-
Notifications
You must be signed in to change notification settings - Fork 89
Actions
- Admin actions
- Collection actions
- Scheme 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 the collections and can later modify it |
name | collection_name | Name of the collection |
bool | allow_notify | If this is set to false, it won't be possible to add accounts to the notify_accounts vector. This solves the problem of notify_accounts theoretically being able to block transfers by making the transactions throw, at the expense of notifications. |
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) |
double | market_fee | 3rd party marketplaces are encouraged to take this fee out of every asset sale of this collection and make it available to the collection's author |
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 | collection_name | Name of the collection |
double | market_fee | New market_fee of the collection |
Sets the market_fee of a collection. 3rd party marketplaces are encouraged to take this fee out of every asset sale of this collection and make it available to the collection's author.
Author of the collection
Type | Name | Description |
---|---|---|
name | collection_name | Name of the collection |
Sets the allow_notify value of a collection to false if it has previously been true. Only possible if the notify_accounts vector of the collection is empty.
Author of the collection
Type | Name | Description |
---|---|---|
name | authorized_creator | Account createing this scheme |
name | collection_name | Name of the collection that this scheme belongs to |
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 within the parent collection. 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.
<authorized_creator>, who needs to be in the authorized_accounts vector of the collection that the scheme belongs to
Type | Name | Description |
---|---|---|
name | authorized_editor | Account editing / extending this scheme |
name | collection_name | Name of the collection that the scheme belongs to |
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.
<authorized_editor>, who needs to be in the authorized_accounts vector of the collection that the scheme belongs to
Type | Name | Description |
---|---|---|
name | authorized_creator | Account creating the preset |
name | collection_name | Collection this preset and any child assets belong to |
name | scheme_name | Scheme that is used for data serialization for this preset and any child assets |
bool | transferable | Determines if child assets are transferable |
bool | burnable | Determines if child assets are burnable |
uint32_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_minter | Account minting the asset |
name | collection_name | Collection that the asset belongs to |
name | scheme_name | Scheme that the asset belongs to |
int32_t | preset_id | ID of the preset referenced, or -1 if no preset is referenced |
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 | ram_payer | Account paying for the RAM of the asset |
name | owner | Account owning the asset |
uint64_t | asset_id | ID of the asset |
symbol | symbol_to_announce | Symbol that is added to the asset's backed_tokens vector |
Adds a zero value asset with the specified symbol to the backed_tokens vector of an asset. Because adding something to a vector increases the RAM required, this can't be done directly in the receipt of a transfer action. Therefore, using this action, a zero value asset is first added to the asset (taking up more RAM than before) so that then in the transfer action meant to back tokens to the asset, this zero value asset can be modified instead of having to add a new one.
<ram_payer>
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