Skip to main content
Version: Next

Class: AccountInterface

Hierarchy​

Implemented by​

Constructors​

constructor​

• new AccountInterface(): AccountInterface

Returns​

AccountInterface

Inherited from​

ProviderInterface.constructor

Properties​

address​

• Abstract address: string

Defined in​

src/account/interface.ts:35


signer​

• Abstract signer: SignerInterface

Defined in​

src/account/interface.ts:37


cairoVersion​

• Abstract cairoVersion: CairoVersion

Defined in​

src/account/interface.ts:39


channel​

• Abstract channel: RpcChannel | RpcChannel

Inherited from​

ProviderInterface.channel

Defined in​

src/provider/interface.ts:37

Methods​

estimateInvokeFee​

â–¸ estimateInvokeFee(calls, estimateFeeDetails?): Promise<EstimateFeeResponse>

Estimate Fee for executing an INVOKE transaction on starknet

Parameters​

NameTypeDescription
callsAllowArray<Call>the invocation object containing: - contractAddress - the address of the contract - entrypoint - the entrypoint of the contract - calldata? - (defaults to []) the calldata
estimateFeeDetails?EstimateFeeDetailsblockIdentifier? - nonce? = 0 - skipValidate? - default true - tip? - prioritize order of transactions in the mempool. - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction) - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337) - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei

Returns​

Promise<EstimateFeeResponse>

response from estimate_fee

Defined in​

src/account/interface.ts:62


estimateDeclareFee​

â–¸ estimateDeclareFee(contractPayload, estimateFeeDetails?): Promise<EstimateFeeResponse>

Estimate Fee for executing a DECLARE transaction on starknet

Parameters​

NameTypeDescription
contractPayloadDeclareContractPayloadthe payload object containing: - contract - the compiled contract to be declared - casm? - compiled cairo assembly. Cairo1(casm or compiledClassHash are required) - classHash? - the class hash of the compiled contract. Precalculate for faster execution. - compiledClassHash?: class hash of the cairo assembly. Cairo1(casm or compiledClassHash are required)
estimateFeeDetails?EstimateFeeDetailsblockIdentifier? - nonce? = 0 - skipValidate? - default true - tip? - prioritize order of transactions in the mempool. - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction) - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337) - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei

Returns​

Promise<EstimateFeeResponse>

response from estimate_fee

Defined in​

src/account/interface.ts:89


estimateAccountDeployFee​

â–¸ estimateAccountDeployFee(contractPayload, estimateFeeDetails?): Promise<EstimateFeeResponse>

Estimate Fee for executing a DEPLOY_ACCOUNT transaction on starknet

Parameters​

NameTypeDescription
contractPayloadDeployAccountContractPayloadclassHash - the class hash of the compiled contract. - constructorCalldata? - constructor data; - contractAddress? - future account contract address. Precalculate for faster execution. - addressSalt? - salt used for calculation of the contractAddress. Required if contractAddress is provided.
estimateFeeDetails?EstimateFeeDetailsblockIdentifier? - nonce? = 0 - skipValidate? - default true - tip? - prioritize order of transactions in the mempool. - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337) - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei

Returns​

Promise<EstimateFeeResponse>

response from estimate_fee

Defined in​

src/account/interface.ts:115


estimateDeployFee​

â–¸ estimateDeployFee(deployContractPayload, estimateFeeDetails?): Promise<EstimateFeeResponse>

Estimate Fee for executing a UDC DEPLOY transaction on starknet This is different from the normal DEPLOY transaction as it goes through the Universal Deployer Contract (UDC)

Parameters​

NameTypeDescription
deployContractPayloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]array or singular - classHash: computed class hash of compiled contract - salt: address salt - unique: bool if true ensure unique salt - constructorCalldata: constructor calldata
estimateFeeDetails?EstimateFeeDetailsblockIdentifier? - nonce? - skipValidate? - default true - tip? - prioritize order of transactions in the mempool. - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction) - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337) - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition) - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei

Returns​

Promise<EstimateFeeResponse>

Defined in​

src/account/interface.ts:141


estimateFeeBulk​

â–¸ estimateFeeBulk(invocations, details?): Promise<EstimateFeeResponseBulk>

