BatchMultiCall
BatchMultiCall function class

Parameters:

  1. 1.
    web3 (required) - Web3 instance
  2. 2.
    contractAddress (required) - string Address of FactoryProxy contract
import { BatchMultiCall } from "fct";
​
const batchMultiCall = new BatchMultiCall(web3, contractAddress);

calls

Get all added transactions, which are ready to be signed.

Example:

const calls = batchMultiCall.calls

Returns:

Returns array with batchCallPacked object:
  • typeHash - EIP-712 type hash
  • sessionId - Bytes string, that contains groupId, nonce, afterTimestamp, beforeTimestamp, gasLimit, maxGasPrice and flags.
  • signer - Signer address
  • typedData - EIP-712 Typed data
  • encodedMessage - Whole message encoded
  • encodedLimits - Encoded limits
  • inputData - Unedited input data
  • mcall - Array with MultiCalls:
    • value - Call ETH value
    • to - Call address
    • data - Encoded parameters. If value is 0x - call is an ETH transfer
    • ensHash - Call target ENS Address hashed. If none was provided, value is 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
    • typeHash - EIP-712 type hash for specific call
    • flags - Converted MultiCall flags​
    • functionSignature - hashed method interface
    • gasLimit - Max gas that can be spent in the specific transaction. If value is 0 - no gas limit.
    • encodedMessage - Encoded whole call message
    • encodedDetails - Encoded only details part of the call message

Example:

[
{
"typeHash": "0x..."
"sessionId": "0x...",
"signer": "0x08B7d04533DfAe2d72e693771b339FA6DF08635d",
"typedData": {...},
"encodedMessage": "0x9e64fa4e3069c05a38524f474e6cd871c3f007cb04d0424e5ec12e4dc6ef255253b8dbefdef43e5ac608712b0556bba9c599c3e11346bf7b9ea7e1aff5318cafad29964cb1eb58ece794b703ce6b2374ba7fde7bffbbb55d8297617bc8a13750ef68bcdad4ddde475daca2c2d4a0a436b02ee1e8fd02ec66eee40b4a475637503f272c5cedbe0014c048ff2e35f0547086e310a99b336cb880939ed15591b9ba",
"encodedLimits": "0xbbd703474a0fe976e5ed3dd17e3039ab2659abfdab4e23ce9b75b54470d20799000000000000000000000000000000000000000000000000000005000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffff00000000000000000000000000000000000000000000000000000005d21dba00",
"unhashedCall": {...}, // The same as the input
"mcall": [
{
"value": 0,
"to": "0xE2de2E31c2e78e5C6d4e91aE121a39f34ff49D4a",
"data": "0x...",
"ensHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeHash": "0x...",
"flags": "0",
"functionSignature": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"gasLimit": 0,
"encodedData": "0x...",
"encodedDetails": "0x..."
},
{
"value": 0,
"to": "0xE2de2E31c2e78e5C6d4e91aE121a39f34ff49D4a",
"data": "0x...",
"ensHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeHash": "0x...",
"flags": "0",
"functionSignature": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
"gasLimit": 0,
"encodedData": "0x...",
"encodedDetails": "0x..."
},
{
"value": 10,
"to": "0x08B7d04533DfAe2d72e693771b339FA6DF08635d",
"data": "0x",
"ensHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"typeHash": "0x...",
"flags": "0",
"functionSignature": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"gasLimit": 0,
"encodedData": "0x5fe8cda090ad57b825b8464bef2366af318a276b57f2fc20efa2579fbb022ff36d924b197ee1857085c78c3039110b2144fd80d4acc0eba4971ecb3f1614c66f",
"encodedDetails": "0x73c77b9772adfcfdff9a783d309890c4b96134bce55db2ece4e17354c8ebd66200000000000000000000000008b7d04533dfae2d72e693771b339fa6df08635dc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
}
]
}
]
Copy link
Outline
calls