diff --git a/packages/fast-usdc/src/utils/chain-policies.js b/packages/fast-usdc/src/utils/chain-policies.js index cc52dc045f4..f9d899f9eca 100644 --- a/packages/fast-usdc/src/utils/chain-policies.js +++ b/packages/fast-usdc/src/utils/chain-policies.js @@ -19,6 +19,9 @@ export const ChainPolicies = /** @type {const} */ ({ }, Base: { attenuatedCttpBridgeAddresses: [ + // Contract Name: ERC1967Proxy + // Submitted for verification at basescan.org on 2024-06-21 + // https://basescan.org/address/0xb6615b2662b35fc3533f8479002e62d0523341de#code '0xB6615B2662b35fc3533F8479002e62D0523341De', ], cctpTokenMessengerAddress: '0x1682Ae6375C4E4A97e4B583BC394c861A46D8962', @@ -33,6 +36,9 @@ export const ChainPolicies = /** @type {const} */ ({ }, Ethereum: { attenuatedCttpBridgeAddresses: [ + // Contract Name: ERC1967Proxy + // Submitted for verification at Etherscan.io on 2024-06-21 + // https://etherscan.io/address/0xbc8552339da68eb65c8b88b414b5854e0e366cfc#code '0xBC8552339dA68EB65C8b88B414B5854E0E366cFc', ], cctpTokenMessengerAddress: '0xBd3fa81B58Ba92a82136038B25aDec7066af3155', diff --git a/packages/fast-usdc/src/utils/deploy-config.js b/packages/fast-usdc/src/utils/deploy-config.js index 4a096b425a7..633caa5312a 100644 --- a/packages/fast-usdc/src/utils/deploy-config.js +++ b/packages/fast-usdc/src/utils/deploy-config.js @@ -46,6 +46,169 @@ const agoricAssetInfo = defaultAssetInfo.filter( const DepositForBurnEvent = 'DepositForBurn(uint64,address,uint256,address,bytes32,uint32,bytes32,bytes32)'; +/** @satisfies {Record} */ +const devnetChainInfo = { + agoric: { + bech32Prefix: 'agoric', + chainId: 'agoricdev-23', + stakingTokens: [{ denom: 'ubld' }], + icqEnabled: false, + connections: { + 'grand-1': { + id: 'connection-85', + client_id: '07-tendermint-131', + counterparty: { + client_id: '07-tendermint-387', + connection_id: 'connection-351', + }, + state: 3, + transferChannel: { + channelId: 'channel-64', + portId: 'transfer', + counterPartyChannelId: 'channel-304', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + 'osmo-test-5': { + id: 'connection-81', + client_id: '07-tendermint-127', + counterparty: { + client_id: '07-tendermint-4326', + connection_id: 'connection-3786', + }, + state: 3, + transferChannel: { + channelId: 'channel-61', + portId: 'transfer', + counterPartyChannelId: 'channel-10041', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + }, + }, + noble: { + bech32Prefix: 'noble', + chainId: 'grand-1', + icqEnabled: false, + connections: { + 'agoricdev-23': { + id: 'connection-351', + client_id: '07-tendermint-387', + counterparty: { + client_id: '07-tendermint-131', + connection_id: 'connection-85', + }, + state: 3, + transferChannel: { + channelId: 'channel-304', + portId: 'transfer', + counterPartyChannelId: 'channel-64', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + 'osmo-test-5': { + id: 'connection-31', + client_id: '07-tendermint-42', + counterparty: { + client_id: '07-tendermint-1374', + connection_id: 'connection-1275', + }, + state: 3, + transferChannel: { + channelId: 'channel-22', + portId: 'transfer', + counterPartyChannelId: 'channel-4280', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + }, + }, + osmosis: { + bech32Prefix: 'osmo', + chainId: 'osmo-test-5', + stakingTokens: [ + { + denom: 'uosmo', + }, + ], + icqEnabled: true, + connections: { + 'agoricdev-23': { + id: 'connection-3786', + client_id: '07-tendermint-4326', + counterparty: { + client_id: '07-tendermint-127', + connection_id: 'connection-81', + }, + state: 3, + transferChannel: { + channelId: 'channel-10041', + portId: 'transfer', + counterPartyChannelId: 'channel-61', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + 'grand-1': { + id: 'connection-1275', + client_id: '07-tendermint-1374', + counterparty: { + client_id: '07-tendermint-42', + connection_id: 'connection-31', + }, + state: 3, + transferChannel: { + channelId: 'channel-4280', + portId: 'transfer', + counterPartyChannelId: 'channel-22', + counterPartyPortId: 'transfer', + ordering: 0, + state: 3, + version: 'ics20-1', + }, + }, + }, + }, +}; +harden(devnetChainInfo); + +/** @type {[Denom, DenomDetail & { brandKey?: string}][]} */ +export const devnetAssetInfo = [ + ['uusdc', { baseName: 'noble', chainName: 'noble', baseDenom: 'uusdc' }], + [ + `ibc/${denomHash({ denom: 'uusdc', channelId: devnetChainInfo.agoric.connections['grand-1'].transferChannel.channelId })}`, + { + baseName: 'noble', + chainName: 'agoric', + baseDenom: 'uusdc', + brandKey: 'USDC', + }, + ], + [ + `ibc/${denomHash({ denom: 'uusdc', channelId: devnetChainInfo.osmosis.connections['grand-1'].transferChannel.channelId })}`, + { + baseName: 'noble', + chainName: 'osmosis', + baseDenom: 'uusdc', + }, + ], +]; +harden(devnetAssetInfo); + /** * @type {Record>} * @@ -98,22 +261,21 @@ export const configurations = { }, DEVNET: { oracles: { - DSRV: 'agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft', - Stakin: 'agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82', - '01node': 'agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4', - 'Simply Staking': 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf', - P2P: 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk', + gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce', + gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang', + gov3: 'agoric1w8wktaur4zf8qmmtn3n7x3r0jhsjkjntcm3u6h', + // jcv1: 'agoric1f6au5xffuuph97w85zg9qf062gddsnw0sx9xj3', + // jcv2: 'agoric1vxygktgl0zd7aznq9kw2msdx6gfyz0t0wjreag', }, feedPolicy: { - nobleAgoricChannelId: 'TODO', + // grand-1->agoricdev-23: channel-304 + nobleAgoricChannelId: 'channel-304', nobleDomainId: 4, - chainPolicies: ChainPolicies.TESTNET, + chainPolicies: ChainPolicies.TESTNET, // TODO: devnet chainPolicies eventFilter: DepositForBurnEvent, }, - chainInfo: /** @type {Record} */ ( - withChainCapabilities(fetchedChainInfo) // TODO: use devnet values - ), - assetInfo: defaultAssetInfo, // TODO: use emerynet values + chainInfo: devnetChainInfo, + assetInfo: devnetAssetInfo, }, EMERYNET: { oracles: {