Estimate Fee for executing a list of transactions on starknet Contract must be deployed for fee estimation to be possible

Parameters​

NameType
invocationsInvocations
details?EstimateFeeDetails

Returns​

Promise<EstimateFeeResponseBulk>

response from estimate_fee

Defined in​

src/account/interface.ts:167


getSuggestedFee​

â–¸ getSuggestedFee(estimateFeeAction, details): Promise<EstimateFee>

Gets Suggested Max Fee based on the transaction type

Parameters​

NameType
estimateFeeActionEstimateFeeAction
detailsEstimateFeeDetails

Returns​

Promise<EstimateFee>

EstimateFee (...response, resourceBounds, suggestedMaxFee)

Defined in​

src/account/interface.ts:179


simulateTransaction​

â–¸ simulateTransaction(invocations, details?): Promise<SimulateTransactionResponse>

Simulates an array of transaction and returns an array of transaction trace and estimated fee.

Parameters​

NameTypeDescription
invocationsInvocationsInvocations containing: - type - transaction type: DECLARE, (multi)DEPLOY, DEPLOY_ACCOUNT, (multi)INVOKE_FUNCTION
details?SimulateTransactionDetailsSimulateTransactionDetails

Returns​

Promise<SimulateTransactionResponse>

response from simulate_transaction

Defined in​

src/account/interface.ts:193


execute​

â–¸ execute(transactions, abis?, transactionsDetail?): Promise<{ transaction_hash: string }>

Invoke execute function in account contract

Parameters​

NameTypeDescription
transactionsAllowArray<Call>the invocation object or an array of them, containing: - contractAddress - the address of the contract - entrypoint - the entrypoint of the contract - calldata - (defaults to []) the calldata - signature - (defaults to []) the signature
abis?Abi[]-
transactionsDetail?InvocationsDetails-

Returns​

Promise<{ transaction_hash: string }>

response from addTransaction

Defined in​

src/account/interface.ts:210


declare​

â–¸ declare(contractPayload, transactionsDetail?): Promise<{ class_hash: string ; transaction_hash: string }>

Declares a given compiled contract (json) to starknet

Parameters​

NameTypeDescription
contractPayloadDeclareContractPayloadtransaction payload to be deployed containing: - contract: compiled contract code - (optional) classHash: computed class hash of compiled contract. Pre-compute it for faster execution. - (required for Cairo1 without compiledClassHash) casm: CompiledContract | string; - (optional for Cairo1 with casm) compiledClassHash: compiled class hash from casm. Pre-compute it for faster execution.
transactionsDetail?InvocationsDetailsInvocationsDetails

Returns​

Promise<{ class_hash: string ; transaction_hash: string }>

a confirmation of sending a transaction on the starknet contract

Defined in​

src/account/interface.ts:228


deploy​

â–¸ deploy(payload, details?): Promise<MultiDeployContractResponse>

Deploys a declared contract to starknet - using Universal Deployer Contract (UDC) support multicall

Parameters​

NameTypeDescription
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]classHash: computed class hash of compiled contract - [constructorCalldata] contract constructor calldata - [salt=pseudorandom] deploy address salt - [unique=true] ensure unique salt
details?InvocationsDetailsInvocationsDetails

Returns​

Promise<MultiDeployContractResponse>

  • contract_address[]
  • transaction_hash

Defined in​

src/account/interface.ts:248


deployContract​

â–¸ deployContract(payload, details?): Promise<DeployContractUDCResponse>

Simplify deploy simulating old DeployContract with same response + UDC specific response Internal wait for L2 transaction, support multicall

Parameters​

NameTypeDescription
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]classHash: computed class hash of compiled contract - [constructorCalldata] contract constructor calldata - [salt=pseudorandom] deploy address salt - [unique=true] ensure unique salt
details?InvocationsDetailsInvocationsDetails

Returns​

Promise<DeployContractUDCResponse>

  • contract_address
  • transaction_hash
  • address
  • deployer
  • unique
  • classHash
  • calldata_len
  • calldata
  • salt

Defined in​

src/account/interface.ts:275


declareAndDeploy​

â–¸ declareAndDeploy(payload, details?): Promise<DeclareDeployUDCResponse>

