From 6b81e34dc25218848482a28539052dc96a9e16d5 Mon Sep 17 00:00:00 2001 From: arjunbhuptani Date: Tue, 30 May 2023 14:35:02 +0100 Subject: [PATCH 1/5] feat: add miva and fraction to mainnet prod --- .../src/cli/init/config/mainnet/production.ts | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts index 573755beeb..8c12e9e2b6 100644 --- a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts +++ b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts @@ -211,6 +211,78 @@ export const MAINNET_PRODUCTION_INIT_CONFIG: InitConfig = { }, }, }, + { + name: "MIVA", + canonical: { + domain: "6778479", + address: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", + decimals: 18, + cap: utils.parseUnits("10000000", 18).toString(), + }, + representations: { + // optimism + "1869640809": { + local: "0x0000000000000000000000000000000000000000", + adopted: "0x0000000000000000000000000000000000000000", + }, + // ethereum + "6648936": { + local: "0x0000000000000000000000000000000000000000", + adopted: "0x0000000000000000000000000000000000000000", + }, + // bnb + "6450786": { + local: "0x0000000000000000000000000000000000000000", + adopted: "0x0000000000000000000000000000000000000000", + }, + // polygon + "1886350457": { + local: "0xC0b2983A17573660053BEEED6FDb1053107cf387", + adopted: "0xC0b2983A17573660053BEEED6FDb1053107cf387", + }, + // arbtirum-one + "1634886255": { + local: "0x0000000000000000000000000000000000000000", + adopted: "0x0000000000000000000000000000000000000000", + }, + }, + }, + { + name: "FRACTION", + canonical: { + domain: "6778479", + address: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", + decimals: 18, + cap: utils.parseUnits("10000000", 18).toString(), + }, + representations: { + // optimism + "1869640809": { + local: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + adopted: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + }, + // ethereum + "6648936": { + local: "0x0000000000000000000000000000000000000000", + adopted: "0x0000000000000000000000000000000000000000", + }, + // bnb + "6450786": { + local: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + adopted: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + }, + // polygon + "1886350457": { + local: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + adopted: "0xbD80CFA9d93A87D1bb895f810ea348E496611cD4", + }, + // arbtirum-one + "1634886255": { + local: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", + adopted: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", + }, + }, + }, ], agents: { watchers: { From f784a287bfb9ae0d1f9c8697103d50d8c305f52d Mon Sep 17 00:00:00 2001 From: Layne Haber Date: Tue, 30 May 2023 15:36:32 -0600 Subject: [PATCH 2/5] fix: skip canonical domain not hub dopmain on asset config --- packages/deployments/contracts/src/cli/init/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/deployments/contracts/src/cli/init/init.ts b/packages/deployments/contracts/src/cli/init/init.ts index ec59e38ff1..cf65f054c6 100644 --- a/packages/deployments/contracts/src/cli/init/init.ts +++ b/packages/deployments/contracts/src/cli/init/init.ts @@ -123,7 +123,7 @@ export const sanitizeAndInit = async () => { }; for (const domain of domains) { - if (domain === hubDomain) continue; + if (+domain === +asset.canonical.domain) continue; _extracted.representations[domain] = asset.representations[domain]; } From dc78cb8849982d72c1a54960433c26c4082e662c Mon Sep 17 00:00:00 2001 From: Layne Haber Date: Tue, 30 May 2023 16:00:49 -0600 Subject: [PATCH 3/5] fix: logging + account for non-applied changes --- .../contracts/src/cli/init/helpers/assets.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/deployments/contracts/src/cli/init/helpers/assets.ts b/packages/deployments/contracts/src/cli/init/helpers/assets.ts index 68745d26e5..3107cb9f70 100644 --- a/packages/deployments/contracts/src/cli/init/helpers/assets.ts +++ b/packages/deployments/contracts/src/cli/init/helpers/assets.ts @@ -25,7 +25,7 @@ export const setupAsset = async (args: { [utils.defaultAbiCoder.encode(["bytes32", "uint32"], [canonical.id, canonical.domain])], ); console.log( - `\tVerifying asset setup for ${asset.name} (${asset.canonical.address}). Canonical ID: ${canonical.id}; Canonical Domain: ${canonical.domain}; Key: ${key}`, + `\n\tVerifying asset setup for ${asset.name} (${asset.canonical.address}). Canonical ID: ${canonical.id}; Canonical Domain: ${canonical.domain}; Key: ${key}`, ); // Set up the canonical asset on the canonical domain. @@ -163,10 +163,12 @@ export const setupAsset = async (args: { } // After registering the asset, check pool status. - const [local, adopted] = await getValue<[string, string]>({ - deployment: network.deployments.Connext, - read: { method: "getLocalAndAdoptedToken(bytes32,uint32)", args: [canonical.id, canonical.domain] }, - }); + const [local, adopted] = apply + ? await getValue<[string, string]>({ + deployment: network.deployments.Connext, + read: { method: "getLocalAndAdoptedToken(bytes32,uint32)", args: [canonical.id, canonical.domain] }, + }) + : [representation.local ?? constants.AddressZero, desiredAdopted]; if (local.toLowerCase() === adopted.toLowerCase()) { // No pools are needed From d71b1857fbeca447c419415f0ee72792e2c0d019 Mon Sep 17 00:00:00 2001 From: Prathmesh <201952225@iiitvadodara.ac.in> Date: Wed, 4 Oct 2023 18:23:03 +0530 Subject: [PATCH 4/5] fix: removed unused domains --- .../src/cli/init/config/mainnet/production.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts index 6e72cb29a8..5beb2710f7 100644 --- a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts +++ b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts @@ -386,21 +386,11 @@ export const MAINNET_PRODUCTION_INIT_CONFIG: InitConfig = { local: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", adopted: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", }, - // optimism - "1869640809": { - local: "0x0000000000000000000000000000000000000000", - adopted: "0x0000000000000000000000000000000000000000", - }, // polygon "1886350457": { local: "0xC0b2983A17573660053BEEED6FDb1053107cf387", adopted: "0xC0b2983A17573660053BEEED6FDb1053107cf387", }, - // arbtirum-one - "1634886255": { - local: "0x0000000000000000000000000000000000000000", - adopted: "0x0000000000000000000000000000000000000000", - }, }, }, { From b950327b8921371448218c1a97ae28cc5392a54d Mon Sep 17 00:00:00 2001 From: Prathmesh <201952225@iiitvadodara.ac.in> Date: Wed, 11 Oct 2023 18:36:06 +0530 Subject: [PATCH 5/5] fix: xERC20 address added --- .../src/cli/init/config/mainnet/production.ts | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts index 5beb2710f7..83345e360d 100644 --- a/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts +++ b/packages/deployments/contracts/src/cli/init/config/mainnet/production.ts @@ -373,38 +373,38 @@ export const MAINNET_PRODUCTION_INIT_CONFIG: InitConfig = { }, }, }, - { - name: "MIVA", - canonical: { - domain: "11111", - address: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", - decimals: 18, - }, - representations: { - //gnosis - "6778479": { - local: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", - adopted: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", - }, - // polygon - "1886350457": { - local: "0xC0b2983A17573660053BEEED6FDb1053107cf387", - adopted: "0xC0b2983A17573660053BEEED6FDb1053107cf387", - }, - }, - }, + // { + // name: "MIVA", + // canonical: { + // domain: "11111", + // address: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", + // decimals: 18, + // }, + // representations: { + // //gnosis + // "6778479": { + // local: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", + // adopted: "0x63e62989D9EB2d37dfDB1F93A22f063635b07d51", + // }, + // // polygon + // "1886350457": { + // local: "0xC0b2983A17573660053BEEED6FDb1053107cf387", + // adopted: "0xC0b2983A17573660053BEEED6FDb1053107cf387", + // }, + // }, + // }, { name: "FRACTION", canonical: { domain: "11111", - address: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", + address: "0x4602e7CFE18d8b16ED13538603B00073F5c28bc8", decimals: 18, }, representations: { // gnosis "6778479": { - local: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", - adopted: "0x2bF2ba13735160624a0fEaE98f6aC8F70885eA61", + local: "0x4602e7CFE18d8b16ED13538603B00073F5c28bc8", + adopted: "0x4602e7CFE18d8b16ED13538603B00073F5c28bc8", }, // optimism "1869640809": {