Skip to content

Commit 795e914

Browse files
darunrsali-behjati
andauthored
feat: Add iota mainnet (#2653)
* copy iota testnet wormhole * add chain id for iota mainnet * add move.toml * remove contract toml for now and update toml of vendored wormhole * build and publish wormhole * deploy and activate wormhole * add mainnet to contract manager * feat: add pyth deployment metadata --------- Co-authored-by: Ali Behjati <[email protected]>
1 parent 24476eb commit 795e914

File tree

139 files changed

+27794
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+27794
-0
lines changed

contract_manager/store/chains/IotaChains.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
mainnet: false
44
rpcUrl: https://api.testnet.iota.cafe/
55
type: IotaChain
6+
- id: iota_mainnet
7+
wormholeChainName: iota_sui_mainnet
8+
mainnet: true
9+
rpcUrl: https://api.mainnet.iota.cafe/
10+
type: IotaChain

contract_manager/store/contracts/IotaPriceFeedContracts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
stateId: "0x68dda579251917b3db28e35c4df495c6e664ccc085ede867a9b773c8ebedc2c1"
33
wormholeStateId: "0x8bc490f69520a97ca1b3de864c96aa2265a0cf5d90f5f3f016b2eddf0cf2af2b"
44
type: IotaPriceFeedContract
5+
- chain: iota_mainnet
6+
stateId: "0x6bc33855c7675e006f55609f61eebb1c8a104d8973a698ee9efd3127c210b37f"
7+
wormholeStateId: "0xd43b448afc9dd01deb18273ec39d8f27ddd4dd46b0922383874331771b70df73"
8+
type: IotaPriceFeedContract
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
- chain: iota_testnet
22
stateId: "0x8bc490f69520a97ca1b3de864c96aa2265a0cf5d90f5f3f016b2eddf0cf2af2b"
33
type: IotaWormholeContract
4+
- chain: iota_mainnet
5+
stateId: "0xd43b448afc9dd01deb18273ec39d8f27ddd4dd46b0922383874331771b70df73"
6+
type: IotaWormholeContract

governance/xc_admin/packages/xc_admin_common/src/chains.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export const RECEIVER_CHAINS = {
111111
xion: 60081,
112112
worldchain: 60082,
113113
swellchain: 60083,
114+
// empty chain id 60084
115+
iota_sui_mainnet: 60085,
114116

115117
// Testnets as a separate chain ids (to use stable data sources and governance for them)
116118
injective_testnet: 60013,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "Pyth"
3+
version = "0.0.2"
4+
published-at = "0x7792c84e1f8683dac893126712f7cf3ba5fcc82450839f0a481215f60199769f"
5+
6+
[dependencies.Iota]
7+
git = "https://github.com/iotaledger/iota.git"
8+
subdir = "crates/iota-framework/packages/iota-framework"
9+
rev = "751c23caf24efd071463b9ffd07eabcb15f44f31"
10+
11+
[dependencies.Wormhole]
12+
local = "../vendor/wormhole_iota_mainnet/wormhole"
13+
14+
[addresses]
15+
pyth = "0x7792c84e1f8683dac893126712f7cf3ba5fcc82450839f0a481215f60199769f"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
deploy.out
2+
sui.log.*
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# first build the image
2+
3+
cd ..; DOCKER_BUILDKIT=1 docker build --no-cache --progress plain -f sui/Dockerfile.base -t sui .
4+
5+
# tag the image with the appropriate version
6+
7+
docker tag sui:latest ghcr.io/wormhole-foundation/sui:1.19.1-mainnet
8+
9+
# push to ghcr
10+
11+
docker push ghcr.io/wormhole-foundation/sui:1.19.1-mainnet
12+
13+
echo remember to update both Dockerfile and Dockerfile.export
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM cli-gen AS cli-export
2+
FROM const-gen AS const-export
3+
FROM ghcr.io/wormhole-foundation/sui:1.19.1-mainnet@sha256:544a1b2aa5701fae25a19aed3c5e8c24e0caf7d1c9f511b6844d339a8f0b2a00 as sui
4+
5+
# initial run
6+
# COPY sui/devnet/genesis_config genesis_config
7+
# RUN sui genesis -f --from-config genesis_config
8+
9+
# subsequent runs after committing files from /root/.sui/sui_config/
10+
COPY sui/devnet/ /root/.sui/sui_config/
11+
12+
WORKDIR /tmp
13+
14+
COPY sui/scripts/ scripts
15+
COPY sui/wormhole/ wormhole
16+
COPY sui/token_bridge/ token_bridge
17+
COPY sui/examples/ examples
18+
COPY sui/Makefile Makefile
19+
20+
# Copy .env and CLI
21+
COPY --from=const-export .env .env
22+
COPY --from=cli-export clients/js /cli
23+
24+
# Link `worm`
25+
WORKDIR /cli
26+
27+
RUN npm link
28+
29+
FROM sui AS tests
30+
31+
WORKDIR /tmp
32+
33+
RUN --mount=type=cache,target=/root/.move,id=move_cache make test
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM rust:1.62@sha256:5777f201f507075309c4d2d1c1e8d8219e654ae1de154c844341050016a64a0c as sui-node
2+
3+
WORKDIR /tmp
4+
5+
RUN curl -L https://github.com/MystenLabs/sui/releases/download/mainnet-v1.19.1/sui-mainnet-v1.19.1-ubuntu-x86_64.tgz > sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
6+
RUN echo "6a8cc96759760293143a00fe7031a5fea70d2dff5b98d18c0470c09555da63e0 sui-mainnet-v1.19.1-ubuntu-x86_64.tgz" | sha256sum -c --status
7+
8+
RUN tar -xvf sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
9+
RUN mv target/release/sui-ubuntu-x86_64 /bin/sui
10+
RUN mv target/release/sui-faucet-ubuntu-x86_64 /bin/sui-faucet
11+
RUN mv target/release/sui-node-ubuntu-x86_64 /bin/sui-node
12+
13+
RUN rm sui-mainnet-v1.19.1-ubuntu-x86_64.tgz
14+
15+
RUN apt-get update
16+
RUN apt-get install -y ca-certificates curl gnupg
17+
RUN mkdir -p /etc/apt/keyrings
18+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
19+
20+
ARG NODE_MAJOR=18
21+
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
22+
23+
RUN apt-get update
24+
RUN apt-get install nodejs -y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
TEST_CONTRACT_DIRS := wormhole token_bridge examples/coins examples/core_messages
2+
CLEAN_CONTRACT_DIRS := wormhole token_bridge examples/coins examples/core_messages
3+
4+
.PHONY: clean
5+
clean:
6+
$(foreach dir,$(TEST_CONTRACT_DIRS), make -C $(dir) $@ &&) true
7+
8+
.PHONY: test
9+
test:
10+
$(foreach dir,$(TEST_CONTRACT_DIRS), make -C $(dir) $@ &&) true
11+
12+
test-docker:
13+
DOCKER_BUILDKIT=1 docker build --progress plain -f ../Dockerfile.cli -t cli-gen ..
14+
DOCKER_BUILDKIT=1 docker build --build-arg num_guardians=1 --progress plain -f ../Dockerfile.const -t const-gen ..
15+
DOCKER_BUILDKIT=1 docker build -f Dockerfile ..

0 commit comments

Comments
 (0)