Declares and Deploy a given compiled contract (json) to starknet using UDC Internal wait for L2 transaction, do not support multicall Method will pass even if contract is already declared (internal using DeclareIfNot)

Parameters​

NameTypeDescription
payloadDeclareAndDeployContractPayloadcontract: compiled contract code - [casm=cairo1]: CairoAssembly | undefined; - [compiledClassHash]: string | undefined; - [classHash]: computed class hash of compiled contract - [constructorCalldata] contract constructor calldata - [salt=pseudorandom] deploy address salt - [unique=true] ensure unique salt
details?InvocationsDetailsInvocationsDetails

Returns​

Promise<DeclareDeployUDCResponse>

  • declare
    • transaction_hash
  • deploy
    • contract_address
    • transaction_hash
    • address
    • deployer
    • unique
    • classHash
    • calldata_len
    • calldata
    • salt

Defined in​

src/account/interface.ts:309


deployAccount​

â–¸ deployAccount(contractPayload, transactionsDetail?): Promise<DeployContractResponse>

Deploy the account on Starknet

Parameters​

NameTypeDescription
contractPayloadDeployAccountContractPayloadtransaction payload to be deployed containing: - classHash: computed class hash of compiled contract - optional constructor calldata - optional address salt - optional contractAddress
transactionsDetail?InvocationsDetailsInvocationsDetails

Returns​

Promise<DeployContractResponse>

a confirmation of sending a transaction on the starknet contract

Defined in​

src/account/interface.ts:326


signMessage​

â–¸ signMessage(typedData): Promise<Signature>

Signs a JSON object for off-chain usage with the Starknet private key and returns the signature This adds a message prefix so it can't be interchanged with transactions

Parameters​

NameType
typedDataTypedData

Returns​

Promise<Signature>

the signature of the JSON object

Throws

if the JSON object is not a valid JSON

Defined in​

src/account/interface.ts:339


hashMessage​

â–¸ hashMessage(typedData): Promise<string>

Hash a JSON object with Pedersen hash and return the hash This adds a message prefix so it can't be interchanged with transactions

Parameters​

NameType
typedDataTypedData

Returns​

Promise<string>

the hash of the JSON object

Throws

if the JSON object is not a valid JSON

Defined in​

src/account/interface.ts:349


verifyMessage​

â–¸ verifyMessage(typedData, signature): Promise<boolean>

Verify a signature of a JSON object

Parameters​

NameTypeDescription
typedDataTypedDataJSON object to be verified
signatureSignaturesignature of the JSON object

Returns​

Promise<boolean>

true if the signature is valid, false otherwise

Throws

if the JSON object is not a valid JSON or the signature is not a valid signature

Defined in​

src/account/interface.ts:359


verifyMessageHash​

â–¸ verifyMessageHash(hash, signature): Promise<boolean>

Verify a signature of a given hash

Parameters​

NameTypeDescription
hashBigNumberishhash to be verified
signatureSignaturesignature of the hash

Returns​

Promise<boolean>

true if the signature is valid, false otherwise

Warning

This method is not recommended, use verifyMessage instead

Throws

if the signature is not a valid signature

Defined in​

src/account/interface.ts:370


getNonce​

â–¸ getNonce(blockIdentifier?): Promise<string>

Gets the nonce of the account with respect to a specific block

Parameters​

NameTypeDescription
blockIdentifier?BlockIdentifieroptional blockIdentifier. Defaults to 'pending'

Returns​

Promise<string>

nonce of the account

Defined in​

src/account/interface.ts:378


getChainId​

â–¸ getChainId(): Promise<StarknetChainId>

Gets the Starknet chain Id

Returns​

Promise<StarknetChainId>

the chain Id

Inherited from​

ProviderInterface.getChainId

Defined in​

src/provider/interface.ts:44


callContract​

â–¸ callContract(call, blockIdentifier?): Promise<CallContractResponse>

Calls a function on the Starknet contract.

Parameters​

NameTypeDescription
callCalltransaction to be called
blockIdentifier?BlockIdentifierblock identifier

Returns​

Promise<CallContractResponse>

the result of the function on the smart contract.

Inherited from​

ProviderInterface.callContract

Defined in​

src/provider/interface.ts:53


getBlock​

