From a58559b6e3daeb6ba825f76cba2e906aeb530ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20=C3=93=27Mhuiris?= Date: Fri, 20 Nov 2020 18:15:13 +0000 Subject: [PATCH] Add GUSD --- packages/dai-plugin-mcd/contracts/abiMap.js | 3 ++- packages/dai-plugin-mcd/contracts/addresses/kovan.json | 7 ++++++- packages/dai-plugin-mcd/contracts/addresses/mainnet.json | 7 ++++++- packages/dai-plugin-mcd/src/index.js | 4 +++- packages/dai-plugin-mcd/src/schemas/token.js | 2 ++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/dai-plugin-mcd/contracts/abiMap.js b/packages/dai-plugin-mcd/contracts/abiMap.js index ab378a524..794838f91 100644 --- a/packages/dai-plugin-mcd/contracts/abiMap.js +++ b/packages/dai-plugin-mcd/contracts/abiMap.js @@ -51,5 +51,6 @@ module.exports = { LRC: require('./abis/DSToken.json'), LINK: require('./abis/DSToken.json'), YFI: require('./abis/DSToken.json'), - BAL: require('./abis/DSToken.json') + BAL: require('./abis/DSToken.json'), + GUSD: require('./abis/GUSD.json') }; diff --git a/packages/dai-plugin-mcd/contracts/addresses/kovan.json b/packages/dai-plugin-mcd/contracts/addresses/kovan.json index b222f63f4..db0cf59a3 100644 --- a/packages/dai-plugin-mcd/contracts/addresses/kovan.json +++ b/packages/dai-plugin-mcd/contracts/addresses/kovan.json @@ -117,5 +117,10 @@ "BAL": "0x630D82Cbf82089B09F71f8d3aAaff2EBA6f47B15", "PIP_BAL": "0x4fd34872F3AbC07ea6C45c7907f87041C0801DdE", "MCD_JOIN_BAL_A": "0x8De5EA9251E0576e3726c8766C56E27fAb2B6597", - "MCD_FLIP_BAL_A": "0xF6d19CC05482Ef7F73f09c1031BA01567EF6ac0f" + "MCD_FLIP_BAL_A": "0xF6d19CC05482Ef7F73f09c1031BA01567EF6ac0f", + + "GUSD": "0x31D8EdbF6F33ef858c80d68D06Ec83f33c2aA150", + "PIP_GUSD": "0xb6630DE6Eda0f3f3d96Db4639914565d6b82CfEF", + "MCD_JOIN_GUSD_A": "0x0c6B26e6AB583D2e4528034037F74842ea988909", + "MCD_FLIP_GUSD_A": "0xf6c0e36a76F2B9F7Bd568155F3fDc53ff1be1Aeb" } diff --git a/packages/dai-plugin-mcd/contracts/addresses/mainnet.json b/packages/dai-plugin-mcd/contracts/addresses/mainnet.json index c954b673f..89d6c61d5 100644 --- a/packages/dai-plugin-mcd/contracts/addresses/mainnet.json +++ b/packages/dai-plugin-mcd/contracts/addresses/mainnet.json @@ -119,5 +119,10 @@ "BAL": "0xba100000625a3754423978a60c9317c58a424e3D", "PIP_BAL": "0x3ff860c0F28D69F392543A16A397D0dAe85D16dE", "MCD_JOIN_BAL_A": "0x4a03Aa7fb3973d8f0221B466EefB53D0aC195f55", - "MCD_FLIP_BAL_A": "0xb2b9bd446eE5e58036D2876fce62b7Ab7334583e" + "MCD_FLIP_BAL_A": "0xb2b9bd446eE5e58036D2876fce62b7Ab7334583e", + + "GUSD": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", + "PIP_GUSD": "0xf45Ae69CcA1b9B043dAE2C83A5B65Bc605BEc5F5", + "MCD_JOIN_GUSD_A": "0xe29A14bcDeA40d83675aa43B72dF07f649738C8b", + "MCD_FLIP_GUSD_A": "0xCAa8D152A8b98229fB77A213BE16b234cA4f612f" } diff --git a/packages/dai-plugin-mcd/src/index.js b/packages/dai-plugin-mcd/src/index.js index 2dc712d73..b13b30717 100644 --- a/packages/dai-plugin-mcd/src/index.js +++ b/packages/dai-plugin-mcd/src/index.js @@ -79,6 +79,7 @@ export const LRC = createCurrency('LRC'); export const LINK = createCurrency('LINK'); export const YFI = createCurrency('YFI'); export const BAL = createCurrency('BAL'); +export const GUSD = createCurrency('GUSD'); export const defaultCdpTypes = [ { currency: ETH, ilk: 'ETH-A' }, @@ -97,7 +98,8 @@ export const defaultCdpTypes = [ { currency: LRC, ilk: 'LRC-A', decimals: 18 }, { currency: LINK, ilk: 'LINK-A', decimals: 18 }, { currency: YFI, ilk: 'YFI-A', decimals: 18 }, - { currency: BAL, ilk: 'BAL-A', decimals: 18 } + { currency: BAL, ilk: 'BAL-A', decimals: 18 }, + { currency: GUSD, ilk: 'GUSD-A', decimals: 2 } ]; export const SAI = createCurrency('SAI'); diff --git a/packages/dai-plugin-mcd/src/schemas/token.js b/packages/dai-plugin-mcd/src/schemas/token.js index 62b32592d..37627443c 100644 --- a/packages/dai-plugin-mcd/src/schemas/token.js +++ b/packages/dai-plugin-mcd/src/schemas/token.js @@ -39,6 +39,8 @@ export const tokenBalance = { return currencyToken(v, -6); } else if (symbol === 'WBTC') { return currencyToken(v, -8); + } else if (symbol === 'GUSD') { + return currencyToken(v, -2); } else { return currencyToken(v, 'wei'); }