Explorar el Código

[eth] Add EOS network (#963)

Ali Behjati hace 2 años
padre
commit
e63490be48

+ 1 - 0
governance/xc_admin/packages/xc_admin_common/src/chains.ts

@@ -38,6 +38,7 @@ export const RECEIVER_CHAINS = {
   wemix: 60023,
   linea: 60024,
   neutron_testnet_pion_1: 60025,
+  eos: 60026,
 };
 
 // If there is any overlapping value the receiver chain will replace the wormhole

+ 1 - 1
package-lock.json

@@ -58486,7 +58486,7 @@
     },
     "target_chains/ethereum/sdk/js": {
       "name": "@pythnetwork/pyth-evm-js",
-      "version": "1.22.0",
+      "version": "1.23.0",
       "license": "Apache-2.0",
       "dependencies": {
         "@pythnetwork/price-service-client": "*",

+ 5 - 0
target_chains/ethereum/contracts/.env.prod.eos

@@ -0,0 +1,5 @@
+MIGRATIONS_DIR=./migrations/prod-receiver
+MIGRATIONS_NETWORK=eos
+WORMHOLE_CHAIN_NAME=eos
+CLUSTER=mainnet
+VALID_TIME_PERIOD_SECONDS=60

+ 5 - 0
target_chains/ethereum/contracts/.env.prod.eos_testnet

@@ -0,0 +1,5 @@
+MIGRATIONS_DIR=./migrations/prod-receiver
+MIGRATIONS_NETWORK=eos_testnet
+WORMHOLE_CHAIN_NAME=eos
+CLUSTER=testnet
+VALID_TIME_PERIOD_SECONDS=60

+ 16 - 0
target_chains/ethereum/contracts/networks/15557.json

@@ -0,0 +1,16 @@
+[
+  {
+    "contractName": "Migrations",
+    "address": "0xf5BBe9558F4Bf37F1eB82fb2CEdb1C775FA56832"
+  },
+  {
+    "contractName": "WormholeReceiver",
+    "address": "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a",
+    "transactionHash": "0x52fa3139a655d1d92c01073dbf5a57bcfa8754c63db13a137c16d24a5661e522"
+  },
+  {
+    "contractName": "PythUpgradable",
+    "address": "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+    "transactionHash": "0x275abd4ca66afece361d33a84e26dc42703078d299ccb97be895b66fdfb757e9"
+  }
+]

+ 16 - 0
target_chains/ethereum/contracts/networks/17777.json

@@ -0,0 +1,16 @@
+[
+  {
+    "contractName": "Migrations",
+    "address": "0xf5BBe9558F4Bf37F1eB82fb2CEdb1C775FA56832"
+  },
+  {
+    "contractName": "WormholeReceiver",
+    "address": "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a",
+    "transactionHash": "0xccc60abb83d028d4a7fe5fa680d2940a7f6af9fef0b3e887b1575d2453eb3d0a"
+  },
+  {
+    "contractName": "PythUpgradable",
+    "address": "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+    "transactionHash": "0x8cc4fda0f7ab37175ebe4464c7ffe6b91747abe54c7627327df4c87011d02c0a"
+  }
+]

+ 18 - 0
target_chains/ethereum/contracts/truffle-config.js

@@ -292,6 +292,24 @@ module.exports = {
         apiKey: "there_should_be_a_dummy_value_here_to_avoid_error",
       },
     },
+    eos: {
+      provider: payerProvider("https://api.evm.eosnetwork.com"),
+      network_id: 17777,
+      verify: {
+        apiUrl: "https://explorer.evm.eosnetwork.com/api",
+        explorerUrl: "https://explorer.evm.eosnetwork.com",
+        apiKey: "there_should_be_a_dummy_value_here_to_avoid_error",
+      },
+    },
+    eos_testnet: {
+      provider: payerProvider("https://api.testnet.evm.eosnetwork.com"),
+      network_id: 15557,
+      verify: {
+        apiUrl: "https://explorer.testnet.evm.eosnetwork.com/api",
+        explorerUrl: "https://explorer.testnet.evm.eosnetwork.com",
+        apiKey: "there_should_be_a_dummy_value_here_to_avoid_error",
+      },
+    },
   },
 
   compilers: {

+ 1 - 1
target_chains/ethereum/sdk/js/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@pythnetwork/pyth-evm-js",
-  "version": "1.22.0",
+  "version": "1.23.0",
   "description": "Pyth Network EVM Utils in JS",
   "homepage": "https://pyth.network",
   "author": {

+ 2 - 0
target_chains/ethereum/sdk/js/src/index.ts

@@ -57,4 +57,6 @@ export const CONTRACT_ADDR: Record<string, string> = {
   wemix_testnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   linea_goerli: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
   linea: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+  eos: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
+  eos_testnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729",
 };