Skip to content

Commit

Permalink
Merge pull request #260 from ultraio/feature/BLOCK-2587-enable-new-to…
Browse files Browse the repository at this point in the history
…ken-features

[BLOCK-2587] enable new token features
  • Loading branch information
Adam-Ultra authored Dec 12, 2024
2 parents a143f44 + fc28bd2 commit aa57f1d
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 511 deletions.

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

0 comments on commit aa57f1d

Please sign in to comment.