From ac188d05688b44fb0a5795acc79ef4e26d7cabab Mon Sep 17 00:00:00 2001 From: Lev Livnev Date: Wed, 1 Apr 2020 20:46:52 +0100 Subject: [PATCH 1/3] bin/conf/hevm.sh: fix address constants for latest version of hevm the way that hevm computes addresses of deployed contracts was changed in a recent version, fixing an outstanding bug. --- bin/conf/hevm.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/conf/hevm.sh b/bin/conf/hevm.sh index 77b8d4c..4878554 100644 --- a/bin/conf/hevm.sh +++ b/bin/conf/hevm.sh @@ -1,6 +1,6 @@ CHAIN_ID=99 -ADDRESS=0xd122f8f92737fc00fb3d62d4ed9244d393663870 -VAT=0x0F1c6673615352379AFC1a60e3D0234101D67eb2 -POT=0xc351B89C286288B9201835f78dbbccaDA357671e -JOIN=0x2D6B98058E84Dcb8b57fb8C79613bD858af65975 -DAI=0x959DC1D68ba3a9f6959239135bcbc854b781eb9a +ADDRESS=0x3fa733B07a7cEBB28aE4da05054fbcb53eC4ee4c +VAT=0xE58d97b6622134C0436d60daeE7FBB8b965D9713 +POT=0xDB356e865AAaFa1e37764121EA9e801Af13eEb83 +JOIN=0x956378240adc1e2Ce39bCA0e957bE5324e846a4E +DAI=0xEcEDFd8BA8ae39a6Bd346Fe9E5e0aBeA687fFF31 From 517406c8df8603dbce58d7c207005c44c28c3f80 Mon Sep 17 00:00:00 2001 From: Lev Livnev Date: Wed, 1 Apr 2020 20:47:12 +0100 Subject: [PATCH 2/3] Makefile: pin solc version with --use --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d301d1..f9e8a0b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ +SOLC_VERSION="0.5.12" + all :; dapp build clean :; dapp clean deploy :; dapp create Chai test: NETWORK=hevm ./bin/set_constants - dapp test || NETWORK=mainnet ./bin/set_constants + dapp --use solc:${SOLC_VERSION} test || NETWORK=mainnet ./bin/set_constants NETWORK=mainnet ./bin/set_constants From a28d2cdc8af142b76ec29a6e58f62a56843b8885 Mon Sep 17 00:00:00 2001 From: Lev Livnev Date: Wed, 1 Apr 2020 21:41:31 +0100 Subject: [PATCH 3/3] chai.t.sol: update addresses in tests --- src/test/chai.t.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/chai.t.sol b/src/test/chai.t.sol index bd4798a..b0db84f 100644 --- a/src/test/chai.t.sol +++ b/src/test/chai.t.sol @@ -108,7 +108,7 @@ contract ChaiTest is DSTest, ChaiSetup { } function test_chai() public { - assertEq(address(chai), address(0xd122F8f92737FC00Fb3d62d4eD9244D393663870)); + assertEq(address(chai), address(0x3fa733B07a7cEBB28aE4da05054fbcb53eC4ee4c)); } function test_join_then_exit() public { @@ -435,7 +435,7 @@ contract TokenTest is DSTest, ChaiSetup { function testChaiAddress() public { //The dai address generated by hevm //used for signature generation testing - assertEq(address(chai), address(0xd122F8f92737FC00Fb3d62d4eD9244D393663870)); + assertEq(address(chai), address(0x3fa733B07a7cEBB28aE4da05054fbcb53eC4ee4c)); } function testTypehash() public { @@ -443,7 +443,7 @@ contract TokenTest is DSTest, ChaiSetup { } function testDomain_Separator() public { - assertEq(chai.DOMAIN_SEPARATOR(), 0x388ddaf68a6d95f0638353feb69385f7b35449d69961073c34f6977bc907fb8c); + assertEq(chai.DOMAIN_SEPARATOR(), 0x9e181843763782d3938b68be3f5e957c1fe62ef2b84b0669f36a91214edb4806); } function testPermit() public {