Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contract addresses #348

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
381 changes: 381 additions & 0 deletions v2/data/addresses.mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,381 @@
[
{
"address": "0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Duplicate address values found in addresses.mainnet.json.

The following address values are duplicated in the JSON file, which may affect data integrity:

  • 0x70e967acFcC17c3941E87562161406d41676FD83
  • 0x7828F92E7d79E141189f24C98aceF71Bc07bad3f
  • 0xaeB6dDB7708467814D557e340283248be8E43124
  • 0xaf28a257D292e7f0E531073f70a175b57E0261a8

Please review and ensure each address is unique.

Analysis chain

Verify the uniqueness of address values.

To ensure data integrity, it's important to confirm that each address value is unique across all objects in the array.

Also applies to: 10-10, 17-17, 24-24, 31-31, 38-38, 45-45, 52-52, 59-59, 66-66, 73-73, 80-80, 87-87, 94-94, 101-101, 108-108, 115-115, 122-122, 129-129, 136-136, 143-143, 150-150, 157-157, 164-164, 171-171, 178-178, 185-185, 192-192, 199-199, 206-206, 219-219, 232-232, 245-245, 258-258, 271-271, 284-284, 297-297, 310-310, 323-323, 336-336, 348-348, 361-361, 375-375

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the uniqueness of `address` values.

# Test: Extract `address` values and check for duplicates.
# Expect: No output, indicating no duplicates found.
jq -r '.[].address' v2/data/addresses.mainnet.json | sort | uniq -d

Length of output: 241


Tip

Codebase Verification

Inconsistent Address Formats Detected

The address formats for the specified chain_name values are inconsistent with the expected standards. Ethereum-based chains ("eth_mainnet", "bsc_mainnet", "polygon_mainnet", "zeta_mainnet") have addresses starting with "bc1q", which is incorrect. Similarly, "btc_mainnet" has addresses starting with "0x", which is also incorrect. Please review and correct these address formats.

  • Ethereum-based chains should have addresses starting with "0x".
  • Bitcoin-based chains should have addresses starting with "bc1q".
Analysis chain

Verify the consistency of address formats for each chain_name.

Each chain_name likely has its own expected format for address values. It's crucial to validate that the address values adhere to the correct format based on the associated chain_name.

Also applies to: 10-10, 17-17, 24-24, 31-31, 38-38, 45-45, 52-52, 59-59, 66-66, 73-73, 80-80, 87-87, 94-94, 101-101, 108-108, 115-115, 122-122, 129-129, 136-136, 143-143, 150-150, 157-157, 164-164, 171-171, 178-178, 185-185, 192-192, 199-199, 206-206, 219-219, 232-232, 245-245, 258-258, 271-271, 284-284, 297-297, 310-310, 323-323, 336-336, 348-348, 361-361, 375-375

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the consistency of `address` formats for each `chain_name`.

# Test: Check if `address` values start with "0x" for `chain_name` "eth_mainnet".
# Expect: All `address` values should start with "0x".
jq -r 'select(.[].chain_name == "eth_mainnet") | .[].address' v2/data/addresses.mainnet.json | grep -v '^0x'

# Test: Check if `address` values start with "0x" for `chain_name` "bsc_mainnet".
# Expect: All `address` values should start with "0x". 
jq -r 'select(.[].chain_name == "bsc_mainnet") | .[].address' v2/data/addresses.mainnet.json | grep -v '^0x'

# Test: Check if `address` values start with "0x" for `chain_name` "polygon_mainnet".
# Expect: All `address` values should start with "0x".
jq -r 'select(.[].chain_name == "polygon_mainnet") | .[].address' v2/data/addresses.mainnet.json | grep -v '^0x'

# Test: Check if `address` values start with "0x" for `chain_name` "zeta_mainnet".
# Expect: All `address` values should start with "0x".
jq -r 'select(.[].chain_name == "zeta_mainnet") | .[].address' v2/data/addresses.mainnet.json | grep -v '^0x'

# Test: Check if `address` values start with "bc1q" for `chain_name` "btc_mainnet".
# Expect: All `address` values should start with "bc1q".
jq -r 'select(.[].chain_name == "btc_mainnet") | .[].address' v2/data/addresses.mainnet.json | grep -v '^bc1q'

Length of output: 4173

"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "connector"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have some contracts here that are not used in v2, like connector etc, which tools depend on having these addresses in v2 folder?

},
{
"address": "0x0000030Ec64DF25301d8414eE5a29588C4B0dE10",
"category": "omnichain",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "erc20Custody"
},
{
"address": "0xaeB6dDB7708467814D557e340283248be8E43124",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "pauser"
},
{
"address": "0x70e967acFcC17c3941E87562161406d41676FD83",
"category": "omnichain",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "tss"
},
{
"address": "0xaeB6dDB7708467814D557e340283248be8E43124",
"category": "omnichain",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "tssUpdater"
},
{
"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": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "uniswapV3Factory"
},
{
"address": "0xE592427A0AEce92De3Edee1F18E0157C05861564",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "uniswapV3Router"
},
{
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_mainnet",
"type": "weth9"
},
{
"address": "0xf091867EC603A6628eD83D274E835539D82e9cc8",
"category": "messaging",
"chain_id": 1,
"chain_name": "eth_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": "0xaf28a257D292e7f0E531073f70a175b57E0261a8",
"category": "messaging",
"chain_id": 56,
"chain_name": "bsc_mainnet",
"type": "pauser"
},
{
"address": "0x70e967acFcC17c3941E87562161406d41676FD83",
"category": "omnichain",
"chain_id": 56,
"chain_name": "bsc_mainnet",
"type": "tss"
},
{
"address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8",
"category": "omnichain",
"chain_id": 56,
"chain_name": "bsc_mainnet",
"type": "tssUpdater"
},
{
"address": "0x0000028a2eB8346cd5c0267856aB7594B7a55308",
"category": "messaging",
"chain_id": 56,
"chain_name": "bsc_mainnet",
"type": "zetaToken"
},
{
"address": "0x73cE2544d30A71D833C70D418FB5Ddf7a4A75455",
"category": "messaging",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "connector"
},
{
"address": "0x69727Ef241ebD6e42Fc3A798092077069B415B2D",
"category": "omnichain",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "erc20Custody"
},
{
"address": "0x7828F92E7d79E141189f24C98aceF71Bc07bad3f",
"category": "messaging",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "pauser"
},
{
"address": "0x70e967acFcC17c3941E87562161406d41676FD83",
"category": "omnichain",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "tss"
},
{
"address": "0x7828F92E7d79E141189f24C98aceF71Bc07bad3f",
"category": "omnichain",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "tssUpdater"
},
{
"address": "0x2eff750c9D770BaBE6dBe84d05E40e4C65d7938d",
"category": "messaging",
"chain_id": 137,
"chain_name": "polygon_mainnet",
"type": "zetaToken"
},
{
"address": "0x239e96c8f17C85c30100AC26F635Ea15f23E9c67",
"category": "messaging",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "connector"
},
{
"address": "0x735b14BB79463307AAcBED86DAf3322B1e6226aB",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "fungibleModule"
},
{
"address": "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "systemContract"
},
{
"address": "0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "uniswapV2Factory"
},
{
"address": "0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "uniswapV2Router02"
},
{
"address": "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"type": "zetaToken"
},
{
"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"
},
Comment on lines +206 to +217
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Incomplete Metadata for "zrc20" Objects

The verification process found that several "zrc20" objects have incomplete metadata due to empty "asset" fields. Please ensure that all required properties have valid values.

  • Objects with empty "asset" fields:
    • Address: 0x13A0c5930C028511Dc02665E7285134B6d11A5f4
    • Address: 0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb
    • Address: 0xADF73ebA3Ebaa7254E859549A44c74eF7cff7501
    • Address: 0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891
Analysis chain

Verify the completeness of metadata for "zrc20" objects.

Objects with type "zrc20" contain additional metadata properties. Ensure that all required metadata properties are present and have valid values for each "zrc20" object.

Also applies to: 218-230, 231-243, 245-256, 257-269, 270-282, 283-295, 296-308, 309-321, 322-334, 335-347, 348-360, 361-373

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the completeness of metadata for "zrc20" objects.

# Test: Check if all "zrc20" objects have the required metadata properties.
# Expect: All objects should have "address", "asset", "category", "chain_id", "chain_name", 
#         "coin_type", "decimals", "description", "foreign_chain_id", "symbol", and "type".
jq -r 'select(.[].type == "zrc20") | select(has("address") and has("asset") and has("category") and has("chain_id") and has("chain_name") and has("coin_type") and has("decimals") and has("description") and has("foreign_chain_id") and has("symbol") and has("type") | not)' v2/data/addresses.mainnet.json

# Test: Check if all "zrc20" objects have non-empty values for the required metadata properties.
# Expect: All required properties should have non-empty values.
jq -r 'select(.[].type == "zrc20") | select((.address == "") or (.asset == "") or (.category == "") or (.chain_id == "") or (.chain_name == "") or (.coin_type == "") or (.decimals == "") or (.description == "") or (.foreign_chain_id == "") or (.symbol == "") or (.type == ""))' v2/data/addresses.mainnet.json

Length of output: 802


Script:

#!/bin/bash
# Description: Verify the completeness of metadata for "zrc20" objects.

# Test: Check if all "zrc20" objects have the required metadata properties.
# Expect: All objects should have "address", "asset", "category", "chain_id", "chain_name", 
#         "coin_type", "decimals", "description", "foreign_chain_id", "symbol", and "type".
jq -r '.[] | select(.type == "zrc20") | select(has("address") and has("asset") and has("category") and has("chain_id") and has("chain_name") and has("coin_type") and has("decimals") and has("description") and has("foreign_chain_id") and has("symbol") and has("type") | not)' v2/data/addresses.mainnet.json

# Test: Check if all "zrc20" objects have non-empty values for the required metadata properties.
# Expect: All required properties should have non-empty values.
jq -r '.[] | select(.type == "zrc20") | select((.address == "") or (.asset == "") or (.category == "") or (.chain_id == "") or (.chain_name == "") or (.coin_type == "") or (.decimals == "") or (.description == "") or (.foreign_chain_id == "") or (.symbol == "") or (.type == ""))' v2/data/addresses.mainnet.json

Length of output: 1910

{
"address": "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a",
"asset": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 6,
"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": 8,
"description": "ZetaChain ZRC20 BTC-btc_mainnet",
"foreign_chain_id": "8332",
"symbol": "BTC.BTC",
"type": "zrc20"
},
{
"address": "0x236b0DE675cC8F46AE186897fCCeFe3370C9eDeD",
"asset": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 18,
"description": "ZetaChain ZRC20 PEPE on ETH",
"foreign_chain_id": "1",
"symbol": "PEPE.ETH",
"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": "0x777915D031d1e8144c90D025C594b3b8Bf07a08d",
"asset": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 18,
"description": "ZetaChain ZRC20 SHIB on ETH",
"foreign_chain_id": "1",
"symbol": "SHIB.ETH",
"type": "zrc20"
},
{
"address": "0x7c8dDa80bbBE1254a7aACf3219EBe1481c6E01d7",
"asset": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 6,
"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": "0xADF73ebA3Ebaa7254E859549A44c74eF7cff7501",
"asset": "",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "gas",
"decimals": 18,
"description": "ZetaChain ZRC20 Polygon POL-polygon_mainnet",
"foreign_chain_id": "137",
"symbol": "POL.POLYGON",
"type": "zrc20"
},
{
"address": "0xcC683A782f4B30c138787CB5576a86AF66fdc31d",
"asset": "0x6b175474e89094c44da98b954eedeac495271d0f",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 18,
"description": "ZetaChain ZRC20 DAI on ETH",
"foreign_chain_id": "1",
"symbol": "DAI.ETH",
"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": "0xdbfF6471a79E5374d771922F2194eccc42210B9F",
"asset": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 6,
"description": "ZetaChain ZRC20 USDT on POL",
"foreign_chain_id": "137",
"symbol": "USDT.POL",
"type": "zrc20"
},
{
"address": "0xfC9201f4116aE6b054722E10b98D904829b469c3",
"asset": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_mainnet",
"coin_type": "erc20",
"decimals": 6,
"description": "ZetaChain ZRC20 USDC on POL",
"foreign_chain_id": "137",
"symbol": "USDC.POL",
"type": "zrc20"
},
{
"address": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y",
"category": "omnichain",
"chain_id": 8332,
"chain_name": "btc_mainnet",
"type": "tss"
}
]
Loading
Loading