Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link
MultiCallInvocationScope

Icon LinkClass: MultiCallInvocationScope<TReturn>

@fuel-ts/program .MultiCallInvocationScope

Represents a scope for invoking multiple calls.

Icon LinkType parameters

NameTypeDescription
TReturnanyThe type of the return value.

Icon LinkHierarchy

  • BaseInvocationScope<TReturn>

    MultiCallInvocationScope

Icon LinkConstructors

Icon Linkconstructor

new MultiCallInvocationScope<TReturn>(contract, funcScopes): MultiCallInvocationScope <TReturn>

Constructs an instance of MultiCallInvocationScope.

Icon LinkType parameters

NameType
TReturnany

Icon LinkParameters

NameTypeDescription
contractAbstractContract The contract.
funcScopesFunctionInvocationScope <any[], any>[]An array of function invocation scopes.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

Icon LinkOverrides

BaseInvocationScope<TReturn&gt;.constructor

Icon LinkDefined in

functions/multicall-scope.ts:20 Icon Link

Icon LinkProperties

Icon LinkexternalAbis

Protected externalAbis: Record<string, JsonAbi> = {}

Icon LinkInherited from

BaseInvocationScope.externalAbis

Icon LinkDefined in

functions/base-invocation-scope.ts:65 Icon Link


Icon LinkfunctionInvocationScopes

Protected functionInvocationScopes: InvocationScopeLike [] = []

Icon LinkInherited from

BaseInvocationScope.functionInvocationScopes

Icon LinkDefined in

functions/base-invocation-scope.ts:60 Icon Link


Icon LinkhasCallParamsGasLimit

Protected hasCallParamsGasLimit: boolean = false

Icon LinkInherited from

BaseInvocationScope.hasCallParamsGasLimit

Icon LinkDefined in

functions/base-invocation-scope.ts:64 Icon Link


Icon LinkisMultiCall

Protected isMultiCall: boolean = false

Icon LinkInherited from

BaseInvocationScope.isMultiCall

Icon LinkDefined in

functions/base-invocation-scope.ts:63 Icon Link


Icon Linkprogram

Protected program: AbstractProgram

Icon LinkInherited from

BaseInvocationScope.program

Icon LinkDefined in

functions/base-invocation-scope.ts:59 Icon Link


Icon LinkrequiredCoins

Protected requiredCoins: CoinQuantity [] = []

Icon LinkInherited from

BaseInvocationScope.requiredCoins

Icon LinkDefined in

functions/base-invocation-scope.ts:62 Icon Link


Icon LinktransactionRequest

Protected transactionRequest: ScriptTransactionRequest

Icon LinkInherited from

BaseInvocationScope.transactionRequest

Icon LinkDefined in

functions/base-invocation-scope.ts:58 Icon Link


Icon LinktxParameters

Protected Optional txParameters: Partial<{ gasLimit: BigNumberish ; gasPrice: BigNumberish ; maturity?: number ; maxFee?: BigNumberish ; variableOutputs: number ; witnessLimit?: BigNumberish }>

Icon LinkInherited from

BaseInvocationScope.txParameters

Icon LinkDefined in

functions/base-invocation-scope.ts:61 Icon Link

Icon LinkAccessors

Icon Linkcalls

get calls(): ContractCall []

Getter for the contract calls.

Icon LinkReturns

ContractCall []

An array of contract calls.

Icon LinkInherited from

BaseInvocationScope.calls

Icon LinkDefined in

functions/base-invocation-scope.ts:88 Icon Link

Icon LinkMethods

Icon LinkaddCall

addCall(funcScope): MultiCallInvocationScope <TReturn>

Adds a single function invocation scope to the multi-call invocation scope.

Icon LinkParameters

NameTypeDescription
funcScopeFunctionInvocationScope <any[], any>The function invocation scope.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

The instance of MultiCallInvocationScope.

Icon LinkOverrides

BaseInvocationScope.addCall

Icon LinkDefined in

functions/multicall-scope.ts:32 Icon Link


Icon LinkaddCalls

addCalls(funcScopes): MultiCallInvocationScope <TReturn>

