diff --git a/.github/workflows/utility/chain_registry.mjs b/.github/workflows/utility/chain_registry.mjs index e917767..1908b61 100644 --- a/.github/workflows/utility/chain_registry.mjs +++ b/.github/workflows/utility/chain_registry.mjs @@ -16,6 +16,7 @@ export const chainRegistryRoot = "../../.."; const networkTypeToDirectoryNameMap = new Map(); networkTypeToDirectoryNameMap.set("mainnet", ""); networkTypeToDirectoryNameMap.set("testnet", "testnets"); +networkTypeToDirectoryNameMap.set("devnet", "devnets"); const networkTypes = Array.from(networkTypeToDirectoryNameMap.keys()); const domainToDirectoryNameMap = new Map(); @@ -34,9 +35,9 @@ export const nonChainDirectories = [ ".vs", "_IBC", "_memo_keys", - "_non-cosmos", "_template", "testnets", + "devnets", ".gitignore", "assetlist.schema.json", "chain.schema.json", @@ -77,6 +78,7 @@ export const bech32ConfigSuffixMap = new Map([ const networkTypeToDirectoryMap = new Map(); networkTypeToDirectoryMap.set("mainnet", ""); networkTypeToDirectoryMap.set("testnet", "testnets"); +networkTypeToDirectoryMap.set("devnet", "devnets"); for (const [networkType, directory] of networkTypeToDirectoryMap.entries()) { networkTypeToDirectoryMap.set(networkType, path.join(chainRegistryRoot, directory)); } diff --git a/.github/workflows/utility/test_ibcdata.py b/.github/workflows/utility/test_ibcdata.py index 8ae6e35..fd52761 100644 --- a/.github/workflows/utility/test_ibcdata.py +++ b/.github/workflows/utility/test_ibcdata.py @@ -7,9 +7,11 @@ mypathMainnets = join(getcwd(),"_IBC") mypathTestnets = join(getcwd(),"testnets","_IBC") +mypathDevnets = join(getcwd(),"devnets","_IBC") ibcData_files_mainnet = [f for f in listdir(mypathMainnets) if isfile(join(mypathMainnets, f))] ibcData_files_testnet = [f for f in listdir(mypathTestnets) if isfile(join(mypathTestnets, f))] -ibcData_files = ibcData_files_mainnet + ibcData_files_testnet +ibcData_files_devnet = [f for f in listdir(mypathDevnets) if isfile(join(mypathDevnets, f))] +ibcData_files = ibcData_files_mainnet + ibcData_files_testnet + ibcData_files_devnet @pytest.mark.parametrize("input", ibcData_files) def test_fileName(input): @@ -53,6 +55,19 @@ def test_chainNameMatchFileNameTestnets(input): chain_2 = str(json_file["chain_2"]["chain_name"]).lower() assert fileName_chain1 == chain_1 and fileName_chain2 == chain_2 +@pytest.mark.parametrize("input", ibcData_files_devnet) +def test_chainNameMatchFileNameDevnets(input): + # validates for testnet connections that the chain-name for chain-1 and chain-2 inside the json file match the order used in the file name. + pattern = re.compile(r'(.*)-(.*).json$') + m = pattern.match(input) + fileName_chain1 = m.group(1).lower() + fileName_chain2 = m.group(2).lower() + with open(join(mypathDevnets,input), "r") as read_file: + json_file = json.load(read_file) + chain_1 = str(json_file["chain_1"]["chain_name"]).lower() + chain_2 = str(json_file["chain_2"]["chain_name"]).lower() + assert fileName_chain1 == chain_1 and fileName_chain2 == chain_2 + @pytest.mark.parametrize("input", ibcData_files) # validates that the chain-name's used exist as root folders on the chain-registry def test_existstsOnChainReg(input): @@ -60,8 +75,7 @@ def test_existstsOnChainReg(input): m = pattern.match(input) chain1 = m.group(1).lower() chain2 = m.group(2).lower() - non_cosmos = join('_non-cosmos') testnets = join('testnets') - nc_testnets = join('testnets','_non-cosmos') - assert ((isdir(join(getcwd(),chain1)) or isdir(join(getcwd(),non_cosmos,chain1)) or isdir(join(getcwd(),testnets,chain1)) or isdir(join(getcwd(),nc_testnets,chain1))) and - (isdir(join(getcwd(),chain2)) or isdir(join(getcwd(),non_cosmos,chain2)) or isdir(join(getcwd(),testnets,chain1)) or isdir(join(getcwd(),nc_testnets,chain2)))) + devnets = join('devnets') + assert ((isdir(join(getcwd(),chain1)) or isdir(join(getcwd(),testnets,chain1)) or isdir(join(getcwd(), devnets,chain1))) and + (isdir(join(getcwd(),chain2)) or isdir(join(getcwd(),testnets,chain2)) or isdir(join(getcwd(),devnets,chain2)))) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f910ed --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "devnets" + ] +} \ No newline at end of file diff --git a/assetlist.schema.json b/assetlist.schema.json index 675fd63..cf5551d 100644 --- a/assetlist.schema.json +++ b/assetlist.schema.json @@ -119,12 +119,12 @@ "png": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.png$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$" }, "svg": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.svg$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$" } }, "additionalProperties": false @@ -140,12 +140,12 @@ "png": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.png$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$" }, "svg": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.svg$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$" }, "theme": { "type": "object", diff --git a/chain.schema.json b/chain.schema.json index 9e5fa5d..15e019e 100644 --- a/chain.schema.json +++ b/chain.schema.json @@ -425,12 +425,12 @@ "png": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.png$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$" }, "svg": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.svg$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$" }, "theme": { "type": "object", @@ -486,12 +486,12 @@ "png": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.png$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.png$" }, "svg": { "type": "string", "format": "uri-reference", - "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/)[a-z0-9]+/images/.+\\.svg$" + "pattern": "^https://raw\\.githubusercontent\\.com/initia/initia-registry/master/(|testnets/|devnets/)[a-z0-9]+/images/.+\\.svg$" } }, "additionalProperties": false diff --git a/testnets/_IBC/mahalo-minimove.json b/devnets/_IBC/mahalo-minimove.json similarity index 93% rename from testnets/_IBC/mahalo-minimove.json rename to devnets/_IBC/mahalo-minimove.json index 7c87ebe..7bb2fe3 100644 --- a/testnets/_IBC/mahalo-minimove.json +++ b/devnets/_IBC/mahalo-minimove.json @@ -1,5 +1,5 @@ { - "$schema": "../ibc_data.schema.json", + "$schema": "../../ibc_data.schema.json", "chain_1": { "chain_name": "mahalo", "client_id": "07-tendermint-0", diff --git a/testnets/_IBC/mahalo-miniwasm.json b/devnets/_IBC/mahalo-miniwasm.json similarity index 93% rename from testnets/_IBC/mahalo-miniwasm.json rename to devnets/_IBC/mahalo-miniwasm.json index bad2063..f7aa917 100644 --- a/testnets/_IBC/mahalo-miniwasm.json +++ b/devnets/_IBC/mahalo-miniwasm.json @@ -1,5 +1,5 @@ { - "$schema": "../ibc_data.schema.json", + "$schema": "../../ibc_data.schema.json", "chain_1": { "chain_name": "mahalo", "client_id": "07-tendermint-1", diff --git a/testnets/mahalo/assetlist.json b/devnets/mahalo/assetlist.json similarity index 98% rename from testnets/mahalo/assetlist.json rename to devnets/mahalo/assetlist.json index 0a2ef71..966e374 100644 --- a/testnets/mahalo/assetlist.json +++ b/devnets/mahalo/assetlist.json @@ -1,5 +1,5 @@ { - "$schema": "../assetlist.schema.json", + "$schema": "../../assetlist.schema.json", "chain_name": "initia", "assets": [ { diff --git a/testnets/mahalo/chain.json b/devnets/mahalo/chain.json similarity index 98% rename from testnets/mahalo/chain.json rename to devnets/mahalo/chain.json index b0ad149..8cea7c2 100644 --- a/testnets/mahalo/chain.json +++ b/devnets/mahalo/chain.json @@ -1,5 +1,5 @@ { - "$schema": "../chain.schema.json", + "$schema": "../../chain.schema.json", "chain_name": "initia", "chain_id": "mahalo-1", "website": "https://initia.xyz", diff --git a/testnets/mahalo/images/ETH.png b/devnets/mahalo/images/ETH.png similarity index 100% rename from testnets/mahalo/images/ETH.png rename to devnets/mahalo/images/ETH.png diff --git a/testnets/mahalo/images/ETH.svg b/devnets/mahalo/images/ETH.svg similarity index 100% rename from testnets/mahalo/images/ETH.svg rename to devnets/mahalo/images/ETH.svg diff --git a/testnets/mahalo/images/INIT.png b/devnets/mahalo/images/INIT.png similarity index 100% rename from testnets/mahalo/images/INIT.png rename to devnets/mahalo/images/INIT.png diff --git a/testnets/mahalo/images/INIT.svg b/devnets/mahalo/images/INIT.svg similarity index 100% rename from testnets/mahalo/images/INIT.svg rename to devnets/mahalo/images/INIT.svg diff --git a/testnets/mahalo/images/USDC.png b/devnets/mahalo/images/USDC.png similarity index 100% rename from testnets/mahalo/images/USDC.png rename to devnets/mahalo/images/USDC.png diff --git a/testnets/mahalo/images/USDC.svg b/devnets/mahalo/images/USDC.svg similarity index 100% rename from testnets/mahalo/images/USDC.svg rename to devnets/mahalo/images/USDC.svg diff --git a/testnets/minimove/assetlist.json b/devnets/minimove/assetlist.json similarity index 97% rename from testnets/minimove/assetlist.json rename to devnets/minimove/assetlist.json index ad59574..44e9429 100644 --- a/testnets/minimove/assetlist.json +++ b/devnets/minimove/assetlist.json @@ -1,5 +1,5 @@ { - "$schema": "../assetlist.schema.json", + "$schema": "../../assetlist.schema.json", "chain_name": "minimove", "assets": [ { diff --git a/testnets/minimove/chain.json b/devnets/minimove/chain.json similarity index 98% rename from testnets/minimove/chain.json rename to devnets/minimove/chain.json index 52f9988..cff0ea4 100644 --- a/testnets/minimove/chain.json +++ b/devnets/minimove/chain.json @@ -1,5 +1,5 @@ { - "$schema": "../chain.schema.json", + "$schema": "../../chain.schema.json", "chain_name": "minimove", "chain_id": "minimove-1", "website": "https://initia.xyz", diff --git a/testnets/minimove/images/INIT.png b/devnets/minimove/images/INIT.png similarity index 100% rename from testnets/minimove/images/INIT.png rename to devnets/minimove/images/INIT.png diff --git a/testnets/minimove/images/INIT.svg b/devnets/minimove/images/INIT.svg similarity index 100% rename from testnets/minimove/images/INIT.svg rename to devnets/minimove/images/INIT.svg diff --git a/testnets/minimove/images/USDC.png b/devnets/minimove/images/USDC.png similarity index 100% rename from testnets/minimove/images/USDC.png rename to devnets/minimove/images/USDC.png diff --git a/testnets/minimove/images/USDC.svg b/devnets/minimove/images/USDC.svg similarity index 100% rename from testnets/minimove/images/USDC.svg rename to devnets/minimove/images/USDC.svg diff --git a/testnets/miniwasm/assetlist.json b/devnets/miniwasm/assetlist.json similarity index 97% rename from testnets/miniwasm/assetlist.json rename to devnets/miniwasm/assetlist.json index e165c70..c96c720 100644 --- a/testnets/miniwasm/assetlist.json +++ b/devnets/miniwasm/assetlist.json @@ -1,5 +1,5 @@ { - "$schema": "../assetlist.schema.json", + "$schema": "../../assetlist.schema.json", "chain_name": "miniwasm", "assets": [ { diff --git a/testnets/miniwasm/chain.json b/devnets/miniwasm/chain.json similarity index 98% rename from testnets/miniwasm/chain.json rename to devnets/miniwasm/chain.json index c1a7657..a4353e4 100644 --- a/testnets/miniwasm/chain.json +++ b/devnets/miniwasm/chain.json @@ -1,5 +1,5 @@ { - "$schema": "../chain.schema.json", + "$schema": "../../chain.schema.json", "chain_name": "miniwasm", "chain_id": "miniwasm-1", "website": "https://initia.xyz", diff --git a/testnets/miniwasm/images/INIT.png b/devnets/miniwasm/images/INIT.png similarity index 100% rename from testnets/miniwasm/images/INIT.png rename to devnets/miniwasm/images/INIT.png diff --git a/testnets/miniwasm/images/INIT.svg b/devnets/miniwasm/images/INIT.svg similarity index 100% rename from testnets/miniwasm/images/INIT.svg rename to devnets/miniwasm/images/INIT.svg diff --git a/testnets/miniwasm/images/USDC.png b/devnets/miniwasm/images/USDC.png similarity index 100% rename from testnets/miniwasm/images/USDC.png rename to devnets/miniwasm/images/USDC.png diff --git a/testnets/miniwasm/images/USDC.svg b/devnets/miniwasm/images/USDC.svg similarity index 100% rename from testnets/miniwasm/images/USDC.svg rename to devnets/miniwasm/images/USDC.svg