Skip to content

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Jul 18, 2025

Contract addresses fresh from the registry πŸ₯¬

LIst

yarn -s zetachain query contracts list
βœ” Successfully fetched 32 contracts
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Chain ID β”‚ Type              β”‚ Address                                                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 97       β”‚ connector         β”‚ 0x0000ecb8cdd25a18F12DAA23f6422e07fBf8B9E1                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 97       β”‚ erc20Custody      β”‚ 0xD80BE3710F08D280F51115e072e5d2a778946cd7                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 97       β”‚ gateway           β”‚ 0x0c487a766110c85d301D96E33579C5B317Fa4995                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 97       β”‚ zetaToken         β”‚ 0x0000c9eC4042283e8139c74F4c64BcD1E0b9B54f                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 103      β”‚ gateway           β”‚ 0xba51550593bA92Ff43376D0A6Cc26a5CA226F9BD                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 901      β”‚ gateway           β”‚ ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ connector         β”‚ 0x239e96c8f17C85c30100AC26F635Ea15f23E9c67                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ fungibleModule    β”‚ 0x735b14BB79463307AAcBED86DAf3322B1e6226aB                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ gateway           β”‚ 0x6c533f7fE93fAE114d0954697069Df33C9B74fD7                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ systemContract    β”‚ 0xEdf1c3275d13489aCdC6cD6eD246E72458B8795B                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ uniswapV2Factory  β”‚ 0x9fd96203f7b22bCF72d9DCb40ff98302376cE09c                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ uniswapV2Router02 β”‚ 0x2ca7d64A7EFE2D62A725E2B35Cf7230D6677FfEe                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 7001     β”‚ zetaToken         β”‚ 0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 18332    β”‚ tss               β”‚ tb1qy9pqmk2pd9sv63g27jt8r657wy0d9ueeh0nqur                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 43113    β”‚ erc20Custody      β”‚ 0x1B088fbAfD7ab966022944AD7b90B9f1113DC027                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 43113    β”‚ gateway           β”‚ 0x0dA86Dc3F9B71F84a0E97B0e2291e50B7a5df10f                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 80002    β”‚ connector         β”‚ 0x60E6b70bC2761f878Ff992276612F67FbABC1761                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 80002    β”‚ erc20Custody      β”‚ 0xD80BE3710F08D280F51115e072e5d2a778946cd7                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 80002    β”‚ gateway           β”‚ 0x0c487a766110c85d301D96E33579C5B317Fa4995                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 80002    β”‚ zetaToken         β”‚ 0x1432612E60cad487C857E7D38AFf57134916c902                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 84532    β”‚ connector         β”‚ 0xc0B74d761ef4EC9e9473f65687d36B9F13DB0dCc                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 84532    β”‚ erc20Custody      β”‚ 0xD80BE3710F08D280F51115e072e5d2a778946cd7                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 84532    β”‚ gateway           β”‚ 0x0c487a766110c85d301D96E33579C5B317Fa4995                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 84532    β”‚ zetaToken         β”‚ 0xf4e63991E7475b659bd97Bba85f32a7259239D5d                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 421614   β”‚ erc20Custody      β”‚ 0x1B088fbAfD7ab966022944AD7b90B9f1113DC027                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 421614   β”‚ gateway           β”‚ 0x0dA86Dc3F9B71F84a0E97B0e2291e50B7a5df10f                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 2015141  β”‚ gateway           β”‚ 0x0087115e4a012e747d9bce013ce2244010c6d5e3b0f88ddbc63420519b8619e5a0 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 11155111 β”‚ tss               β”‚ 0x8531a5aB847ff5B22D855633C25ED1DA3255247e                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 11155111 β”‚ connector         β”‚ 0x3963341dad121c9CD33046089395D66eBF20Fb03                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 11155111 β”‚ erc20Custody      β”‚ 0xD80BE3710F08D280F51115e072e5d2a778946cd7                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 11155111 β”‚ gateway           β”‚ 0x0c487a766110c85d301D96E33579C5B317Fa4995                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 11155111 β”‚ zetaToken         β”‚ 0x0000c304D2934c00Db1d51995b9f6996AffD17c0                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Show