â–¸ getBlock(): Promise<PendingBlock>

Gets the block information

Returns​

Promise<PendingBlock>

the block object

Inherited from​

ProviderInterface.getBlock

Defined in​

src/provider/interface.ts:64

â–¸ getBlock(blockIdentifier): Promise<PendingBlock>

Parameters​

NameType
blockIdentifier"pending"

Returns​

Promise<PendingBlock>

Inherited from​

ProviderInterface.getBlock

Defined in​

src/provider/interface.ts:65

â–¸ getBlock(blockIdentifier): Promise<Block>

Parameters​

NameType
blockIdentifier"latest"

Returns​

Promise<Block>

Inherited from​

ProviderInterface.getBlock

Defined in​

src/provider/interface.ts:66

â–¸ getBlock(blockIdentifier): Promise<GetBlockResponse>

Parameters​

NameType
blockIdentifierBlockIdentifier

Returns​

Promise<GetBlockResponse>

Inherited from​

ProviderInterface.getBlock

Defined in​

src/provider/interface.ts:67


getClassAt​

â–¸ getClassAt(contractAddress, blockIdentifier?): Promise<ContractClassResponse>

Gets the contract class of the deployed contract.

Parameters​

NameTypeDescription
contractAddressstringcontract address
blockIdentifier?BlockIdentifierblock identifier

Returns​

Promise<ContractClassResponse>

Contract class of compiled contract

Inherited from​

ProviderInterface.getClassAt

Defined in​

src/provider/interface.ts:76


getClassHashAt​

â–¸ getClassHashAt(contractAddress, blockIdentifier?): Promise<string>

Returns the contract class hash in the given block for the contract deployed at the given address

Parameters​

NameTypeDescription
contractAddressstringcontract address
blockIdentifier?BlockIdentifierblock identifier

Returns​

Promise<string>

Class hash

Inherited from​

ProviderInterface.getClassHashAt

Defined in​

src/provider/interface.ts:88


getClassByHash​

â–¸ getClassByHash(classHash): Promise<ContractClassResponse>

Returns the contract class deployed under the given class hash.

Parameters​

NameTypeDescription
classHashstringclass hash

Returns​

Promise<ContractClassResponse>

Contract class of compiled contract

Inherited from​

ProviderInterface.getClassByHash

Defined in​

src/provider/interface.ts:99


getNonceForAddress​

â–¸ getNonceForAddress(contractAddress, blockIdentifier?): Promise<string>

Returns the nonce associated with the given address in the given block

Parameters​

NameTypeDescription
contractAddressstringcontract address
blockIdentifier?BlockIdentifier-

Returns​

Promise<string>

the hex nonce

Inherited from​

ProviderInterface.getNonceForAddress

Defined in​

src/provider/interface.ts:107


getStorageAt​

â–¸ getStorageAt(contractAddress, key, blockIdentifier?): Promise<string>

Get the value of the storage (contract's variable) at the given address and key

Parameters​

NameTypeDescription
contractAddressstring
keyBigNumberishfrom getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)
blockIdentifier?BlockIdentifierblock identifier

Returns​

Promise<string>

the value of the storage variable

Inherited from​

ProviderInterface.getStorageAt

Defined in​

src/provider/interface.ts:120


getTransaction​

â–¸ getTransaction(transactionHash): Promise<TransactionWithHash>

Gets the transaction information from a tx id.

Parameters​

NameType
transactionHashBigNumberish

Returns​

Promise<TransactionWithHash>

the transaction object { transaction_id, status, transaction, block_number?, block_number?, transaction_index?, transaction_failure_reason? }

Inherited from​

ProviderInterface.getTransaction

Defined in​

src/provider/interface.ts:132


getTransactionReceipt​

â–¸ getTransactionReceipt(transactionHash): Promise<GetTransactionReceiptResponse>

Gets the transaction receipt from a tx hash.

Parameters​

NameType
transactionHashBigNumberish

Returns​

Promise<GetTransactionReceiptResponse>

the transaction receipt object

Inherited from​

ProviderInterface.getTransactionReceipt

Defined in​

src/provider/interface.ts:140


deployAccountContract​

â–¸ deployAccountContract(payload, details): Promise<DeployContractResponse>

