Skip to content

Commit

Permalink
Merge pull request #93 from keep-network/babe-the-blue-ox
Browse files Browse the repository at this point in the history
Babe the Blue Ox: Add rudimentary buidler setup

This change allows the usage of buidler-vm instead of ganache for testing,
which in turn allows the usage of console.log in contracts.

A special script, buidler-vm:log, filters the buidler VM output to only
log output. This is useful for testing with logs.

Lastly, with ganache gone, its script is updated to note that Ganache
is no longer used, and the Solidity test workflow is updated to use
npm run buidler-vm instead of ganache.

To use logging in a contract, add an import:

import "@nomiclabs/buidler/console.sol";

Then you can use console.log with limited types, and cannot pass
arrays to it directly. See the docs for more.
  • Loading branch information
pdyraga authored Sep 12, 2020
2 parents a198a8a + 15ac734 commit 094c701
Show file tree
Hide file tree
Showing 4 changed files with 2,662 additions and 814 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/solidity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Run tests
# Runs ganache in background
run: |
npm run ganache &
npm run buidler-vm &
npm test
env:
CI: true
1 change: 1 addition & 0 deletions buidler.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
Loading

0 comments on commit 094c701

Please sign in to comment.