union of update entrypoints
union of view entrypoints
Optional
schema: Schema<E>Protected
contractProtected
contractProtected
dryThe dry-run instance, accessible through ContractBase.dryRun
Protected
grpcProtected
Optional
schemaA dry-run instance, providing access to methods for performing dry-run invocations of update instructions.
Check if the smart contract instance exists on the blockchain and whether it uses a matching contract name. Optionally a module reference can be provided to check if the contract instance uses this module.
If failing to communicate with the concordium node or if the instance does not exist on chain or fails the checks.
Optional
options: ContractCheckOnChainOptions = {}Options for checking information on chain.
Creates and sends a contract update transaction with parameter input
to entrypoint
.
If the query could not be invoked successfully.
The transaction hash of the update transaction
The type of the input
The name of the receive function to invoke.
A function to serialize the input
to bytes.
Metadata to be used for the transaction (with defaults).
Input for for contract function.
An object to use for signing the transaction.
Creates a ContractUpdateTransactionWithSchema contract update transaction, holding the necessary parts to sign/submit to the chain.
If the query could not be invoked successfully.
Details necesary for submitting the contract update transaction.
The type of the input
The name of the receive function to invoke.
A function to serialize the input
to bytes.
Metadata to be used for the transaction creation (with defaults).
Input for for contract function.
Creates a ContractUpdateTransactionWithSchema contract update transaction, holding the necessary parts to sign/submit to the chain.
If the query could not be invoked successfully.
Details necessary for submitting the contract update transaction (with JSON to be serialized with corresponding schema)
The type of the input
The type of the input formatted as JSON compatible with the corresponding contract schema
The name of the receive function to invoke.
A function to serialize the input
to bytes.
Metadata to be used for the transaction creation (with defaults).
Input for for contract function.
A function to format the input
as JSON format serializable by the contract schema.
Parameter of the update
Hex encoded parameter for the update
JSON representation of the parameter to be used with the corresponding contract schema
The payload of the transaction, which will always be of type UpdateContractPayload
Optional
schema?: ContractSchemaThe schema needed to serialize the parameter
The type of the transaction, which will always be of type Update
Get information on this smart contract instance.
if the InstanceInfo of the contract could not be found.
The instance info.
Optional
blockHash: BlockHashHash of the block to check information at. When not provided the last finalized block is used.
Invokes entrypoint
view function on contract.
If the query could not be invoked successfully.
The transaction hash of the update transaction
The type of the input
The type the invocation response should be deserialized into.
The name of the view function to invoke.
A function to serialize the input
to bytes.
A function to deserialize the value returned from the view invocation.
Input for for contract function.
Optional
blockHash: BlockHashThe hash of the block to perform the invocation of. Defaults to the latest finalized block on chain.
Protected
sendSubmits a ContractUpdateTransaction contract update transaction.
If the query could not be invoked successfully.
The transaction hash of the update transaction
The details of the transaction to send.
Metadata to be used for the transaction (with defaults).
An object to use for signing the transaction.
Static
createCreates a new Contract
instance by querying the node for the necessary information through the supplied grpcClient
.
If InstanceInfo
could not be received for the contract,
or if the contract name could not be parsed from the information received from the node.
The client used for contract invocations and updates.
Address of the contract instance.
Optional
schema: Schema<E>The schema of the contract, either defined as parameter schemas per entrypoint E
or as a single module schema.
If no schema is defined, an attempt to get an embedded schema from the contract is made.
Static
Protected
getHelper function for getting the name of a contract
if the InstanceInfo of the contract could not be found.
the name of the contract.
The GRPC client for accessing a node.
The address of the contract.
Static
Protected
getHelper function for getting the InstanceInfo of a contract
if the InstanceInfo of the contract could not be found.
the instance info.
The GRPC client for accessing a node.
The address of the contract.
Generated using TypeDoc
Base class for interacting with arbitrary contracts. Public version is Contract.