|
|
5 tháng trước cách đây | |
|---|---|---|
| .. | ||
| src | ecd23ff30b fix: update imports to use @pythnetwork/contract-manager instead of relative imports | 5 tháng trước cách đây |
| .gitignore | f61d4dd546 feat(target_chains/sui): add iota network (#2428) | 8 tháng trước cách đây |
| README.md | f61d4dd546 feat(target_chains/sui): add iota network (#2428) | 8 tháng trước cách đây |
| package.json | b5ae884eba refactor(js): move ts-node to package catalog (#2513) | 8 tháng trước cách đây |
| tsconfig.json | a899d658da refactor: split structure into core/node | 5 tháng trước cách đây |
Install move cli according to this doc
Configure the Move.toml file accordingly. The wormhole address should be specified based on the target chain in the Move.toml and the pyth address should be 0x0.
We can deploy the pyth oracle and initialize it with the following command:
npm run cli -- deploy --private-key <private-key> --chain [iota_sui|iota_sui]
You can then add your iota contract configs to the contract manager store.
You can also manually create all the price feeds available at the moment to make it easier for devs to test the oracle.
npm run cli -- create-all --private-key <private-key> --contract <contract-id>
You can use the create and update-feeds commands to create and update price feeds respectively.
npm run cli -- create --feed-id <feed-id> --private-key <private-key> --contract <contract-id>
npm run cli -- update-feeds --feed-id <feed-id> --private-key <private-key> --contract <contract-id>
The following steps are needed to upgrade our iota contracts:
current_version and previous_version functions in version_control modulemigrate moduleRun the following command to generate the new hash, make sure the contract addresses are identical to the deployed ones:
npm run cli -- generate-digest
To upgrade the contract after the governance vaa was executed run:
npm run cli -- upgrade --private-key <private-key> --contract <contract-id> --vaa <upgrade-vaa>
The upgrade procedure consists of 2 transactions. The first one is to upgrade the contract (iota level) and the second one is to run the migrate function and upgrade the version (package level).
Since clients try to fetch the latest version of the package automatically, it's important to run the second transaction as soon as possible after the first one.
Transaction has non recoverable errors from at least 1/3 of validators. What should I do?
Make sure you have enough funding in the wallet and try again. Usually a more descriptive error message is available in the returned value of the transaction.