Constructor for SmartContractsClient objects.
Private
Readonly
mnsPrivate
Readonly
publicPrivate
Readonly
walletGet the status of a specific operation and wait until it reaches one of the required statuses.
The required operation id.
An array of required statuses.
Optional
timeout: numberA promise that resolves to the status of the operation.
Private
awaitHelper method to wait for a specific condition on an operation's status.
The operation id to check.
A callback function that defines the condition for the operation status.
A promise that resolves to the status of the operation.
Get the status of a specific operation and wait until it reaches the required status.
The required operation id.
The required status.
Optional
timeout: numberA promise that resolves to the status of the operation.
Calls a smart contract method.
The data required for the smart contract call.
Optional
executor: IBaseAccountThe account that will execute the call (default: the default wallet account from WalletClient).
A promise that resolves to the operation ID of the call operation as a string.
If no executor is provided, the default wallet account will be used.
Protected
compactCompacts bytes payload per operation.
The operation data.
The operation type id.
The expire period.
The compacted bytes payload.
Deploy a smart contract on the massa blockchain by creating and sending an operation containing byte code.
The deployment contract data.
Optional
executor: IBaseAccountThe account to use for the deployment.
A promise that resolves to the operation ID of the deployment operation.
If no executor is provided, the default wallet account from the provided WalletClient will be used.
Send a read-only smart contract execution request.
The data required for the operation.
A promise which resolves to an object containing data about the operation.
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.
Get filtered smart contract output events.
The filter data for the events.
A promise that resolves to an array of IEvent objects containing the filtered events.
Get the status of a specific operation.
The operation id.
A promise that resolves to the status of the operation.
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.
The data required for the a read operation of a smart contract.
A promise that resolves to an object which represents the result of the operation and contains data about its execution.
Protected
sendSends a post JSON rpc request to the node.
The rpc method to call.
The parameters to pass to the rpc method.
A promise that resolves as the result of the rpc method.
An error if the rpc method returns an error.
Set new providers as IProvider.
The new providers to set as an array of 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.
Watches the status of an operation and invokes a callback function when the status changes.
The ID of the operation to watch.
The function to call when the operation status changes. It receives the new status and a potential error as a parameter.
Optional
error: ErrorThe interval in milliseconds at which to check the operation status. Defaults to 1000 ms.
The time at which to stop checking the operation status. Defaults is 16000 ms.
A Promise that resolves to a function that can be called to stop watching the operation status.
Generated using TypeDoc
Smart Contracts Client object enables smart contract deployment, calls and streaming of events.