Skip to content

Commit

Permalink
chore: remove agoriclocal from chain-info
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Sep 18, 2024
1 parent f703e4f commit 7a1c91c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Generated by [AVA](https://avajs.dev).
'published.agoricNames.chain.agoric',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"agoric-3\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ubld\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.agoriclocal',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"agoriclocal\\\\\\"}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.celestia',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}',
Expand Down Expand Up @@ -96,14 +92,6 @@ Generated by [AVA](https://avajs.dev).
'published.agoricNames.chainConnection.agoric-3_umee-1',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-152\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-101\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.agoriclocal_cosmoshub-4',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":1,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.agoriclocal_osmosislocal',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-0\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":1,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.celestia_neutron-1',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-29\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-48\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-36\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-35\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
Expand Down Expand Up @@ -316,14 +304,6 @@ Generated by [AVA](https://avajs.dev).
'published.agoricNames.chainConnection.agoric-3_umee-1',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-18\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-152\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-101\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-18\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-11\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-42\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.agoriclocal_cosmoshub-4',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-3\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-1\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":1,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.agoriclocal_osmosislocal',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-2\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-1\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-0\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-0\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-1\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":1,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.celestia_neutron-1',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-29\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-48\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-36\\\\\\"},\\\\\\"id\\\\\\":\\\\\\"connection-7\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-8\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-35\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}',
Expand Down
Binary file not shown.
49 changes: 2 additions & 47 deletions packages/orchestration/src/chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +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',
},
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',
},
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
1 change: 0 additions & 1 deletion packages/orchestration/test/chain-info.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ test('chain-info', async t => {
});
t.deepEqual(chainNames.keys(), [
'agoric',
'agoriclocal',
'celestia',
'cosmoshub',
'dydx',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test('transfer', async t => {
value: 'cosmos1pleab',
encoding: 'bech32',
};
const sourceChannel = 'channel-1'; // observed in toBridge VLOCALCHAIN_EXECUTE_TX sourceChannel
const sourceChannel = 'channel-5'; // observed in toBridge VLOCALCHAIN_EXECUTE_TX sourceChannel, confirmed via fetched-chain-info.js

// TODO rename to lastSequence
/** The running tally of transfer messages that were sent over the bridge */
Expand Down Expand Up @@ -195,7 +195,7 @@ test('transfer', async t => {
// XXX dev has to know not to startTransfer here
await t.throwsAsync(
VE(account).transfer({ denom: 'ubld', value: 1n }, unknownDestination),
{ message: /connection not found: agoriclocal<->fakenet/ },
{ message: /connection not found: agoric-3<->fakenet/ },
'cannot create transfer msg with unknown chainId',
);

Expand Down Expand Up @@ -310,7 +310,7 @@ test('send', async t => {

const toAddress = {
value: 'agoric1EOAAccAddress',
chainId: 'agoriclocal',
chainId: 'agoric-3',
encoding: 'bech32' as const,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/orchestration/test/exos/make-test-loa-kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const prepareMakeTestLOAKit = (
account: lca,
address: harden({
value: address,
chainId: 'agoriclocal',
chainId: 'agoric-3',
encoding: 'bech32',
}),
storageNode: storageNode.makeChildNode(address),
Expand Down
6 changes: 0 additions & 6 deletions packages/orchestration/test/snapshots/chain-info.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ Generated by [AVA](https://avajs.dev).
],
},
],
[
'agoriclocal',
{
chainId: 'agoriclocal',
},
],
[
'celestia',
{
Expand Down
Binary file modified packages/orchestration/test/snapshots/chain-info.test.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/orchestration/test/staking-ops.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const configStaking = {
validator: {
value: 'agoric1valoper234',
encoding: 'bech32',
chainId: 'agoriclocal',
chainId: 'agoric-3',
},
delegations: {
agoric1valoper234: { denom: 'uatom', amount: '200' },
Expand Down

0 comments on commit 7a1c91c

Please sign in to comment.