@celo/contractkit"wrappers/MetaTransactionWallet"

Module: "wrappers/MetaTransactionWallet"

Index

Classes

Interfaces

Type aliases

Functions

Type aliases

TransactionInput

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

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

Functions

Const buildMetaTxTypedData

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

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

Parameters:

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.

Parameters:

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.

Parameters:

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[]