Expand description
This module contains a generic client that provides conveniences for interacting with any smart contract instance, as well as for creating new ones.
The key types in this module are
ContractClient,
ContractInitBuilder
and ModuleDeployBuilder.
Structs§
- Contract
Client - A contract client that handles some of the boilerplate such as serialization and parsing of responses when sending transactions, or invoking smart contracts.
- Contract
Init Handle - A handle returned when sending a smart contract init transaction. This can be used to get the response of the initialization.
- Contract
Init Inner - A helper type to construct
ContractInitBuilder. Users do not directly interact with values of this type. - Contract
Transaction Metadata - Transaction metadata for CIS-4 update transactions.
- Contract
Update Handle - A handle returned when sending a smart contract update transaction. This can be used to get the response of the update.
- Contract
Update Inner - A helper type to construct
ContractUpdateBuilder. Users do not directly interact with values of this type. - Credential
Entry - Response to a credential data query.
- Credential
Event Data - Data for events of registering and updating a credential.
- Credential
Info - Credential
Metadata Event - Credential
Schema RefEvent - The schema reference has been updated for the credential type.
- Credential
Type - Credential type is a string that corresponds to the value of the “name” attribute of the credential schema.
- Error
Schema - Define a newtype wrapper around the error schema type.
- Issuer
Metadata Event - An event emitted when the issuer metadata is set, either initially or when it is updated.
- Metadata
Url - A URL for the metadata.
- Module
Deploy Data - Result of successful module deployment.
- Module
Deploy Handle - Reason
- A short comment on a reason of revoking or restoring a credential. The string is of a limited size of 256 bytes in order to fit into a single log entry along with other data.
- Registry
Metadata - A response type for the registry metadata request.
- Rejected
Transaction - This type is used when an invoke (dry-run) of a transaction gets rejected.
- Revocation
KeyEvent - An untagged revocation key event.
Emitted when keys are registered and removed.
For a tagged version use
CredentialEvent. - Revocation
KeyWith Nonce - Revocation key together with a nonce that needs to be used for signing the next revocation transaction.
- Revoke
Credential Event - An untagged revocation event.
- Schema
Ref - A schema reference is a schema URL pointing to the JSON schema for a verifiable credential.
- Transaction
Builder - A builder of transactions out of minimal data typically obtained by dry-running.
Enums§
- Concordium
StdReject Reason - Contract
Init Error - An error that may occur when querying the result of a smart contract update transaction.
- Contract
Update Error - An error that may occur when querying the result of a smart contract update transaction.
- Credential
Event - An event specified by CIS4 standard.
- Credential
Status - The current status of a credential.
- Decoded
Reason - A human-readable decoded error for the reject reason of a reverted transaction.
- DryRun
Module Deploy Error - An error that may occur when attempting to dry run a smart contract module deployment.
- DryRun
NewInstance Error - An error that may occur when attempting to dry run a new instance creation.
- Invoke
Contract Outcome - The outcome of invoking (dry-running) a transaction to update a smart contract instance. The variants describe the two cases of successfully simulating the transaction and rejecting the transaction due to some reverts.
- Module
Deploy Error - An error that may occur when querying the result of a module deploy transaction.
- Revocation
KeyAction - Revoker
- A type for specifying who is revoking a credential, when registering a revocation event.
- View
Error - An error that can be used as the error for the
viewfamily of functions.
Functions§
- decode_
concordium_ std_ error - Decode the
reject_reasoninto a human-readable error based on the error code definition in theconcordium-stdcrate. - decode_
smart_ contract_ revert - Decode the smart contract logical revert reason and return a human-readable error.
Type Aliases§
- Contract
Init Builder - Builder for initializing a new smart contract instance.
- Contract
Update Builder - A builder to simplify sending smart contract updates.
- Issuer
Key - Public key of an issuer.
- Module
Deploy Builder - Revocation
Key - Simulated
Transaction - The
SimulatedTransactiontype is an alias for theContractUpdateBuildertype. This type is used when an invoke (dry-run) of a transaction succeeds. This type includes a convenient send method to send and execute the transaction on-chain in a subsequent action. As such, it is a builder to simplify sending smart contract updates.