Adds multiple function invocation scopes to the multi-call invocation scope.

Icon LinkParameters

NameTypeDescription
funcScopesFunctionInvocationScope <any[], any>[]An array of function invocation scopes.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

The instance of MultiCallInvocationScope.

Icon LinkOverrides

BaseInvocationScope.addCalls

Icon LinkDefined in

functions/multicall-scope.ts:42 Icon Link


Icon LinkaddContracts

addContracts(contracts): MultiCallInvocationScope <TReturn>

Adds contracts to the invocation scope.

Icon LinkParameters

NameTypeDescription
contractsAbstractContract []An array of contracts to add.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

The current instance of the class.

Icon LinkInherited from

BaseInvocationScope.addContracts

Icon LinkDefined in

functions/base-invocation-scope.ts:315 Icon Link


Icon LinkaddSigners

addSigners(signers): MultiCallInvocationScope <TReturn>

Icon LinkParameters

NameType
signersAccount | Account []

Icon LinkReturns

MultiCallInvocationScope <TReturn>

Icon LinkInherited from

BaseInvocationScope.addSigners

Icon LinkDefined in

functions/base-invocation-scope.ts:341 Icon Link


Icon LinkaddTransfer

addTransfer(destination, amount, assetId): MultiCallInvocationScope <TReturn>

Adds an asset transfer to an Account on the contract call transaction request.

Icon LinkParameters

NameTypeDescription
destinationstring | AbstractAddress The address of the destination.
amountBigNumberishThe amount of coins to transfer.
assetIdstringThe asset ID of the coins to transfer.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

The current instance of the class.

Icon LinkInherited from

BaseInvocationScope.addTransfer

Icon LinkDefined in

functions/base-invocation-scope.ts:331 Icon Link


Icon Linkcall

call<T>(): Promise<FunctionInvocationResult <T, void>>

Submits a transaction.

Icon LinkType parameters

NameType
TTReturn

Icon LinkReturns

Promise<FunctionInvocationResult <T, void>>

The result of the function invocation.

Icon LinkInherited from

BaseInvocationScope.call

Icon LinkDefined in

functions/base-invocation-scope.ts:363 Icon Link


Icon LinkcheckGasLimitTotal

checkGasLimitTotal(): void

Checks if the total gas limit is within the acceptable range.

Icon LinkReturns

void

Icon LinkInherited from

BaseInvocationScope.checkGasLimitTotal

Icon LinkDefined in

functions/base-invocation-scope.ts:210 Icon Link


Icon LinkdryRun

dryRun<T>(): Promise<InvocationCallResult <T>>

Executes a transaction in dry run mode.

Icon LinkType parameters

NameType
TTReturn

Icon LinkReturns

Promise<InvocationCallResult <T>>

The result of the invocation call.

Icon LinkInherited from

BaseInvocationScope.dryRun

Icon LinkDefined in

functions/base-invocation-scope.ts:416 Icon Link


Icon LinkfundWithRequiredCoins

fundWithRequiredCoins(): Promise<MultiCallInvocationScope <TReturn>>

Funds the transaction with the required coins.

Icon LinkReturns

Promise<MultiCallInvocationScope <TReturn>>

The current instance of the class.

Icon LinkInherited from

BaseInvocationScope.fundWithRequiredCoins

Icon LinkDefined in

functions/base-invocation-scope.ts:247 Icon Link


Icon Linkget

get<T>(): Promise<InvocationCallResult <T>>

Icon LinkType parameters

NameType
TTReturn

Icon LinkReturns

Promise<InvocationCallResult <T>>

Icon LinkInherited from

BaseInvocationScope.get

Icon LinkDefined in

functions/base-invocation-scope.ts:430 Icon Link


Icon LinkgetProvider

getProvider(): Provider

Icon LinkReturns

Provider

Icon LinkInherited from

BaseInvocationScope.getProvider

Icon LinkDefined in

functions/base-invocation-scope.ts:444 Icon Link


Icon LinkgetRequiredCoins

getRequiredCoins(): CoinQuantity []

Gets the required coins for the transaction.

Icon LinkReturns

CoinQuantity []

An array of required coin quantities.

