From a86c664da865eab3f06e92ce91c3285f9db15b13 Mon Sep 17 00:00:00 2001 From: Lewis B Date: Tue, 30 Jan 2024 13:05:26 +0800 Subject: [PATCH] fix: use gd token address from deployment.json (#120) --- packages/app/src/models/constants.ts | 3 ++- packages/common/src/constants/addresses.ts | 3 +-- packages/sdk-js/scripts/createPool.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app/src/models/constants.ts b/packages/app/src/models/constants.ts index 0235bc18..0a803fa7 100644 --- a/packages/app/src/models/constants.ts +++ b/packages/app/src/models/constants.ts @@ -1,4 +1,5 @@ import { Token } from '@uniswap/sdk-core'; +import GdContracts from '@gooddollar/goodprotocol/releases/deployment.json'; // 5% export const acceptablePriceImpact = 5; @@ -14,7 +15,7 @@ export const SupportedNetworkNames: Record = { // Uniswap V3 Router on Celo export const UNISWAP_V3_ROUTER_ADDRESS = '0x5615CDAb10dc425a742d643d949a7F474C01abc4'; -export const GDToken: Token = new Token(SupportedNetwork.CELO, '0x62B8B11039FcfE5aB0C56E502b1C372A3d2a9c7A', 18, 'G$'); +export const GDToken: Token = new Token(SupportedNetwork.CELO, GdContracts['production-celo'].GoodDollar, 18, 'G$'); // if a token is not in this list, the address from the Celo Token List is used export const coingeckoTokenMapping: Record = { diff --git a/packages/common/src/constants/addresses.ts b/packages/common/src/constants/addresses.ts index 4df86008..d6835032 100644 --- a/packages/common/src/constants/addresses.ts +++ b/packages/common/src/constants/addresses.ts @@ -1,3 +1,2 @@ // EXTERNAL CONTRACTS - -export const DAI_ADDRESS = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; +export const DAI_ADDRESS = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; // dai-mainnet diff --git a/packages/sdk-js/scripts/createPool.ts b/packages/sdk-js/scripts/createPool.ts index 0790e0ed..1bf33ad7 100644 --- a/packages/sdk-js/scripts/createPool.ts +++ b/packages/sdk-js/scripts/createPool.ts @@ -35,7 +35,7 @@ const main = async () => { manager: '0xEbB3341cD1511035845f1b37e6A2BFCDcf433Ad7', membersValidator: ethers.constants.AddressZero, uniquenessValidator: ethers.constants.AddressZero, - rewardToken: '0x62B8B11039FcfE5aB0C56E502b1C372A3d2a9c7A', //celo dev token + rewardToken: '0x62B8B11039FcfE5aB0C56E502b1C372A3d2a9c7A', //celo production token allowRewardOverride: false, };