Skip to content

Commit 2ad991f

Browse files
authored
Abehjati/add-eth-governance (#279)
Also add governance-sdk-js to generate messages (both in testing and in multisig)
1 parent b86a9d1 commit 2ad991f

Some content is hidden

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

41 files changed

+13719
-29
lines changed

ethereum/Dockerfile renamed to Dockerfile.ethereum

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@ RUN apk add git python make build-base
66

77
# Run as user, otherwise, npx explodes.
88
USER 1000
9-
RUN mkdir -p /home/node/app
9+
RUN mkdir -p /home/node/ethereum
1010
RUN mkdir -p /home/node/.npm
11-
WORKDIR /home/node/app
11+
12+
WORKDIR /home/node/third_party/pyth/xc-governance-sdk-js/
13+
ADD --chown=node:node third_party/pyth/xc-governance-sdk-js/ .
14+
15+
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
16+
--mount=type=cache,uid=1000,gid=1000,target=xc_gc_node_modules \
17+
npm install && \
18+
cp -r node_modules node_modules_cache
19+
20+
21+
WORKDIR /home/node/ethereum
1222

1323
# Only invalidate the npm install step if package.json changed
14-
ADD --chown=node:node package.json .
15-
ADD --chown=node:node package-lock.json .
16-
ADD --chown=node:node .env.test .env
24+
ADD --chown=node:node ethereum/package.json .
25+
ADD --chown=node:node ethereum/package-lock.json .
26+
ADD --chown=node:node ethereum/.env.test .env
1727

1828
# We want to cache node_modules *and* incorporate it into the final image.
1929
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
@@ -26,4 +36,5 @@ RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
2636
# could be a renameat syscall. Alpine does not have this bug.
2737
RUN rm -rf node_modules && mv node_modules_cache node_modules
2838

29-
ADD --chown=node:node . .
39+
ADD --chown=node:node ethereum/ .
40+

Tiltfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ k8s_resource(
155155

156156
docker_build(
157157
ref = "eth-node",
158-
context = "./ethereum",
159-
dockerfile = "./ethereum/Dockerfile",
158+
context = "./",
159+
dockerfile = "./Dockerfile.ethereum",
160160

161161
# ignore local node_modules (in case they're present)
162-
ignore = ["./ethereum/node_modules"],
162+
ignore = ["./ethereum/node_modules", "./third_party/pyth/xc-governance-sdk-js/node_modules"],
163163

164164
# sync external scripts for incremental development
165165
# (everything else needs to be restarted from scratch for determinism)

ethereum/.env.prod.aurora_testnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ PYTHNET_CHAIN_ID=0x1a
99
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1010

1111
VALID_TIME_PERIOD_SECONDS=60
12+
13+
GOVERNANCE_CHAIN_ID=0x1
14+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.bnb_testnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ PYTHNET_CHAIN_ID=0x1a
99
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1010

1111
VALID_TIME_PERIOD_SECONDS=60
12+
13+
GOVERNANCE_CHAIN_ID=0x1
14+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.celo_alfajores_testnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ PYTHNET_CHAIN_ID=0x1a
99
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1010

1111
VALID_TIME_PERIOD_SECONDS=60
12+
13+
GOVERNANCE_CHAIN_ID=0x1
14+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.development

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ PYTHNET_CHAIN_ID=0x1a
1010
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1111

1212
VALID_TIME_PERIOD_SECONDS=60
13+
14+
GOVERNANCE_CHAIN_ID=0x1
15+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.fantom_testnet

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ PYTHNET_CHAIN_ID=0x1a
99
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1010

1111
VALID_TIME_PERIOD_SECONDS=60
12+
13+
GOVERNANCE_CHAIN_ID=0x1
14+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.fuji

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ PYTHNET_CHAIN_ID=0x1a
1111
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1212

1313
VALID_TIME_PERIOD_SECONDS=60
14+
15+
GOVERNANCE_CHAIN_ID=0x1
16+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.goerli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ PYTHNET_CHAIN_ID=0x1a
99
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1010

1111
VALID_TIME_PERIOD_SECONDS=120
12+
13+
GOVERNANCE_CHAIN_ID=0x1
14+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

ethereum/.env.prod.mumbai

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ PYTHNET_CHAIN_ID=0x1a
1111
PYTHNET_EMITTER=0xa27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6
1212

1313
VALID_TIME_PERIOD_SECONDS=60
14+
15+
GOVERNANCE_CHAIN_ID=0x1
16+
GOVERNANCE_EMITTER=0xad070b5dc9c72dcf0484b8f9c643f18586eadfbff06b7e240e4a540edb93d152

0 commit comments

Comments
 (0)