The CW721 ADO is a smart contract to allow users to launch their own custom NFT projects. In addition to the standard CW721 messages, we have added some custom logic to further extend the utility and function of the contract.
The CW721 ADO is one of the base ADOs meaning it can interact with a large number of other ADOs such as the marketplace, crowdfund, auction, CW721 timelock and many more.
The contract has implemented a custom TransferAgreement
message to allow the buying/selling of tokens between two parties throught the CW721 ADO itself.
Ado_type: cw721
Version: 2.0.3-beta.1
Name | Type | Description |
---|---|---|
Mints a new NFT.
Only available to the defined minter
in the InstantiateMsg.
Extension that can be added to an NFT when minting.
Mint several NFTs at once.
Assigns a TransferAgreement
for a token. If the agreement
field is not set, the message will remove any previously set agreements on the token (Instead of making a new RemoveAgreement message).
Only available to the token owner.
The purchaser
may use the TransferNft
message for this token as long as funds are provided equaling the amount
defined in the agreement.
If the purchaser
is set to "*"
then anyone can complete the TransferAgreement
(Anyone can buy the NFT).
A CW721 compliant transfer method. Transfers ownership of a minted token.
Archived tokens cannot be transferred.
Only available to the contract owner, an approved operator, or a purchaser in a TransferAgreement
for the given token.
A CW721 compliant send method. Sends ownership of a minted token to an external contract.
Only available to the token owner/operator/approved address.
Destroys any token data related to an token Id. The Id of the token is still reserved.
Cannot be undone.
Only available to the token owner.
Archives an token, making it immutable in any respect. Once an token is archived it cannot be edited, transferred or burnt.
Cannot be undone.
Only available to the token owner.
A CW721 compliant approve method. Approves a given address as an operator for the token, allowing them to transfer, burn or archive the token.
Only available to the token owner/operator.
A CW721 compliant revoke method. Revokes operator privileges for a given address.
Only available to the token owner/operator.
A CW721 compliant approve all method. Approves a given address as an operator for all tokens owned by the sender.
Will overwrite any approval currently assigned to the operator's address.
A CW721 compliant revoke all method. Revokes an operator's privileges for any tokens owned by the sender.
The rest of the execute messages can be found in the ADO Base section.
Queries the current minter of the contract.
A CW721 compliant "owner of" query. Queries the current owner of a given token Id.
Returns the approval of a given operator for all tokens of an owner. Errors if no approvals are set.
Returns an Approval struct.
List all operators that can access all of the owner's tokens.
A CW721 compliant "num tokens" query. Queries the amount of tokens minted by the contract.
A CW721 compliant "nft info" query. Queries the stored info of a token.
A CW721 compliant "all nft info" query. Queries all stored info of an token.
Checks if the token with the specified token_id
is archived.
Returns a bool value.
Checks if the token has a TransferAgreement .
Returns None if no TransferAgreement is found, and the TransferAgreement struct otherwise.
Queries all the tokens of a particular owner.
Contains all token_ids in lexicographical ordering. If there are more than limit
, use start_from
in future queries to achieve pagination.
Queries the tokens minted by the contract.
Contains all token_ids in lexicographical ordering. If there are more than limit
, use start_from
in future queries to achieve pagination.
Queries the name and symbol of the token collection.
Queries the spender's approval to check for the expiration.
Returns all the approvals a token has.
Return a vector of Approval.
The rest of the query messages can be found in the ADO Base section.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
name
String
The name of the NFT collection.
symbol
String
The symbol of the NFT collection.
minter
The address allowed to mint NFTs.
kernel_address
String
Contract address of the kernel contract to be used for AMP messaging. Kernel contract address can be found in our deployed contracts.
owner
Option<String>
Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified.
token_id
String
Unique Id of the NFT.
owner
String
The address of the NFT owner.
token_uri
Option<String>
URI pointing to the NFT metadata. You can read more about the NFT token URI and metadata standards here.
extension
TokenExtension
Any custom extension used by this contract. Here we use TokenExtension.
publisher
String
The entity to assign as the publisher of the NFT e.g. "Andromeda" or "Bob". (Immutable).
tokens
Vec<MintMsg>
Vector of MintMsg. Similar to minting one token, but allows minting of many tokens in one go.
token_id
String
The token Id of the NFT we want to add an agreement for.
agreement
Option<TransferAgreement>
The agreement for the token containing the selling price and the address allowed to purchase the token. If not specified then any previously set agreement is removed from the token.
amount
The amount required for the purchaser to transfer ownership of the token.
purchaser
String
The address of the purchaser that is allowed to purchase the token.
recipient
The address to receive the NFT.
token_id
String
The token Id of the token to be transferred.
contract
The address of the receiving contract.
token_id
String
The Id of the token to be sent.
msg
Binary
A message to be sent to the receiving contract.
token_id
String
The Id of the token to burn.
token_id
String
The Id of the token to archive.
spender
String
The address to be authorised as an operator.
token_id
String
The id of the token for which to assign the spender
as an operator.
expires
Option<Expiration>
An optional expiration for the approval. Defaults to never.
spender
String
The address of the operator for which to revoke privileges.
token_id
String
The Id of the token for which to revoke operator privileges.
operator
String
The address to be authorised as an operator.
expires
Option<Expiration>
An optional expiration for the approval. Defaults to never.
operator
String
The address of the operator for which to revoke privileges.
token_id
String
The Id of the token to query.
include_expired
bool
Whether to include any expired owners.
owner
String
The owner of the queried token.
approvals
Vec<Approval>
An array of all approvals for the token.
spender
String
The address that is approved.
expires
The expiration for the approval.
owner
String
The address of the NFTs owner.
operator
String
The address of the operator that has approvals over the specified owner
NFTs.
include_expired
Option<bool>
Whether to include any expired approvals.
owner
String
The address of the owner for which to query operators.
include_expired
Option<bool>
Whether to include any expired approvals.
limit
Option<u32>
An optional limit on how many approvals are returned. The default limit is 10 and the maximum limit allowed is 100.
start_after
Option<String>
An optional address for which to start after, used for pagination.
approvals
Vec<Approval>
An array of all approvals for the given owner address.
count
u64
The amount of tokens minted by the contract.
token_id
String
The id of the token.
token_uri
String
Universal resource identifier for this token.
extension
T (Generic type)
Any extension being used by the contract to add custom metadata to the tokens.
token_id
String
The token id of the NFT.
include_expired
Option<bool>
Whether to include any expired approvals.
access
The address that can transfer the token.
info
Data on the token itself.
token_id
String
The token_id
of the NFT we want to check.
token_id
String
The token_id of the nft we want to check.
owner
String
The address that we want to check the tokens of
start_after
Option<String>
An optional address for which to start after, used for pagination.
limit
Option<u32>
Optional limit to the number of tokens queried. It is set by default as 10 and can be set up to 30.
start_after
Option<String>
An optional address for which to start after, used for pagination.
limit
Option<u32>
Optional limit to the number of tokens queried. It is set by default as 10 and can be set up to 30.
name
String
The name of the contract.
symbol
String
The assigned symbol of the contract.
token_id
String
The token Id of the NFT to check.
spender
String
The address to check the approvals.
include_expired
Option<bool>
Optional flag to include the expired approvals. Defaults to false.
approval
Approval
The approved spender and the expiration for the approval.
spender
String
Account that can transfer/send the token
expires
When the Approval expires. Might be Expiration::never.
token_id
String
The token Id of the NFT to get approvals for.
include_expired
Option<bool>
Optional flag to include the expired approvals. Defaults to false.