Skip to content

Commit

Permalink
Add Priority Scores (#96)
Browse files Browse the repository at this point in the history
* Add priorityScoresByBase field to input jsons

* Add scores

* Add changeset and fix runt lint issue

* Add comma

* Format function

* Move import up

* Update test

* Format test

* Fix tests

* Change type for test input priority score

* Remove empty space

* Update priority score logic

* Bump minor version
  • Loading branch information
JasonMHasperhoven authored Oct 18, 2024
1 parent e4c015f commit 4a563c9
Show file tree
Hide file tree
Showing 13 changed files with 179 additions and 55 deletions.
31 changes: 28 additions & 3 deletions input/chains/penumbra-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,32 @@
]
}
],
"canonicalNumeraires": [
"transfer/channel-2/uusdc"
]
"canonicalNumeraires": ["transfer/channel-2/uusdc"],
"priorityScoresByBase": {
"upenumbra": 999999999999,
"transfer/channel-2/uusdc": 100000000000,
"transfer/channel-4/factory/osmo1em6xs47hd82806f5cxgyufguxrrc7l0aqx7nzzptjuqgswczk8csavdxek/alloyed/allUSDT": 10000000000,
"transfer/channel-4/factory/osmo1k6c8jln7ejuqwtqmay3yvzrg3kueaczl96pk067ldg8u835w0yhsw27twm/alloyed/allETH": 10000000000,
"transfer/channel-4/factory/osmo1n3n75av8awcnw4jl62n3l48e6e4sxqmaf97w5ua6ddu4s475q5qq9udvx4/alloyed/allSOL": 10000000000,
"transfer/channel-4/factory/osmo1z6r6qdknhgsc0zeracktgpcxf43j6sekq07nw8sxduc9lg0qjjlqfu25e3/alloyed/allBTC": 10000000000,
"transfer/channel-4/factory/osmo1z0qrq605sjgcqpylfl4aa6s90x738j7m58wyatt0tdzflg2ha26q67k743/wbtc": 10000000000,
"transfer/channel-4/factory/osmo18zdw5yvs6gfp95rp74qqwug9yduw2fyr8kplk2xgs726s9axc5usa2vpgw/alloyed/allLINK": 1000000000,
"transfer/channel-4/factory/osmo1r53fx9fvcdzncrs7zkn4gw5vfelx5gk8k5wc6wqha2jpkh992rusr5tk02/alloyed/allDOT": 1000000000,
"transfer/channel-4/factory/osmo14mafhhp337yjj2aujplawz0tks6jd2lel4hkwz4agyzhvvztzaqsqzjq8x/alloyed/allTRX": 100000000,
"transfer/channel-4/factory/osmo1p7x454ex08s4f9ztmm7wfv7lvtgdkfztj2u7v7fezfcauy85q35qmqrdpk/alloyed/allARB": 100000000,
"transfer/channel-4/factory/osmo1nufyzqlm8qhu2w7lm0l4rrax0ec8rsk69mga4tel8eare7c7ljaqpk2lyg/alloyed/allOP": 100000000,
"transfer/channel-4/factory/osmo12lnwf54yd30p6amzaged2atln8k0l32n7ncxf04ctg7u7ymnsy7qkqgsw4/alloyed/allTON": 100000000,
"transfer/channel-4/factory/osmo1f588gk9dazpsueevdl2w6wfkmfmhg5gdvg2uerdlzl0atkasqhsq59qc6a/alloyed/allSHIB": 100000000,
"transfer/channel-0/uatom": 100000000,
"transfer/channel-3/utia": 100000000,
"transfer/channel-4/factory/osmo1g8qypve6l95xmhgc0fddaecerffymsl7kn9muw/sqatom": 10000000,
"transfer/channel-1/adydx": 10000000,
"transfer/channel-4/factory/osmo1g8qypve6l95xmhgc0fddaecerffymsl7kn9muw/sqtia": 10000000,
"transfer/channel-4/uosmo": 10000,
"transfer/channel-4/factory/osmo1pfyxruwvtwk00y8z06dh2lqjdj82ldvy74wzm3/WOSMO": 10000,
"transfer/channel-4/factory/osmo1dv8wz09tckslr2wy5z86r46dxvegylhpt97r9yd6qc3kyc6tv42qa89dr9/ampOSMO": 10000,
"transfer/channel-4/factory/osmo1s3l0lcqc7tu0vpj6wdjz9wqpxv8nk6eraevje4fuwkyjnwuy82qsx3lduv/boneOsmo": 10000,
"transfer/channel-4/factory/osmo104jtrwcljnxfljhml8mxrw7qetcsdmqvy3sprw/ucosmousd": 10000,
"transfer/channel-4/factory/osmo1g8qypve6l95xmhgc0fddaecerffymsl7kn9muw/squosmo": 10000
}
}
6 changes: 2 additions & 4 deletions input/chains/penumbra-testnet-deimos-8-x6de97e39.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@
}
}
],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
]
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"priorityScoresByBase": {}
}
6 changes: 2 additions & 4 deletions input/chains/penumbra-testnet-deimos-8.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@
}
}
],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
]
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"priorityScoresByBase": {}
}
6 changes: 2 additions & 4 deletions input/chains/penumbra-testnet-phobos-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@
}
}
],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
]
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"priorityScoresByBase": {}
}
6 changes: 2 additions & 4 deletions input/chains/penumbra-testnet-phobos-2-x4120f355.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@
}
}
],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
]
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"priorityScoresByBase": {}
}
6 changes: 2 additions & 4 deletions input/chains/penumbra-testnet-phobos-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@
}
}
],
"canonicalNumeraires": [
"wtest_usd",
"transfer/channel-1/uusdc"
]
"canonicalNumeraires": ["wtest_usd", "transfer/channel-1/uusdc"],
"priorityScoresByBase": {}
}
5 changes: 5 additions & 0 deletions npm/.changeset/small-islands-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@penumbra-labs/registry': minor
---

