diff --git a/data/addresses.mainnet.json b/data/addresses.mainnet.json index 104a4b29..2d771e2b 100644 --- a/data/addresses.mainnet.json +++ b/data/addresses.mainnet.json @@ -23,28 +23,28 @@ { "address": "0x70e967acFcC17c3941E87562161406d41676FD83", "category": "omnichain", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "tss" }, { "address": "0x70e967acFcC17c3941E87562161406d41676FD83", "category": "omnichain", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "tss" }, { "address": "0x70e967acFcC17c3941E87562161406d41676FD83", "category": "omnichain", - "chain_id": "8332", + "chain_id": 8332, "chain_name": "btc_mainnet", "type": "tss" }, { "address": "0x70e967acFcC17c3941E87562161406d41676FD83", "category": "omnichain", - "chain_id": "7000", + "chain_id": 7000, "chain_name": "zeta_mainnet", "type": "tss" }, @@ -184,70 +184,70 @@ { "address": "0x0000028a2eB8346cd5c0267856aB7594B7a55308", "category": "messaging", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "zetaToken" }, { "address": "0x000063A6e758D9e2f438d430108377564cf4077D", "category": "messaging", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "connector" }, { "address": "0x00000fF8fA992424957F97688015814e707A0115", "category": "omnichain", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "erc20Custody" }, { "address": "0xf091867EC603A6628eD83D274E835539D82e9cc8", "category": "messaging", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "zetaToken" }, { "address": "0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a", "category": "messaging", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "connector" }, { "address": "0x0000030Ec64DF25301d8414eE5a29588C4B0dE10", "category": "omnichain", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "erc20Custody" }, { "address": "0xaeB6dDB7708467814D557e340283248be8E43124", "category": "omnichain", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "tssUpdater" }, { "address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8", "category": "omnichain", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "tssUpdater" }, { "address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8", "category": "messaging", - "chain_id": "56", + "chain_id": 56, "chain_name": "bsc_mainnet", "type": "pauser" }, { "address": "0xaeB6dDB7708467814D557e340283248be8E43124", "category": "messaging", - "chain_id": "1", + "chain_id": 1, "chain_name": "eth_mainnet", "type": "pauser" }, diff --git a/data/addresses.testnet.json b/data/addresses.testnet.json index 2e5de1e6..a4df5b8e 100644 --- a/data/addresses.testnet.json +++ b/data/addresses.testnet.json @@ -65,28 +65,28 @@ { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", - "chain_id": "5", + "chain_id": 5, "chain_name": "goerli_testnet", "type": "tss" }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", - "chain_id": "97", + "chain_id": 97, "chain_name": "bsc_testnet", "type": "tss" }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", - "chain_id": "80001", + "chain_id": 80001, "chain_name": "mumbai_testnet", "type": "tss" }, { "address": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur", "category": "omnichain", - "chain_id": "18332", + "chain_id": 18332, "chain_name": "btc_testnet", "type": "tss" }, @@ -224,107 +224,107 @@ "type": "fungibleModule" }, { - "address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", + "address": "0x0000c304d2934c00db1d51995b9f6996affd17c0", "category": "messaging", - "chain_id": "97", - "chain_name": "bsc_testnet", + "chain_id": 5, + "chain_name": "goerli_testnet", "type": "zetaToken" }, { - "address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", + "address": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", "category": "messaging", - "chain_id": "97", - "chain_name": "bsc_testnet", + "chain_id": 5, + "chain_name": "goerli_testnet", "type": "connector" }, { - "address": "0x0000a7db254145767262c6a81a7ee1650684258e", + "address": "0x000047f11c6e42293f433c82473532e869ce4ec5", "category": "omnichain", - "chain_id": "97", - "chain_name": "bsc_testnet", + "chain_id": 5, + "chain_name": "goerli_testnet", "type": "erc20Custody" }, { - "address": "0x0000c304d2934c00db1d51995b9f6996affd17c0", + "address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", "category": "messaging", - "chain_id": "5", - "chain_name": "goerli_testnet", + "chain_id": 80001, + "chain_name": "mumbai_testnet", "type": "zetaToken" }, { - "address": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", + "address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", "category": "messaging", - "chain_id": "5", - "chain_name": "goerli_testnet", + "chain_id": 80001, + "chain_name": "mumbai_testnet", "type": "connector" }, { - "address": "0x000047f11c6e42293f433c82473532e869ce4ec5", + "address": "0x0000a7db254145767262c6a81a7ee1650684258e", "category": "omnichain", - "chain_id": "5", - "chain_name": "goerli_testnet", + "chain_id": 80001, + "chain_name": "mumbai_testnet", "type": "erc20Custody" }, { "address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", "category": "messaging", - "chain_id": "80001", - "chain_name": "mumbai_testnet", + "chain_id": 97, + "chain_name": "bsc_testnet", "type": "zetaToken" }, { "address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", "category": "messaging", - "chain_id": "80001", - "chain_name": "mumbai_testnet", + "chain_id": 97, + "chain_name": "bsc_testnet", "type": "connector" }, { "address": "0x0000a7db254145767262c6a81a7ee1650684258e", "category": "omnichain", - "chain_id": "80001", - "chain_name": "mumbai_testnet", + "chain_id": 97, + "chain_name": "bsc_testnet", "type": "erc20Custody" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "omnichain", - "chain_id": "97", + "chain_id": 97, "chain_name": "bsc_testnet", "type": "tssUpdater" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "omnichain", - "chain_id": "80001", + "chain_id": 80001, "chain_name": "mumbai_testnet", "type": "tssUpdater" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "omnichain", - "chain_id": "5", + "chain_id": 5, "chain_name": "goerli_testnet", "type": "tssUpdater" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "messaging", - "chain_id": "5", + "chain_id": 5, "chain_name": "goerli_testnet", "type": "pauser" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "messaging", - "chain_id": "80001", + "chain_id": 80001, "chain_name": "mumbai_testnet", "type": "pauser" }, { "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", "category": "messaging", - "chain_id": "97", + "chain_id": 97, "chain_name": "bsc_testnet", "type": "pauser" }, diff --git a/package.json b/package.json index 61c6e323..3f6b4c7a 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "scripts": { "build": "yarn compile && npx del-cli dist abi && tsc || exit 0 && npx del-cli './dist/typechain-types/**/*.js' && npx cpx './data/**/*' dist/data && npx cpx './artifacts/contracts/**/*' ./abi && npx del-cli './abi/**/*.dbg.json'", "compile": "npx hardhat compile --force", - "generate": "yarn compile && ./scripts/generate_go.sh || exit 0 && ./scripts/generate_addresses.sh", + "generate": "yarn compile && ./scripts/generate_go.sh || exit 0 && ./scripts/generate_addresses.sh && yarn lint:fix", "lint": "npx eslint . --ext .js,.ts", "lint:fix": "npx eslint . --ext .js,.ts,.json --fix", "prepublishOnly": "yarn build", diff --git a/scripts/generate_addresses.sh b/scripts/generate_addresses.sh index 2c767fa5..62e81086 100755 --- a/scripts/generate_addresses.sh +++ b/scripts/generate_addresses.sh @@ -7,6 +7,4 @@ npx hardhat addresses --network zeta_mainnet > ./data/addresses.mainnet.json echo "Generating protocol addresses types..." -npx ts-node scripts/generate_addresses_types.ts > ./lib/types.d.ts - -yarn lint:fix \ No newline at end of file +npx ts-node scripts/generate_addresses_types.ts > ./lib/types.d.ts \ No newline at end of file diff --git a/tasks/addresses.ts b/tasks/addresses.ts index cb33d1b7..56f324f8 100644 --- a/tasks/addresses.ts +++ b/tasks/addresses.ts @@ -52,7 +52,7 @@ const fetchTssData = async (chains: any, addresses: any, network: Network) => { addresses.push({ address: chain.chain_name === "btc_testnet" ? btc : eth, category: "omnichain", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "tss", }); @@ -157,7 +157,7 @@ const fetchChainSpecificAddresses = async (chains: any, addresses: any, network: addresses.push({ address: zetaToken, category: "messaging", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "zetaToken", }); @@ -167,7 +167,7 @@ const fetchChainSpecificAddresses = async (chains: any, addresses: any, network: addresses.push({ address: connector, category: "messaging", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "connector", }); @@ -177,7 +177,7 @@ const fetchChainSpecificAddresses = async (chains: any, addresses: any, network: addresses.push({ address: data.chain_params.erc20_custody_contract_address, category: "omnichain", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "erc20Custody", }); @@ -202,7 +202,7 @@ const fetchTSSUpdater = async (chains: any, addresses: any) => { addresses.push({ address, category: "omnichain", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "tssUpdater", }); @@ -227,7 +227,7 @@ const fetchPauser = async (chains: any, addresses: any) => { addresses.push({ address, category: "messaging", - chain_id: chain.chain_id, + chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name, type: "pauser", });