Skip to content

Commit

Permalink
8879 add umee (#9500)
Browse files Browse the repository at this point in the history
_follow-up_

## Description

Adds 'umee', on the list in #8879. 

### Security Considerations



### Scaling Considerations



### Documentation Considerations



### Testing Considerations



### Upgrade Considerations
  • Loading branch information
mergify[bot] authored Jun 13, 2024
2 parents 3e597a8 + 954b359 commit 97fa24a
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 17 deletions.

Large diffs are not rendered by default.

Binary file not shown.
22 changes: 16 additions & 6 deletions packages/orchestration/scripts/fetch-chain-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const chainNames = [
'secretnetwork',
'stargaze',
'stride',
'umee',
];

const client = new ChainRegistryClient({
Expand All @@ -57,6 +58,16 @@ function toConnectionEntry(ibcInfo: IBCInfo, name: string) {
// @ts-expect-error tags does not specify keys
c.tags?.preferred,
);
if (transferChannels.length === 0) {
console.warn(
'no transfer channel for [',
from.chain_name,
to.chain_name,
']',
'(skipping)',
);
return [];
}
if (transferChannels.length > 1) {
console.warn(
'multiple preferred transfer channels [',
Expand Down Expand Up @@ -94,7 +105,7 @@ function toConnectionEntry(ibcInfo: IBCInfo, name: string) {
},
} as IBCConnectionInfo;
const destChainId = chainInfo[to.chain_name].chainId;
return [destChainId, record];
return [destChainId, record] as const;
}

for (const name of chainNames) {
Expand All @@ -104,10 +115,10 @@ for (const name of chainNames) {
chainInfo[name] = {
chainId: chain.chain_id,
stakingTokens: chain.staking?.staking_tokens,
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
icqEnabled: name === 'osmosis',
};
}
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9326
chainInfo.osmosis = { ...chainInfo.osmosis, icqEnabled: true };

// iterate this after chainInfo is filled out
for (const name of chainNames) {
Expand All @@ -117,9 +128,8 @@ for (const name of chainNames) {
const connections = Object.fromEntries(
ibcData
.map(datum => toConnectionEntry(datum, name))
// sort alphbetically for consistency
// eslint-disable-next-line no-nested-ternary
.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),
// sort alphabetically for consistency
.sort(([a], [b]) => a?.localeCompare(b)),
);
chainInfo[name] = { ...chainInfo[name], connections };
}
Expand Down
Loading

0 comments on commit 97fa24a

Please sign in to comment.