Skip to content

Commit

Permalink
Add Minimum Length to Strings in JSON Schemas (#4829)
Browse files Browse the repository at this point in the history
* Update assetlist.schema.json

* Update chain.schema.json

* remove properties with empty strings

* add zetatestnet version name and allow empty string for next_version_name

* Update chain.json
  • Loading branch information
JeremyParish69 authored Jun 17, 2024
1 parent 52aa0c9 commit 1eb7f41
Show file tree
Hide file tree
Showing 56 changed files with 301 additions and 285 deletions.
1 change: 0 additions & 1 deletion 8ball/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.svg"
},
"coingecko_id": "",
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/8ball/images/8ball.png",
Expand Down
1 change: 0 additions & 1 deletion _non-cosmos/ethereum/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,6 @@
]
},
{
"description": "",
"type_asset": "erc20",
"address": "0x78a0A62Fba6Fb21A83FE8a3433d44C73a4017A6f",
"denom_units": [
Expand Down
1 change: 0 additions & 1 deletion _non-cosmos/solana/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
]
},
{
"description": "",
"type_asset": "erc20",
"address": "So11111111111111111111111111111111111111112",
"denom_units": [
Expand Down
3 changes: 1 addition & 2 deletions akash/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@
"consensus": {
"type": "cometbft",
"version": "akash-network/cometbft v0.34.27-akash"
},
"next_version_name": ""
}
}
]
},
Expand Down
1 change: 0 additions & 1 deletion akiro/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/akiro/images/akiro.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/akiro/images/akiro.svg"
},
"coingecko_id": "",
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/akiro/images/akiro.png",
Expand Down
3 changes: 1 addition & 2 deletions andromeda/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
"version": "v0.37.4"
},
"cosmwasm_version": "v0.41.0",
"cosmwasm_enabled": true,
"next_version_name": ""
"cosmwasm_enabled": true
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions archway/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@
"version": "v0.37.5"
},
"cosmwasm_version": "v0.45.0",
"cosmwasm_enabled": true,
"next_version_name": ""
"cosmwasm_enabled": true
}
]
},
Expand Down
57 changes: 50 additions & 7 deletions assetlist.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
"properties": {
"$schema": {
"type": "string",
"minLength": 1,
"pattern": "^(\\.\\./)+assetlist\\.schema\\.json$"
},
"chain_name": {
"type": "string"
"type": "string",
"minLength": 1
},
"assets": {
"type": "array",
Expand Down Expand Up @@ -42,10 +44,12 @@
},
"description": {
"type": "string",
"minLength": 1,
"description": "[OPTIONAL] A short description of the asset"
},
"extended_description": {
"type": "string",
"minLength": 1,
"description": "[OPTIONAL] A long description of the asset"
},
"denom_units": {
Expand All @@ -57,29 +61,35 @@
},
"type_asset": {
"type": "string",
"minLength": 1,
"enum": ["sdk.coin", "cw20", "erc20", "ics20", "snip20", "snip25", "bitcoin-like", "evm-base", "svm-base", "substrate", "unknown"],
"default": "sdk.coin",
"description": "[OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin"
},
"address": {
"type": "string",
"minLength": 1,
"description": "[OPTIONAL] The address of the asset. Only required for type_asset : cw20, snip20"
},
"base": {
"type": "string",
"minLength": 1,
"description": "The base unit of the asset. Must be in denom_units."
},
"name": {
"type": "string",
"minLength": 1,
"description": "The project name of the asset. For example Bitcoin.",
"maxLength": 42
},
"display": {
"type": "string",
"minLength": 1,
"description": "The human friendly unit of the asset. Must be in denom_units."
},
"symbol": {
"type": "string",
"minLength": 1,
"description": "The symbol of an asset. For example BTC."
},
"traces": {
Expand Down Expand Up @@ -126,11 +136,13 @@
"properties": {
"png": {
"type": "string",
"minLength": 1,
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.png$"
},
"svg": {
"type": "string",
"minLength": 1,
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.svg$"
}
Expand All @@ -147,20 +159,23 @@
},
"png": {
"type": "string",
"minLength": 1,
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.png$"
},
"svg": {
"type": "string",
"minLength": 1,
"format": "uri-reference",
"pattern": "^https://raw\\.githubusercontent\\.com/cosmos/chain-registry/master/(|testnets/|_non-cosmos/)[a-z0-9]+/images/.+\\.svg$"
},
"theme": {
"type": "object",
"properties": {
"primary_color_hex": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
"type": "string",
"minLength": 1,
"pattern": "^#[0-9a-fA-F]{6}$"
},
"circle": {
"type": "boolean"
Expand All @@ -179,12 +194,14 @@
},
"coingecko_id": {
"type": "string",
"minLength": 1,
"description": "[OPTIONAL] The coingecko id to fetch asset data from coingecko v3 api. See https://api.coingecko.com/api/v3/coins/list"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"minLength": 1
},
"minContains": 1,
"maxContains": 20
Expand All @@ -195,10 +212,12 @@
"properties": {
"website": {
"type": "string",
"minLength": 1,
"format": "uri"
},
"twitter": {
"type": "string",
"minLength": 1,
"format": "uri"
}
}
Expand Down Expand Up @@ -233,15 +252,17 @@
],
"properties": {
"denom": {
"type": "string"
"type": "string",
"minLength": 1
},
"exponent": {
"type": "integer"
},
"aliases": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"minLength": 1
},
"minContains": 1
}
Expand All @@ -257,10 +278,12 @@
"properties": {
"chain_name": {
"type": "string",
"minLength": 1,
"description": "The chain name or platform from which the object resides. E.g., 'cosmoshub', 'ethereum', 'forex', or 'nasdaq'"
},
"base_denom": {
"type": "string",
"minLength": 1,
"description": "The base denom of the asset from which the object originates. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform."
}
},
Expand All @@ -276,6 +299,7 @@
"properties": {
"type": {
"type": "string",
"minLength": 1,
"enum": [
"ibc"
]
Expand All @@ -290,14 +314,17 @@
"properties": {
"chain_name": {
"type": "string",
"minLength": 1,
"description": "The name of the counterparty chain. (must match exactly the chain name used in the Chain Registry)"
},
"base_denom": {
"type": "string",
"minLength": 1,
"description": "The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform."
},
"channel_id": {
"type": "string",
"minLength": 1,
"pattern": "^channel-(JEnb|\\d+)$",
"description": "The counterparty IBC transfer channel(, e.g., 'channel-1')."
}
Expand All @@ -313,11 +340,13 @@
"properties": {
"channel_id": {
"type": "string",
"minLength": 1,
"pattern": "^channel-\\d+$",
"description": "The chain's IBC transfer channel(, e.g., 'channel-1')."
},
"path": {
"type": "string",
"minLength": 1,
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
}
},
Expand All @@ -336,6 +365,7 @@
"properties": {
"type": {
"type": "string",
"minLength": 1,
"enum": [
"ibc-cw20"
]
Expand All @@ -351,18 +381,22 @@
"properties": {
"chain_name": {
"type": "string",
"minLength": 1,
"description": "The name of the counterparty chain. (must match exactly the chain name used in the Chain Registry)"
},
"base_denom": {
"type": "string",
"minLength": 1,
"description": "The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform."
},
"port": {
"type": "string",
"minLength": 1,
"description": "The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for outgoing cw20 transfers."
},
"channel_id": {
"type": "string",
"minLength": 1,
"pattern": "^channel-\\d+$",
"description": "The counterparty IBC transfer channel(, e.g., 'channel-1')."
}
Expand All @@ -379,15 +413,18 @@
"properties": {
"port": {
"type": "string",
"minLength": 1,
"description": "The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for outgoing cw20 transfers."
},
"channel_id": {
"type": "string",
"minLength": 1,
"pattern": "^channel-\\d+$",
"description": "The chain's IBC transfer channel(, e.g., 'channel-1')."
},
"path": {
"type": "string",
"minLength": 1,
"description": "The port/channel/denom input string that generates the 'ibc/...' denom."
}
},
Expand All @@ -406,6 +443,7 @@
"properties": {
"type": {
"type": "string",
"minLength": 1,
"enum": [
"bridge",
"liquid-stake",
Expand All @@ -424,13 +462,16 @@
"properties": {
"chain_name": {
"type": "string",
"minLength": 1,
"description": "The chain or platform from which the asset originates. E.g., 'cosmoshub', 'ethereum', 'forex', or 'nasdaq'"
},
"base_denom": {
"type": "string"
"type": "string",
"minLength": 1
},
"contract": {
"type": "string",
"minLength": 1,
"description": "The contract address where the transition takes place, where applicable. E.g., The Ethereum contract that locks up the asset while it's minted on another chain."
}
},
Expand All @@ -444,13 +485,15 @@
"properties": {
"contract": {
"type": "string",
"minLength": 1,
"description": "The contract address where the transition takes place, where applicable. E.g., The Ethereum contract that locks up the asset while it's minted on another chain."
}
},
"additionalProperties": false
},
"provider": {
"type": "string",
"minLength": 1,
"description": "The entity offering the service. E.g., 'Gravity Bridge' [Network] or 'Tether' [Company]."
}
},
Expand Down
3 changes: 1 addition & 2 deletions aura/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@
"version": "aura-nw/cometbft v0.37.4-aura.2"
},
"cosmwasm_version": "v0.42.0",
"cosmwasm_enabled": true,
"next_version_name": ""
"cosmwasm_enabled": true
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions aura1/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@
"version": "0.37.2"
},
"cosmwasm_version": "0.42.0",
"cosmwasm_enabled": true,
"next_version_name": ""
"cosmwasm_enabled": true
}
]
},
Expand Down
2 changes: 0 additions & 2 deletions bluzelle/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bluzelle/images/elt.png"
},
"coingecko_id": "",
"keywords": [
"elt"
],
Expand Down Expand Up @@ -89,7 +88,6 @@
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bluzelle/images/g4.png"
},
"coingecko_id": "",
"keywords": [
"g4"
],
Expand Down
Loading

0 comments on commit 1eb7f41

Please sign in to comment.