Icon LinkInherited from

BaseInvocationScope.getRequiredCoins

Icon LinkDefined in

functions/base-invocation-scope.ts:130 Icon Link


Icon LinkgetTransactionCost

getTransactionCost(options?): Promise<TransactionCost >

Gets the transaction cost ny dry running the transaction.

Icon LinkParameters

NameTypeDescription
options?Partial<{ fundTransaction: boolean ; gasPrice: BigNumberish }>Optional transaction cost options.

Icon LinkReturns

Promise<TransactionCost >

The transaction cost details.

Icon LinkInherited from

BaseInvocationScope.getTransactionCost

Icon LinkDefined in

functions/base-invocation-scope.ts:229 Icon Link


Icon LinkgetTransactionId

getTransactionId(chainId?): Promise<string>

Obtains the ID of a transaction.

Icon LinkParameters

NameTypeDescription
chainId?numberthe chainId to use to hash the transaction with

Icon LinkReturns

Promise<string>

the ID of the transaction.

Icon LinkInherited from

BaseInvocationScope.getTransactionId

Icon LinkDefined in

functions/base-invocation-scope.ts:456 Icon Link


Icon LinkgetTransactionRequest

getTransactionRequest(): Promise<ScriptTransactionRequest >

Prepares and returns the transaction request object.

Icon LinkReturns

Promise<ScriptTransactionRequest >

The prepared transaction request.

Icon LinkInherited from

BaseInvocationScope.getTransactionRequest

Icon LinkDefined in

functions/base-invocation-scope.ts:353 Icon Link


Icon LinkprepareTransaction

prepareTransaction(): Promise<void>

Prepares the transaction by updating the script request, required coins, and checking the gas limit.

Icon LinkReturns

Promise<void>

Icon LinkInherited from

BaseInvocationScope.prepareTransaction

Icon LinkDefined in

functions/base-invocation-scope.ts:188 Icon Link


Icon Linksimulate

simulate<T>(): Promise<InvocationCallResult <T>>

Simulates a transaction.

Icon LinkType parameters

NameType
TTReturn

Icon LinkReturns

Promise<InvocationCallResult <T>>

The result of the invocation call.

Icon LinkInherited from

BaseInvocationScope.simulate

Icon LinkDefined in

functions/base-invocation-scope.ts:389 Icon Link


Icon LinktxParams

txParams(txParams): MultiCallInvocationScope <TReturn>

Sets the transaction parameters.

Icon LinkParameters

NameTypeDescription
txParamsPartial<{ gasLimit: BigNumberish ; gasPrice: BigNumberish ; maturity?: number ; maxFee?: BigNumberish ; variableOutputs: number ; witnessLimit?: BigNumberish }>The transaction parameters to set.

Icon LinkReturns

MultiCallInvocationScope <TReturn>

The current instance of the class.

Icon LinkInherited from

BaseInvocationScope.txParams

Icon LinkDefined in

functions/base-invocation-scope.ts:291 Icon Link


Icon LinkupdateContractInputAndOutput

updateContractInputAndOutput(): void

Updates the transaction request with the current input/output.

Icon LinkReturns

void

Icon LinkInherited from

BaseInvocationScope.updateContractInputAndOutput

Icon LinkDefined in

functions/base-invocation-scope.ts:116 Icon Link


Icon LinkupdateRequiredCoins

updateRequiredCoins(): void

Updates the required coins for the transaction.

Icon LinkReturns

void

Icon LinkInherited from

BaseInvocationScope.updateRequiredCoins

Icon LinkDefined in

functions/base-invocation-scope.ts:143 Icon Link


Icon LinkupdateScriptRequest

updateScriptRequest(): void

Updates the script request with the current contract calls.

Icon LinkReturns

void

Icon LinkInherited from

BaseInvocationScope.updateScriptRequest

Icon LinkDefined in

functions/base-invocation-scope.ts:107 Icon Link


Icon LinkvalidateHeapTypeReturnCalls

validateHeapTypeReturnCalls(): void

Icon LinkReturns

void

Icon LinkDefined in

functions/multicall-scope.ts:46 Icon Link