Skip to content

Commit 533181c

Browse files
authored
[eth] add evmos testnet (#683)
* add evmos_testnet deployment files * fix precommit * fix precommit * bump
1 parent 3e104b4 commit 533181c

File tree

9 files changed

+36
-6
lines changed

9 files changed

+36
-6
lines changed

governance/xc_governance_sdk_js/src/chains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const RECEIVER_CHAINS = {
77
zksync: 60003,
88
shimmer: 60004,
99
gnosis: 60005,
10+
evmos: 60006,
1011
};
1112

1213
// If there is any overlapping value the receiver chain will replace the wormhole

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MIGRATIONS_DIR=./migrations/prod-receiver
2+
MIGRATIONS_NETWORK=evmos_testnet
3+
WORMHOLE_CHAIN_NAME=evmos
4+
CLUSTER=testnet
5+
VALID_TIME_PERIOD_SECONDS=60

target_chains/ethereum/contracts/Deploying.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Each network that Pyth is deployed on has some configuration stored on this repo
2626
- `MIGRATIONS_NETWORK`: Network name in the [`truffle-config.js`](./truffle-config.js) file.
2727
- `WORMHOLE_CHAIN_NAME`: Chain name in Wormhole. It is either defined in the
2828
[Wormhole SDK constants](https://github.com/wormhole-foundation/wormhole/blob/dev.v2/sdk/js/src/utils/consts.ts)
29-
or is defined in [Wormhole Receiver names](../third_party/pyth/xc_governance_sdk_js/src/chains.ts). If the new
29+
or is defined in [Wormhole Receiver names](../../../governance/xc_governance_sdk_js/src/chains.ts). If the new
3030
network requires a Receiver contract you need to update the latter file and add the network there.
3131
- `CLUSTER`: Cluster of this network. It is either `testnet` or `mainnet`. There are some cluster specific
3232
configuration that are loaded from [`.env.cluster.testnet`](./.env.cluster.testnet) or
@@ -68,7 +68,10 @@ This is the deployment process:
6868
- export the Infura RPC API key to `INFURA_KEY` if you are deploying to a network that uses an Infura RPC.
6969
5. Make sure the deployment account has proper balance on this network and top it up if needed. Search
7070
for testnet faucets if it is a testnet network. Sometimes you need to bridge the network token (e.g., L2s).
71-
6. Deploy the new contract or changes using the [`deploy.sh`](./deploy.sh) script.
71+
6. Deploy the new contract or changes using the [`deploy.sh`](./deploy.sh) script. If you have made changes
72+
to [`chains.ts`](../../../governance/xc_governance_sdk_js/src/chains.ts), please make sure to
73+
run `npx lerna run build --scope="@pythnetwork/pyth-evm-contract" --include-dependencies` in the
74+
root directory before running the deployment script.
7275
You might need to repeat this script because of busy RPCs. Repeating would not cause any problem even
7376
if the changes are already made. Also, sometimes the gases are not adjusted and it will cause the tx to
7477
remain on the mempool for a long time (so there is no progress until timeout). Please update them with

target_chains/ethereum/contracts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Please refer to [Deploying.md](./Deploying.md) for more information.
2020
Foundry can be installed by the official installer, or by running our helper script which will automatically pull the correct installation script individually for Foundry and the Solidity compiler for your current OS. This may work better if you are running into networking/firewall issues using Foundry's Solidity installer. To use helper script, run the command below from this directory:
2121

2222
```sh
23-
pyth-crosschain/ethereum $ bash ../scripts/install-foundry.sh
23+
pyth-crosschain/target_chains/ethereum/contracts $ bash ../../../scripts/install-foundry.sh
2424
```
2525

2626
You need to install npm dependencies as described in [Installation](#installation). Also, you need to run the following
27-
command to install forge dependencies:
27+
command in the `contracts` directory to install forge dependencies:
2828

2929
```
3030
npm run install-forge-deps
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"contractName": "Migrations",
4+
"address": "0x5e92a04Cb8591cb7d9FD40B77B474cde0fE44D36"
5+
},
6+
{
7+
"contractName": "WormholeReceiver",
8+
"address": "0xfD4EC459371580925319059306388D9753f72405",
9+
"transactionHash": "0x664b5882e14416bae9c40a03dcc4f5ca769eaed41bb44596c31056b1f4386bad"
10+
},
11+
{
12+
"contractName": "PythUpgradable",
13+
"address": "0x354bF866A4B006C9AF9d9e06d9364217A8616E12",
14+
"transactionHash": "0xeece8e67ba75cdd07348ddafa383e7371b15ad08e2e630c8f040025c72fa6eba"
15+
}
16+
]

target_chains/ethereum/contracts/truffle-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ module.exports = {
208208
apiKey: "",
209209
},
210210
},
211+
evmos_testnet: {
212+
provider: payerProvider(`https://eth.bd.evmos.dev:8545/`),
213+
network_id: 9000,
214+
},
211215
},
212216

213217
compilers: {

target_chains/ethereum/sdk/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-evm-js",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Pyth Network EVM Utils in JS",
55
"homepage": "https://pyth.network",
66
"author": {

target_chains/ethereum/sdk/js/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ export const CONTRACT_ADDR: Record<string, string> = {
3737
shimmer_testnet: "0x354bF866A4B006C9AF9d9e06d9364217A8616E12",
3838
chiado: "0xdDAf6D29b8bc81c1F0798a5e4c264ae89c16a72B", // Gnosis testnet
3939
zksync: "0xf087c864AEccFb6A2Bf1Af6A0382B0d0f6c5D834",
40+
evmos_testnet: "0x354bF866A4B006C9AF9d9e06d9364217A8616E12",
4041
};

0 commit comments

Comments
 (0)