diff --git a/src/constants/aliases.ts b/src/constants/aliases.ts index ad237a18..78b95f55 100644 --- a/src/constants/aliases.ts +++ b/src/constants/aliases.ts @@ -241,23 +241,23 @@ export const ALIASES_CELO = lowerCaseValues({ }); export const ALIASES_ZKSYNC = lowerCaseValues({ - "crv": "0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB", // <--- TODO CHANGE - "gauge_factory": "0x0000000000000000000000000000000000000000", // <-- CHANGED - "voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY - "fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY - "gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB", // <--- TODO CHANGE - "address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383", // <--- TODO CHANGE + "crv": "0x5945932099f124194452a4c62d34bB37f16183B2", + "gauge_factory": "0x0000000000000000000000000000000000000000", + "voting_escrow": "0x0000000000000000000000000000000000000000", + "fee_distributor": "0x0000000000000000000000000000000000000000", + "gauge_controller": "0x0000000000000000000000000000000000000000", + "address_provider": "0x0000000000000000000000000000000000000000", "router": "0x7C915390e109CA66934f1eB285854375D1B127FA", - "deposit_and_stake": "0x0000000000000000000000000000000000000000", + "deposit_and_stake": "0x253548e98C769aD2850da8DB3E4c2b2cE46E3839", "stable_calc": "0x0000000000000000000000000000000000000000", "crypto_calc": '0x0000000000000000000000000000000000000000', - "factory": '0xAF5261eD780fd5b80CF6E206b6BF90CbB97F511B', - "crvusd_factory": '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d', // <-- DUMMY - "eywa_factory": '0x37F22A0B028f2152e6CAcef210e0C4d3b875f367', // <--- DUMMY - "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99', // <--- TODO CHANGE - "twocrypto_factory": '0x0000000000000000000000000000000000000000', // <--- NEW - "tricrypto_factory": '0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963', // <--- TODO CHANGE - "stable_ng_factory": '0x0000000000000000000000000000000000000000', // <--- DUMMY + "factory": '0x0000000000000000000000000000000000000000', + "crvusd_factory": '0x0000000000000000000000000000000000000000', + "eywa_factory": '0x0000000000000000000000000000000000000000', + "crypto_factory": '0x0000000000000000000000000000000000000000', + "twocrypto_factory": '0xf3a546AF64aFd6BB8292746BA66DB33aFAE72114', + "tricrypto_factory": '0x5d4174C40f1246dABe49693845442927d5929f0D', + "stable_ng_factory": '0xFcAb5d04e8e031334D5e8D2C166B08daB0BE6CaE', "factory_admin": "0x0000000000000000000000000000000000000000", }); diff --git a/src/constants/tricryptoDeployImplementations.ts b/src/constants/tricryptoDeployImplementations.ts index 82217c22..a20b356a 100644 --- a/src/constants/tricryptoDeployImplementations.ts +++ b/src/constants/tricryptoDeployImplementations.ts @@ -40,8 +40,8 @@ export const tricryptoDeployImplementations = { implementationIdx: 1, }, 324: { // ZKSYNC - amm_native_transfers_disabled: '0x0000000000000000000000000000000000000000'.toLowerCase(), - amm_native_transfers_enabled: '0x0000000000000000000000000000000000000000'.toLowerCase(), + amm_native_transfers_disabled: '0x1BD7d40CF9bBb63537746C89992f421bC35C6716'.toLowerCase(), + amm_native_transfers_enabled: '0x18d01726FeDaBd91579A9368DFB2F8A24f905280'.toLowerCase(), implementationIdx: 0, }, 1284: { // MOONBEAM diff --git a/src/curve.ts b/src/curve.ts index 0aca26b4..c2fe3941 100644 --- a/src/curve.ts +++ b/src/curve.ts @@ -692,7 +692,7 @@ class Curve implements ICurve { this.setContract(this.constants.ALIASES.factory, factoryABI); - if (this.chainId !== 1313161554 && this.chainId !== 252 && this.chainId !== 196 && this.chainId !== 5000) { + if (this.chainId !== 1313161554 && this.chainId !== 252 && this.chainId !== 324 && this.chainId !== 196 && this.chainId !== 5000) { const factoryContract = this.contracts[this.constants.ALIASES.factory].contract; this.constants.ALIASES.factory_admin = (await factoryContract.admin(this.constantOptions) as string).toLowerCase(); this.setContract(this.constants.ALIASES.factory_admin, factoryAdminABI); @@ -811,7 +811,7 @@ class Curve implements ICurve { } fetchFactoryPools = async (useApi = true): Promise => { - if ([196, 252, 5000, 1313161554].includes(this.chainId)) return; + if ([196, 252, 324, 5000, 1313161554].includes(this.chainId)) return; if (useApi) { this.constants.FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(await getFactoryPoolsDataFromApi.call(this, "factory")); @@ -867,7 +867,7 @@ class Curve implements ICurve { } fetchTworyptoFactoryPools = async (useApi = true): Promise => { - if ([324, 1284].includes(this.chainId)) return; + if ([1284].includes(this.chainId)) return; if (useApi) { this.constants.TWOCRYPTO_FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(await getFactoryPoolsDataFromApi.call(this, "factory-twocrypto")); @@ -881,7 +881,7 @@ class Curve implements ICurve { } fetchTricryptoFactoryPools = async (useApi = true): Promise => { - if ([324, 1284].includes(this.chainId)) return; + if ([1284].includes(this.chainId)) return; if (useApi) { this.constants.TRICRYPTO_FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(await getFactoryPoolsDataFromApi.call(this, "factory-tricrypto")); @@ -948,7 +948,7 @@ class Curve implements ICurve { } fetchNewTwocryptoFactoryPools = async (): Promise => { - if ([324, 1284].includes(this.chainId)) return []; + if ([1284].includes(this.chainId)) return []; const currentPoolIds = Object.keys(this.constants.TWOCRYPTO_FACTORY_POOLS_DATA); const lastPoolIdx = currentPoolIds.length === 0 ? -1 : Number(currentPoolIds[currentPoolIds.length - 1].split("-")[2]); @@ -960,7 +960,7 @@ class Curve implements ICurve { } fetchNewTricryptoFactoryPools = async (): Promise => { - if ([324, 1284].includes(this.chainId)) return []; + if ([1284].includes(this.chainId)) return []; const currentPoolIds = Object.keys(this.constants.TRICRYPTO_FACTORY_POOLS_DATA); const lastPoolIdx = currentPoolIds.length === 0 ? -1 : Number(currentPoolIds[currentPoolIds.length - 1].split("-")[2]); @@ -1001,7 +1001,7 @@ class Curve implements ICurve { } fetchRecentlyDeployedTwocryptoFactoryPool = async (poolAddress: string): Promise => { - if ([324, 1284].includes(this.chainId)) return ''; + if ([1284].includes(this.chainId)) return ''; const poolData = lowerCasePoolDataAddresses(await getTwocryptoFactoryPoolData.call(this, 0, poolAddress)); this.constants.TWOCRYPTO_FACTORY_POOLS_DATA = { ...this.constants.TWOCRYPTO_FACTORY_POOLS_DATA, ...poolData }; this._updateDecimalsAndGauges(this.constants.TWOCRYPTO_FACTORY_POOLS_DATA); @@ -1010,7 +1010,7 @@ class Curve implements ICurve { } fetchRecentlyDeployedTricryptoFactoryPool = async (poolAddress: string): Promise => { - if ([324, 1284].includes(this.chainId)) return ''; + if ([1284].includes(this.chainId)) return ''; const poolData = lowerCasePoolDataAddresses(await getTricryptoFactoryPoolData.call(this, 0, poolAddress)); this.constants.TRICRYPTO_FACTORY_POOLS_DATA = { ...this.constants.TRICRYPTO_FACTORY_POOLS_DATA, ...poolData }; this._updateDecimalsAndGauges(this.constants.TRICRYPTO_FACTORY_POOLS_DATA); diff --git a/src/factory/constants.ts b/src/factory/constants.ts index e186de14..8517ec7f 100644 --- a/src/factory/constants.ts +++ b/src/factory/constants.ts @@ -356,20 +356,8 @@ export const implementationABIDictCelo: IDict = lowerCaseKeys({ }); export const implementationABIDictZkSync: IDict = lowerCaseKeys({ - "0x7c2a205C52361410233540008f7095dEF5915843": Plain2BasicABI, - "0xEF04fC6b95b1658AfdFd527aF9b947cd7BD46bde": Plain2BalancesABI, - "0x4887ef1a68f30364a25a8b0bAA13EeeA7eeBE574": Plain2ETHABI, - "0x044f8F31078c0CB898f25fff3286cE905C18434e": Plain2OptimizedABI, - - "0x2e6De7148Afc6e4B1ee766D070DDeff0C84831a5": Plain3BasicABI, - "0x5D18b28C052Bb0C1573d90Ea055b13048026d83F": Plain3BalancesABI, - "0x9707Bbf96eBB136B67788aa7E46d771Ec18895f4": Plain3ETHABI, - "0xb274f2cdCff70A0bac146e9Ca5a8a28f59a3f812": Plain3OptimizedABI, - - "0x30eb3F0EF60993584e8dD231dF7539db31800555": Plain4BasicABI, - "0x3D21E268d6A526948e978ad1595052c949927e54": Plain4BalancesABI, - "0xD46aed59fBd5eB6c134b1AFb364240bb62dA0451": Plain4ETHABI, - "0xE80AeF1a4782eA7b7f9Ad9F0c2ed9343861934e3": Plain4OptimizedABI, + "0x04D0095a1A4Ae881a078ae61F36945E85464e6d7": PlainStableSwapNGABI, + "0xC5d5402481aefec461Ab86b1051AC26dF05BeE3B": MetaStableSwapNGABI, }) export const implementationABIDictBase: IDict = lowerCaseKeys({