diff --git a/docs/cli-client/token.md b/docs/cli-client/token.md index 674700bace..8ac574be45 100644 --- a/docs/cli-client/token.md +++ b/docs/cli-client/token.md @@ -5,12 +5,13 @@ Token module allows you to manage assets on IRIS Hub ## Available Commands | Name | Description | -| ------------------------------------------ | ------------------------------------------ | +|--------------------------------------------|--------------------------------------------| | [issue](#iris-tx-token-issue) | Issue a new token | | [edit](#iris-tx-token-edit) | Edit an existing token | | [transfer](#iris-tx-token-transfer) | Transfer the ownership of a token | | [mint](#iris-tx-token-mint) | Mint tokens to a specified address | | [burn](#iris-tx-token-burn) | Burn some tokens | +| [swap-fee](#iris-tx-token-swap-fee) | Swap one token with another token | | [token](#iris-query-token-token) | Query a token by symbol | | [tokens](#iris-query-token-tokens) | Query tokens by owner | | [fee](#iris-query-token-fee) | Query the token related fees | @@ -122,6 +123,19 @@ iris tx token mint [symbol] [flags] | --to | string | | | Address to which the token will be minted, default to the owner address | | --amount | uint64 | Yes | 0 | Amount of the tokens to be minted | +## iris tx token swap-fee + +Swap one token with another token. For example, this feature can be used to exchange `IRIS` for `ERIS`. + +```bash +iris tx token swap-fee [fee_paid] --to [reciever] +``` +**Flags:** + +| Name | Type | Required | Default | Description | +| -------- | ------ |----------| ------- |-------------------------------------------| +| --to | string | Yes | | Address to which the token will be swaped | + ### Mint Token ```bash diff --git a/docs/get-started/evm-contract.md b/docs/get-started/evm-contract.md index 3bf23524d6..4134078c34 100644 --- a/docs/get-started/evm-contract.md +++ b/docs/get-started/evm-contract.md @@ -64,8 +64,8 @@ Open the Metamask extension on your browser, you may have to log in to your Meta Then click the top right circle and go to `Settings > Networks`. Press the `Add Network` button and fill the form as the example below with your application ChainID: -- Network Name: IRISHub -- RPC URL: http://localhost:8545 +- Network Name: IRISHub 2.0 +- RPC URL: https://evmrpc.irishub-1.irisnet.org - ChainID: 6688 - Symbol: ERIS diff --git a/docs/migration/account.md b/docs/migration/account.md new file mode 100644 index 0000000000..693cd14597 --- /dev/null +++ b/docs/migration/account.md @@ -0,0 +1,63 @@ +## Introduction + +IRISHub v2.0 changed the generative structure of the entire account system from `auth.BaseAccountProto` to `ethermint.ProtoAccount` , resulting in incompatibility of newly created accounts; + +**Note:** **Accounts before the v2.0 upgrade will not be affected and can still be used normally** + +**The following content takes nyancat testnet as an example:** + +For accounts before the v2.0 upgrade, the query structure through LCD is as follows: https://lcd.nyancat.irisnet.org/cosmos/auth/v1beta1/accounts/iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2 + +```json +{ + "account": { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address":"iaa1e0rx87mdj79zejewuc4jg7ql9ud2286g2us8f2", + "pub_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key":"AiOFJ3Jclq/8y3xV85ALNFuA7FJo1IMoTxYoB3ddMrMr" + }, + "account_number": "1251", + "sequence": "12983" + } +} +``` + +For accounts upgraded in v2.0, the query structure through LCD is as follows: https://lcd.nyancat.irisnet.org/cosmos/auth/v1beta1/accounts/iaa1g4uak38a8fhkg5v5qky3fc9g6h50yrdcn7waug + +```json +{ + "account": { + "@type": "/ethermint.types.v1.EthAccount", + "base_account": { + "address":"iaa1g4uak38a8fhkg5v5qky3fc9g6h50yrdcn7waug", + "pub_key": { + "@type": "/ethermint.crypto.v1.ethsecp256k1.PubKey", + "key":"AhHKT0xpnrOmpikkd1lEPxiEHG4ngItq06KLhwU2UQHO" + }, + "account_number": "5564", + "sequence": "6" + }, + "code_hash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + } +} +``` + + +### Using Proto + +A new type needs to be registered, and the type structure is here: https://github.com/bianjieai/ethermint/blob/v0.20.0-irishub-1/proto/ethermint/types/v1/account.proto + +When the query structure is `/ethermint.types.v1.EthAccount`, use the new structure analysis; + +When the query structure is `/cosmos.auth.v1beta1.BaseAccount`, use the old structure analysis; + +You can refer to the core-sdk-go written by the irisnet team. The relevant hash is at: https://github.com/irisnet/core-sdk-go/commit/68ed671727e057edb185935c42710f8777dab62f + +### Useing LCD + +When parsing, please make compatibility according to the required type; + +If the type is `/cosmos.auth.v1beta1.BaseAccount`, use the old structure analysis; + +If the type is `/ethermint.types.v1.EthAccount`, use the new structure analysis; \ No newline at end of file diff --git a/docs/pics/evm-metamask.png b/docs/pics/evm-metamask.png index 9e54801deb..36c2e679d9 100644 Binary files a/docs/pics/evm-metamask.png and b/docs/pics/evm-metamask.png differ