Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BLOCK-2587] enable new token features #260

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

121 changes: 0 additions & 121 deletions docs/blockchain/contracts/token-contract/token_tables.experimental.md

This file was deleted.

60 changes: 60 additions & 0 deletions docs/blockchain/contracts/token-contract/token_tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,63 @@ cleos get table eosio.token <SYMBOL_RAW_VALUE> stat
```shell script
curl <NODEOS_API_IP>/v1/chain/get_table_rows -X POST -d '{"scope":"<SYMBOL_RAW_VALUE>", "code":"eosio.token", "table":"stat", "json": true}'s
```

## metadata

Store token metadata

- Code: `eosio.token`
- Table: `metadata`
- Scope: `symbol_raw_value`
- Key: `symbol_raw_value`
- Data

| Fields | Type | Description |
| ------------- | ------------- | ------------------------------ |
| `symbol` | eosio::symbol | The symbol of the token |
| `name` | eosio::name | The name of the token |
| `icon` | string | The URL of token's icon |
| `description` | string | The description of the token |
| `color` | uint32_t | The display color of the token |

- `cleos` Query Example

```shell script
cleos get table eosio.token <SYMBOL_RAW_VALUE> metadata
```

- `curl` query example

```shell script
curl <NODEOS_API_IP>/v1/chain/get_table_rows -X POST -d '{"scope":"<SYMBOL_RAW_VALUE>", "code":"eosio.token", "table":"metadata", "json": true}'s
```

## tokenconfig

Store token strategy configuration

- Code: `eosio.token`
- Table: `tokenconfig`
- Scope: `symbol_raw_value`
- Key: `symbol_raw_value`
- Data

| Fields | Type | Description |
| ---------------------- | ------------------------- | --------------------------------------------------------------------------------------------- |
| `trigger_supply` | eosio::asset | The threshold supply for when strategy will be applied to transfer |
| `strategy` | uint16_t | The strategy will be used to decide which config to use tax or burn. 0 nothing, 1 burn, 2 tax |
| `rate_bp` | uint16_t | The rate where strategy will be applied in basis where 1 is 0.01% |
| `tax_receiver` | eosio::name | The account where tax will be transfer to |
| `whitelisted_accounts` | std::vector\<eosio::name> | The accounts will be exempted from strategy |

- `cleos` Query Example

```shell script
cleos get table eosio.token <SYMBOL_RAW_VALUE> tokenconfig
```

- `curl` query example

```shell script
curl <NODEOS_API_IP>/v1/chain/get_table_rows -X POST -d '{"scope":"<SYMBOL_RAW_VALUE>", "code":"eosio.token", "table":"tokenconfig", "json": true}'s
```
Loading
Loading