Auto disable buidler-gas-reporter (#504)
parent
7bdcac1206
commit
2b14380d3d
@ -0,0 +1,8 @@ |
||||
const { loadPluginFile } = require("@nomiclabs/buidler/plugins-testing"); |
||||
loadPluginFile(__dirname + "/../plugins/buidler.plugin"); |
||||
usePlugin("@nomiclabs/buidler-truffle5"); |
||||
usePlugin("buidler-gas-reporter"); |
||||
|
||||
module.exports={ |
||||
defaultNetwork: "buidlerevm", |
||||
}; |
@ -0,0 +1,17 @@ |
||||
pragma solidity ^0.5.0; |
||||
|
||||
|
||||
contract ContractA { |
||||
uint x; |
||||
constructor() public { |
||||
} |
||||
|
||||
function sendFn() public { |
||||
x = 5; |
||||
} |
||||
|
||||
function callFn() public pure returns (uint){ |
||||
uint y = 5; |
||||
return y; |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
const ContractA = artifacts.require("ContractA"); |
||||
|
||||
contract("contracta", function(accounts) { |
||||
let instance; |
||||
|
||||
before(async () => instance = await ContractA.new()) |
||||
|
||||
it('sends', async function(){ |
||||
await instance.sendFn(); |
||||
}); |
||||
|
||||
it('calls', async function(){ |
||||
await instance.callFn(); |
||||
}) |
||||
}); |
Loading…
Reference in new issue