yarn -s zetachain query contracts show --chain-id 11155111 --type gateway
0x0c487a766110c85d301D96E33579C5B317Fa4995

How a ninja would use this command:

zetachain q c s -c 11155111 -t gateway

Summary by CodeRabbit

  • New Features
    • Introduced a new CLI command group for contract registry operations, including:
      • A command to list contracts from the blockchain registry with customizable output formats and columns.
      • A command to display a specific contract address by chain ID and contract type.
  • Chores
    • Updated a protocol contracts dependency to a newer version.
    • Updated Node.js versions in GitHub Actions workflows to version 22.
  • Refactor
    • Added utility functions for improved address parsing and formatting.
    • Added validation schemas for contract-related command options.
    • Introduced a constant for the contract registry address.

Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

πŸ“ Walkthrough

Walkthrough

This change introduces a new CLI command group for querying contract registry data, including commands to list and show contract addresses by chain ID and type. Supporting utilities for address parsing and formatting are added, as well as Zod schemas for command option validation. Dependencies and constants are updated to support the new functionality. Additionally, Node.js versions in GitHub Actions workflows are updated from 21 to 22.

Changes

File(s) Change Summary
package.json Updated "@zetachain/protocol-contracts" dependency version from "13.0.0" to "13.1.0-rc3".
Command group and integration
packages/commands/src/query/contracts/index.ts, packages/commands/src/query/index.ts
Added new contractsCommand group with subcommands for contract registry queries; integrated into main queryCommand.
Contract listing command
packages/commands/src/query/contracts/list.ts
Added listCommand for listing contracts with flexible output, plus fetchContracts utility.
Contract showing command
packages/commands/src/query/contracts/show.ts
Added showCommand for displaying a contract address by chain ID and type.
src/constants/addresses.ts Added CONTRACT_REGISTRY_ADDRESS constant.
src/schemas/commands/contracts.ts Added Zod schemas for validating contract command options.
utils/addressResolver.ts Added tryParseEvmAddress and formatAddress utility functions for address parsing/formatting.
GitHub Actions workflows
.github/workflows/build.yaml, .github/workflows/lint.yaml, .github/workflows/publish-npm.yaml, .github/workflows/test.yaml
Updated Node.js version from 21 to 22 in all CI/CD workflow files.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant ContractsRegistry (via ethers.js)
    participant Utils

    User->>CLI: Run "contracts list" or "contracts show" command
    CLI->>ContractsRegistry: fetchContracts(rpcUrl)
    ContractsRegistry-->>CLI: List of contracts
    CLI->>Utils: formatAddress(address)
    Utils-->>CLI: Formatted address
    CLI-->>User: Output (JSON or table for list, address for show)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~40 minutes

Note

⚑️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


πŸ“œ Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a814596 and 2f214af.

πŸ“’ Files selected for processing (4)
  • .github/workflows/build.yaml (1 hunks)
  • .github/workflows/lint.yaml (1 hunks)
  • .github/workflows/publish-npm.yaml (1 hunks)
  • .github/workflows/test.yaml (1 hunks)
βœ… Files skipped from review due to trivial changes (4)
  • .github/workflows/lint.yaml
  • .github/workflows/build.yaml
  • .github/workflows/publish-npm.yaml
  • .github/workflows/test.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
πŸ§ͺ Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch contracts-cli

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the feat label Jul 18, 2025
@fadeev fadeev marked this pull request as ready for review July 22, 2025 11:53
@fadeev fadeev requested review from a team as code owners July 22, 2025 11:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
packages/commands/src/query/contracts/show.ts (2)

13-17: Consider making the interface more type-safe.

The ContractData interface duplicates what might already be defined elsewhere. Consider importing this from a shared types file to maintain consistency and avoid duplication.

#!/bin/bash
# Description: Check if ContractData interface is defined elsewhere in the codebase
ast-grep --pattern 'interface ContractData {
  $$$
}'

61-63: Improve error handling specificity.

