Skip to content

Commit

Permalink
docs: add release doc for ITS on Sui
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchainguyy committed Jan 31, 2025
1 parent e4bef79 commit 6d917a3
Showing 1 changed file with 139 additions and 0 deletions.
139 changes: 139 additions & 0 deletions releases/sui/2025-01-ITS-v1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# EVM ITS v1.1.0

| | **Owner** |
|-----------|------------|
| **Created By** | @milapsheth <[email protected]> |
| **Deployment** | @blockchainguyy <[email protected]> |

| **Network** | **Deployment Status** | **Date** |
|-------------|----------------------|----------|
| **Devnet Amplifier** | Deployed | 2025-01-24 |
| **Stagenet** | - | TBD |
| **Testnet** | - | TBD |
| **Mainnet** | - | TBD |

[Release](https://github.com/axelarnetwork/axelar-cgp-sui/releases/tag/v1.0.3)

[Changelog](https://github.com/axelarnetwork/interchain-token-service/blob/v/CHANGELOG.md#210)

## Deployment

- Ensure that ITS Hub has been upgraded to [v1.1.0](../cosmwasm/2025-01-ITS-v1.1.0.md) first.
- The rollout involves deploying Sui ITS contracts version `v1.1.0` on Sui.

```bash
# Clone latest main and update deps
npm ci
```

Create an `.env` config. Use `all` for `CHAINS` to run the cmd for every EVM chain, or set a specific chain.

```yaml
MNEMONIC=<wasm-deployer-key>
PRIVATE_KEY=<sui-deployer-key>
PRIVATE_KEY_TYPE="mnemonic" # Optional
SIGNATURE_SCHEME=secp256k1
ENV=<devnet-amplifier|stagenet|testnet|mainnet>
CHAIN=sui
```

### Deploy move contracts
- Ensure that there isn’t a move directory in Sui directory, if it exists delete it.
```bash
rm -rf ./sui/move
```

- Deploy the ITS Contract and required depndencies on Sui (remember to save `sui/move` files for ITS deployment)

```bash
node sui/deploy-contract.js deploy ABI
node sui/deploy-contract.js deploy ITS
node sui/deploy-contract.js deploy Example
```

### Register Sui chain on core

```bash
ITS_HUB_ADDR=$(cat ./axelar-chains-config/info/<your_config_name>.json | jq -rM '.axelar.contracts.InterchainTokenService.address')
ITS_SUI_CHANNEL=$(cat ./axelar-chains-config/info/<your_config_name>.json | jq -rM '.chains.sui.contracts.ITS.objects.ChannelId')
```

#### Devnet:
```bash
kubectl exec genesis-0 -- axelard tx wasm execute "$ITS_HUB_ADDR" \
'{
"register_chains": {
"chains": [
{
"chain": "sui",
"its_edge_contract": "'"$ITS_SUI_CHANNEL"'",
"truncation": {
"max_decimals_when_truncating": '"8"',
"max_uint": "'"18446744073709551615"'"
}
}
]
}
}' \
--from <name-of-your-wasm-deployer-key> \
--gas auto \
--gas-adjustment 1.2
```

#### Stagenet/Testnet/Mainnet:
```bash
node cosmwasm/submit-proposal.js its-hub-register-chains sui -t "Register ITS for Sui chain" -d "Register ITS for Sui chain at ITS Hub contract" --deposit 100000000 \
-m '{
"register_chains": {
"chains": [
{
"chain": "sui",
"its_edge_contract": "'"$ITS_SUI_CHANNEL"'",
"truncation": {
"max_decimals_when_truncating": '"8"',
"max_uint": "'"18446744073709551615"'"
}
}
]
}
}'
```

### Setting up trusted addresses
```bash
ITS_HUB_ADDR=$(cat ./axelar-chains-config/info/<your_config_name>.json | jq -rM '.axelar.contracts.InterchainTokenService.address')

node sui/its.js setup-trusted-address axelar $ITS_HUB_ADDR

# comma separated list of existing chains of ITS
node evm/its.js -n avalanche-fuji,ethereum-sepolia --action setTrustedAddress --trustedChain sui --trustedAddress hub

# the other way around, done for all existing chains with ITS
node sui/its.js setup-trusted-address all-evm hub
```

## Checklist

The following checks should be performed after the rollout

- [ ] Run the following to test ITS transfer

```bash
# Deploy Test Tokens
node sui/its-example deploy-token --origin [symbo] [name] [decimal]

# Send Token Deployment to Gateway
node sui/its-example send-deployment [symbol] [consensusChain] [fee]

# Send Token Deployment to Gateway
node sui/its-example send-deployment [symbol] [amplifierChain] [fee]

# Send Tokens to Destination chain
node sui/its-example send-token [symbol] [sourceChain] [sourceAddress] [fee] 1

# Send Tokens to Destination chain
node sui/its-example send-token [symbol] [sourceChain] [sourceAddress] [fee] 1

# Initiate token trasnfer from both EVM chains too
node evm/its.js --action interchainTransfer --destinationChain sui --tokenId [tokenId] --destinationAddress [recipient] --amount 1 --gasValue 0.5
```

0 comments on commit 6d917a3

Please sign in to comment.