@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
functions/multicall-scope.ts:19
• Protected
externalAbis: Record
<string
, JsonAbi
> = {}
BaseInvocationScope.externalAbis
functions/base-invocation-scope.ts:56
• Protected
functionInvocationScopes: InvocationScopeLike
[] = []
BaseInvocationScope.functionInvocationScopes
functions/base-invocation-scope.ts:51
• Protected
hasCallParamsGasLimit: boolean
= false
BaseInvocationScope.hasCallParamsGasLimit
functions/base-invocation-scope.ts:55
• Protected
isMultiCall: boolean
= false
BaseInvocationScope.isMultiCall
functions/base-invocation-scope.ts:54
• Protected
program: AbstractProgram
BaseInvocationScope.program
functions/base-invocation-scope.ts:50
• Protected
requiredCoins: CoinQuantity
[] = []
BaseInvocationScope.requiredCoins
functions/base-invocation-scope.ts:53
• Protected
transactionRequest: ScriptTransactionRequest
BaseInvocationScope.transactionRequest
functions/base-invocation-scope.ts:49
• Protected
Optional
txParameters: Partial
<{ gasLimit
: BigNumberish
; maturity?
: number
; maxFee?
: BigNumberish
; tip
: BigNumberish
; variableOutputs
: number
; witnessLimit?
: BigNumberish
}>
BaseInvocationScope.txParameters
functions/base-invocation-scope.ts:52
• get
calls(): ContractCall
[]
Getter for the contract calls.
ContractCall
[]
An array of contract calls.
BaseInvocationScope.calls
functions/base-invocation-scope.ts:78
▸ addBatchTransfer(transferParams
): MultiCallInvocationScope
<TReturn
>
Adds multiple transfers to the contract call transaction request.
Name | Type | Description |
---|---|---|
transferParams | TransferParams [] | An array of TransferParams objects representing the transfers to be made. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.addBatchTransfer
functions/base-invocation-scope.ts:329
▸ 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
functions/multicall-scope.ts:30
▸ 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
functions/multicall-scope.ts:40
▸ 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
functions/base-invocation-scope.ts:297
▸ addSigners(signers
): MultiCallInvocationScope
<TReturn
>
MultiCallInvocationScope
<TReturn
>
BaseInvocationScope.addSigners
functions/base-invocation-scope.ts:342
▸ addTransfer(transferParams
): MultiCallInvocationScope
<TReturn
>
Adds an asset transfer to an Account on the contract call transaction request.
Name | Type | Description |
---|---|---|
transferParams | TransferParams | The object representing the transfer to be made. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.addTransfer
functions/base-invocation-scope.ts:311
▸ 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
functions/base-invocation-scope.ts:364
▸ checkGasLimitTotal(): void
Checks if the total gas limit is within the acceptable range.
void
BaseInvocationScope.checkGasLimitTotal
functions/base-invocation-scope.ts:207
▸ 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
functions/base-invocation-scope.ts:410
▸ fundWithRequiredCoins(): Promise
<ScriptTransactionRequest
>
Funds the transaction with the required coins.
Promise
<ScriptTransactionRequest
>
The current instance of the class.
BaseInvocationScope.fundWithRequiredCoins
functions/base-invocation-scope.ts:244
▸ get<T
>(): Promise
<InvocationCallResult
<T
>>
Name | Type |
---|---|
T | TReturn |
Promise
<InvocationCallResult
<T
>>
BaseInvocationScope.get
functions/base-invocation-scope.ts:424
▸ getProvider(): Provider
BaseInvocationScope.getProvider
functions/base-invocation-scope.ts:438
▸ getRequiredCoins(): CoinQuantity
[]
Gets the required coins for the transaction.
CoinQuantity
[]
An array of required coin quantities.
BaseInvocationScope.getRequiredCoins
functions/base-invocation-scope.ts:127
▸ getTransactionCost(): Promise
<TransactionCost
>
Gets the transaction cost ny dry running the transaction.
Promise
<TransactionCost
>
The transaction cost details.
BaseInvocationScope.getTransactionCost
functions/base-invocation-scope.ts:226
▸ 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
functions/base-invocation-scope.ts:450
▸ getTransactionRequest(): Promise
<ScriptTransactionRequest
>
Prepares and returns the transaction request object.
Promise
<ScriptTransactionRequest
>
The prepared transaction request.
BaseInvocationScope.getTransactionRequest
functions/base-invocation-scope.ts:354
▸ prepareTransaction(): Promise
<void
>
Prepares the transaction by updating the script request, required coins, and checking the gas limit.
Promise
<void
>
BaseInvocationScope.prepareTransaction
functions/base-invocation-scope.ts:185
▸ simulate<T
>(): Promise
<InvocationCallResult
<T
>>
Simulates a transaction.
Name | Type |
---|---|
T | TReturn |
Promise
<InvocationCallResult
<T
>>
The result of the invocation call.
BaseInvocationScope.simulate
functions/base-invocation-scope.ts:387
▸ txParams(txParams
): MultiCallInvocationScope
<TReturn
>
Sets the transaction parameters.
Name | Type | Description |
---|---|---|
txParams | Partial <{ gasLimit : BigNumberish ; maturity? : number ; maxFee? : BigNumberish ; tip : BigNumberish ; variableOutputs : number ; witnessLimit? : BigNumberish }> | The transaction parameters to set. |
MultiCallInvocationScope
<TReturn
>
The current instance of the class.
BaseInvocationScope.txParams
functions/base-invocation-scope.ts:276
▸ updateContractInputAndOutput(): void
Updates the transaction request with the current input/output.
void
BaseInvocationScope.updateContractInputAndOutput
functions/base-invocation-scope.ts:108
▸ updateRequiredCoins(): void
Updates the required coins for the transaction.
void
BaseInvocationScope.updateRequiredCoins
functions/base-invocation-scope.ts:140
▸ updateScriptRequest(): void
Updates the script request with the current contract calls.
void
BaseInvocationScope.updateScriptRequest