Module: "wrappers/MetaTransactionWallet"




Type aliases


Type aliases


Ƭ TransactionInput: CeloTxObject‹T› | TransactionObjectWithValue‹T› | RawTransaction

Defined in packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts:27


Const buildMetaTxTypedData

buildMetaTxTypedData(walletAddress: Address, tx: RawTransaction, nonce: number, chainId: number): EIP712TypedData

Defined in packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts:255


Name Type
walletAddress Address
tx RawTransaction
nonce number
chainId number

Returns: EIP712TypedData

Const toRawTransaction

toRawTransaction(tx: TransactionInput‹any›): RawTransaction

Defined in packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts:210

Turns any possible way to pass in a transaction into the raw values that are actually required. This is used both internally to normalize ways in which transactions are passed in but also public in order for one instance of ContractKit to serialize a meta transaction to send over the wire and be consumed somewhere else.


Name Type Description
tx TransactionInput‹any› TransactionInput union of all the ways we expect transactions

Returns: RawTransaction

a RawTransactions that's serializable

Const toTransactionBatch

toTransactionBatch(txs: Array‹TransactionInput‹any››): object

Defined in packages/sdk/contractkit/src/wrappers/MetaTransactionWallet.ts:238

Turns an array of transaction inputs into the argument that need to be passed to the executeTransactions call. Main transformation is that all the data parts of each transaction in the batch are concatenated and an array of lengths is constructed. This is a gas optimisation on the contract.


Name Type Description
txs Array‹TransactionInput‹any›› Array> array of txs

Returns: object

Params for the executeTransactions method call

  • callData: string

  • callDataLengths: number[]

  • destinations: string[]

  • values: string[]