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

Fix docs links and update block explorers #69

Merged
merged 9 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions pages/dev-tutorials/pointer-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,6 @@ seid tx evm register-evm-pointer CW721 $CW721_TOKEN_ADDRESS --from=$SENDER --cha
- `--gas`: Specifies the maximum amount of gas that can be consumed by the transaction.
- `--fees`: Indicates the transaction fee.
- `--node`: Points to the specific Sei node RPC URL you're connecting to for transaction submission.

### For TokenFactory Tokens
Refer to the [Tokenfactory tutorial](./tokenfactory-tutorial.mdx) for details on how to create a tokenfactory denom and an associated pointer contract.
49 changes: 48 additions & 1 deletion pages/dev-tutorials/tokenfactory-tutorial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,51 @@ Understanding these arguments will help you execute the commands more confidentl
For detailed descriptions of these arguments, use `seid help` in the CLI.
</Callout>

## Updating Token Metadata

When creating a token, it is important to specify details regarding the denom amounts and aliases so your token can be correctly parsed on wallets and explorers.

### 1. Create Token Metadata file
Create a token metadata `json` file. The file below is an example metadata file for the Sei token.
```json
{
"name": "sei",
"description": "The native token of Sei.",
"denom_units": [
{
"denom": "usei,
mj850 marked this conversation as resolved.
Show resolved Hide resolved
"exponent": 0,
"aliases": [
"microsei"
],
},
{
"denom": "msei",
"exponent": 3,
"aliases": [
"millisei"
]
},
{
"denom": "sei",
"exponent": 6,
}
],
"base": "usei",
"display": "sei",
}
```

The `base` field denotes the smallest denom that this token can be represented in.
Note that if you intend to create a [pointer contract](#create-pointer-contract), the `denom_units` with the largest exponent will be used as the display denom. (`sei` in this case).

### 2. Set token metadata using seid
```sh
seid tx tokenfactory set-denom-metadata $METADATA_FILE --fees 20000usei -b block -y --from $ADDR
```

Replace `$METADATA_FILE` with the path to your metadata file created in step 1. and `$ADDR` with the address of the token admin.

## Minting Tokens

```bash copy
Expand Down Expand Up @@ -109,7 +154,7 @@ seid tx evm deploy-erc20 $DENOM $NAME $SYMBOL $DECIMAL --from=$ACCOUNT --evm-rpc
**Parameters**

- `DENOM`: The denomination of the token for which you want to create an ERC20 pointer. This should match the TokenFactory token you created.
- `DENOM`: The name you wish to assign to your ERC20 pointer token. It should match the name of the TokenFactory token.
- `NAME`: The name you wish to assign to your ERC20 pointer token. It should match the name of the TokenFactory token.
- `SYMBOL`: The symbol for your ERC20 pointer token. It should correspond with the symbol of the TokenFactory token.
- `DECIMAL`: The number of decimals for your ERC20 pointer token. This should align with the decimals of the TokenFactory token (typically 6).

Expand All @@ -120,6 +165,8 @@ seid tx evm deploy-erc20 $DENOM $NAME $SYMBOL $DECIMAL --from=$ACCOUNT --evm-rpc

Executing this command creates an ERC20 token and outputs the contract address. This token is linked to the TokenFactory token, meaning any activities involving this ERC20 token will also reflect on the state of the TokenFactory token and vice versa.

Note that if you wish to specify denoms on your ERC20 tokens, you will need to [set the token metadata](#updating-token-metadata) for the base tokenfactory token. The denom with the largest exponent will be used.

<Callout type="info">
Learn more about EVM interoperability and pointer contracts
[here](../interoperability/overview.mdx).
Expand Down
Loading