@fuel-ts/program .MultiCallInvocationScope
Represents a scope for invoking multiple calls.
Name | Type | Description |
---|---|---|
TReturn | any | The type of the return value. |
BaseInvocationScope
<TReturn
>
↳ MultiCallInvocationScope
• new MultiCallInvocationScope<TReturn
>(contract
, funcScopes
): MultiCallInvocationScope
<TReturn
>
Constructs an instance of MultiCallInvocationScope.
Name | Type |
---|---|
TReturn | any |
Name | Type | Description |
---|---|---|
contract | AbstractContract | The contract. |
funcScopes | FunctionInvocationScope <any [], any >[] | An array of function invocation scopes. |
MultiCallInvocationScope
<TReturn
>
BaseInvocationScope<TReturn>.constructor
packages/program/src/functions/multicall-scope.ts:20
• Protected
externalAbis: Record
<string
, JsonAbi
> = {}
BaseInvocationScope.externalAbis
packages/program/src/functions/base-invocation-scope.ts:63
• Protected
functionInvocationScopes: InvocationScopeLike
[] = []
BaseInvocationScope.functionInvocationScopes
packages/program/src/functions/base-invocation-scope.ts:58
• Protected
hasCallParamsGasLimit: boolean
= false
BaseInvocationScope.hasCallParamsGasLimit
packages/program/src/functions/base-invocation-scope.ts:62
• Protected
isMultiCall: boolean
= false
BaseInvocationScope.isMultiCall
packages/program/src/functions/base-invocation-scope.ts:61
• Protected
program: AbstractProgram
BaseInvocationScope.program
packages/program/src/functions/base-invocation-scope.ts:57
• Protected
requiredCoins: CoinQuantity
[] = []
BaseInvocationScope.requiredCoins
packages/program/src/functions/base-invocation-scope.ts:60
• Protected
transactionRequest: ScriptTransactionRequest
BaseInvocationScope.transactionRequest
packages/program/src/functions/base-invocation-scope.ts:56
• Protected
Optional
txParameters: Partial
<{ gasLimit
: BigNumberish
; gasPrice
: BigNumberish
; maturity?
: number
; maxFee?
: BigNumberish
; variableOutputs
: number
; witnessLimit?
: BigNumberish
}>
BaseInvocationScope.txParameters
packages/program/src/functions/base-invocation-scope.ts:59
• get
calls(): ContractCall
[]
Getter for the contract calls.
ContractCall
[]
An array of contract calls.
BaseInvocationScope.calls
packages/program/src/functions/base-invocation-scope.ts:86
▸ addCall(funcScope
): MultiCallInvocationScope
<TReturn
>
Adds a single function invocation scope to the multi-call invocation scope.
Name | Type | Description |
---|---|---|
funcScope | FunctionInvocationScope <any [], any > | The function invocation scope. |
MultiCallInvocationScope
<TReturn
>
The instance of MultiCallInvocationScope.
BaseInvocationScope.addCall
packages/program/src/functions/multicall-scope.ts:32
▸ addCalls(funcScopes
): MultiCallInvocationScope
<TReturn
>
Adds multiple function invocation scopes to the multi-call invocation scope.
Name | Type | Description |
---|---|---|
funcScopes | FunctionInvocationScope <any [], any >[] | An array of function invocation scopes. |
MultiCallInvocationScope
<TReturn
>
The instance of MultiCallInvocationScope.
BaseInvocationScope.addCalls
packages/program/src/functions/multicall-scope.ts:42
▸ addContracts(contracts
): MultiCallInvocationScope
<TReturn
>
Adds contracts to the invocation scope.
Name | Type | Description |
---|---|---|
contracts | AbstractContract [] | An array of contracts to add. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.addContracts
packages/program/src/functions/base-invocation-scope.ts:313
▸ addSigners(signers
): MultiCallInvocationScope
<TReturn
>
MultiCallInvocationScope
<TReturn
>
BaseInvocationScope.addSigners
packages/program/src/functions/base-invocation-scope.ts:339
▸ addTransfer(destination
, amount
, assetId
): MultiCallInvocationScope
<TReturn
>
Adds an asset transfer to an Account on the contract call transaction request.
Name | Type | Description |
---|---|---|
destination | string | AbstractAddress | The address of the destination. |
amount | BigNumberish | The amount of coins to transfer. |
assetId | string | The asset ID of the coins to transfer. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.addTransfer
packages/program/src/functions/base-invocation-scope.ts:329
▸ call<T
>(): Promise
<FunctionInvocationResult
<T
, void
>>
Submits a transaction.
Name | Type |
---|---|
T | TReturn |
Promise
<FunctionInvocationResult
<T
, void
>>
The result of the function invocation.
BaseInvocationScope.call
packages/program/src/functions/base-invocation-scope.ts:361
▸ checkGasLimitTotal(): void
Checks if the total gas limit is within the acceptable range.
void
BaseInvocationScope.checkGasLimitTotal
packages/program/src/functions/base-invocation-scope.ts:208
▸ dryRun<T
>(): Promise
<InvocationCallResult
<T
>>
Executes a transaction in dry run mode.
Name | Type |
---|---|
T | TReturn |
Promise
<InvocationCallResult
<T
>>
The result of the invocation call.
BaseInvocationScope.dryRun
packages/program/src/functions/base-invocation-scope.ts:414
▸ fundWithRequiredCoins(): Promise
<MultiCallInvocationScope
<TReturn
>>
Funds the transaction with the required coins.
Promise
<MultiCallInvocationScope
<TReturn
>>
The current instance of the class.
BaseInvocationScope.fundWithRequiredCoins
packages/program/src/functions/base-invocation-scope.ts:245
▸ get<T
>(): Promise
<InvocationCallResult
<T
>>
Name | Type |
---|---|
T | TReturn |
Promise
<InvocationCallResult
<T
>>
BaseInvocationScope.get
packages/program/src/functions/base-invocation-scope.ts:428
▸ getProvider(): Provider
BaseInvocationScope.getProvider
packages/program/src/functions/base-invocation-scope.ts:442
▸ getRequiredCoins(): CoinQuantity
[]
Gets the required coins for the transaction.
CoinQuantity
[]
An array of required coin quantities.
BaseInvocationScope.getRequiredCoins
packages/program/src/functions/base-invocation-scope.ts:128
▸ getTransactionCost(options?
): Promise
<TransactionCost
>
Gets the transaction cost ny dry running the transaction.
Name | Type | Description |
---|---|---|
options? | Partial <{ fundTransaction : boolean ; gasPrice : BigNumberish }> | Optional transaction cost options. |
Promise
<TransactionCost
>
The transaction cost details.
BaseInvocationScope.getTransactionCost
packages/program/src/functions/base-invocation-scope.ts:227
▸ getTransactionId(chainId?
): Promise
<string
>
Obtains the ID of a transaction.
Name | Type | Description |
---|---|---|
chainId? | number | the chainId to use to hash the transaction with |
Promise
<string
>
the ID of the transaction.
BaseInvocationScope.getTransactionId
packages/program/src/functions/base-invocation-scope.ts:454
▸ getTransactionRequest(): Promise
<ScriptTransactionRequest
>
Prepares and returns the transaction request object.
Promise
<ScriptTransactionRequest
>
The prepared transaction request.
BaseInvocationScope.getTransactionRequest
packages/program/src/functions/base-invocation-scope.ts:351
▸ prepareTransaction(): Promise
<void
>
Prepares the transaction by updating the script request, required coins, and checking the gas limit.
Promise
<void
>
BaseInvocationScope.prepareTransaction
packages/program/src/functions/base-invocation-scope.ts:186
▸ simulate<T
>(): Promise
<InvocationCallResult
<T
>>
Simulates a transaction.
Name | Type |
---|---|
T | TReturn |
Promise
<InvocationCallResult
<T
>>
The result of the invocation call.
BaseInvocationScope.simulate
packages/program/src/functions/base-invocation-scope.ts:387
▸ txParams(txParams
): MultiCallInvocationScope
<TReturn
>
Sets the transaction parameters.
Name | Type | Description |
---|---|---|
txParams | Partial <{ gasLimit : BigNumberish ; gasPrice : BigNumberish ; maturity? : number ; maxFee? : BigNumberish ; variableOutputs : number ; witnessLimit? : BigNumberish }> | The transaction parameters to set. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.txParams
packages/program/src/functions/base-invocation-scope.ts:289
▸ updateContractInputAndOutput(): void
Updates the transaction request with the current input/output.
void
BaseInvocationScope.updateContractInputAndOutput
packages/program/src/functions/base-invocation-scope.ts:114
▸ updateRequiredCoins(): void
Updates the required coins for the transaction.
void
BaseInvocationScope.updateRequiredCoins
packages/program/src/functions/base-invocation-scope.ts:141
▸ updateScriptRequest(): void
Updates the script request with the current contract calls.
void
BaseInvocationScope.updateScriptRequest
packages/program/src/functions/base-invocation-scope.ts:105
▸ validateHeapTypeReturnCalls(): void
void