Deploys a given compiled Account contract (json) to starknet

Parameters​

NameTypeDescription
payloadDeployAccountContractPayloadpayload to be deployed containing: - compiled contract code - constructor calldata - address salt
detailsInvocationsDetailsWithNonce-

Returns​

Promise<DeployContractResponse>

a confirmation of sending a transaction on the starknet contract

Inherited from​

ProviderInterface.deployAccountContract

Defined in​

src/provider/interface.ts:153


invokeFunction​

â–¸ invokeFunction(invocation, details): Promise<{ transaction_hash: string }>

Invokes a function on starknet

Parameters​

NameTypeDescription
invocationInvocationthe invocation object containing: - contractAddress - the address of the contract - entrypoint - the entrypoint of the contract - calldata - (defaults to []) the calldata - signature - (defaults to []) the signature
detailsInvocationsDetailsWithNonceoptional details containing: - nonce - optional nonce - version - optional version - maxFee - optional maxFee

Returns​

Promise<{ transaction_hash: string }>

response from addTransaction

Deprecated

This method won't be supported as soon as fees are mandatory. Should not be used outside of Account class

Inherited from​

ProviderInterface.invokeFunction

Defined in​

src/provider/interface.ts:173


declareContract​

â–¸ declareContract(transaction, details): Promise<{ class_hash: string ; transaction_hash: string }>

Declares a given compiled contract (json) to starknet

Parameters​

NameTypeDescription
transactionDeclareContractTransactiontransaction payload to be deployed containing: - compiled contract code - sender address - signature
detailsInvocationsDetailsWithNonceInvocation Details containing: - nonce - optional version - optional maxFee

Returns​

Promise<{ class_hash: string ; transaction_hash: string }>

a confirmation of sending a transaction on the starknet contract

Inherited from​

ProviderInterface.declareContract

Defined in​

src/provider/interface.ts:190


getEstimateFee​

â–¸ getEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Estimates the fee for a given INVOKE transaction

Parameters​

NameTypeDescription
invocationInvocationthe invocation object containing: - contractAddress - the address of the contract - entrypoint - the entrypoint of the contract - calldata - (defaults to []) the calldata - signature - (defaults to []) the signature
detailsInvocationsDetailsWithNonceoptional details containing: - nonce - optional nonce - version - optional version
blockIdentifier?BlockIdentifier(optional) block identifier
skipValidate?boolean(optional) skip cairo validate method

Returns​

Promise<EstimateFeeResponse>

the estimated fee

Deprecated

Please use getInvokeEstimateFee or getDeclareEstimateFee instead. Should not be used outside of Account class

Inherited from​

ProviderInterface.getEstimateFee

Defined in​

src/provider/interface.ts:211


getInvokeEstimateFee​

â–¸ getInvokeEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Estimates the fee for a given INVOKE transaction

Parameters​

NameTypeDescription
invocationInvocationthe invocation object containing: - contractAddress - the address of the contract - entrypoint - the entrypoint of the contract - calldata - (defaults to []) the calldata - signature - (defaults to []) the signature
detailsInvocationsDetailsWithNonceoptional details containing: - nonce - optional nonce - version - optional version
blockIdentifier?BlockIdentifier(optional) block identifier
skipValidate?boolean(optional) skip cairo validate method

Returns​

Promise<EstimateFeeResponse>

the estimated fee

Inherited from​

ProviderInterface.getInvokeEstimateFee

Defined in​

src/provider/interface.ts:233


getDeclareEstimateFee​

