diff --git a/data/addresses.json b/data/addresses.json index cd879792..b78c7b76 100644 --- a/data/addresses.json +++ b/data/addresses.json @@ -18,19 +18,19 @@ "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "0xFB2fCE3CCca19F0f764Ed8aa26C62181E3dA04C5" }, - "btc_testnet": { + "btc_mainnet": { "connector": "", "immutableCreate2Factory": "", - "tss": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur", + "tss": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y", "tssUpdater": "", "zetaToken": "", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, - "btc_mainnet": { + "btc_testnet": { "connector": "", "immutableCreate2Factory": "", - "tss": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y", + "tss": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur", "tssUpdater": "", "zetaToken": "", "zetaTokenConsumerUniV2": "", @@ -64,20 +64,20 @@ "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "0x7e792f3736751e168864106AdbAC50152641A927" }, - "zeta_testnet": { + "zeta_mainnet": { "connector": "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67", "immutableCreate2Factory": "", - "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", - "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", + "tss": "", + "tssUpdater": "", "zetaToken": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" }, - "zeta_mainnet": { + "zeta_testnet": { "connector": "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67", "immutableCreate2Factory": "", - "tss": "", - "tssUpdater": "", + "tss": "0x7c125C1d515b8945841b3d5144a060115C58725F", + "tssUpdater": "0x7274d1d5dddef36aac53dd45b93487ce01ef0a55", "zetaToken": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", "zetaTokenConsumerUniV2": "", "zetaTokenConsumerUniV3": "" @@ -131,26 +131,26 @@ "bsc_testnet": { "zrc20": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" }, + "btc_testnet": { + "zrc20": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b" + }, "goerli_testnet": { "zrc20": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4" }, "mumbai_testnet": { "zrc20": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb" }, - "btc_testnet": { - "zrc20": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b" + "zeta_mainnet": { + "fungibleModule": "", + "systemContract": "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", + "uniswapv2Factory": "", + "uniswapv2Router02": "" }, "zeta_testnet": { "fungibleModule": "0x735b14BB79463307AAcBED86DAf3322B1e6226aB", "systemContract": "0xEdf1c3275d13489aCdC6cD6eD246E72458B8795B", "uniswapv2Factory": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", "uniswapv2Router02": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe" - }, - "zeta_mainnet": { - "fungibleModule": "", - "systemContract": "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", - "uniswapv2Factory": "", - "uniswapv2Router02": "" } } -} \ No newline at end of file +} diff --git a/data/addresses.mainnet.json b/data/addresses.mainnet.json new file mode 100644 index 00000000..8d9af7f4 --- /dev/null +++ b/data/addresses.mainnet.json @@ -0,0 +1,289 @@ +[ + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV3Router" + }, + { + "address": "0x70e967acFcC17c3941E87562161406d41676FD83", + "category": "omnichain", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "tss" + }, + { + "address": "0x70e967acFcC17c3941E87562161406d41676FD83", + "category": "omnichain", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "tss" + }, + { + "address": "0x70e967acFcC17c3941E87562161406d41676FD83", + "category": "omnichain", + "chain_id": 8332, + "chain_name": "btc_mainnet", + "type": "tss" + }, + { + "address": "0x70e967acFcC17c3941E87562161406d41676FD83", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "tss" + }, + { + "address": "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "systemContract" + }, + { + "address": "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67", + "category": "messaging", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "connector" + }, + { + "address": "0x05BA149A7bd6dC1F937fA9046A9e05C05f3b18b0", + "asset": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "erc20", + "decimals": 18, + "description": "ZetaChain ZRC20 USDC on BSC", + "foreign_chain_id": "56", + "symbol": "USDC.BSC", + "type": "zrc20" + }, + { + "address": "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a", + "asset": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "erc20", + "decimals": 18, + "description": "ZetaChain ZRC20 USDC on ETH", + "foreign_chain_id": "1", + "symbol": "USDC.ETH", + "type": "zrc20" + }, + { + "address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", + "asset": "", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "gas", + "decimals": 18, + "description": "ZetaChain ZRC20 BTC-btc_mainnet", + "foreign_chain_id": "8332", + "symbol": "BTC.BTC", + "type": "zrc20" + }, + { + "address": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", + "asset": "", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "gas", + "decimals": 18, + "description": "ZetaChain ZRC20 BNB-bsc_mainnet", + "foreign_chain_id": "56", + "symbol": "BNB.BSC", + "type": "zrc20" + }, + { + "address": "0x7c8dDa80bbBE1254a7aACf3219EBe1481c6E01d7", + "asset": "0xdac17f958d2ee523a2206206994597c13d831ec7", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "erc20", + "decimals": 18, + "description": "ZetaChain ZRC20 USDT on ETH", + "foreign_chain_id": "1", + "symbol": "USDT.ETH", + "type": "zrc20" + }, + { + "address": "0x91d4F0D54090Df2D81e834c3c8CE71C6c865e79F", + "asset": "0x55d398326f99059ff775485246999027b3197955", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "erc20", + "decimals": 18, + "description": "ZetaChain ZRC20 USDT on BSC", + "foreign_chain_id": "56", + "symbol": "USDT.BSC", + "type": "zrc20" + }, + { + "address": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891", + "asset": "", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "coin_type": "gas", + "decimals": 18, + "description": "ZetaChain ZRC20 ETH-eth_mainnet", + "foreign_chain_id": "1", + "symbol": "ETH.ETH", + "type": "zrc20" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "zetaToken" + }, + { + "address": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "uniswapV2Router02" + }, + { + "address": "0x735b14BB79463307AAcBED86DAf3322B1e6226aB", + "category": "omnichain", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "fungibleModule" + }, + { + "address": "0x0000028a2eB8346cd5c0267856aB7594B7a55308", + "category": "messaging", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "zetaToken" + }, + { + "address": "0x000063A6e758D9e2f438d430108377564cf4077D", + "category": "messaging", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "connector" + }, + { + "address": "0x00000fF8fA992424957F97688015814e707A0115", + "category": "omnichain", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "erc20Custody" + }, + { + "address": "0xf091867EC603A6628eD83D274E835539D82e9cc8", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "zetaToken" + }, + { + "address": "0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "connector" + }, + { + "address": "0x0000030Ec64DF25301d8414eE5a29588C4B0dE10", + "category": "omnichain", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "erc20Custody" + }, + { + "address": "0xaeB6dDB7708467814D557e340283248be8E43124", + "category": "omnichain", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "tssUpdater" + }, + { + "address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8", + "category": "omnichain", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "tssUpdater" + }, + { + "address": "0xaeB6dDB7708467814D557e340283248be8E43124", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "pauser" + }, + { + "address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8", + "category": "messaging", + "chain_id": 56, + "chain_name": "bsc_mainnet", + "type": "pauser" + }, + { + "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "weth9" + }, + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "messaging", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV3Factory" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "messaging", + "chain_id": 7000, + "chain_name": "zeta_mainnet", + "type": "uniswapV3Factory" + } +] diff --git a/data/addresses.testnet.json b/data/addresses.testnet.json new file mode 100644 index 00000000..e697a43f --- /dev/null +++ b/data/addresses.testnet.json @@ -0,0 +1,408 @@ +[ + { + "address": "0x8eAc517b92eeE82177a83851268F13109878f8c4", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "zetaTokenConsumerUniV2" + }, + { + "address": "0x7e792f3736751e168864106AdbAC50152641A927", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "zetaTokenConsumerUniV3" + }, + { + "address": "0xFB2fCE3CCca19F0f764Ed8aa26C62181E3dA04C5", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "zetaTokenConsumerUniV3" + }, + { + "address": "0x8954AfA98594b838bda56FE4C12a09D7739D179b", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV3Router" + }, + { + "address": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV3Router" + }, + { + "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV3Router" + }, + { + "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "category": "omnichain", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "tss" + }, + { + "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "tss" + }, + { + "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", + "category": "omnichain", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "tss" + }, + { + "address": "tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur", + "category": "omnichain", + "chain_id": 18332, + "chain_name": "btc_testnet", + "type": "tss" + }, + { + "address": "0xEdf1c3275d13489aCdC6cD6eD246E72458B8795B", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "systemContract" + }, + { + "address": "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67", + "category": "messaging", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "connector" + }, + { + "address": "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a", + "asset": "0x07865c6e87b9f70255377e024ace6630c1eaa37f", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "erc20", + "decimals": 18, + "description": "USDC-goerli_testnet", + "foreign_chain_id": "5", + "symbol": "USDC", + "type": "zrc20" + }, + { + "address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4", + "asset": "", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "gas", + "decimals": 18, + "description": "ETH-goerli_testnet", + "foreign_chain_id": "5", + "symbol": "gETH", + "type": "zrc20" + }, + { + "address": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb", + "asset": "", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "gas", + "decimals": 18, + "description": "MATIC-mumbai_testnet", + "foreign_chain_id": "80001", + "symbol": "tMATIC", + "type": "zrc20" + }, + { + "address": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b", + "asset": "", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "gas", + "decimals": 18, + "description": "BTC-btc_testnet-btc_testnet", + "foreign_chain_id": "18332", + "symbol": "tBTC", + "type": "zrc20" + }, + { + "address": "0x7c8dDa80bbBE1254a7aACf3219EBe1481c6E01d7", + "asset": "0x64544969ed7EBf5f083679233325356EbE738930", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "erc20", + "decimals": 18, + "description": "USDC-bsc_testnet", + "foreign_chain_id": "97", + "symbol": "USDC", + "type": "zrc20" + }, + { + "address": "0x91d4F0D54090Df2D81e834c3c8CE71C6c865e79F", + "asset": "0x9999f7fea5938fd3b1e26a12c3f2fb024e194f97", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "erc20", + "decimals": 18, + "description": "USDC-mumbai_testnet", + "foreign_chain_id": "80001", + "symbol": "USDC", + "type": "zrc20" + }, + { + "address": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891", + "asset": "", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "coin_type": "gas", + "decimals": 18, + "description": "BNB-bsc_testnet", + "foreign_chain_id": "97", + "symbol": "tBNB", + "type": "zrc20" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "zetaToken" + }, + { + "address": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0x735b14BB79463307AAcBED86DAf3322B1e6226aB", + "category": "omnichain", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "fungibleModule" + }, + { + "address": "0x0000c304d2934c00db1d51995b9f6996affd17c0", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "zetaToken" + }, + { + "address": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "connector" + }, + { + "address": "0x000047f11c6e42293f433c82473532e869ce4ec5", + "category": "omnichain", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "erc20Custody" + }, + { + "address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "zetaToken" + }, + { + "address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "connector" + }, + { + "address": "0x0000a7db254145767262c6a81a7ee1650684258e", + "category": "omnichain", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "erc20Custody" + }, + { + "address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "zetaToken" + }, + { + "address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "connector" + }, + { + "address": "0x0000a7db254145767262c6a81a7ee1650684258e", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "erc20Custody" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "tssUpdater" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "omnichain", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "tssUpdater" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "omnichain", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "tssUpdater" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "pauser" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "pauser" + }, + { + "address": "0x55122f7590164Ac222504436943FAB17B62F5d7d", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "pauser" + }, + { + "address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "weth9" + }, + { + "address": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV2Factory" + }, + { + "address": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "weth9" + }, + { + "address": "0xB7926C0430Afb07AA7DEfDE6DA862aE0Bde767bc", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV2Factory" + }, + { + "address": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "weth9" + }, + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "messaging", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV3Factory" + }, + { + "address": "0xB7926C0430Afb07AA7DEfDE6DA862aE0Bde767bc", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV3Factory" + }, + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV3Factory" + }, + { + "address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c", + "category": "messaging", + "chain_id": 7001, + "chain_name": "zeta_testnet", + "type": "uniswapV3Factory" + } +] diff --git a/data/readme.md b/data/readme.md new file mode 100644 index 00000000..9a1ef0f0 --- /dev/null +++ b/data/readme.md @@ -0,0 +1 @@ +These addresses are generated automatically, do not modify them directly. diff --git a/hardhat.config.ts b/hardhat.config.ts index b6c9cf2e..bbf4aef7 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -3,6 +3,7 @@ import "@nomicfoundation/hardhat-verify"; import "@typechain/hardhat"; import "tsconfig-paths/register"; import "hardhat-abi-exporter"; +import "./tasks/addresses"; import { getHardhatConfigNetworks } from "@zetachain/networks"; import * as dotenv from "dotenv"; diff --git a/lib/address.tools.ts b/lib/address.tools.ts index a4b9eeb0..d027c883 100644 --- a/lib/address.tools.ts +++ b/lib/address.tools.ts @@ -81,13 +81,13 @@ export const isMainnetNetwork = (network: ZetaProtocolTestNetwork): boolean => { return false; }; -export const getAddress = (address: ZetaProtocolAddress | ZetaZEVMAddress, network: ZetaProtocolNetwork): string => { - if (isZetaProtocolAddress(address)) { - return (addresses["ccm"] as any)[network][address]; - } +// export const getAddress = (address: ZetaProtocolAddress | ZetaZEVMAddress, network: ZetaProtocolNetwork): string => { +// if (isZetaProtocolAddress(address)) { +// return (addresses["ccm"] as any)[network][address]; +// } - return (addresses["zevm"] as any)[network][address]; -}; +// return (addresses["zevm"] as any)[network][address]; +// }; export const getZRC20Address = (network: ZetaProtocolNetwork): string => { return (addresses["zevm"] as any)[network]["zrc20"]; diff --git a/lib/addresses.ts b/lib/addresses.ts new file mode 100644 index 00000000..0d2127cc --- /dev/null +++ b/lib/addresses.ts @@ -0,0 +1,25 @@ +import { getChainId } from "@zetachain/networks"; + +import mainnet from "../data/addresses.mainnet.json"; +import testnet from "../data/addresses.testnet.json"; +import { ParamChainName, ParamSymbol, ParamType } from "./types"; + +export const getAddress = (type: ParamType, network: ParamChainName, symbol?: ParamSymbol) => { + const networks = [...testnet, ...mainnet]; + let address; + if (type !== "zrc20" && symbol) { + throw new Error("Symbol is only supported when ParamType is zrc20"); + } + if (type === "zrc20" && !symbol) { + // for backwards compatibility + const chainId = getChainId(network); + address = networks.find((n: any) => { + return n.foreign_chain_id === chainId?.toString() && n.type === type && n.coin_type === "gas"; + }); + } else { + address = networks.find((n: any) => { + return n.chain_name === network && n.type === type && n.symbol === symbol; + }); + } + return address?.address; +}; diff --git a/lib/index.ts b/lib/index.ts index b2321035..0e1ccbec 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1 +1,5 @@ +export { default as mainnet } from "../data/addresses.mainnet.json"; +export { default as testnet } from "../data/addresses.testnet.json"; export * from "./address.tools"; +export * from "./addresses"; +export * from "./types"; diff --git a/lib/types.ts b/lib/types.ts new file mode 100644 index 00000000..6dbc5594 --- /dev/null +++ b/lib/types.ts @@ -0,0 +1,40 @@ +export type ParamSymbol = + | "BNB.BSC" + | "BTC.BTC" + | "ETH.ETH" + | "gETH" + | "tBNB" + | "tBTC" + | "tMATIC" + | "USDC.BSC" + | "USDC.ETH" + | "USDC" + | "USDT.BSC" + | "USDT.ETH"; +export type ParamChainName = + | "bsc_mainnet" + | "bsc_testnet" + | "btc_mainnet" + | "btc_testnet" + | "eth_mainnet" + | "goerli_testnet" + | "mumbai_testnet" + | "zeta_mainnet" + | "zeta_testnet"; +export type ParamType = + | "connector" + | "erc20Custody" + | "fungibleModule" + | "pauser" + | "systemContract" + | "tss" + | "tssUpdater" + | "uniswapV2Factory" + | "uniswapV2Router02" + | "uniswapV3Factory" + | "uniswapV3Router" + | "weth9" + | "zetaToken" + | "zetaTokenConsumerUniV2" + | "zetaTokenConsumerUniV3" + | "zrc20"; diff --git a/package.json b/package.json index 85de1c12..83fd2a42 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^2.0.0", - "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomicfoundation/hardhat-verify": "2.0.3", + "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "@openzeppelin/contracts": "^4.8.3", "@typechain/ethers-v5": "^10.1.0", @@ -22,7 +22,8 @@ "@uniswap/v2-core": "^1.0.1", "@uniswap/v2-periphery": "^1.1.0-beta.0", "@uniswap/v3-periphery": "^1.4.3", - "@zetachain/networks": "^2.4.3", + "@zetachain/networks": "4.0.0-rc1", + "axios": "^1.6.5", "chai": "^4.3.6", "cpx": "^1.5.0", "del-cli": "^5.0.0", @@ -67,16 +68,15 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "build": "yarn clean && 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'", - "clean": "npx hardhat clean", - "compile": "yarn clean && npx hardhat compile", - "generate": "yarn compile && ./scripts/generate_go.sh", + "build": "yarn compile && npx del-cli dist abi && npx tsc || true && 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 || true && ./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", - "test": "npx hardhat clean && npx hardhat test", + "test": "yarn compile && npx hardhat test", "tsc:watch": "npx tsc --watch" }, "types": "./dist/lib/index.d.ts", "version": "0.0.8" -} \ No newline at end of file +} diff --git a/scripts/generate_addresses.sh b/scripts/generate_addresses.sh new file mode 100755 index 00000000..b51dc8cf --- /dev/null +++ b/scripts/generate_addresses.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Generating protocol addresses..." + +npx hardhat addresses --network zeta_testnet > ./data/addresses.testnet.json +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.ts \ No newline at end of file diff --git a/scripts/generate_addresses_types.ts b/scripts/generate_addresses_types.ts new file mode 100644 index 00000000..2c0622be --- /dev/null +++ b/scripts/generate_addresses_types.ts @@ -0,0 +1,42 @@ +import mainnet from "../data/addresses.mainnet.json"; +import testnet from "../data/addresses.testnet.json"; + +const extractUniqueValues = (data: any[], key: string): string[] => { + const allValues = data.filter((item) => item[key] !== undefined).map((item) => item[key].toString()); + return [...new Set(allValues)]; +}; + +const generateTypesForKeys = (keys: string[]) => { + const networks = [...mainnet, ...testnet]; + + let typeDefs = ""; + + keys.forEach((key) => { + const uniqueValues = extractUniqueValues(networks, key); + if (uniqueValues.length > 0) { + const isNumeric = uniqueValues.every((value) => !isNaN(Number(value))); + const formattedValues = isNumeric ? uniqueValues.join(" | ") : `"${uniqueValues.join('" | "')}"`; + + typeDefs += `export type Param${toCamelCase(key, true)} = ${formattedValues};\n`; + } + }); + + console.log(typeDefs); +}; + +// Modify this function to handle underscores and capitalize each word +const toCamelCase = (string: string, capitalizeFirst: boolean = false) => { + return string + .split("_") + .map((word, index) => { + if (index === 0) { + return capitalizeFirst ? word.charAt(0).toUpperCase() + word.slice(1) : word; + } + return word.charAt(0).toUpperCase() + word.slice(1); + }) + .join(""); +}; + +const keysToGenerate = ["symbol", "chain_name", "type"]; + +generateTypesForKeys(keysToGenerate); diff --git a/tasks/addresses.mainnet.json b/tasks/addresses.mainnet.json new file mode 100644 index 00000000..fe76c7f5 --- /dev/null +++ b/tasks/addresses.mainnet.json @@ -0,0 +1,23 @@ +[ + { + "address": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV2Factory" + }, + { + "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 1, + "chain_name": "eth_mainnet", + "type": "uniswapV3Router" + } +] diff --git a/tasks/addresses.testnet.json b/tasks/addresses.testnet.json new file mode 100644 index 00000000..7793f0c8 --- /dev/null +++ b/tasks/addresses.testnet.json @@ -0,0 +1,65 @@ +[ + { + "address": "0x8eAc517b92eeE82177a83851268F13109878f8c4", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "zetaTokenConsumerUniV2" + }, + { + "address": "0x7e792f3736751e168864106AdbAC50152641A927", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "zetaTokenConsumerUniV3" + }, + { + "address": "0xFB2fCE3CCca19F0f764Ed8aa26C62181E3dA04C5", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "zetaTokenConsumerUniV3" + }, + { + "address": "0x8954AfA98594b838bda56FE4C12a09D7739D179b", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 80001, + "chain_name": "mumbai_testnet", + "type": "uniswapV3Router" + }, + { + "address": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0x9a489505a00cE272eAa5e07Dba6491314CaE3796", + "category": "messaging", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "uniswapV3Router" + }, + { + "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV2Router02" + }, + { + "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", + "category": "messaging", + "chain_id": 5, + "chain_name": "goerli_testnet", + "type": "uniswapV3Router" + } +] diff --git a/tasks/addresses.ts b/tasks/addresses.ts new file mode 100644 index 00000000..0fb844d4 --- /dev/null +++ b/tasks/addresses.ts @@ -0,0 +1,328 @@ +import uniswapV2Router from "@uniswap/v2-periphery/build/IUniswapV2Router02.json"; +import { getEndpoints } from "@zetachain/networks"; +import axios, { AxiosResponse } from "axios"; +import { task } from "hardhat/config"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; + +import { ZetaConnectorBase__factory } from "../typechain-types"; +import { ERC20Custody__factory } from "../typechain-types/factories/contracts/evm/ERC20Custody__factory"; +import { SystemContract__factory } from "../typechain-types/factories/contracts/zevm/SystemContract.sol/SystemContract__factory"; +import zeta_mainnet_addresses from "./addresses.mainnet.json"; +import zeta_testnet_addresses from "./addresses.testnet.json"; + +declare const hre: any; + +type Network = "zeta_mainnet" | "zeta_testnet"; + +const api = { + zeta_mainnet: { + evm: "https://zetachain-evm.blockpi.network/v1/rpc/public", + rpc: "https://zetachain.blockpi.network/lcd/v1/public", + }, + zeta_testnet: { + evm: "https://zetachain-athens-evm.blockpi.network/v1/rpc/public", + rpc: "https://zetachain-athens.blockpi.network/lcd/v1/public", + }, +}; + +const fetchChains = async (network: Network) => { + const URL = `${api[network].rpc}/zeta-chain/observer/supportedChains`; + try { + const response: AxiosResponse = await axios.get(URL); + + if (response.status === 200) { + return response.data.chains; + } else { + console.error("Error fetching chains:", response.status, response.statusText); + } + } catch (error) { + console.error("Error fetching chains:", error); + } +}; + +const fetchTssData = async (chains: any, addresses: any, network: Network) => { + const URL = `${api[network].rpc}/zeta-chain/observer/get_tss_address/18332`; + try { + const tssResponse: AxiosResponse = await axios.get(URL); + + if (tssResponse.status === 200) { + chains.forEach((chain: any) => { + const { btc, eth } = tssResponse.data; + if (chain.chain_name === "zeta_testnet") return; + addresses.push({ + address: chain.chain_name === "btc_testnet" ? btc : eth, + category: "omnichain", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "tss", + }); + }); + } else { + console.error("Error fetching TSS data:", tssResponse.status, tssResponse.statusText); + } + } catch (error) { + console.error("Error fetching TSS data:", error); + } +}; + +const fetchSystemContract = async (addresses: any, network: Network) => { + const chain_id = network === "zeta_mainnet" ? 7000 : 7001; + const URL = `${api[network].rpc}/zeta-chain/fungible/system_contract`; + try { + const systemContractResponse: AxiosResponse = await axios.get(URL); + + if (systemContractResponse.status === 200) { + addresses.push({ + address: systemContractResponse.data.SystemContract.system_contract, + category: "omnichain", + chain_id, + chain_name: network, + type: "systemContract", + }); + addresses.push({ + address: systemContractResponse.data.SystemContract.connector_zevm, + category: "messaging", + chain_id, + chain_name: network, + type: "connector", + }); + } else { + console.error("Error fetching system contract:", systemContractResponse.statusText); + } + } catch (error) { + console.error("Error fetching system contract:", error); + } +}; + +const fetchForeignCoinsData = async (chains: any, addresses: any, network: Network) => { + const chain_id = network === "zeta_mainnet" ? 7000 : 7001; + const URL = `${api[network].rpc}/zeta-chain/fungible/foreign_coins`; + try { + const foreignCoinsResponse: AxiosResponse = await axios.get(URL); + if (foreignCoinsResponse.status === 200) { + foreignCoinsResponse.data.foreignCoins.forEach((token: any) => { + addresses.push({ + address: token.zrc20_contract_address, + asset: token.asset, + category: "omnichain", + chain_id, + chain_name: network, + coin_type: token.coin_type.toLowerCase(), + decimals: 18, + description: token.name, + foreign_chain_id: token.foreign_chain_id, + symbol: token.symbol, + type: "zrc20", + }); + }); + } else { + console.error("Error fetching foreign coins data:", foreignCoinsResponse.status, foreignCoinsResponse.statusText); + } + } catch (error) { + console.error("Error fetching foreign coins data:", error); + } +}; + +const fetchAthensAddresses = async (addresses: any, hre: any, network: Network) => { + const chain_id = network === "zeta_mainnet" ? 7000 : 7001; + const systemContract = addresses.find((a: any) => { + return a.chain_name === network && a.type === "systemContract"; + })?.address; + const provider = new hre.ethers.providers.JsonRpcProvider(api[network].evm); + const sc = SystemContract__factory.connect(systemContract, provider); + const common = { + category: "omnichain", + chain_id, + chain_name: network, + }; + try { + addresses.push({ ...common, address: await sc.uniswapv2FactoryAddress(), type: "uniswapV2Factory" }); + addresses.push({ ...common, address: await sc.wZetaContractAddress(), type: "zetaToken" }); + addresses.push({ ...common, address: await sc.uniswapv2Router02Address(), type: "uniswapV2Router02" }); + // addresses.push({ ...common, address: await sc.zetaConnectorZEVMAddress(), type: "zetaConnectorZEVM" }); + addresses.push({ ...common, address: await sc.FUNGIBLE_MODULE_ADDRESS(), type: "fungibleModule" }); + } catch (error) { + console.error("Error fetching addresses from ZetaChain:", error); + } +}; + +const fetchChainSpecificAddresses = async (chains: any, addresses: any, network: Network) => { + await Promise.all( + chains.map(async (chain: any) => { + return axios + .get(`${api[network].rpc}/zeta-chain/observer/get_chain_params_for_chain/${chain.chain_id}`) + .then(({ data }) => { + const zetaToken = data.chain_params.zeta_token_contract_address; + if (zetaToken && zetaToken != "0x0000000000000000000000000000000000000000") { + addresses.push({ + address: zetaToken, + category: "messaging", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "zetaToken", + }); + } + const connector = data.chain_params.connector_contract_address; + if (connector && connector != "0x0000000000000000000000000000000000000000") { + addresses.push({ + address: connector, + category: "messaging", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "connector", + }); + } + const erc20Custody = data.chain_params.erc20_custody_contract_address; + if (erc20Custody && erc20Custody != "0x0000000000000000000000000000000000000000") { + addresses.push({ + address: data.chain_params.erc20_custody_contract_address, + category: "omnichain", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "erc20Custody", + }); + } + }); + }) + ); +}; + +const fetchTSSUpdater = async (chains: any, addresses: any) => { + await Promise.all( + chains.map(async (chain: any) => { + const erc20Custody = addresses.find((a: any) => { + return a.chain_name === chain.chain_name && a.type === "erc20Custody"; + })?.address; + if (erc20Custody) { + if (["18332", "8332"].includes(chain.chain_id)) return; + const rpc = getEndpoints("evm", chain.chain_name)[0]?.url; + const provider = new hre.ethers.providers.JsonRpcProvider(rpc); + const custody = ERC20Custody__factory.connect(erc20Custody, provider); + return custody.TSSAddressUpdater().then((address: string) => { + addresses.push({ + address, + category: "omnichain", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "tssUpdater", + }); + }); + } + }) + ); +}; + +const fetchPauser = async (chains: any, addresses: any) => { + await Promise.all( + chains.map(async (chain: any) => { + const erc20Custody = addresses.find((a: any) => { + return a.chain_name === chain.chain_name && a.type === "connector"; + })?.address; + if (erc20Custody) { + if (["18332", "8332", "7001", "7000"].includes(chain.chain_id)) return; + const rpc = getEndpoints("evm", chain.chain_name)[0]?.url; + const provider = new hre.ethers.providers.JsonRpcProvider(rpc); + const connector = ZetaConnectorBase__factory.connect(erc20Custody, provider); + return connector.pauserAddress().then((address: string) => { + addresses.push({ + address, + category: "messaging", + chain_id: parseInt(chain.chain_id), + chain_name: chain.chain_name, + type: "pauser", + }); + }); + } + }) + ); +}; + +const fetchFactoryV2 = async (addresses: any, hre: HardhatRuntimeEnvironment, network: Network) => { + const routers = addresses.filter((a: any) => a.type === "uniswapV2Router02"); + + for (const router of routers) { + const rpc = getEndpoints("evm", router.chain_name)[0]?.url; + const provider = new hre.ethers.providers.JsonRpcProvider(rpc); + const routerContract = new hre.ethers.Contract(router.address, uniswapV2Router.abi, provider); + + try { + const wethAddress = await routerContract.WETH(); + const factoryAddress = await routerContract.factory(); + + // Skip ZetaChain as we've already added ZETA token + if (router.chain_id !== 7000 && router.chain_id !== 7001) { + addresses.push({ + address: wethAddress, + category: "messaging", + chain_id: router.chain_id, + chain_name: router.chain_name, + type: "weth9", + }); + } + + addresses.push({ + address: factoryAddress, + category: "messaging", + chain_id: router.chain_id, + chain_name: router.chain_name, + type: "uniswapV2Factory", + }); + } catch (error) { + console.error(`Error fetching factory and WETH for router v2 ${router.address}:`, error); + } + } +}; + +const fetchFactoryV3 = async (addresses: any, hre: HardhatRuntimeEnvironment, network: Network) => { + const routers = addresses.filter((a: any) => a.type === "uniswapV2Router02"); + + for (const router of routers) { + const rpc = getEndpoints("evm", router.chain_name)[0]?.url; + const provider = new hre.ethers.providers.JsonRpcProvider(rpc); + const routerContract = new hre.ethers.Contract(router.address, uniswapV2Router.abi, provider); + + try { + const factoryAddress = await routerContract.factory(); + + addresses.push({ + address: factoryAddress, + category: "messaging", + chain_id: router.chain_id, + chain_name: router.chain_name, + type: "uniswapV3Factory", + }); + } catch (error) { + console.error(`Error fetching factory for router v3 ${router.address}:`, error); + } + } +}; + +const main = async (args: any, hre: HardhatRuntimeEnvironment) => { + const addresses: any = []; + + const n = hre.network.name; + if (n === "zeta_testnet") { + addresses.push(...zeta_testnet_addresses); + } else if (n === "zeta_mainnet") { + addresses.push(...zeta_mainnet_addresses); + } else { + throw new Error(`Unsupported network: ${n}. Must be 'zeta_testnet' or 'zeta_mainnet'.`); + } + + const network: Network = n; + + const chains = await fetchChains(network); + await fetchTssData(chains, addresses, network); + await fetchSystemContract(addresses, network); + await fetchForeignCoinsData(chains, addresses, network); + await fetchAthensAddresses(addresses, hre, network); + await fetchChainSpecificAddresses(chains, addresses, network); + await fetchTSSUpdater(chains, addresses); + await fetchPauser(chains, addresses); + await fetchFactoryV2(addresses, hre, network); + await fetchFactoryV3(addresses, hre, network); + + console.log(JSON.stringify(addresses, null, 2)); +}; + +task("addresses", "").setAction(main); diff --git a/tasks/readme.md b/tasks/readme.md new file mode 100644 index 00000000..c5442530 --- /dev/null +++ b/tasks/readme.md @@ -0,0 +1,2 @@ +Addresses JSON files in this directory contain contract addresses which cannot +be fetched from the blockchain. diff --git a/yarn.lock b/yarn.lock index 7636a3eb..62ba3eb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2078,10 +2078,10 @@ "@uniswap/v3-core" "1.0.0" base64-sol "1.0.1" -"@zetachain/networks@^2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-2.4.3.tgz#870b2cda4b91f913be990246831378f60688d452" - integrity sha512-ZoqN8M6+59OkujZCl3FcSEgSftIN1tw5bpuFwI/2+f0SlKH+8ztAk7aF1QHmzrPqolIJKt29ogsfvIjiynXNkg== +"@zetachain/networks@4.0.0-rc1": + version "4.0.0-rc1" + resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-4.0.0-rc1.tgz#0ec6efabaa78d7124f5adb9218f25d85e252087b" + integrity sha512-Zl8cZc5PdKI46KZqPeIu7DmpSqUkXN07L9Yxy/Lp233L9pZKWUVr7RnEq2HUaN9F6gqtxlofNtKBFopphm1pEQ== dependencies: dotenv "^16.1.4" @@ -2514,6 +2514,15 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axios@^1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.5.tgz#2c090da14aeeab3770ad30c3a1461bc970fb0cd8" + integrity sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg== + dependencies: + follow-redirects "^1.15.4" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-runtime@^6.9.2: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -4512,6 +4521,11 @@ follow-redirects@^1.12.1: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.4: + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -4554,6 +4568,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -7139,6 +7162,11 @@ promise@^8.0.0: dependencies: asap "~2.0.6" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"