-
Notifications
You must be signed in to change notification settings - Fork 279
Add Buidler plugin / Finalize API #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## beta #421 +/- ##
==========================================
+ Coverage 99.06% 99.22% +0.16%
==========================================
Files 14 20 +6
Lines 639 779 +140
==========================================
+ Hits 633 773 +140
Misses 6 6
Continue to review full report at Codecov.
|
* Plugin draft * Passing: standard test suite
* Add buidler config and run info * Sub 'add' for 'use' * Add docs links
* Let plugins manage which client is used * Use requested network name
I was trying this plugin for buidler and we are using both the typescript stuff, and I need to pass a ganache setting. There is currently no d.ts file to extend the BuidlerConfig class. |
@roderik Hi. Could you elaborate on this problem a bit - you're configuring .solcover.js providerOptions and seeing a TS error? |
If you look at all the plugins, they all have a Typescript section in the docs: https://buidler.dev/plugins/nomiclabs-buidler-ethers.html#typescript-support This makes it so that you can add plugin fields to the BuidlerConfig
Without these, i cannot add the solidity-coverage configuration to the config. (for some reason configuring it via a separate config file did not pass my testrpc options) |
@roderik Ah, this plugin is not designed the same way - it loads the options itself from
That's a serious problem - if you share the solcover.js config I will try to reproduce and fix. |
There's also a working 'complex project' example at sc-forks/moloch that might be helpful for comparison purposes.... Their buidler config defines a coverage network: coverage: {
url: 'http://localhost:8555'
} Their .solcover.js includes provider settings like module.exports = {
client: require('ganache-cli'),
providerOptions: {
mnemonic: "fetch local valve black attend double eye excite planet primary install allow"
},
skipFiles: [
'Migrations.sol',
'Token.sol',
'oz',
'gnosis-safe'
]
} And lastly, the command is launched:
|
@roderik If you need any help or even if you get this working, please just lmk You're one of the first users and an experienced veteran - it would be great if you told me everything that's wrong with it :) |
Will retry today, it has something to do with Waffle / buidlerevm / test-rpc I put the waffle addresses into buidlerem like this
and that works perfectly. When I switch to coverage, test-rpc starts with different addresses, and they have no ETH. So I tried to set the gasprice at 0 via the .solcover.js file, but that did not stick. Then i was reading the code and i had the impression (could have misread) that putting a solcoverjs key in the builder config would also be picked up as config. There i have the accounts as well and i was thinking to push the addresses into test-rpc. But then there was no typescript definition so all hell broke loose :) Will start again and try to make it work. Will share the result |
Ah @roderik ganache is currently a requirement because of the way the coverage tool collects data - it launches a server instance and listens to its EVM. You just need to Am talking to NomicLabs about how to integrate BuidlerEVM - it's new. Looks amazing actually. I think you can do something very similar to the Moloch config in the comment above, but adapt the private key / balance array to the format described in the ganache-core options. |
Continuation of #372. This is the root PR for phase II of the 0.7.x improvements.
Overview
Tasks
"main": "plugins/buidler.plugin.js"
) (Add simple E2E for Buidler #438)