â–¸ getDeclareEstimateFee(transaction, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Estimates the fee for a given DECLARE transaction

Parameters​

NameTypeDescription
transactionDeclareContractTransactiontransaction payload to be declared containing: - compiled contract code - sender address - signature - (defaults to []) the signature
detailsInvocationsDetailsWithNonceoptional details containing: - nonce - version - optional version - optional maxFee
blockIdentifier?BlockIdentifier(optional) block identifier
skipValidate?boolean(optional) skip cairo validate method

Returns​

Promise<EstimateFeeResponse>

the estimated fee

Inherited from​

ProviderInterface.getDeclareEstimateFee

Defined in​

src/provider/interface.ts:255


getDeployAccountEstimateFee​

â–¸ getDeployAccountEstimateFee(transaction, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Estimates the fee for a given DEPLOY_ACCOUNT transaction

Parameters​

NameTypeDescription
transactionDeployAccountContractTransactiontransaction payload to be deployed containing: - classHash - constructorCalldata - addressSalt - signature - (defaults to []) the signature
detailsInvocationsDetailsWithNonceoptional details containing: - nonce - version - optional version - optional maxFee
blockIdentifier?BlockIdentifier(optional) block identifier
skipValidate?boolean(optional) skip cairo validate method

Returns​

Promise<EstimateFeeResponse>

the estimated fee

Inherited from​

ProviderInterface.getDeployAccountEstimateFee

Defined in​

src/provider/interface.ts:278


getEstimateFeeBulk​

â–¸ getEstimateFeeBulk(invocations, options?): Promise<EstimateFeeResponseBulk>

Estimates the fee for a list of INVOKE transaction

Parameters​

NameTypeDescription
invocationsAccountInvocationsAccountInvocations - Complete invocations array with account details
options?getEstimateFeeBulkOptionsgetEstimateFeeBulkOptions - (optional) blockIdentifier - BlockIdentifier

Returns​

Promise<EstimateFeeResponseBulk>

the estimated fee

Inherited from​

ProviderInterface.getEstimateFeeBulk

Defined in​

src/provider/interface.ts:293


waitForTransaction​

â–¸ waitForTransaction(txHash, options?): Promise<GetTransactionReceiptResponse>

Wait for the transaction to be accepted

Parameters​

NameTypeDescription
txHashBigNumberishtransaction hash
options?waitForTransactionOptionswaitForTransactionOptions - (optional) retryInterval: number | undefined; - (optional) successStates: TransactionStatus[] | undefined;

Returns​

Promise<GetTransactionReceiptResponse>

GetTransactionReceiptResponse

Inherited from​

ProviderInterface.waitForTransaction

Defined in​

src/provider/interface.ts:306


getSimulateTransaction​

â–¸ getSimulateTransaction(invocations, options?): Promise<SimulateTransactionResponse>

Simulates the transaction and returns the transaction trace and estimated fee.

Parameters​

NameTypeDescription
invocationsAccountInvocationsAccountInvocations - Complete invocations array with account details
options?getSimulateTransactionOptionsgetSimulateTransactionOptions - (optional) blockIdentifier - block identifier - (optional) skipValidate - skip cairo validate method - (optional) skipExecute - skip cairo execute method

Returns​

Promise<SimulateTransactionResponse>

an array of transaction trace and estimated fee

Inherited from​

ProviderInterface.getSimulateTransaction

Defined in​

src/provider/interface.ts:321


getStateUpdate​

â–¸ getStateUpdate(blockIdentifier?): Promise<StateUpdateResponse>

Gets the state changes in a specific block (result of executing the requested block)

Parameters​

NameTypeDescription
blockIdentifier?BlockIdentifierblock identifier

Returns​

Promise<StateUpdateResponse>

StateUpdateResponse

Inherited from​

ProviderInterface.getStateUpdate

Defined in​

src/provider/interface.ts:332


getContractVersion​

â–¸ getContractVersion(contractAddress, classHash?, options?): Promise<ContractVersion>

Gets the contract version from the provided address

Parameters​

NameTypeDescription
contractAddressstringstring
classHash?undefinedundefined
options?getContractVersionOptionsgetContractVersionOptions - (optional) compiler - (default true) extract compiler version using type tactic from abi - (optional) blockIdentifier - block identifier

Returns​

Promise<ContractVersion>

Inherited from​

ProviderInterface.getContractVersion

Defined in​

src/provider/interface.ts:342

â–¸ getContractVersion(contractAddress, classHash, options?): Promise<ContractVersion>

Gets the contract version from the provided address

Parameters​

NameTypeDescription
contractAddressundefinedundefined
classHashstring
options?getContractVersionOptionsgetContractVersionOptions - (optional) compiler - (default true) extract compiler version using type tactic from abi - (optional) blockIdentifier - block identifier

Returns​

Promise<ContractVersion>

Inherited from​

ProviderInterface.getContractVersion

Defined in​

src/provider/interface.ts:356