You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a `.env` config. Use `all` for `CHAINS` to run the cmd for every EVM chain, or set a specific chain. On `devnet-amplifier` chain name will be set to `sui-2`.
25
+
26
+
```yaml
27
+
PRIVATE_KEY=<sui-deployer-key>
28
+
PRIVATE_KEY_TYPE="mnemonic" # Optional
29
+
SIGNATURE_SCHEME=secp256k1
30
+
ENV=<devnet-amplifier|stagenet|testnet|mainnet>
31
+
CHAIN=sui
32
+
```
33
+
34
+
### ITS Contract Admin & Roles
35
+
36
+
Many of the below commands require either Owner or Operator privileges on the ITS contract.
37
+
38
+
#### OwnerCap
39
+
40
+
Some commands require a wallet that owns the contract's admin capability (`OwnerCap`). By default, this will be the address that deployed the ITS v0 contract.
41
+
42
+
The commands requiring this capability are:
43
+
*[Upgrading the ITS move contract][]
44
+
*[Enabling the Upgrade][]
45
+
*[Disabling the Legacy Contract][]
46
+
47
+
#### OperatorCap
48
+
49
+
Migrating legacy coin metadata requires a `OperatorCap` capability. This is any address added as an operator for the effected coin. By default, the address that deployed and initialized the ITS v0 contract possesses a `OperatorCap`.
50
+
51
+
The commands requiring this capability are:
52
+
*[Migrating Legacy Tokens][]
53
+
54
+
### Fetching Legacy Tokens
55
+
56
+
To fix the issue of some tokens not displaying correctly in wallets, we need to fetch the effected tokens. This list can be fetched before, or after the upgrade.
57
+
58
+
```bash
59
+
# Save legacy tokens for later migration
60
+
ts-node sui/tokens legacy-coins
61
+
```
62
+
63
+
### Upgrading the ITS move contract ###
64
+
65
+
1. Update the release dependency in `package.json`
Copy file name to clipboardExpand all lines: sui/README.md
+87Lines changed: 87 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,15 @@ policy should be one of the following:
229
229
230
230
Provide `--txFilePath` with `--offline` to generate tx data file for offline signing.
231
231
232
+
### Migrating Post-Upgrade
233
+
234
+
After upgrading a package, state migrations (e.g. for [versioned](https://docs.sui.io/references/framework/sui/versioned) packages) can be called using the `migrate` command.
If a `channel` id is present in the `options` array (e.g. `--channel <channel>`) it will be used, otherwise a new `channel` will be created and transferred to the sender. A `salt` for the registration transaction will automatically be created.
_Added in v1 to fix coins that were not displaying correctly in wallet softwares. Only callable for coins with metadata owned by ITS. Will [publicly freeze](https://docs.sui.io/references/framework/sui/transfer#sui_transfer_public_freeze_object) a coin's metadata, making it a publicly shared object._
473
+
474
+
```bash
475
+
ts-node sui/its.js migrate-coin-metadata <symbol>
476
+
```
477
+
478
+
## Coin Linking
479
+
480
+
### Give Unlinked Coin
481
+
482
+
Deploys a coin on Sui, registers it as custom coin and gives its treasury capability to ITS. Treasury capability will be reclaimable if the `--treasuryCapReclaimer` flag is passed to the command options.
Deploys a source coin and links it with a destination chain coin. If a `channel` id is present in the `options` array (e.g. `--channel <channel>`) it will be used, otherwise a new `channel` will be created and transferred to the sender. A `salt` for the coin registration and linking transactions will automatically be created.
This script generates a `verification` folder inside the `move` directory, which contains ZIP files for each contract to be used for verification. Before zipping, a `deps` subdirectory is added to each contract, and the local dependency paths in the `Move.toml` file are updated to reference the `deps` folder.
0 commit comments