-
Notifications
You must be signed in to change notification settings - Fork 89
Actions
- Admin actions
- Scheme actions
- Collection actions
- Preset actions
- Asset actions
- Transfer/ Offer actions
Initializes the config and tokenconfigs table if it hasn't been initialized before, otherwise does nothing. Has to be called once after deploying the contract.
atomicassets account.
Type | Name | Description |
---|---|---|
vector<FORMAT> | collection_format_extension | Vector of FORMATs to be added to the collection_format that is used to serialize collection data |
Adds one or more lines are added to the collection_format value in the config singleton. These lines are used to serialize the data of collections.
atomicassets account.
Type | Name | Description |
---|---|---|
string | new_version | New version string to be saved in the tokenconfigs table |
Updates the version in the tokenconfigs table.
atomicassets account.
Type | Name | Description |
---|---|---|
name | author | Account that creates this scheme and can later extend the format |
name | scheme_name | Name of the scheme |
vector<FORMAT> | scheme_format | Vector of FORMATs that the scheme is initialized with. Each FORMAT describes one attribute that can be serialized by this scheme. |
Creates a new scheme. Scheme names must be unique, so no other scheme with the name <scheme_name> can exist. Schemes also can't have the name of an account that exists on the blockchain, except if the action has the authorization of that account.
<author>
Type | Name | Description |
---|---|---|
name | scheme_name | Scheme to extend |
vector<FORMAT> | scheme_format_extension | Vector of FORMATs that the scheme is extended by. Each FORMAT describes one attribute that can be serialized by this scheme. |
Extends the format of an existing scheme.
Author of the scheme.
Type | Name | Description |
---|---|---|
name | author | Account that creates the collections and can later modify it |
name | collection_name | Name of the collection |
vector | authorized_accounts | Vector of account names that are authorized to create/ edit both presets and assets of this collection |
vector | notify_accounts | Vector of accounts that will get notified of any actions related to this collection (More Info) |
ATTRIBUTE_MAP | data | Data that the collection is initialized with, to be serialized with the collection_format specified in the config table |
Creates a new collection. Collection names must be unique, so no other collection with the name <collection_name> can exist. Collections also can't have the name of an account that exists on the blockchain, except if the action has the authorization of that account.
<author>
Type | Name | Description |
---|---|---|
name | collection_name | Collection to set the data of |
ATTRIBUTE_MAP | data | Data to be serialized with the collection_format specified in the config table |
Updates/ sets the data of a collection.
Author of the collection
Type | Name | Description |
---|---|---|
name | collection_name | Name of the collection |
name | account_to_add | Account to add to the authorized_accounts vector |
Adds an account to the authroized_accounts vector of a collection.
Author of the collection
Type | Name | Description |
---|---|---|
name | collection_name | Name of the collection |
name | account_to_remove | Account to remove from the authorized_accounts vector |
Removes an account from the authroized_accounts vector of a collection.
Author of the collection
Type | Name | Description |
---|---|---|
name | collection_name | Name of the collection |
name | account_to_add | Account to add to the notify_accounts vector |
Adds an account to the notify_accounts vector of a collection.
Author of the collection
Type | Name | Description |
---|---|---|
name | collection_name | Name of the collection |
name | account_to_remove | Account to remove from the notify_accounts vector |
Removes an account from the notify_accounts vector of a collection.
Author of the collection
Type | Name | Description |
---|---|---|
name | authorized_creator | Account creating the preset |
name | scheme_name | Scheme that is used for data serialization for this preset and any child assets |
name | collection_name | Collection this preset and any child assets belong to |
bool | transferable | Determines if child assets are transferable |
bool | burnable | Determines if child assets are burnable |
uint64_t | max_supply | Maximum amount of child assets that this preset can mint. 0 if there should not be a maximum |
ATTRIBUTE_MAP | immutable_data | Data that can not be changed after creating the preset |
ATTRIBUTE_MAP | mutable_data | Data that can not be changed after creating the preset |
Creates a new preset.
<authorized_creator>, who needs to be in the authorized_accounts vector of the specified collection
Type | Name | Description |
---|---|---|
name | authorized_editor | Account editing the preset |
uint32_t | preset_id | ID of the preset to edit |
ATTRIBUTE_MAP | new_mutable_data | Data to set the mutable data to |
Updates/ sets the mutable data of a preset.
<authorized_editor>, who needs to be in the authorized_accounts vector of the collection that the preset belongs to
Type | Name | Description |
---|---|---|
name | authorized_minter | Account minting the asset |
uint32_t | preset_id | ID of the asset's parent preset |
name | new_owner | Account that will own the minted asset |
ATTRIBUTE_MAP | immutable_data | Data that can not be changed after creating the asset |
ATTRIBUTE_MAP | mutable_data | Data that can be changed after creating the asset |
Mints (creates) a new asset. The RAM cost is paid by <authorized_minter>.
<authorized_minter>, who needs to be in the authorized_accounts vector of the collection that the parent preset belongs to
Type | Name | Description |
---|---|---|
name | authorized_editor | Account editing the asset |
name | owner | Account owning the asset |
uint64_t | asset_id | ID of the asset |
ATTRIBUTE_MAP | new_mutable_data | Data to set the mutable data to |
Updates/ sets the mutable data of an asset.
<authorized_editor>, who needs to be in the authorized_accounts vector of the collection that the asset's parent preset belongs to
Type | Name | Description |
---|---|---|
name | owner | Account owning the asset |
uint64_t | asset_id | ID of the asset |
Burns (deletes) an asset. If there previously were core tokens backed for this asset, these core tokens are transferred to <owner>.
Note: Burning an asset does not decrement the issued_supply of the parent preset.
<owner>
Type | Name | Description |
---|---|---|
name | from | Account to transfer assets from |
name | to | Account to transfer assets to |
vector<uint64_t> | asset_ids | Vector of asset ids that are to be transferred |
string | memo | Memo attached to the transaction |
Transfers one or more assets from one account to another. If the recipient did not previously own any assets, the sender pays the 112 bytes of RAM to create the recipient's scope in the assets table.
Note: Both <from> and <to> are notified using require_recipient().
<from>
Type | Name | Description |
---|---|---|
name | sender | Account creating/ sending the offer |
name | recipient | Account receiving the offer |
vector<uint64_t> | sender_asset_ids | Vector of asset ids that the sender will give to the recipient |
vector<uint64_t> | recipient_asset_ids | Vector of asset ids that the recipient will give to the sender |
string | memo | Memo attached to the trade offer |
Creates a two sided trade offer, that <recipient> can accept or decline. If the offer is accepted, the assets will automatically be transferred to the respective sides.
Note: Both <sender> and <recipient> are notified using require_recipient().
Note: Only a single asset needs to be included in a trade offer. That means that offers with one side empty are possible.
Note: An offer's validity is checked when they are created, but they are not automatically deleted when they become invalid (because one of the sides loses ownership of at least one of the items included in the offer).
<sender>
Type | Name | Description |
---|---|---|
uint64_t | offer_id | ID of the offer |
Cancels (deletes) an offer.
Note: Both the offer sender and recipient are notified using require_recipient().
Sender of the offer
Type | Name | Description |
---|---|---|
uint64_t | offer_id | ID of the offer |
Accepts an offer. The assets included in the offer are automatically transferred to the respective sides.
Note: Both the offer sender and recipient are notified using require_recipient().
Recipient of the offer
Type | Name | Description |
---|---|---|
uint64_t | offer_id | ID of the offer |
Declines (deletes) an offer.
Note: Both the offer sender and recipient are notified using require_recipient().
Recipient of the offer
atomicassets.io - developed with ❤️ by pink.network