From ab42ea3f5886ec118cfa21db433980285df55126 Mon Sep 17 00:00:00 2001 From: alanrsoares Date: Sat, 3 Feb 2024 20:32:30 +1300 Subject: [PATCH] chore: fix tokenList --- cli/wizard/commands/list-squid-token/index.ts | 2 +- registry/mainnet/cosmos/chains.json | 2 +- registry/mainnet/evm/chains.json | 2 +- .../mainnet/interchain/squid.tokenlist.json | 6 +- .../schemas/interchain-tokenlist.schema.json | 85 +++--- registry/testnet/cosmos/chains.json | 252 +++++++++--------- registry/testnet/evm/chains.json | 42 +-- specs/interchain.spec.ts | 4 +- 8 files changed, 198 insertions(+), 197 deletions(-) diff --git a/cli/wizard/commands/list-squid-token/index.ts b/cli/wizard/commands/list-squid-token/index.ts index 892a65e..8837131 100644 --- a/cli/wizard/commands/list-squid-token/index.ts +++ b/cli/wizard/commands/list-squid-token/index.ts @@ -185,7 +185,7 @@ function parseAsInterchainTokenConfig( name: data.tokenName, originAxelarChainId: data.axelarChainId, tokenType: data.kind, - tokenSalt: data.salt, + deploySalt: data.salt, iconUrls: { svg: `${BASE_REPO_URL}/images/tokens/${data.tokenSymbol.toLowerCase()}.svg`, }, diff --git a/registry/mainnet/cosmos/chains.json b/registry/mainnet/cosmos/chains.json index 1c04581..f061c03 100644 --- a/registry/mainnet/cosmos/chains.json +++ b/registry/mainnet/cosmos/chains.json @@ -1,7 +1,7 @@ { "$schema": "../../schemas/cosmos-chains.schema.json", "name": "MAINNET chain list for COSMOS [generated by 'scripts/codegen-chains.ts', do not edit manually]", - "timestamp": "2023-08-27T08:52:43.243Z", + "timestamp": "2024-02-03T07:24:15.576Z", "chains": [ { "rest": "https://api.cosmos.network", diff --git a/registry/mainnet/evm/chains.json b/registry/mainnet/evm/chains.json index 01ec12c..e40049e 100644 --- a/registry/mainnet/evm/chains.json +++ b/registry/mainnet/evm/chains.json @@ -1,7 +1,7 @@ { "$schema": "../../schemas/evm-chains.schema.json", "name": "MAINNET chain list for EVM [generated by 'scripts/codegen-chains.ts', do not edit manually]", - "timestamp": "2023-08-27T08:52:43.242Z", + "timestamp": "2024-02-03T07:24:15.575Z", "chains": [ { "id": 42161, diff --git a/registry/mainnet/interchain/squid.tokenlist.json b/registry/mainnet/interchain/squid.tokenlist.json index 922394b..6b6ed4d 100644 --- a/registry/mainnet/interchain/squid.tokenlist.json +++ b/registry/mainnet/interchain/squid.tokenlist.json @@ -19,10 +19,12 @@ "originAxelarChainId": "moonbeam", "tokenType": "interchain", "iconUrls": { - "svg": "/images/tokens/rmrk.svg" + "svg": "https://raw.githubusercontent.com/axelarnetwork/axelar-configs/main/images/tokens/rmrk.svg" }, + "deployer": "0x0000000000000000000000000000000000000000", + "originalMinter": "0x0000000000000000000000000000000000000000", "deploySalt": "0x", - "deploymentTxHash": "", + "deploymentTxHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "chains": [ { "axelarChainId": "moonbeam", diff --git a/registry/schemas/interchain-tokenlist.schema.json b/registry/schemas/interchain-tokenlist.schema.json index 3362c6f..be572fb 100644 --- a/registry/schemas/interchain-tokenlist.schema.json +++ b/registry/schemas/interchain-tokenlist.schema.json @@ -11,15 +11,7 @@ "version": { "$ref": "#/definitions/version" }, "tokens": { "type": "object", - "properties": { - "$id": { - "type": "string" - }, - "$schema": { - "type": "object", - "$ref": "#/definitions/interchainToken" - } - } + "additionalProperties": { "$ref": "#/definitions/interchainToken" } } }, "required": ["$schema", "name", "version", "tokens"], @@ -27,37 +19,67 @@ "definitions": { "IconUrlsSchema": { "type": "object", - "properties": { "svg": { "type": "string" } }, + "properties": { "svg": { "type": "string", "format": "uri" } }, "required": ["svg"], "additionalProperties": false }, + "chains": { + "type": "object", + "properties": { + "axelarChainId": { "type": "string" }, + "tokenAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "tokenManager": { + "$ref": "#/definitions/chains/properties/tokenAddress" + }, + "tokenManagerType": { "type": "string" } + }, + "required": [ + "axelarChainId", + "tokenAddress", + "tokenManager", + "tokenManagerType" + ], + "additionalProperties": false + }, "interchainToken": { "type": "object", "properties": { "tokenId": { "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, - "tokenAddress": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "tokenAddress": { + "$ref": "#/definitions/chains/properties/tokenAddress" + }, + "tokenManager": { + "$ref": "#/definitions/chains/properties/tokenAddress" + }, + "deployer": { "$ref": "#/definitions/chains/properties/tokenAddress" }, + "originalMinter": { + "$ref": "#/definitions/chains/properties/tokenAddress" + }, + "tokenManagerType": { "type": "string" }, "symbol": { "type": "string" }, "prettySymbol": { "type": "string" }, "decimals": { "type": "integer" }, "name": { "type": "string" }, "originAxelarChainId": { "type": "string" }, "tokenType": { "type": "string" }, - "deploymentTxHash": { "type": "string" }, "iconUrls": { "$ref": "#/definitions/IconUrlsSchema" }, + "deploySalt": { "type": "string" }, "chains": { "type": "array", "items": { "$ref": "#/definitions/chains" } }, - "tokenManager": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "tokenManagerType": { "type": "string" }, - "coinGeckoId": { "type": "string" } + "coinGeckoId": { "type": "string" }, + "deploymentTxHash": { + "$ref": "#/definitions/interchainToken/properties/tokenId" + } }, "required": [ "tokenId", "tokenAddress", + "tokenManager", + "deployer", + "originalMinter", + "tokenManagerType", "symbol", "prettySymbol", "decimals", @@ -65,32 +87,9 @@ "originAxelarChainId", "tokenType", "iconUrls", + "deploySalt", "chains", - "deploymentTxHash", - "tokenManager", - "tokenManagerType" - ], - "additionalProperties": false - }, - "chains": { - "type": "object", - "properties": { - "axelarChainId": { "type": "string" }, - "tokenAddress": { - "$ref": "#/definitions/interchainToken/properties/tokenAddress" - }, - "tokenManager": { - "$ref": "#/definitions/interchainToken/properties/tokenManager" - }, - "tokenManagerType": { - "$ref": "#/definitions/interchainToken/properties/tokenManagerType" - } - }, - "required": [ - "axelarChainId", - "tokenAddress", - "tokenManager", - "tokenManagerType" + "deploymentTxHash" ], "additionalProperties": false }, diff --git a/registry/testnet/cosmos/chains.json b/registry/testnet/cosmos/chains.json index 42d3135..72d2f25 100644 --- a/registry/testnet/cosmos/chains.json +++ b/registry/testnet/cosmos/chains.json @@ -1,48 +1,8 @@ { "$schema": "../../schemas/cosmos-chains.schema.json", "name": "TESTNET chain list for COSMOS [generated by 'scripts/codegen-chains.ts', do not edit manually]", - "timestamp": "2023-08-27T08:52:43.244Z", + "timestamp": "2024-02-03T07:24:15.577Z", "chains": [ - { - "rest": "https://lcd.euphoria.aura.network", - "rpc": "https://testnet.rpc.axelar.dev/chain/aura", - "chainId": "euphoria-2", - "chainName": "Aura Testnet", - "stakeCurrency": { - "coinDenom": "EAURA", - "coinMinimalDenom": "ueaura", - "coinDecimals": 6, - "coinImageUrl": "/images/tokens/eaura.svg" - }, - "bech32Config": { - "bech32PrefixAccAddr": "aura", - "bech32PrefixAccPub": "aurapub", - "bech32PrefixConsAddr": "auravalcons", - "bech32PrefixConsPub": "auravalconspub", - "bech32PrefixValAddr": "auravaloper", - "bech32PrefixValPub": "auravaloperpub" - }, - "bip44": { - "coinType": 118 - }, - "feeCurrencies": [ - { - "coinDenom": "EAURA", - "coinMinimalDenom": "ueaura", - "coinDecimals": 6, - "coinImageUrl": "/images/tokens/eaura.svg" - } - ], - "currencies": [ - { - "coinDenom": "EAURA", - "coinMinimalDenom": "ueaura", - "coinDecimals": 6, - "coinImageUrl": "/images/tokens/eaura.svg" - } - ], - "chainIconUrl": "/images/chains/aura.svg" - }, { "rest": "http://testnet.securesecrets.org:1317", "rpc": "https://testnet.rpc.axelar.dev/chain/secret", @@ -84,176 +44,216 @@ "chainIconUrl": "/images/chains/secret.svg" }, { - "rest": "https://axelar-testnet-lcd.axelar-dev.workers.dev", - "rpc": "https://testnet.rpc.axelar.dev/chain/axelar", - "chainId": "axelar-testnet-lisbon-3", - "chainName": "Axelar Testnet", + "rest": "https://lcd.osmotest5.osmosis.zone", + "rpc": "https://testnet.rpc.axelar.dev/chain/osmosis", + "chainId": "osmo-test-5", + "chainName": "Osmosis Testnet", "stakeCurrency": { - "coinDenom": "AXL", - "coinMinimalDenom": "uaxl", + "coinDenom": "OSMO", + "coinMinimalDenom": "uosmo", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/axl.svg" + "coinImageUrl": "/images/tokens/osmo.svg" }, "bech32Config": { - "bech32PrefixAccAddr": "axelar", - "bech32PrefixAccPub": "axelarpub", - "bech32PrefixConsAddr": "axelarvalcons", - "bech32PrefixConsPub": "axelarvalconspub", - "bech32PrefixValAddr": "axelarvaloper", - "bech32PrefixValPub": "axelarvaloperpub" + "bech32PrefixAccAddr": "osmo", + "bech32PrefixAccPub": "osmopub", + "bech32PrefixConsAddr": "osmovalcons", + "bech32PrefixConsPub": "osmovalconspub", + "bech32PrefixValAddr": "osmovaloper", + "bech32PrefixValPub": "osmovaloperpub" }, "bip44": { "coinType": 118 }, "feeCurrencies": [ { - "coinDenom": "AXL", - "coinMinimalDenom": "uaxl", + "coinDenom": "OSMO", + "coinMinimalDenom": "uosmo", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/axl.svg" + "coinImageUrl": "/images/tokens/osmo.svg" } ], "currencies": [ { - "coinDenom": "AXL", - "coinMinimalDenom": "uaxl", + "coinDenom": "OSMO", + "coinMinimalDenom": "uosmo", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/axl.svg" + "coinImageUrl": "/images/tokens/osmo.svg" + }, + { + "coinDenom": "ION", + "coinMinimalDenom": "uion", + "coinDecimals": 6, + "coinImageUrl": "/images/tokens/osmosis-ion.svg" } ], - "chainIconUrl": "/images/chains/axelar.svg" + "chainIconUrl": "/images/chains/osmosis.svg" }, { - "rest": "https://api.xion-testnet-1.burnt.com", - "rpc": "https://testnet.rpc.axelar.dev/chain/burnt", - "chainId": "xion-testnet-1", - "chainName": "Burnt Testnet", + "rest": "https://api.cosmos.network", + "rpc": "https://testnet.rpc.axelar.dev/chain/cosmoshub", + "chainId": "cosmoshub-4", + "chainName": "Cosmoshub", "stakeCurrency": { - "coinDenom": "XION", - "coinMinimalDenom": "uxion", + "coinDenom": "ATOM", + "coinMinimalDenom": "uatom", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/xion.svg" + "coinImageUrl": "/images/tokens/atom.svg" }, "bech32Config": { - "bech32PrefixAccAddr": "xion", - "bech32PrefixAccPub": "xionpub", - "bech32PrefixConsAddr": "xionvalcons", - "bech32PrefixConsPub": "xionvalconspub", - "bech32PrefixValAddr": "xionvaloper", - "bech32PrefixValPub": "xionvaloperpub" + "bech32PrefixAccAddr": "cosmos", + "bech32PrefixAccPub": "cosmospub", + "bech32PrefixConsAddr": "cosmosvalcons", + "bech32PrefixConsPub": "cosmosvalconspub", + "bech32PrefixValAddr": "cosmosvaloper", + "bech32PrefixValPub": "cosmosvaloperpub" }, "bip44": { "coinType": 118 }, "feeCurrencies": [ { - "coinDenom": "XION", - "coinMinimalDenom": "uxion", + "coinDenom": "ATOM", + "coinMinimalDenom": "uatom", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/xion.svg" + "coinImageUrl": "/images/tokens/atom.svg" } ], "currencies": [ { - "coinDenom": "XION", - "coinMinimalDenom": "uxion", + "coinDenom": "ATOM", + "coinMinimalDenom": "uatom", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/xion.svg" - }, + "coinImageUrl": "/images/tokens/atom.svg" + } + ], + "chainIconUrl": "/images/chains/cosmoshub.svg" + }, + { + "rest": "https://axelar-testnet-lcd.axelar-dev.workers.dev", + "rpc": "https://testnet.rpc.axelar.dev/chain/axelar", + "chainId": "axelar-testnet-lisbon-3", + "chainName": "Axelar Testnet", + "stakeCurrency": { + "coinDenom": "AXL", + "coinMinimalDenom": "uaxl", + "coinDecimals": 6, + "coinImageUrl": "/images/tokens/axl.svg" + }, + "bech32Config": { + "bech32PrefixAccAddr": "axelar", + "bech32PrefixAccPub": "axelarpub", + "bech32PrefixConsAddr": "axelarvalcons", + "bech32PrefixConsPub": "axelarvalconspub", + "bech32PrefixValAddr": "axelarvaloper", + "bech32PrefixValPub": "axelarvaloperpub" + }, + "bip44": { + "coinType": 118 + }, + "feeCurrencies": [ { "coinDenom": "AXL", - "coinMinimalDenom": "ibc/D934516FBE457F3A98AFABD87E0EFF7F95A15325C191EA8CDD7763C702FDDEC2", + "coinMinimalDenom": "uaxl", "coinDecimals": 6, "coinImageUrl": "/images/tokens/axl.svg" } ], - "chainIconUrl": "/images/chains/burnt.svg" + "currencies": [ + { + "coinDenom": "AXL", + "coinMinimalDenom": "uaxl", + "coinDecimals": 6, + "coinImageUrl": "/images/tokens/axl.svg" + } + ], + "chainIconUrl": "/images/chains/axelar.svg" }, { - "rest": "https://api.cosmos.network", - "rpc": "https://testnet.rpc.axelar.dev/chain/cosmoshub", - "chainId": "cosmoshub-4", - "chainName": "Cosmoshub", + "rest": "https://lcd.euphoria.aura.network", + "rpc": "https://testnet.rpc.axelar.dev/chain/aura", + "chainId": "euphoria-2", + "chainName": "Aura Testnet", "stakeCurrency": { - "coinDenom": "ATOM", - "coinMinimalDenom": "uatom", + "coinDenom": "EAURA", + "coinMinimalDenom": "ueaura", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/atom.svg" + "coinImageUrl": "/images/tokens/eaura.svg" }, "bech32Config": { - "bech32PrefixAccAddr": "cosmos", - "bech32PrefixAccPub": "cosmospub", - "bech32PrefixConsAddr": "cosmosvalcons", - "bech32PrefixConsPub": "cosmosvalconspub", - "bech32PrefixValAddr": "cosmosvaloper", - "bech32PrefixValPub": "cosmosvaloperpub" + "bech32PrefixAccAddr": "aura", + "bech32PrefixAccPub": "aurapub", + "bech32PrefixConsAddr": "auravalcons", + "bech32PrefixConsPub": "auravalconspub", + "bech32PrefixValAddr": "auravaloper", + "bech32PrefixValPub": "auravaloperpub" }, "bip44": { "coinType": 118 }, "feeCurrencies": [ { - "coinDenom": "ATOM", - "coinMinimalDenom": "uatom", + "coinDenom": "EAURA", + "coinMinimalDenom": "ueaura", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/atom.svg" + "coinImageUrl": "/images/tokens/eaura.svg" } ], "currencies": [ { - "coinDenom": "ATOM", - "coinMinimalDenom": "uatom", + "coinDenom": "EAURA", + "coinMinimalDenom": "ueaura", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/atom.svg" + "coinImageUrl": "/images/tokens/eaura.svg" } ], - "chainIconUrl": "/images/chains/cosmoshub.svg" + "chainIconUrl": "/images/chains/aura.svg" }, { - "rest": "https://lcd.osmotest5.osmosis.zone", - "rpc": "https://testnet.rpc.axelar.dev/chain/osmosis", - "chainId": "osmo-test-5", - "chainName": "Osmosis Testnet", + "rest": "https://api.xion-testnet-1.burnt.com", + "rpc": "https://testnet.rpc.axelar.dev/chain/burnt", + "chainId": "xion-testnet-1", + "chainName": "Burnt Testnet", "stakeCurrency": { - "coinDenom": "OSMO", - "coinMinimalDenom": "uosmo", + "coinDenom": "XION", + "coinMinimalDenom": "uxion", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/osmo.svg" + "coinImageUrl": "/images/tokens/xion.svg" }, "bech32Config": { - "bech32PrefixAccAddr": "osmo", - "bech32PrefixAccPub": "osmopub", - "bech32PrefixConsAddr": "osmovalcons", - "bech32PrefixConsPub": "osmovalconspub", - "bech32PrefixValAddr": "osmovaloper", - "bech32PrefixValPub": "osmovaloperpub" + "bech32PrefixAccAddr": "xion", + "bech32PrefixAccPub": "xionpub", + "bech32PrefixConsAddr": "xionvalcons", + "bech32PrefixConsPub": "xionvalconspub", + "bech32PrefixValAddr": "xionvaloper", + "bech32PrefixValPub": "xionvaloperpub" }, "bip44": { "coinType": 118 }, "feeCurrencies": [ { - "coinDenom": "OSMO", - "coinMinimalDenom": "uosmo", + "coinDenom": "XION", + "coinMinimalDenom": "uxion", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/osmo.svg" + "coinImageUrl": "/images/tokens/xion.svg" } ], "currencies": [ { - "coinDenom": "OSMO", - "coinMinimalDenom": "uosmo", + "coinDenom": "XION", + "coinMinimalDenom": "uxion", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/osmo.svg" + "coinImageUrl": "/images/tokens/xion.svg" }, { - "coinDenom": "ION", - "coinMinimalDenom": "uion", + "coinDenom": "AXL", + "coinMinimalDenom": "ibc/D934516FBE457F3A98AFABD87E0EFF7F95A15325C191EA8CDD7763C702FDDEC2", "coinDecimals": 6, - "coinImageUrl": "/images/tokens/osmosis-ion.svg" + "coinImageUrl": "/images/tokens/axl.svg" } ], - "chainIconUrl": "/images/chains/osmosis.svg" + "chainIconUrl": "/images/chains/burnt.svg" } ] } diff --git a/registry/testnet/evm/chains.json b/registry/testnet/evm/chains.json index eb754e0..894cce6 100644 --- a/registry/testnet/evm/chains.json +++ b/registry/testnet/evm/chains.json @@ -1,28 +1,8 @@ { "$schema": "../../schemas/evm-chains.schema.json", "name": "TESTNET chain list for EVM [generated by 'scripts/codegen-chains.ts', do not edit manually]", - "timestamp": "2023-08-27T08:52:43.243Z", + "timestamp": "2024-02-03T07:24:15.576Z", "chains": [ - { - "id": 80001, - "network": "maticmum", - "name": "Polygon Mumbai", - "nativeCurrency": { - "name": "MATIC", - "symbol": "MATIC", - "decimals": 18, - "iconUrl": "/images/tokens/matic.svg" - }, - "rpcUrls": ["https://matic-mumbai.chainstacklabs.com"], - "blockExplorers": [ - { - "name": "PolygonScan", - "url": "https://mumbai.polygonscan.com" - } - ], - "iconUrl": "/images/chains/polygon.svg", - "testnet": true - }, { "id": 5, "network": "goerli", @@ -62,6 +42,26 @@ ], "iconUrl": "/images/chains/polygon.svg", "testnet": true + }, + { + "id": 80001, + "network": "maticmum", + "name": "Polygon Mumbai", + "nativeCurrency": { + "name": "MATIC", + "symbol": "MATIC", + "decimals": 18, + "iconUrl": "/images/tokens/matic.svg" + }, + "rpcUrls": ["https://matic-mumbai.chainstacklabs.com"], + "blockExplorers": [ + { + "name": "PolygonScan", + "url": "https://mumbai.polygonscan.com" + } + ], + "iconUrl": "/images/chains/polygon.svg", + "testnet": true } ] } diff --git a/specs/interchain.spec.ts b/specs/interchain.spec.ts index 9bb5776..ea0854c 100644 --- a/specs/interchain.spec.ts +++ b/specs/interchain.spec.ts @@ -15,10 +15,10 @@ describe("InterchainTokenList Configs", async () => { const result = validate(config, schema); if (!result.valid) { - console.log({ errors: result.errors }); + console.log({ errors: result.errors.map((x) => x.message) }); } - expect(result.valid).toBe(true); + expect(result.errors).toEqual([]); }); } });