Constructor for SmartContractsClient objects.
Private
Readonly
publicPrivate
Readonly
walletGet the status of a specific operation and wait until it reaches the required status.
A promise that resolves to the status of the operation.
The required operation id.
The required status.
Calls a smart contract method.
If no executor is provided, the default wallet account will be used.
A promise that resolves to the operation ID of the call operation as a string.
The data required for the smart contract call.
Optional
executor: IBaseAccountThe account that will execute the call (default: the default wallet account from WalletClient).
Protected
compactCompacts bytes payload per operation.
The compacted bytes payload.
The operation data.
The operation type id.
The expire period.
Deploy a smart contract on the massa blockchain by creating and sending an operation containing byte code.
If no executor is provided, the default wallet account from the provided WalletClient will be used.
A promise that resolves to the operation ID of the deployment operation.
The deployment contract data.
Optional
executor: IBaseAccountThe account to use for the deployment.
Send a read-only smart contract execution request.
This method is used to dry-run a smart contract execution and get the changes of the states that would have happen if the transaction was really executed on chain. This operation does not modify the blockchain state.
A promise which resolves to an object containing data about the operation.
The data required for the operation.
Get filtered smart contract output events.
A promise that resolves to an array of IEvent objects containing the filtered events.
The filter data for the events.
Get the status of a specific operation.
A promise that resolves to the status of the operation.
The operation id.
Protected
getProtected
getExecute a dry run Smart contract call and returns some data regarding its execution such as the changes of in the states that would have happen if the transaction was really executed on chain.
A promise that resolves to an object which represents the result of the operation and contains data about its execution.
The data required for the a read operation of a smart contract.
Protected
sendSends a post JSON rpc request to the node.
An error if the rpc method returns an error.
A promise that resolves as the result of the rpc method.
The rpc method to call.
The parameters to pass to the rpc method.
Set new providers as IProvider.
Will throw an error if no public providers are included in the given array of providers.
Will throw an error if no private providers are included in the given array of providers.
The new providers to set as an array of IProvider.
Generated using TypeDoc
Smart Contracts Client object enables smart contract deployment, calls and streaming of events.