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

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into ranked-choice-methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jparklev committed May 10, 2020
2 parents f3d4f1c + 12cc37a commit 0d412a8
Show file tree
Hide file tree
Showing 39 changed files with 1,493 additions and 1,281 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
coverage/
dist/
umd/
node_modules/
.idea/
*.iml
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@babel/plugin-proposal-throw-expressions": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.3.4",
"@babel/preset-env": "^7.4.5",
"@makerdao/testchain": "^1.1.4",
"@makerdao/testchain": "^1.1.5",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.5",
Expand All @@ -55,16 +55,16 @@
"copyfiles": "^2.0.0",
"eslint": "^5.15.1",
"eslint-loader": "^2.1.2",
"html-webpack-plugin": "^2.30.1",
"husky": "^3.0.8",
"jest": "^24.5.0",
"lint-staged": "^7.1.0",
"minimist": "^1.2.0",
"prettier": "^1.12.1",
"sane": "^4.0.3",
"solc": "^0.4.23",
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack": "^3.11.0",
"webpack-bundle-analyzer": "^3.3.2"
"terser-webpack-plugin": "^2.3.6",
"webpack": "^4.43.0",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-cli": "^3.3.11"
}
}
10 changes: 5 additions & 5 deletions packages/dai-plugin-governance/contracts/addresses/testnet.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"GOV": "0x1c3ac7216250edc5b9daa5598da0579688b9dbd5",
"IOU": "0x99F8dc423f25f8Ad1b797E40412A93E529A7F837",
"CHIEF": "0xBE0fe36494219EE23e42BFaaE77A5b48cF8c6E1C",
"IOU": "0xe46C4EB99d5EB00DBeFE6Eb0c2BD34F3EB2899CF",
"CHIEF": "0x00ED8CcEF5351aF14aa6214e6153c39a5e1d1528",
"POLLING": "0x9A2810a12197CB844af4BA74a4b81bC1CA727130",
"VOTE_PROXY_FACTORY": "0x25f3850107175351B664b73d9F429DdFDF0A42ad",
"MCD_ESM": "0xb002A319887185e56d787A5c90900e13834a85E3",
"MCD_END": "0x7aDf0ddD0776042B87FA7F504270257c269bF61e",
"VOTE_PROXY_FACTORY": "0x9d0C1845c18bD93FB3514705715AAc54FB2135dd",
"MCD_ESM": "0x2125C30dA5DcA0819aEC5e4cdbF58Bfe91918e43",
"MCD_END": "0xb002A319887185e56d787A5c90900e13834a85E3",
"PAUSE": "0x2125C30dA5DcA0819aEC5e4cdbF58Bfe91918e43"
}
37 changes: 23 additions & 14 deletions packages/dai-plugin-governance/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"name": "@makerdao/dai-plugin-governance",
"description": "A dai.js plugin for adding MKR governance support to dapps.",
"version": "0.10.8",
"version": "0.11.1",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/makerdao/dai-plugin-governance.git"
},
"dependencies": {
"@babel/runtime": "^7.4.3",
"@makerdao/currency": "^0.9.5",
"@makerdao/services-core": "^0.9.5",
"assert": "^2.0.0",
"bignumber": "^1.1.0",
"ramda": "^0.25.0",
"web3-utils": "^1.0.0-beta.36"
},
"main": "dist/index.js",
"browser": "umd/index.js",
"unpkg": "umd/index.js",
"jsdelivr": "umd/index.js",
"scripts": {
"build": "../../scripts/build.sh",
"build": "yarn clean && yarn build:cjs && yarn build:umd",
"build:umd": "webpack --config ../../webpack.config.js",
"clean": "rm -rf ./dist ./umd",
"build:cjs": "../../scripts/build.sh",
"prepublishOnly": "yarn build",
"testchain": "../../scripts/run-testchain.sh",
"test": "yarn testchain --ci jest --runInBand",
Expand All @@ -30,9 +28,20 @@
"git add"
]
},
"module": "dist/index.js",
"main": "dist/index.js",
"dependencies": {
"@makerdao/currency": ">=0.9.0",
"@makerdao/services-core": ">=0.9.0",
"assert": "^2.0.0",
"debug": "^4.1.1",
"ramda": "^0.25.0"
},
"peerDependencies": {
"@makerdao/dai": ">=0.18.9"
},
"devDependencies": {
"@makerdao/dai-plugin-config": "^0.2.14-rc.1"
"@babel/cli": "^7.8.4",
"@makerdao/dai": "^0.29.0",
"@makerdao/dai-plugin-config": "^0.2.14-rc.1",
"web3-utils": "^1.2.6"
}
}
2 changes: 1 addition & 1 deletion packages/dai-plugin-governance/test/SpellService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('use testchain', () => {
spellService = maker.service('spell');
});

