Module concordium_base::cis2_types
source · Expand description
This module contains types and their implementations related to the CIS-2 token standard.
Structs§
- Additional data which can be included for each transfer in the transfer parameter for the CIS2 contract function
transfer
. Allows up tou16::MAX
number of bytes. - A query for the balance of a given address for a given token.
- The parameter type for the NFT contract function
CIS2-NFT.balanceOf
. - The response which is sent back when calling the contract function
balanceOf
. It consists of the list of token amounts in the same order as the queries. - A URL for the metadata.
- Error for constructing a new
AdditionalData
. - Error for constructing a new
BalanceOfQueryParams
. - Error for constructing a new
BalanceOfQueryResponse
. - Error for constructing a new
MetadataUrl
. - Error for constructing a new
OperatorOfQueryParams
. - Error for constructing a new
OperatorOfQueryResponse
. - Error for constructing a new
TokenId
. - Error for constructing a new
TokenMetadataQueryParams
. - Error for constructing a new
TokenMetadataQueryResponse
. - Error for constructing a new
TransferParams
. - Error for constructing a new
UpdateOperatorParams
. - A query for the operator of a given address for a given token.
- The parameter type for the NFT contract function
CIS2-NFT.operatorOf
. - The response which is sent back when calling the contract function
operatorOf
. It consists of the list of results in the same order and length as the queries in the parameter. - Full address of a token.
- CIS-2 token amount with serialization as according to CIS-2.
- CIS2 Token ID can be up to 255 bytes in size.
- The parameter type for the NFT contract function
CIS2-NFT.operatorOf
. - The response which is sent back when calling the contract function
tokenMetadata
. It consists of the list of queries paired with their corresponding result. - A description of a transfer according to the CIS2 specification.
- The parameter type for the NFT contract function
CIS2-NFT.transfer
. - The parameter type for the NFT contract function
CIS2-NFT.updateOperator
.
Enums§
- The different errors found in CIS2.
- Smart contract logged event, part of the CIS2 specification.
- Error for constructing a
AdditionalData
from a string. - The type of update for an operator update.
- Error from parsing a token ID bytes from a hex encoded string.
- Address to receive an amount of tokens, it differs from the
Address
type by additionally requiring a contract receive function name when the address is a contract address.
Type Aliases§
- A query for token metadata for a given token.