Skip to content

Commit cf78791

Browse files
authored
[sui] [contract-manager] Sui cm updates (#1030)
* Minor documentation and improvements on contract manager * Add published addresses for sui contracts
1 parent ac0519b commit cf78791

File tree

8 files changed

+13
-6
lines changed

8 files changed

+13
-6
lines changed

contract_manager/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contract Manager
2+
3+
The contract manager is a tool to interact with Pyth related contracts on all supported chains.
4+
5+
It has the following structure:
6+
7+
- `store` contains all the necessary information for registered chains and deployed contracts
8+
- `scripts` contains utility scripts to interact with the contract manager and accomplish common tasks
9+
- `src` contains the contract manager code

contract_manager/scripts/check_proposal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { EvmContract, WormholeEvmContract } from "../src/contracts/evm";
2222
import Web3 from "web3";
2323

2424
const parser = yargs(hideBin(process.argv))
25-
.scriptName("check_proposal.ts")
2625
.usage("Usage: $0 --cluster <cluster_id> --proposal <proposal_address>")
2726
.options({
2827
cluster: {

contract_manager/scripts/fetch_fees.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
DefaultStore,
77
EvmContract,
88
} from "../src";
9-
import { PriceServiceConnection } from "@pythnetwork/price-service-client";
109

1110
const parser = yargs(hideBin(process.argv))
1211
.usage("Usage: $0")

contract_manager/scripts/sync_governance_vaas.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import yargs from "yargs";
22
import { hideBin } from "yargs/helpers";
33
import { DefaultStore } from "../src/store";
4-
import { PriceServiceConnection } from "@pythnetwork/price-service-client";
54
import { SubmittedWormholeMessage, Vault } from "../src/governance";
65
import { parseVaa } from "@certusone/wormhole-sdk";
76
import { decodeGovernancePayload } from "xc_admin_common";

contract_manager/scripts/update_pricefeed.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { DefaultStore, toPrivateKey } from "../src";
44
import { PriceServiceConnection } from "@pythnetwork/price-service-client";
55

66
const parser = yargs(hideBin(process.argv))
7-
.scriptName("update_pricefeed.ts")
87
.usage(
98
"Usage: $0 --contract <contract_id> --feed-id <feed-id> --private-key <private-key>"
109
)

contract_manager/scripts/upload_cosmwasm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { hideBin } from "yargs/helpers";
33
import { CosmWasmChain } from "../src/chains";
44
import { CosmWasmContract } from "../src/contracts/cosmwasm";
55
import { DefaultStore } from "../src/store";
6+
import { toPrivateKey } from "../src";
67

78
const parser = yargs(hideBin(process.argv))
8-
.scriptName("upload_cosmwasm.ts")
99
.usage(
1010
"Usage: $0 --code <path/to/artifact.wasm> --private-key <private-key> --chain <chain>"
1111
)
@@ -32,7 +32,7 @@ async function main() {
3232
const { code } = argv;
3333
const { codeId } = await CosmWasmContract.storeCode(
3434
DefaultStore.chains[argv.chain] as CosmWasmChain,
35-
argv["private-key"],
35+
toPrivateKey(argv["private-key"]),
3636
code
3737
);
3838
console.log(`Successfully uploaded code with id ${codeId}`);

target_chains/sui/contracts/Move.mainnet.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "Pyth"
33
version = "0.0.1"
4+
published-at = "0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e"
45

56
[dependencies.Sui]
67
git = "https://github.com/MystenLabs/sui.git"

target_chains/sui/contracts/Move.testnet.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "Pyth"
33
version = "0.0.1"
4+
published-at = "0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3"
45

56
[dependencies.Sui]
67
git = "https://github.com/MystenLabs/sui.git"

0 commit comments

Comments
 (0)