forked from UMAprotocol/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for buidler tests (UMAprotocol#1735)
* support for buidler tests Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * buidler in ci Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * timeout Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * mocha timeout + builds Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * truffle compile Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * addressed PR, and bumped gas Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * revert solidity-coverage Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * optimize by default Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * truffle test in ci Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * back to buidler Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com> * buidlerevm config Signed-off-by: Kendrick Tan <kendricktan0814@gmail.com>
- Loading branch information
1 parent
8146cec
commit 5ebaf49
Showing
21 changed files
with
228 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cache/ | ||
artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
const chalkPipe = require("chalk-pipe"); | ||
const { usePlugin, task } = require("@nomiclabs/buidler/config"); | ||
|
||
usePlugin("@nomiclabs/buidler-truffle5"); | ||
usePlugin("solidity-coverage"); | ||
|
||
task("test") | ||
.addFlag("debug", "Compile without optimizer") | ||
.setAction(async (taskArgs, bre, runSuper) => { | ||
const { debug } = taskArgs; | ||
|
||
if (debug) { | ||
bre.config.solc.optimizer.enabled = false; | ||
bre.config.solc.optimizer.allowUnlimitedContractSize = true; | ||
bre.config.solc.optimizer.blockGasLimit = 0x1fffffffffffff; | ||
bre.config.solc.optimizer.gas = 12000000; | ||
|
||
console.log(chalkPipe("bold.underline")("Running tests in debug mode")); | ||
} | ||
|
||
await runSuper(taskArgs); | ||
}); | ||
|
||
module.exports = { | ||
solc: { | ||
version: "0.6.6", | ||
optimizer: { | ||
enabled: true, | ||
runs: 200 | ||
} | ||
}, | ||
networks: { | ||
buidlerevm: { | ||
gas: 11500000, | ||
blockGasLimit: 11500000, | ||
allowUnlimitedContractSize: false, | ||
timeout: 1800000 | ||
}, | ||
localhost: { | ||
url: "http://127.0.0.1:8545" | ||
} | ||
}, | ||
mocha: { | ||
timeout: 1800000 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.