Skip to content

Commit

Permalink
fix(chainInfo): ensure icqEnabled is present
Browse files Browse the repository at this point in the history
- given the ChainInfo type is inferred from KnownChains, ensure the icqEnabled key is present on all cosmos chains to facilitate TS types
  • Loading branch information
0xpatrickdev authored and turadg committed Jun 13, 2024
1 parent dd4f2a7 commit 76537e5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,55 @@ Generated by [AVA](https://avajs.dev).
[
[
'published.agoricNames.chain.agoric',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"agoric-3\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ubld\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"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\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"celestia\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"utia\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.cosmoshub',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"cosmoshub-4\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uatom\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"cosmoshub-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uatom\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.dydx',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"dydx-mainnet-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"adydx\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"dydx-mainnet-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"adydx\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.juno',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"juno-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ujuno\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"juno-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ujuno\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.neutron',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"neutron-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"untrn\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"neutron-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"untrn\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.noble',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"noble-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustake\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"noble-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustake\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.omniflixhub',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"omniflixhub-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uflix\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"omniflixhub-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uflix\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.osmosis',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"osmosis-1\\\\\\",\\\\\\"icqEnabled\\\\\\":true,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uosmo\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.secretnetwork',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"secret-4\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uscrt\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"secret-4\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"uscrt\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.stargaze',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"stargaze-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustars\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"stargaze-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustars\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chain.stride',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"stride-1\\\\\\",\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustrd\\\\\\"}]}\\",\\"slots\\":[]}"]}',
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"chainId\\\\\\":\\\\\\"stride-1\\\\\\",\\\\\\"icqEnabled\\\\\\":false,\\\\\\"stakingTokens\\\\\\":[{\\\\\\"denom\\\\\\":\\\\\\"ustrd\\\\\\"}]}\\",\\"slots\\":[]}"]}',
],
[
'published.agoricNames.chainConnection.agoric-3_cosmoshub-4',
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/orchestration/scripts/fetch-chain-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,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 Down
11 changes: 11 additions & 0 deletions packages/orchestration/src/fetched-chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default /** @type {const} } */ ({
denom: 'ubld',
},
],
icqEnabled: false,
connections: {
'cosmoshub-4': {
id: 'connection-8',
Expand Down Expand Up @@ -143,6 +144,7 @@ export default /** @type {const} } */ ({
denom: 'utia',
},
],
icqEnabled: false,
connections: {
'neutron-1': {
id: 'connection-7',
Expand Down Expand Up @@ -258,6 +260,7 @@ export default /** @type {const} } */ ({
denom: 'uatom',
},
],
icqEnabled: false,
connections: {
'agoric-3': {
id: 'connection-649',
Expand Down Expand Up @@ -457,6 +460,7 @@ export default /** @type {const} } */ ({
denom: 'adydx',
},
],
icqEnabled: false,
connections: {
'neutron-1': {
id: 'connection-17',
Expand Down Expand Up @@ -551,6 +555,7 @@ export default /** @type {const} } */ ({
denom: 'ujuno',
},
],
icqEnabled: false,
connections: {
'cosmoshub-4': {
id: 'connection-2',
Expand Down Expand Up @@ -708,6 +713,7 @@ export default /** @type {const} } */ ({
denom: 'untrn',
},
],
icqEnabled: false,
connections: {
celestia: {
id: 'connection-36',
Expand Down Expand Up @@ -907,6 +913,7 @@ export default /** @type {const} } */ ({
denom: 'ustake',
},
],
icqEnabled: false,
connections: {
'agoric-3': {
id: 'connection-40',
Expand Down Expand Up @@ -1106,6 +1113,7 @@ export default /** @type {const} } */ ({
denom: 'uflix',
},
],
icqEnabled: false,
connections: {
'agoric-3': {
id: 'connection-40',
Expand Down Expand Up @@ -1442,6 +1450,7 @@ export default /** @type {const} } */ ({
denom: 'uscrt',
},
],
icqEnabled: false,
connections: {
'agoric-3': {
id: 'connection-80',
Expand Down Expand Up @@ -1641,6 +1650,7 @@ export default /** @type {const} } */ ({
denom: 'ustars',
},
],
icqEnabled: false,
connections: {
celestia: {
id: 'connection-296',
Expand Down Expand Up @@ -1819,6 +1829,7 @@ export default /** @type {const} } */ ({
denom: 'ustrd',
},
],
icqEnabled: false,
connections: {
'agoric-3': {
id: 'connection-118',
Expand Down
11 changes: 11 additions & 0 deletions packages/orchestration/test/snapshots/chain-info.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Generated by [AVA](https://avajs.dev).
'agoric',
{
chainId: 'agoric-3',
icqEnabled: false,
stakingTokens: [
{
denom: 'ubld',
Expand All @@ -30,6 +31,7 @@ Generated by [AVA](https://avajs.dev).
'celestia',
{
chainId: 'celestia',
icqEnabled: false,
stakingTokens: [
{
denom: 'utia',
Expand All @@ -41,6 +43,7 @@ Generated by [AVA](https://avajs.dev).
'cosmoshub',
{
chainId: 'cosmoshub-4',
icqEnabled: false,
stakingTokens: [
{
denom: 'uatom',
Expand All @@ -52,6 +55,7 @@ Generated by [AVA](https://avajs.dev).
'dydx',
{
chainId: 'dydx-mainnet-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'adydx',
Expand All @@ -63,6 +67,7 @@ Generated by [AVA](https://avajs.dev).
'juno',
{
chainId: 'juno-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'ujuno',
Expand All @@ -74,6 +79,7 @@ Generated by [AVA](https://avajs.dev).
'neutron',
{
chainId: 'neutron-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'untrn',
Expand All @@ -85,6 +91,7 @@ Generated by [AVA](https://avajs.dev).
'noble',
{
chainId: 'noble-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'ustake',
Expand All @@ -96,6 +103,7 @@ Generated by [AVA](https://avajs.dev).
'omniflixhub',
{
chainId: 'omniflixhub-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'uflix',
Expand All @@ -119,6 +127,7 @@ Generated by [AVA](https://avajs.dev).
'secretnetwork',
{
chainId: 'secret-4',
icqEnabled: false,
stakingTokens: [
{
denom: 'uscrt',
Expand All @@ -130,6 +139,7 @@ Generated by [AVA](https://avajs.dev).
'stargaze',
{
chainId: 'stargaze-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'ustars',
Expand All @@ -141,6 +151,7 @@ Generated by [AVA](https://avajs.dev).
'stride',
{
chainId: 'stride-1',
icqEnabled: false,
stakingTokens: [
{
denom: 'ustrd',
Expand Down

0 comments on commit 76537e5

Please sign in to comment.