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: devnet config for Fast USDC #10971

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions packages/fast-usdc/src/utils/chain-policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
184 changes: 173 additions & 11 deletions packages/fast-usdc/src/utils/deploy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,169 @@ const agoricAssetInfo = defaultAssetInfo.filter(
const DepositForBurnEvent =
'DepositForBurn(uint64,address,uint256,address,bytes32,uint32,bytes32,bytes32)';

/** @satisfies {Record<string, CosmosChainInfo & Passable>} */
const devnetChainInfo = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: set USDC denom to ibc/35357FE55D81D88054E135529BB2AEB1BB20D207292775A19BD82D83F27BE9B4
and use it in packages/builders/scripts/fast-usdc/start-fast-usdc.build.js

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<string, Pick<FastUSDCConfig, 'oracles' | 'feedPolicy' | 'chainInfo' | 'assetInfo' >>}
*
Expand Down Expand Up @@ -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<string, CosmosChainInfo & Passable>} */ (
withChainCapabilities(fetchedChainInfo) // TODO: use devnet values
),
assetInfo: defaultAssetInfo, // TODO: use emerynet values
chainInfo: devnetChainInfo,
assetInfo: devnetAssetInfo,
},
EMERYNET: {
oracles: {
Expand Down
Loading