Protected
contractProtected
contractProtected
dryThe dry-run instance accessible through the CISContract.dryRun dryRun
getter
Protected
grpcA dry-run instance, providing access to methods for performing dry-run invocations of update instructions.
Invokes CIS-2 "balanceOf" with a single query.
If the query could not be invoked successfully.
The balance corresponding to the query.
The query object specifying the details of the query.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
Invokes CIS-2 "balanceOf" with a list of queries.
If the query could not be invoked successfully.
A list of balances corresponding to and ordered by the list of queries.
A list of query objects, each specifying the details of a query.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
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 CIS-2 "transfer" update transaction containing a single transfer. This is particularly useful if you need the parts required for a wallet to submit the transaction.
If the transaction could not be created successfully.
An object containing the parts of the transaction needed for submission.
Metadata needed for the transaction creation.
The transfer object specifying the details of the transfer.
Creates a CIS-2 "transfer" update transaction containing a list transfers. This is particularly useful if you need the parts required for a wallet to submit the transaction.
If the transaction could not be created successfully.
An object containing the parts of the transaction needed for submission.
Metadata needed for the transaction creation.
A list of transfer objects, each specifying the details of a transfer.
Creates a CIS-2 "operatorOf" update transaction containing a single operator update instruction. This is particularly useful if you need the parts required for a wallet to submit the transaction.
If the transaction could not be created successfully.
An object containing the parts of the transaction needed for submission.
Metadata needed for the transaction creation.
The update instruction object specifying the details of the update.
Creates a CIS-2 "operatorOf" update transaction containing a list of operator update instructions. This is particularly useful if you need the parts required for a wallet to submit the transaction.
If the transaction could not be created successfully.
An object containing the parts of the transaction needed for submission.
Metadata needed for the transaction creation.
A list of update instruction objects, each specifying the details of an update.
Creates a ContractUpdateTransactionWithSchema contract update transaction, holding the necessary parts to sign/submit to the chain.
If the query could not be invoked successfully.
The transaction hash of the update transaction
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.
The transaction hash of the update transaction
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.
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
makeInvokes CIS-2 "operatorOf" with a single query.
If the query could not be invoked successfully.
Whether the specified address is an operator of the specified owner.
The query object specifying the details of the query.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
Invokes CIS-2 "operatorOf" with a list of queries.
If the query could not be invoked successfully.
As list of boolean results, each detailing whether the specified address is an operator of the specified owner for the corresponding query. The list is ordered by the corresponding query.
A list of query objects, each specifying the details of a query.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
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.
Invokes CIS-2 "tokenMetadata" with a single token ID.
If the query could not be invoked successfully.
An object containing the URL of the token metadata.
The ID of the token to get the metadata URL for.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
Invokes CIS-2 "tokenMetadata" with a list of token ID's.
If the query could not be invoked successfully.
A list of objects containing URL's for token metadata for the corresponding token.
The list is ordered by the token ID's given by tokenIds
input parameter.
A list of ID's of the tokens to get metadata URL's for.
Optional
blockHash: BlockHashThe hash of the block to perform the query at. Defaults to the latest finalized block.
Sends a CIS-2 "transfer" update transaction containing a single transfer.
If the update could not be invoked successfully.
The transaction hash of the update transaction
Metadata needed for the transaction.
The transfer object specifying the details of the transfer.
To be used for signing the transaction sent to the node.
Sends a CIS-2 "transfer" update transaction containing a list transfers.
If the update could not be invoked successfully.
The transaction hash of the update transaction
Metadata needed for the transaction.
A list of transfer objects, each specifying the details of a transfer.
To be used for signing the transaction sent to the node.
Sends a CIS-2 "operatorOf" update transaction containing a single operator update instruction.
If the update could not be invoked successfully.
The transaction hash of the update transaction
Metadata needed for the transaction.
The update instruction object specifying the details of the update.
To be used for signing the transaction sent to the node.
Sends a CIS-2 "operatorOf" update transaction containing a list of operator update instructions.
If the update could not be invoked successfully.
The transaction hash of the update transaction
Metadata needed for the transaction.
A list of update instruction objects, each specifying the details of an update.
To be used for signing the transaction sent to the node.
Static
createCreates a new CIS2Contract
instance by querying the node for the necessary information through the supplied grpcClient
.
If InstanceInfo
could not be received for the contract, if the contract does not support the CIS-2 standard,
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.
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
Contains methods for performing operations on CIS-2 smart contracts.