test('get delay', async () => {
xtest('get delay', async () => {
const delay = await spellService.getDelayInSeconds();
expect(delay.toNumber()).toBe(1);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/dai-plugin-mcd/contracts/addresses/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"MIGRATION": "0xc73e0383F3Aff3215E6f04B0331D58CeCf0Ab849",
"MIGRATION_PROXY_ACTIONS": "0x2E1F6062d9fB227069741E40f89186DF222FB426",

"WBTC": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"PIP_WBTC": "0x77b68899b99b686F415d074278a9a16b336085A0",
"MCD_JOIN_WBTC_A": "0xA191e578a6736167326d05c119CE0c90849E84B7",
"MCD_FLIP_WBTC_A": "0xE6ed1d09a19Bd335f051d78D5d22dF3bfF2c28B1"
"WBTC": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"PIP_WBTC": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
"MCD_JOIN_WBTC_A": "0xBF72Da2Bd84c5170618Fbe5914B0ECA9638d5eb5",
"MCD_FLIP_WBTC_A": "0x3E115d85D4d7253b05fEc9C0bB5b08383C2b0603"
}
139 changes: 69 additions & 70 deletions packages/dai-plugin-mcd/contracts/addresses/testnet.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,92 @@
{
"BAT": "0xa8119BfC8565ce4640d0512d8656E54369E4cd79",
"CDP_MANAGER": "0xa805669Da5d6C3851f383acc03a9a5fC45671C25",
"BAT": "0x120A978e83BEeac3DBBB856b35941618A52986d5",
"CDP_MANAGER": "0xb3dc8De316349D8cE5168FE33C2E75c4f0cd0FFE",
"DEPLOYER": "0x16Fb96a5fa0427Af0C8F7cF1eB4870231c8154B6",
"DGD": "0x1fD87e7ddF2A2f22ac5fb8F617A44214f17B883c",
"DGD": "0xfFE1912a78AA9E556cC80a4F3822551F5bB1A119",
"ETH": "0x7ba25F791FA76C3ef40AC98ed42634a8bC24c238",
"FAUCET": "0x298E3eb3C76938DA922EF01b99c87dF156985701",
"FLIPPER_MOM": "0x0E69131732c7700d5d598350504ba885D677CCA8",
"GET_CDPS": "0xdf3B1A36FF07CCCf5E61a60690Fc0170e238f499",
"GNT": "0xA87fAA7500099368Ba57A3A2F584F5197c05E37f",
"MCD_ADM": "0xBE0fe36494219EE23e42BFaaE77A5b48cF8c6E1C",
"MCD_CAT": "0x8C4Be23DE45F82a4feC7a93F69929Bd2A13A4777",
"MCD_DAI": "0x36fdda9B5DAbdDA030598116D09f1E1c6bB1DeaB",
"MCD_DEPLOY": "0x8c12691dba1C6A76a358669c9fE72B9f968F4EAE",
"MCD_END": "0x7aDf0ddD0776042B87FA7F504270257c269bF61e",
"MCD_ESM": "0xb002A319887185e56d787A5c90900e13834a85E3",
"MCD_FLAP": "0x55320248dC50Ef6dABc88ECbc294Fd5e2e1f4eC6",
"MCD_FLIP_BAT_A": "0x5cAed1013a733fcaD7BF2b074FA38eeC7EDfDFC4",
"MCD_FLIP_DGD_A": "0x16c8C8a35Bc22C724E2A27f3070635619e482310",
"MCD_FLIP_ETH_A": "0x19E602E0dC93749Ea7aFa0C88F4693d4C02102D3",
"MCD_FLIP_ETH_B": "0xB61ae46ebb38C2769b7d34Ce80E30e1AafAa7E6D",
"MCD_FLIP_ETH_C": "0x8C431FA9B86A9c60850017e7c730CAc97546bd5C",
"MCD_FLIP_GNT_A": "0xd5b47f44451994B5dF7e1A33EA9758E4cC4dC634",
"MCD_FLIP_OMG_A": "0xb1E284C566B2887cE2D2DE94e835919175327569",
"MCD_FLIP_REP_A": "0x0a53BD73eFAe5DC217d49d1D58434aA36Ff195ba",
"MCD_FLIP_SAI": "0xbfFBcf057e66781F42949112e1630191465533d0",
"MCD_FLIP_USDC_A": "0x2A96fB287b32a844e867c3b1FBF2534a145e9Bff",
"MCD_FLIP_ZRX_A": "0x2A9a492Fc71a6E4CE3f35382c5eF2F6144F58C09",
"MCD_FLOP": "0x2A92CCF051f33912115f86eA0530f4999E3AC1Ac",
"FAUCET": "0xbD4d6688B679F27Bf6829922A4AE4E43D29153E4",
"FLIPPER_MOM": "0xd7e93C4B43A55fe3DbEBe4c89991769d01c3E76d",
"GET_CDPS": "0x883c76966eA1D1AFEC54a1c20f84A57a287BB021",
"GNT": "0x2D1E17cD66E68173d2a6DCaCcf640ce613D75983",
"MCD_ADM": "0x00ED8CcEF5351aF14aa6214e6153c39a5e1d1528",
"MCD_CAT": "0x36fdda9B5DAbdDA030598116D09f1E1c6bB1DeaB",
"MCD_DAI": "0x88015F50fb5b2bB1aBF8a9C3e1Db231E267b5C4f",
"MCD_DEPLOY": "0x3ea503Fb236e6eE3B4d48b6Bd96Ba5F7Cf68AF94",
"MCD_END": "0xb002A319887185e56d787A5c90900e13834a85E3",
"MCD_ESM": "0x2125C30dA5DcA0819aEC5e4cdbF58Bfe91918e43",
"MCD_FLAP": "0x2A92CCF051f33912115f86eA0530f4999E3AC1Ac",
"MCD_FLIP_BAT_A": "0x25ff5F18C0b2e00749bcd564B0a8519B75d46Ed8",
"MCD_FLIP_DGD_A": "0x4add0e51f43f43A1930316c036157d86c0A36B9D",
"MCD_FLIP_ETH_A": "0xBDe07Bb0c774f41a59901876454637E3FeAB8C73",
"MCD_FLIP_ETH_B": "0xC928B33616df7b603879247b8BAfbF12b5a645A7",
"MCD_FLIP_ETH_C": "0x26953EeA2F75430AD336Fa5e6385659CF085621b",
"MCD_FLIP_GNT_A": "0xbA84F99DF52445073c24F71337C2aC10d16A12Df",
"MCD_FLIP_OMG_A": "0x7E1dce941eDf0172D564e9f9da2453039A41aAa3",
"MCD_FLIP_REP_A": "0xcad20ff35c9F2803eAB7324bf41DD3931349b077",
"MCD_FLIP_SAI": "0x8Fcc971E5F73e2F8e40313C16Ad17AD10696f01C",
"MCD_FLIP_USDC_A": "0xb957a5d4113eC015AF73796099e6654d66A6115e",
"MCD_FLIP_WBTC_A": "0x65CAFd3a6eAefA22d503adb48dd2e0811e945600",
"MCD_FLIP_ZRX_A": "0x4d1B37D96ab3B54d8Ada05A17D649a8e7fA6Bf0e",
"MCD_FLOP": "0x19E602E0dC93749Ea7aFa0C88F4693d4C02102D3",
"MCD_GOV": "0x1c3ac7216250eDC5B9DaA5598DA0579688b9dbD5",
"MCD_GOV_ACTIONS": "0x698E14422A7739D268644b2794C1A9e49Ef3960B",
"MCD_IOU": "0x99F8dc423f25f8Ad1b797E40412A93E529A7F837",
"MCD_JOIN_BAT_A": "0x120A978e83BEeac3DBBB856b35941618A52986d5",
"MCD_JOIN_DAI": "0x88015F50fb5b2bB1aBF8a9C3e1Db231E267b5C4f",
"MCD_JOIN_DGD_A": "0xfFE1912a78AA9E556cC80a4F3822551F5bB1A119",
"MCD_JOIN_ETH_A": "0x3EF50E4fE8d6668B701b5F7AaFf95e442fd4DD78",
"MCD_JOIN_ETH_B": "0x71ce2f5A1ee392425B749956f9B58481A7c6b707",
"MCD_JOIN_ETH_C": "0x61aFcbadDfeEFE7155416248cB51511d73b94e42",
"MCD_JOIN_GNT_A": "0x2D1E17cD66E68173d2a6DCaCcf640ce613D75983",
"MCD_JOIN_OMG_A": "0x64ED8f151dAc0f40f45DaccEBa2f2712641A9B50",
"MCD_JOIN_REP_A": "0xC3e78EA1b93D134f795c84e01caa2966f2180892",
"MCD_JOIN_SAI": "0xE425CA42d0CB22D0D82366f6B811d559cff437B4",
"MCD_JOIN_USDC_A": "0xDa4EbE73ff9e11FC6f97cEf200199Ddb385d7982",
"MCD_JOIN_ZRX_A": "0xb13094D7341fA2F77aD8a5eD61A9bB7cF9F62093",
"MCD_JUG": "0xF2Cba62837A52B0c1847f225438C82D050b4aC19",
"MCD_PAUSE": "0x2125C30dA5DcA0819aEC5e4cdbF58Bfe91918e43",
"MCD_PAUSE_PROXY": "0x1D1FF62A8C9E48e09cF8735657A1855ac3f400D2",
"MCD_POT": "0xCe1410e4b98058fA7534FA8fcEe28E82056EB0e9",
"MCD_SPOT": "0xBDe07Bb0c774f41a59901876454637E3FeAB8C73",
"MCD_VAT": "0xEDf775290396cb081B6B3a6d1E4edBb8e2ce3109",
"MCD_VOW": "0x8D68d36D45A34A6Ff368069bD0baa32ad49A6092",
"MIGRATION": "0xd7e93C4B43A55fe3DbEBe4c89991769d01c3E76d",
"MIGRATION_PROXY_ACTIONS": "0xAE3AFb153a36d3E48D4CbC2D0A83EBF9fD2f89Ca",
"MULTICALL": "0x870Cc2aFa004e22a49CAEa7392CC3bCD2ca96A3A",
"OMG": "0x089AF8e5Dc55271A2eE4CA5d5bd1d8b37482Ea19",
"OSM_MOM": "0xfEB7149A008b52581F31717Fad5C5A23ea28cAE4",
"MCD_GOV_ACTIONS": "0x5d2132779D43A0B64F1f3e824B8A3163438358e8",
"MCD_IOU": "0xe46C4EB99d5EB00DBeFE6Eb0c2BD34F3EB2899CF",
"MCD_JOIN_BAT_A": "0xEB9d9336b4A89260bC4B94ee6a34e2faF46B0CA5",
"MCD_JOIN_DAI": "0x55320248dC50Ef6dABc88ECbc294Fd5e2e1f4eC6",
"MCD_JOIN_DGD_A": "0x4aF6E9FA188161FD283DC8d51619615d00ef3F01",
"MCD_JOIN_ETH_A": "0xF7Cbc73FE7d30c68AD7b64D293D4F52F76027261",
"MCD_JOIN_ETH_B": "0x6741A0FECce6ecbf7C1f338dE624F63d970497EA",
"MCD_JOIN_ETH_C": "0xF2ea44B10D559c7bcBf156861efFd3425fb5E5Fb",
"MCD_JOIN_GNT_A": "0x49058F4F6c8C3E1b75aeD7AA45e06c439b9429f0",
"MCD_JOIN_OMG_A": "0x927F29F213c691ACe67cBC9FDb6eBBfd04D07EC4",
"MCD_JOIN_REP_A": "0xDC901A38a2Ec3283556F039b115423049517B50c",
"MCD_JOIN_SAI": "0x565e5E6d6C43Aff09A5b3C2b33d710d9c2c63e06",
"MCD_JOIN_USDC_A": "0x77d6250c22eCBA016a4F6D1a917BF5b2ED0704C5",
"MCD_JOIN_WBTC_A": "0x23c9aafE0d1968EaC6d9F1edb9FA831641783FEd",
"MCD_JOIN_ZRX_A": "0xc677d837a437c24Db14E1225416d52BcC9B86E94",
"MCD_JUG": "0x8D68d36D45A34A6Ff368069bD0baa32ad49A6092",
"MCD_PAUSE": "0x32fE44E2061A19419C0F112596B6f6ea77EC6511",
"MCD_PAUSE_PROXY": "0xB8065F28CbAf91C2674a980c17432821bC3E8F4a",
"MCD_POT": "0x7aDf0ddD0776042B87FA7F504270257c269bF61e",
"MCD_SPOT": "0xCe1410e4b98058fA7534FA8fcEe28E82056EB0e9",
"MCD_VAT": "0xF2Cba62837A52B0c1847f225438C82D050b4aC19",
"MCD_VOW": "0x8C4Be23DE45F82a4feC7a93F69929Bd2A13A4777",
"MIGRATION": "0x2978B18F7c68B2957e701FC6D82C8De5B55833f2",
"MIGRATION_PROXY_ACTIONS": "0x19BDC4b950285a608E50F3b5E7DF154FacBda861",
"MULTICALL": "0x298E3eb3C76938DA922EF01b99c87dF156985701",
"OMG": "0x64ED8f151dAc0f40f45DaccEBa2f2712641A9B50",
"OSM_MOM": "0x378100E78ccEf442F38f1FcFdc4B4352884bcb67",
"PIP_BAT": "0xdD35201726c511474e7E1EE426B5C78B014AddCc",
"PIP_DGD": "0xb564f1dC7D220f8E20de45547de71620543c0053",
"PIP_ETH": "0x2B2fBfcA02F8C29c750ed193828b40887e8BBb32",
"PIP_GNT": "0x9783d28387f5097d72397388d98c52Ca9b18dec8",
"PIP_OMG": "0xE0d81d47aC1e791dd2559013cf1fF005e619d733",
"PIP_REP": "0x2d3AdFCa1e6aD360A138cBCF2F286f70a5Ff614A",
"PIP_SAI": "0x5E6085775Cd0B41fC70d1A6B48a0451bf7aCa801",
"PIP_SAI": "0x8A74211B5fC144A846fD1daA4dC8ABbB6268E18f",
"PIP_USDC": "0xA70B7c2a55a76f89b64b4b15381FfF87279dD3d7",
"PIP_WBTC": "0x870Cc2aFa004e22a49CAEa7392CC3bCD2ca96A3A",
"PIP_ZRX": "0x80f178c7b47cb635Ceb12aBB891338744e98365C",
"PROXY_ACTIONS": "0x2A3a2f87403d675748eb11B6fCe92a16A0084eb6",
"PROXY_ACTIONS_DSR": "0xd324BC539B85e6DFe08005c4D261d0ff22b0A34C",
"PROXY_ACTIONS_END": "0x6C0604d4b3EBB76DBA48cC0B5a54Bd0f260d962c",
"PROXY_DEPLOYER": "0xD017565df4873172C5b5f79cF5B896f1A098137C",
"PROXY_FACTORY": "0xbD4d6688B679F27Bf6829922A4AE4E43D29153E4",
"PROXY_PAUSE_ACTIONS": "0x0380BeA5D02A686aa19C1A6b940FC2D0EEA14351",
"PROXY_REGISTRY": "0x5e73B1F57f673EC875C1624D7C13F06Ef8259b23",
"REP": "0xE9658D1356890E06987C2D769B7d76cAedBcFf4b",
"PROXY_ACTIONS": "0x0E69131732c7700d5d598350504ba885D677CCA8",
"PROXY_ACTIONS_DSR": "0xE425CA42d0CB22D0D82366f6B811d559cff437B4",
"PROXY_ACTIONS_END": "0x5E6085775Cd0B41fC70d1A6B48a0451bf7aCa801",
"PROXY_DEPLOYER": "0xde78bC0e2a1C5118773b692F5ed999f3B626F1AF",
"PROXY_FACTORY": "0x5e73B1F57f673EC875C1624D7C13F06Ef8259b23",
"PROXY_PAUSE_ACTIONS": "0xAE130aEcdF43abbEfdBb97D87bA8Ea38f922CcD8",
"PROXY_REGISTRY": "0x7294588Da9cA5494fa6861A10B1Cc26096dC3b11",
"REP": "0xC3e78EA1b93D134f795c84e01caa2966f2180892",
"SAI": "0xC226F3CD13d508bc319F4f4290172748199d6612",
"SAI_TUB": "0xE82CE3D6Bf40F2F9414C8d01A35E3d9eb16a1761",
"USDC": "0x0E8D43bd507798476c1053165F9C061F1E000A09",
"USDC": "0xDa4EbE73ff9e11FC6f97cEf200199Ddb385d7982",
"VAL_BAT": "0xdD35201726c511474e7E1EE426B5C78B014AddCc",
"VAL_DGD": "0xb564f1dC7D220f8E20de45547de71620543c0053",
"VAL_ETH": "0x2B2fBfcA02F8C29c750ed193828b40887e8BBb32",
"VAL_GNT": "0x9783d28387f5097d72397388d98c52Ca9b18dec8",
"VAL_OMG": "0xE0d81d47aC1e791dd2559013cf1fF005e619d733",
"VAL_REP": "0x2d3AdFCa1e6aD360A138cBCF2F286f70a5Ff614A",
"VAL_USDC": "0xA70B7c2a55a76f89b64b4b15381FfF87279dD3d7",
"VAL_WBTC": "0x870Cc2aFa004e22a49CAEa7392CC3bCD2ca96A3A",
"VAL_ZRX": "0x80f178c7b47cb635Ceb12aBB891338744e98365C",
"VOTE_PROXY_FACTORY": "0x25f3850107175351B664b73d9F429DdFDF0A42ad",
"ZRX": "0x5Ab87E4729BFFFE884c40a65c5bEF55Af105a99e",

"VAL_WBTC": "0xA70B7c2a55a76f89b64b4b15381FfF87279dD3d7",
"WBTC": "0x0E8D43bd507798476c1053165F9C061F1E000A09",
"MCD_JOIN_WBTC_A": "0xDa4EbE73ff9e11FC6f97cEf200199Ddb385d7982",
"MCD_FLIP_WBTC_A": "0x2A96fB287b32a844e867c3b1FBF2534a145e9Bff",
"PIP_WBTC": "0xA70B7c2a55a76f89b64b4b15381FfF87279dD3d7"
"VOTE_PROXY_FACTORY": "0x9d0C1845c18bD93FB3514705715AAc54FB2135dd",
"WBTC": "0xcf4a441593Fbf1Bf56960674C5a3a18049C7bbe2",
"ZRX": "0xb13094D7341fA2F77aD8a5eD61A9bB7cF9F62093"
}
12 changes: 9 additions & 3 deletions packages/dai-plugin-mcd/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{
"name": "@makerdao/dai-plugin-mcd",
"description": "Plugin to add Multi-Collateral Dai support to dai.js",
"version": "1.3.12",
"version": "1.4.1",
"license": "MIT",
"main": "dist",
"main": "dist/index.js",
"browser": "umd/index.js",
"unpkg": "umd/index.js",
"jsdelivr": "umd/index.js",
"scripts": {
"build": "../../scripts/build.sh",
"build": "yarn clean && yarn build:cjs && yarn build:umd",
"build:umd": "webpack --config ../../webpack.config.js",
"build:cjs": "../../scripts/build.sh",
"clean": "rm -rf ./dist ./umd",
"prepublishOnly": "yarn build",
"testchain": "../../scripts/run-testchain.sh",
"coverage": "yarn test --coverage",
Expand Down
24 changes: 10 additions & 14 deletions packages/dai-plugin-mcd/test/schemas/computed.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ let maker,
address,
address2,
proxyAddress,
expectedVaultAddress;

expectedEthVaultAddress,
expectedBatVaultAddress;
const ETH_A_COLLATERAL_AMOUNT = ETH(1);
const ETH_A_DEBT_AMOUNT = MDAI(1);
const ETH_A_PRICE = 180;
Expand Down Expand Up @@ -120,18 +120,19 @@ beforeAll(async () => {
proxyAddress = await maker.service('proxy').ensureProxy();
await dai.approveUnlimited(proxyAddress);

const vault = await mgr.openLockAndDraw(
let vault = await mgr.openLockAndDraw(
'ETH-A',
ETH_A_COLLATERAL_AMOUNT,
ETH_A_DEBT_AMOUNT
);
expectedVaultAddress = await mgr.getUrn(vault.id);
expectedEthVaultAddress = await mgr.getUrn(vault.id);

await mgr.openLockAndDraw(
vault = await mgr.openLockAndDraw(
'BAT-A',
BAT_A_COLLATERAL_AMOUNT,
BAT_A_DEBT_AMOUNT
);
expectedBatVaultAddress = await mgr.getUrn(vault.id);

await sav.join(MDAI(1));
});
Expand Down Expand Up @@ -215,7 +216,7 @@ test(VAULT_TYPE_AND_ADDRESS, async () => {
cdpId
);
expect(collateralType).toEqual(expectedVaultType);
expect(vaultAddress).toEqual(expectedVaultAddress);
expect(vaultAddress).toEqual(expectedEthVaultAddress);
});

test(VAULT_EXTERNAL_OWNER, async () => {
Expand Down Expand Up @@ -324,7 +325,7 @@ test(VAULT, async () => {

expect(vault.id).toEqual(cdpId);
expect(vault.vaultType).toEqual(expectedVaultType);
expect(vault.vaultAddress).toEqual(expectedVaultAddress);
expect(vault.vaultAddress).toEqual(expectedEthVaultAddress);
expect(vault.ownerAddress).toEqual(expectedOwner);
expect(vault.externalOwnerAddress.toLowerCase()).toEqual(
expectedExternalOwner
Expand Down Expand Up @@ -460,13 +461,8 @@ test(USER_VAULTS_LIST, async () => {
expect(batVault.vaultType).toEqual('BAT-A');
expect(ethVault.vaultType).toEqual('ETH-A');

// todo: make expected addresses dynamic
expect(batVault.vaultAddress).toEqual(
'0xE16f8767B7Dd2F74f5878e94cBcc7c1a1E0eF944'
);
expect(ethVault.vaultAddress).toEqual(
'0xA1480ae6E4A767D8CbC9167816d2Efb3e294e558'
);
expect(batVault.vaultAddress).toEqual(expectedBatVaultAddress);
expect(ethVault.vaultAddress).toEqual(expectedEthVaultAddress);
});

test(`${USER_VAULTS_LIST} for account with no proxy`, async () => {
Expand Down
Loading

0 comments on commit 0d412a8

Please sign in to comment.