Skip to main content
Version: Next

Namespace: transaction

Functions

buildUDCCall

buildUDCCall(payload, address): Object

Builds a UDCCall object.

Parameters

NameTypeDescription
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]The payload data for the UDCCall. Can be a single payload object or an array of payload objects .
addressstringThe address to be used in the UDCCall.

Returns

Object

  • The UDCCall object containing an array of calls and an array of addresses.
NameType
calls{ contractAddress: string = UDC.ADDRESS; entrypoint: string = UDC.ENTRYPOINT; calldata: BigNumberish[] }[]
addressesstring[]

Defined in

src/utils/transaction.ts:109


getVersionsByType

getVersionsByType(versionType?): Object

Return transaction versions based on version type, default version type is 'transaction'

Parameters

NameType
versionType?"fee" | "transaction"

Returns

Object

NameType
v1ETransactionVersion
v2ETransactionVersion
v3ETransactionVersion

Defined in

src/utils/transaction.ts:154


transformCallsToMulticallArrays

transformCallsToMulticallArrays(calls): Object

Transforms a list of Calls, each with their own calldata, into two arrays: one with the entry points, and one with the concatenated calldata

Parameters

NameType
callsCall[]

Returns

Object

NameType
callArrayParsedStruct[]
calldataCalldata

Defined in

src/utils/transaction.ts:23


fromCallsToExecuteCalldata

fromCallsToExecuteCalldata(calls): Calldata

Transforms a list of calls into the Cairo 0 __execute__ calldata.

Parameters

NameType
callsCall[]

Returns

Calldata

Defined in

src/utils/transaction.ts:45


fromCallsToExecuteCalldataWithNonce

fromCallsToExecuteCalldataWithNonce(calls, nonce): Calldata

Transforms a list of calls into the Cairo 0 __execute__ calldata including nonce.

Parameters

NameType
callsCall[]
nonceBigNumberish

Returns

Calldata

Deprecated

Defined in

src/utils/transaction.ts:56


transformCallsToMulticallArrays_cairo1

transformCallsToMulticallArrays_cairo1(calls): CallStruct[]

Format Data inside Calls

Parameters

NameType
callsCall[]

Returns

CallStruct[]

Deprecated

Not required for getting execute Calldata

Defined in

src/utils/transaction.ts:65


fromCallsToExecuteCalldata_cairo1

fromCallsToExecuteCalldata_cairo1(calls): Calldata

Transforms a list of calls into the Cairo 1 __execute__ calldata.

Parameters

NameType
callsCall[]

Returns

Calldata

Defined in

src/utils/transaction.ts:77


getExecuteCalldata

getExecuteCalldata(calls, cairoVersion?): Calldata

Create __execute__ Calldata from Calls based on Cairo versions

Parameters

NameTypeDefault value
callsCall[]undefined
cairoVersionCairoVersion'0'

Returns

Calldata

Defined in

src/utils/transaction.ts:94