-
Notifications
You must be signed in to change notification settings - Fork 141
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: rewrite Upgrade Token page #915
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
## Link deployed tokens on multiple chains into Interchain Token(s) | ||
|
||
For custom functionality on multiple chains: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have removed a few important steps they need to do before they Call deployTokenManager() on the Interchain Token Service to deploy a token manager for the existing version of the token on all chains.
|
||
You can optionally have any of these custom tokens extend [`IInterchainTokenStandard`](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interfaces/IInterchainTokenStandard.sol) to offer [`interchainTransfer`](https://github.com/axelarnetwork/interchain-token-service/blob/a2dfcb2490497e627b66be789d944ec3260c5eea/contracts/interfaces/IInterchainTokenStandard.sol#L20) and [`interchainTransferFrom`](https://github.com/axelarnetwork/interchain-token-service/blob/a2dfcb2490497e627b66be789d944ec3260c5eea/contracts/interfaces/IInterchainTokenStandard.sol#L37) methods directly on your token. | ||
|
||
> You could decide to make all of these Token Managers [Mint/Burn](https://docs.axelar.dev/dev/glossary#mintburn), or you could specify at most one (likely your primary/origin chain) to be [Lock/Release](https://docs.axelar.dev/dev/glossary#lockunlock) as indicated in the [`ITokenManagerType.sol`](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interfaces/ITokenManagerType.sol) depending on your needs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This info is also very important. I see you have merged the info to talk about making the primary chain the origin chain, but referencing the token manager type is missing.
|
||
To create the `params` that will be used to initialize the Token Manager in the `deployTokenManager` method above, you can use the [Online Ethereum ABI Encoder](https://adibas03.github.io/online-ethereum-abi-encoder-decoder/#/encode) specifying the operator of the Token Manager and the token address with the argument type `bytes` and `address` respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph is very important to help builders understand how to create params
for deploying token managers.
This line The [Online Ethereum ABI Encoder](https://adibas03.github.io/online-ethereum-abi-encoder-decoder/#/encode) can create the parameters for initializing the token manager.
is confusing because, on the smart contract, we referenced it as params
not parameters that sound like the entire parameters meanwhile the online encoder is just used to create params.
Here is an example of deploying a token manager: | ||
|
||
```solidity | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we don't need short code sample snippets like these? What do you think about the user journey of clicking and redirecting to an external URL instead of seeing a sample of what it looks like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generally against making people go to a separate page, but for code snippets specifically, I think it would be good to link to GitHub code whenever possible for two reasons:
- They can see it in context
- Code is easier to maintain in one place
|
||
1. Call [`deployTokenManager()`](https://github.com/axelarnetwork/interchain-token-service/blob/9edc4318ac1c17231e65886eea72c0f55469d7e5/contracts/InterchainTokenService.sol#L276) on the Interchain Token Service to deploy a token manager for the existing version of the token on all chains. | ||
* You can use the [Online Ethereum ABI Encoder](https://adibas03.github.io/online-ethereum-abi-encoder-decoder/#/encode) to create the `params` for initializing the token manager. The token manager operator will be of type `bytes`, and the token address will be an `address`. | ||
* You can specify at most one chain (likely the primary or origin) to have a Lock/Unlock token manager. The rest must be Mint/Burn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the info about specifying token manager type can go under the step for calling deployTokenManager()
for this doc. What do you think?
@ffe9f8 to move forward |
@Olanetsoft Do these changes still need to be made? Can you close or move them forward if they're needed? |
Preview: https://axelar-docs-git-marty-its-upgrade-token-axelar-network.vercel.app/dev/send-tokens/interchain-tokens/upgrade-tokens