Add priority scores
121 changes: 99 additions & 22 deletions registry/chains/penumbra-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@
"primaryColorHex": "#edd5ee"
}
}
]
],
"priorityScore": "10000"
},
"4oyjsrIftezXMm5xBVMef2Pn+dhkEx1GFwIOniiPnQw=": {
"description": "wLibra is a bridged version of Libra Coin from 0L Network via LibraBridge.",
Expand Down Expand Up @@ -236,7 +237,8 @@
"circle": true
}
}
]
],
"priorityScore": "100000000"
},
"5B0jxWP9LX+U4uD7aU9OVsIk0U385uD2q+a2eEerHg0=": {
"description": "Cosmos Airdrop Chat",
Expand Down Expand Up @@ -407,6 +409,36 @@
"primaryColorHex": "#9DCCED"
}
}
],
"priorityScore": "100000000"
},
"AdlT67pUDx0wsIFBC4opbslYEOk6+QDIzWUcVtQlXgQ=": {
"description": "Chain-key Bitcoin bridged via Omnity Network.",
"denomUnits": [
{
"denom": "transfer/channel-4/factory/osmo10c4y9csfs8q7mtvfg4p9gd8d0acx0hpc2mte9xqzthd7rd3348tsfhaesm/sICP-icrc-ckBTC"
},
{
"denom": "transfer/channel-4/ckBTC",
"exponent": 8
}
],
"base": "transfer/channel-4/factory/osmo10c4y9csfs8q7mtvfg4p9gd8d0acx0hpc2mte9xqzthd7rd3348tsfhaesm/sICP-icrc-ckBTC",
"display": "transfer/channel-4/ckBTC",
"name": "Chain-key Bitcoin",
"symbol": "ckBTC",
"penumbraAssetId": {
"inner": "AdlT67pUDx0wsIFBC4opbslYEOk6+QDIzWUcVtQlXgQ="
},
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/internetcomputer/images/ckbtc.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/internetcomputer/images/ckbtc.svg",
"theme": {
"primaryColorHex": "#3B00B9",
"circle": true
}
}
]
},
"Ar6MhFcFk9QWltJ2omSY3xgXpextuXXTsQsubmSy7gk=": {
Expand Down Expand Up @@ -462,7 +494,8 @@
"primaryColorHex": "#272d45"
}
}
]
],
"priorityScore": "100000000"
},
"BK/Hz826s94tKv7AxSPTGqojgzTnZSsZjpUTYupkZws=": {
"description": "An alloy of TON asset variants on Osmosis.",
Expand Down Expand Up @@ -498,7 +531,8 @@
"primaryColorHex": "#0088CC"
}
}
]
],
"priorityScore": "100000000"
},
"EMttUTznXaZu2d7ecHS5UC0RvJsBh9GYc79abym2ewc=": {
"description": "Margined Power Token sqBTC",
Expand Down Expand Up @@ -600,7 +634,8 @@
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/sqatom.svg"
}
]
],
"priorityScore": "10000000"
},
"JfJc35xgtUPmKfidDjgHDnIYQ2klmu8x4N8lbKryDwY=": {
"description": "For th",
Expand Down Expand Up @@ -655,7 +690,8 @@
"primaryColorHex": "#760dbb"
}
}
]
],
"priorityScore": "10000"
},
"KTJ9iZ/eNN42V2hhzs6Nlgb8zzdJmlBZZvKfCc4GiAw=": {
"description": "A clan of 11y bad kids crafting chaos on the Cosmos eco. One bad memecoin to rule them all $BADKID. Airdropped to Badkids NFT holders and $STARS stakers. It's so bad, your wallet's throwing a tantrum for it.",
Expand Down Expand Up @@ -750,7 +786,8 @@
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allSOL.svg",
"theme": {}
}
]
],
"priorityScore": "10000000000"
},
"MMDbC4jQ7GUP6yEU+Yo2xkW85LyRKJASJN4MPHAPmhE=": {
"description": "Levana Well-funded Perps is a protocol for perpetual swaps, which are leveraged trading contracts.",
Expand Down Expand Up @@ -1037,7 +1074,8 @@
"circle": true
}
}
]
],
"priorityScore": "10000000"
},
"QU5yP3S9mHwCzLyZdYXtUrGW4v/nWzeTqmjMKZZiaRA=": {
"description": "An alloy of BTC asset variants on Osmosis.",
Expand Down Expand Up @@ -1069,7 +1107,8 @@
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allBTC.svg"
}
]
],
"priorityScore": "10000000000"
},
"Rvh55FJrd8q3kT8xYIl5ApTOc9ErxyL8m1NS5RArHxE=": {
"description": "An alloy of OP asset variants on Osmosis.",
Expand Down Expand Up @@ -1104,7 +1143,8 @@
"primaryColorHex": "#fc0424"
}
}
]
],
"priorityScore": "100000000"
},
"SBYNLMUsCQQJaZZYXbrDHD5u/q6rdo6sURKyBlGMtxE=": {
"description": "An alloy of DOT asset variants on Osmosis.",
Expand Down Expand Up @@ -1147,6 +1187,31 @@
"primaryColorHex": "#e4047c"
}
}
],
"priorityScore": "1000000000"
},
"SChNnza9qDQMNGqwSoQMzB2x2M5nmEBtST1EoSy29gM=": {
"description": "An alloy of UNI asset variants on Osmosis.",
"denomUnits": [
{
"denom": "transfer/channel-4/factory/osmo1eqjda4pc6e09jtxzxggf6jl3jye2yn453ja58we5gxwzmf5ah28qvlnaz8/alloyed/allUNI"
},
{
"denom": "transfer/channel-4/allUNI",
"exponent": 12
}
],
"base": "transfer/channel-4/factory/osmo1eqjda4pc6e09jtxzxggf6jl3jye2yn453ja58we5gxwzmf5ah28qvlnaz8/alloyed/allUNI",
"display": "transfer/channel-4/allUNI",
"name": "Uniswap",
"symbol": "UNI",
"penumbraAssetId": {
"inner": "SChNnza9qDQMNGqwSoQMzB2x2M5nmEBtST1EoSy29gM="
},
"images": [
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/ethereum/images/uni.svg"
}
]
},
"TNHw/+5PPN0BC2U1Q80CnhoiKx3GI8ivmb2OG6m5yAI=": {
Expand Down Expand Up @@ -1224,7 +1289,8 @@
"primaryColorHex": "#f39444"
}
}
]
],
"priorityScore": "10000000000"
},
"UxSzPuz9XKLpnAttHgzK/j0t1YHJUtgU+2T99R+FxBE=": {
"description": "Celestia is a modular blockchain network focused on data availability, allowing developers to deploy their own customizable blockchains with ease.",
Expand Down Expand Up @@ -1252,7 +1318,8 @@
"primaryColorHex": "#7c2cfb"
}
}
]
],
"priorityScore": "100000000"
},
"V572bV9yiK9nJWMM9/P5mwCeiGfT4JbMy6j2RUi93g4=": {
"description": "Fractionalized Bad Kids",
Expand Down Expand Up @@ -1464,7 +1531,8 @@
"circle": true
}
}
]
],
"priorityScore": "100000000000"
},
"f/IAN065Ou6XwYdWe3m3SgiLFDYOAY47vphr9y+bowQ=": {
"description": "Fractionalized Pixel Wizards",
Expand Down Expand Up @@ -1515,7 +1583,8 @@
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/sqtia.svg"
}
]
],
"priorityScore": "10000000"
},
"g4mop84SBeLOfjiHNEpnMKUpP2SY7BAoCXfCxY7wsgI=": {
"description": "EURe is a Euro-backed stablecoin issued by Monerium on Noble.",
Expand Down Expand Up @@ -1607,7 +1676,8 @@
"circle": true
}
}
]
],
"priorityScore": "1000000000"
},
"hOnMqQbpe5Abe7vvfHYda77fg3Zit88fatqDfPO1bgQ=": {
"description": "An alloy of SHIB asset variants on Osmosis.",
Expand Down Expand Up @@ -1642,7 +1712,8 @@
"circle": true
}
}
]
],
"priorityScore": "100000000"
},
"iI81O5821jqBIu4F1S2E4++UlzcvK+yI8cLEKZICgAs=": {
"description": "ERIS liquid staked OSMO",
Expand All @@ -1669,7 +1740,8 @@
"primaryColorHex": "#cfdbf1"
}
}
]
],
"priorityScore": "10000"
},
"inEy5XNQBP5u7oz7eUcRLhuuBWiC1FTnJEfBhXIX7A8=": {
"description": "BackBone Labs Liquid Staked OSMO",
Expand All @@ -1696,7 +1768,8 @@
"primaryColorHex": "#c68db5"
}
}
]
],
"priorityScore": "10000"
},
"k2flRuIwi8IAvyDasAL/9fjl8mGpPCPCMhYmsh8AlQQ=": {
"description": "CosmoUSD",
Expand All @@ -1723,7 +1796,8 @@
"primaryColorHex": "#343169"
}
}
]
],
"priorityScore": "10000"
},
"laTqmqV0r3PERHERkPSyNu7d697F4C8mupKyfsKnjAo=": {
"description": "Avail is a web3 infrastructure layer that allows modular execution layers to scale and interoperate in a trust minimized way.",
Expand Down Expand Up @@ -2015,7 +2089,8 @@
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/sqosmo.svg"
}
]
],
"priorityScore": "10000"
},
"v4sDXdozm2zajyIeeXc7D9hx8npHKSD4TEqitPmKcA0=": {
"description": "An alloy of USDT asset variants on Osmosis.",
Expand Down Expand Up @@ -2054,7 +2129,8 @@
{
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allUSDT.svg"
}
]
],
"priorityScore": "10000000000"
},
"vSCVmtndzw2C2RYuB2vcKWfkPVZRCP9GNN8MwB6QUAU=": {
"description": "Cosmus Cartol always get rich",
Expand Down Expand Up @@ -2177,7 +2253,8 @@
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allETH.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/allETH.svg"
}
]
],
"priorityScore": "10000000000"
},
"xNdg/Pc2CvrtawUX41EBLTlgj83RTenRJaBFXxsSTwk=": {
"description": "ION is the second native token of Osmosis.",
Expand Down
2 changes: 1 addition & 1 deletion tools/compiler/files/chain-registry
Submodule chain-registry updated 551 files
Loading

0 comments on commit 4a563c9

Please sign in to comment.