The generic error catch could be more specific. Consider handling different error types (network errors, contract errors, parsing errors) differently to provide more targeted user feedback.

  } catch (error) {
-    console.error(chalk.red("Error details:"), error);
+    if (error instanceof Error) {
+      if (error.message.includes('network')) {
+        console.error(chalk.red("Network error: Please check your RPC URL"));
+      } else if (error.message.includes('contract')) {
+        console.error(chalk.red("Contract error: Unable to fetch contract data"));
+      } else {
+        console.error(chalk.red("Error:"), error.message);
+      }
+    } else {
+      console.error(chalk.red("Unknown error occurred"));
+    }
+    process.exit(1);
  }
πŸ“œ Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 020e499 and 585c62c.

β›” Files ignored due to path filters (62)
  • typechain-types/@zetachain/protocol-contracts/contracts/Revert.sol/Revertable.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorBase.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorNative.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorNonNative.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistry.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistryErrors.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistryEvents.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/helpers/interfaces/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/GatewayZEVM.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/ICoreRegistry.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/IGatewayZEVM.sol/IGatewayZEVM.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol/IZRC20.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol/IZRC20Metadata.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/UniversalContract.sol/UniversalContract.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/interfaces/index.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/libraries/GatewayZEVMValidations.ts is excluded by !typechain-types/**
  • typechain-types/@zetachain/protocol-contracts/contracts/zevm/libraries/index.ts is excluded by !typechain-types/**
  • typechain-types/contracts/testing/mock/ZRC20Mock.sol/IZRC20Mock.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/Errors.sol/INotSupportedMethods__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/Revert.sol/Revertable__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/evm/ERC20Custody__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/evm/GatewayEVM__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorBase__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorNative__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/evm/ZetaConnectorNonNative__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistryErrors__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistryEvents__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/IBaseRegistry__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/interfaces/IBaseRegistry.sol/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/helpers/interfaces/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/GatewayZEVM__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol/SystemContract__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/ZRC20.sol/ZRC20__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/ICoreRegistry__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/IGatewayZEVM.sol/IGatewayZEVMErrors__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/IGatewayZEVM.sol/IGatewayZEVM__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol/IZRC20Metadata__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/IZRC20.sol/IZRC20__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/UniversalContract.sol/UniversalContract__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/interfaces/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/libraries/GatewayZEVMValidations__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/@zetachain/protocol-contracts/contracts/zevm/libraries/index.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/OnlySystem__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/EVMSetup.t.sol/EVMSetup__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/FoundrySetup.t.sol/FoundrySetup__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/TokenSetup.t.sol/TokenSetup__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/ZetaSetup.t.sol/ZetaSetup__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/mock/ZRC20Mock.sol/IZRC20Mock__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/mock/ZRC20Mock.sol/ZRC20Mock__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/mockGateway/NodeLogicMock__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/mockGateway/WrapGatewayEVM__factory.ts is excluded by !typechain-types/**
  • typechain-types/factories/contracts/testing/mockGateway/WrapGatewayZEVM__factory.ts is excluded by !typechain-types/**
  • typechain-types/hardhat.d.ts is excluded by !typechain-types/**
  • typechain-types/index.ts is excluded by !typechain-types/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
πŸ“’ Files selected for processing (8)
  • package.json (1 hunks)
  • packages/commands/src/query/contracts/index.ts (1 hunks)
  • packages/commands/src/query/contracts/list.ts (1 hunks)
  • packages/commands/src/query/contracts/show.ts (1 hunks)
  • packages/commands/src/query/index.ts (2 hunks)
  • src/constants/addresses.ts (1 hunks)
  • src/schemas/commands/contracts.ts (1 hunks)
  • utils/addressResolver.ts (1 hunks)
🧠 Learnings (5)
πŸ““ Common learnings
Learnt from: hernan-clich
PR: zeta-chain/toolkit#238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.
Learnt from: hernan-clich
PR: zeta-chain/toolkit#332
File: packages/commands/src/bitcoin/inscription/call.ts:66-67
Timestamp: 2025-05-27T16:09:13.029Z
Learning: The ZetaChain toolkit uses comprehensive zod schema validation for command inputs, including hexStringSchema for hex string validation with regex /^(0x)?[0-9a-fA-F]*$/, so manual validation in the command logic is typically unnecessary as validation occurs during option parsing.
Learnt from: hernan-clich
PR: zeta-chain/toolkit#329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, base schemas like `baseEvmDepositOptionsSchema` are intentionally kept flexible, with mutual exclusivity refinements like name/privateKey validation happening in the specific command implementations that extend the base schema, rather than in the base schema itself.
Learnt from: fadeev
PR: zeta-chain/toolkit#346
File: packages/commands/src/ton/depositAndCall.ts:0-0
Timestamp: 2025-06-13T15:33:54.781Z
Learning: fadeev prefers responses in English.
Learnt from: fadeev
PR: zeta-chain/toolkit#346
File: packages/commands/src/ton/deposit.ts:0-0
Timestamp: 2025-06-13T15:32:09.225Z
Learning: User fadeev prefers that responses be in English; avoid replying in Russian in future interactions.
package.json (3)

Learnt from: s2imonovic
PR: #370
File: contracts/UniswapV3SetupLib.sol:124-128
Timestamp: 2025-06-26T14:06:16.147Z
Learning: In the ZetaChain toolkit codebase, accurate documentation is important - comments should correctly reflect what the code actually does (e.g., fixing comments that incorrectly reference Uniswap V2 when the code deploys V3 contracts).

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

Learnt from: hernan-clich
PR: #291
File: packages/commands/src/accounts/list.ts:0-0
Timestamp: 2025-04-17T15:59:39.612Z
Learning: In the zetachain/toolkit repository, file system operations should use the safe helper functions from fsUtils.ts (like safeReadFile, safeReadDir, safeExists) instead of direct Node.js fs methods to ensure consistent error handling.

packages/commands/src/query/contracts/index.ts (1)

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

src/schemas/commands/contracts.ts (4)

Learnt from: hernan-clich
PR: #329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, base schemas like baseEvmDepositOptionsSchema are intentionally kept flexible, with mutual exclusivity refinements like name/privateKey validation happening in the specific command implementations that extend the base schema, rather than in the base schema itself.

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

Learnt from: hernan-clich
PR: #332
File: packages/commands/src/bitcoin/inscription/call.ts:66-67
Timestamp: 2025-05-27T16:09:13.029Z
Learning: The ZetaChain toolkit uses comprehensive zod schema validation for command inputs, including hexStringSchema for hex string validation with regex /^(0x)?[0-9a-fA-F]*$/, so manual validation in the command logic is typically unnecessary as validation occurs during option parsing.

Learnt from: hernan-clich
PR: #329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, mutual exclusivity between 'name' and 'privateKey' is implemented using the 'namePkRefineRule' in the individual command schemas that extend the base schema, rather than in the base schema itself. This design pattern allows the base schema to remain flexible while specific commands can apply constraints as needed.

packages/commands/src/query/contracts/list.ts (1)

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

🧬 Code Graph Analysis (5)
packages/commands/src/query/contracts/index.ts (2)
packages/commands/src/query/contracts/list.ts (1)
  • listCommand (103-118)
packages/commands/src/query/contracts/show.ts (1)
  • showCommand (66-81)
packages/commands/src/query/index.ts (1)
packages/commands/src/query/contracts/index.ts (1)
  • contractsCommand (6-11)
packages/commands/src/query/contracts/show.ts (4)
src/schemas/commands/contracts.ts (1)
  • contractsShowOptionsSchema (11-16)
packages/commands/src/query/contracts/list.ts (1)
  • fetchContracts (22-35)
utils/addressResolver.ts (1)
  • formatAddress (308-322)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
src/schemas/commands/contracts.ts (1)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
packages/commands/src/query/contracts/list.ts (4)
src/schemas/commands/contracts.ts (1)
  • contractsListOptionsSchema (5-9)
src/constants/addresses.ts (1)
  • CONTRACT_REGISTRY_ADDRESS (2-3)
utils/addressResolver.ts (1)
  • formatAddress (308-322)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
🧰 Additional context used
🧠 Learnings (5)
πŸ““ Common learnings
Learnt from: hernan-clich
PR: zeta-chain/toolkit#238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.
Learnt from: hernan-clich
PR: zeta-chain/toolkit#332
File: packages/commands/src/bitcoin/inscription/call.ts:66-67
Timestamp: 2025-05-27T16:09:13.029Z
Learning: The ZetaChain toolkit uses comprehensive zod schema validation for command inputs, including hexStringSchema for hex string validation with regex /^(0x)?[0-9a-fA-F]*$/, so manual validation in the command logic is typically unnecessary as validation occurs during option parsing.
Learnt from: hernan-clich
PR: zeta-chain/toolkit#329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, base schemas like `baseEvmDepositOptionsSchema` are intentionally kept flexible, with mutual exclusivity refinements like name/privateKey validation happening in the specific command implementations that extend the base schema, rather than in the base schema itself.
Learnt from: fadeev
PR: zeta-chain/toolkit#346
File: packages/commands/src/ton/depositAndCall.ts:0-0
Timestamp: 2025-06-13T15:33:54.781Z
Learning: fadeev prefers responses in English.
Learnt from: fadeev
PR: zeta-chain/toolkit#346
File: packages/commands/src/ton/deposit.ts:0-0
Timestamp: 2025-06-13T15:32:09.225Z
Learning: User fadeev prefers that responses be in English; avoid replying in Russian in future interactions.
package.json (3)

Learnt from: s2imonovic
PR: #370
File: contracts/UniswapV3SetupLib.sol:124-128
Timestamp: 2025-06-26T14:06:16.147Z
Learning: In the ZetaChain toolkit codebase, accurate documentation is important - comments should correctly reflect what the code actually does (e.g., fixing comments that incorrectly reference Uniswap V2 when the code deploys V3 contracts).

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

Learnt from: hernan-clich
PR: #291
File: packages/commands/src/accounts/list.ts:0-0
Timestamp: 2025-04-17T15:59:39.612Z
Learning: In the zetachain/toolkit repository, file system operations should use the safe helper functions from fsUtils.ts (like safeReadFile, safeReadDir, safeExists) instead of direct Node.js fs methods to ensure consistent error handling.

packages/commands/src/query/contracts/index.ts (1)

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

src/schemas/commands/contracts.ts (4)

Learnt from: hernan-clich
PR: #329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, base schemas like baseEvmDepositOptionsSchema are intentionally kept flexible, with mutual exclusivity refinements like name/privateKey validation happening in the specific command implementations that extend the base schema, rather than in the base schema itself.

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

Learnt from: hernan-clich
PR: #332
File: packages/commands/src/bitcoin/inscription/call.ts:66-67
Timestamp: 2025-05-27T16:09:13.029Z
Learning: The ZetaChain toolkit uses comprehensive zod schema validation for command inputs, including hexStringSchema for hex string validation with regex /^(0x)?[0-9a-fA-F]*$/, so manual validation in the command logic is typically unnecessary as validation occurs during option parsing.

Learnt from: hernan-clich
PR: #329
File: utils/evm.command.helpers.ts:21-38
Timestamp: 2025-05-16T20:59:05.735Z
Learning: In the ZetaChain toolkit, mutual exclusivity between 'name' and 'privateKey' is implemented using the 'namePkRefineRule' in the individual command schemas that extend the base schema, rather than in the base schema itself. This design pattern allows the base schema to remain flexible while specific commands can apply constraints as needed.

packages/commands/src/query/contracts/list.ts (1)

Learnt from: hernan-clich
PR: #238
File: packages/tasks/src/verify.ts:0-0
Timestamp: 2025-03-18T14:06:01.531Z
Learning: The verify.ts file in the zeta-chain/toolkit repository already implements proper validation for empty contract lists using a condition that checks names.length.

🧬 Code Graph Analysis (5)
packages/commands/src/query/contracts/index.ts (2)
packages/commands/src/query/contracts/list.ts (1)
  • listCommand (103-118)
packages/commands/src/query/contracts/show.ts (1)
  • showCommand (66-81)
packages/commands/src/query/index.ts (1)
packages/commands/src/query/contracts/index.ts (1)
  • contractsCommand (6-11)
packages/commands/src/query/contracts/show.ts (4)
src/schemas/commands/contracts.ts (1)
  • contractsShowOptionsSchema (11-16)
packages/commands/src/query/contracts/list.ts (1)
  • fetchContracts (22-35)
utils/addressResolver.ts (1)
  • formatAddress (308-322)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
src/schemas/commands/contracts.ts (1)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
packages/commands/src/query/contracts/list.ts (4)
src/schemas/commands/contracts.ts (1)
  • contractsListOptionsSchema (5-9)
src/constants/addresses.ts (1)
  • CONTRACT_REGISTRY_ADDRESS (2-3)
utils/addressResolver.ts (1)
  • formatAddress (308-322)
src/constants/api.ts (1)
  • DEFAULT_EVM_RPC_URL (3-4)
πŸ”‡ Additional comments (15)
src/constants/addresses.ts (1)

2-3: Verify mainnet CONTRACT_REGISTRY_ADDRESS

Please confirm that the hard-coded address 0x7cce3eb018bf23e1fe2a32692f2c77592d110394 in your constants file is the official mainnet Registry contract and not a testnet deployment. You can cross-check it on Etherscan or against your deployment records. If you need to support multiple networks, consider making this address network-configurable or adding an inline comment/documentation link.

β€’ File: src/constants/addresses.ts (lines 2–3)
β€’ Usage: imported in packages/commands/src/query/contracts/list.ts

packages/commands/src/query/index.ts (2)

5-5: LGTM!

The import follows the established pattern and maintains alphabetical ordering.


14-14: LGTM!

The command integration follows the existing pattern and maintains alphabetical ordering within the command hierarchy.

packages/commands/src/query/contracts/index.ts (1)

1-11: LGTM!

The command group implementation follows commander.js best practices with appropriate aliasing, clear description, and proper subcommand integration. The structure is consistent with the existing codebase patterns.

packages/commands/src/query/contracts/show.ts (3)

19-33: LGTM!

The findContractByChainId function is well-implemented with proper filtering logic and case-insensitive type matching, which improves user experience.


45-57: Excellent user experience with helpful error messages.

The error handling provides clear feedback with the specific chain ID and type that wasn't found, plus a helpful list of available contracts. This makes debugging much easier for users.


78-80: LGTM!

The command action properly validates options using zod schema before execution, which aligns with the established patterns in the ZetaChain toolkit codebase.

src/schemas/commands/contracts.ts (1)

11-16: Schema definition looks good.

The validation schema correctly defines required fields (chainId, type) and provides appropriate defaults for optional fields (json, rpc).

utils/addressResolver.ts (2)

281-302: Well-implemented address parsing function.

The function correctly handles both direct EVM addresses and left-padded bytes32 values. The use of ethers.isAddress for validation and ethers.getAddress for checksumming follows best practices.


304-322: Robust address formatting with appropriate fallbacks.

The function provides a good fallback strategy: EVM address parsing first, then UTF-8 decoding with null byte cleanup, and finally returning the original hex string if all else fails.

packages/commands/src/query/contracts/list.ts (5)

1-21: Good setup with proper imports and type definitions.

The imports are appropriate and the ContractData interface correctly represents the contract registry structure. Type inference from the schema provides good type safety.


22-35: Clean and correct contract fetching implementation.

The function properly sets up the ethers provider and contract instance, with appropriate error handling delegated to the calling function.


37-57: Correct table formatting with conditional columns.

The function properly builds table headers and rows based on the selected columns. The use of formatAddress for address display ensures consistent formatting.


59-101: Robust main function with comprehensive error handling.

The function handles all scenarios well: spinner management for non-JSON output, proper sorting, multiple output formats, empty results, and comprehensive error handling.


103-118: Well-structured command definition.

The command follows best practices with proper aliases, clear description, and good option definitions. The schema validation ensures type safety. Note: This relates to the earlier flagged inconsistency with the schema's columns default.

@fadeev
Copy link
Member Author

fadeev commented Jul 22, 2025

Might need to hold off on merging this until protocol contracts v13.1.0 stable is released.

Copy link
Member

@hernan-clich hernan-clich left a comment

Choose a reason for hiding this comment

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

Tested ACK

@fadeev fadeev marked this pull request as draft August 22, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants