Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
make sure we're including all mainnet addresses in mcd plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 committed Mar 8, 2022
1 parent 97fa9f8 commit 8c12b1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/dai-plugin-mcd/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const { CDP_MANAGER, CDP_TYPE, SYSTEM_DATA, AUCTION, SAVINGS } = ServiceRoles;
// look up contract ABIs using abiMap.
// if an exact match is not found, prefix-match against keys ending in *, e.g.
// MCD_JOIN_ETH_B matches MCD_JOIN_*
// this implementation assumes that all contracts in kovan.json are also in testnet.json
// this implementation assumes that all contracts in goerli/testnet.json are also in mainnet.json
let addContracts = reduce(
testnetAddresses,
(result, testnetAddress, name) => {
mainnetAddresses,
(result, mainnetAddress, name) => {
let abi = abiMap[name];
if (!abi) {
const prefix = Object.keys(abiMap).find(
Expand All @@ -39,13 +39,13 @@ let addContracts = reduce(
result[name] = {
abi,
address: {
testnet: testnetAddress,
testnet: testnetAddresses[name],
goerlifork: goerliAddresses[name],
mainnetfork: mainnetAddresses[name],
mainnetfork: mainnetAddress,
// kovan no longer actively supported
// kovan: kovanAddresses[name],
goerli: goerliAddresses[name],
mainnet: mainnetAddresses[name]
mainnet: mainnetAddress
}
};
}
Expand Down
3 changes: 2 additions & 1 deletion packages/dai-plugin-migrations/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const allContracts = Object.entries(testnetAddresses).reduce(
address: {
testnet: testnetAddress,
kovan: kovanAddresses[name],
mainnet: mainnetAddresses[name]
mainnet: mainnetAddresses[name],
mainnetfork: mainnetAddresses[name]
}
};
}
Expand Down

0 comments on commit 8c12b1f

Please sign in to comment.