Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup chain info #10108

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 103 additions & 123 deletions packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md

Large diffs are not rendered by default.

Binary file not shown.
3 changes: 0 additions & 3 deletions packages/builders/scripts/testing/append-chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ const chainInfo = {
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
Expand Down
3 changes: 0 additions & 3 deletions packages/builders/scripts/testing/tweak-chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ const chainInfo = {
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
Expand Down
55 changes: 2 additions & 53 deletions packages/orchestration/src/chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,15 @@ import { CosmosAssetInfoShape, CosmosChainInfoShape } from './typeGuards.js';
*/

const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
harden({
...fetchedChainInfo,
// FIXME does not have useful connections
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9492
agoriclocal: {
chainId: 'agoriclocal',
connections: {
'cosmoshub-4': {
id: 'connection-1',
client_id: '07-tendermint-3',
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
portId: 'transfer',
channelId: 'channel-1',
counterPartyChannelId: 'channel-1',
counterPartyPortId: 'transfer',
ordering: 1 /* Order.ORDER_UNORDERED */,
state: 3 /* IBCConnectionState.STATE_OPEN */,
version: 'ics20-1',
},
},
osmosislocal: {
id: 'connection-0',
client_id: '07-tendermint-2',
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
portId: 'transfer',
channelId: 'channel-0',
counterPartyChannelId: 'channel-1',
counterPartyPortId: 'transfer',
ordering: 1 /* Order.ORDER_UNORDERED */,
state: 3 /* IBCConnectionState.STATE_OPEN */,
version: 'ics20-1',
},
},
},
},
})
harden(fetchedChainInfo)
);

/**
* @typedef {typeof knownChains} KnownChains
* @internal
*/

// TODO(#9572): include this in registerChain
// TODO(#9966, #9967): include this in registerChain
/**
* Register chain assets into agoricNames
*
Expand Down
3 changes: 0 additions & 3 deletions packages/orchestration/src/cosmos-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export interface IBCConnectionInfo {
counterparty: {
client_id: string;
connection_id: IBCConnectionID;
prefix: {
key_prefix: string;
};
};
transferChannel: {
portId: string;
Expand Down
3 changes: 0 additions & 3 deletions packages/orchestration/src/exos/chain-hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ const reverseConnInfo = connInfo => {
counterparty: {
client_id: connInfo.client_id,
connection_id: connInfo.id,
prefix: {
key_prefix: 'FIXME',
},
},
state: connInfo.state,
transferChannel: {
Expand Down
Loading
Loading