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: rewrite Upgrade Token page #915

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
axelar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 8:44pm


## Link deployed tokens on multiple chains into Interchain Token(s)

For custom functionality on multiple chains:
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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
/**
Copy link
Contributor

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?

Copy link
Contributor Author

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:

  1. They can see it in context
  2. 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.
Copy link
Contributor Author

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?

@StephenFluin
Copy link
Collaborator

@ffe9f8 to move forward

@StephenFluin
Copy link
Collaborator

@Olanetsoft Do these changes still need to be made? Can you close or move them forward if they're needed?

@StephenFluin StephenFluin assigned Olanetsoft and unassigned ffe9f8 Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants