Commit Graph

5 Commits

Author SHA1 Message Date
Georgios Konstantopoulos 8f9c47dbdb
feat: auto-detect solc remappings (#574)
* feat: add remappings detection

* feat: add remappings to compiler settings

* fix: check for error if no contract was compiled

* feat: configure remappings and provide them to compiler settings

* test: check remappings

* chore: clippy lints

* fix: tests (#578)

* Update ethers-solc/src/remappings.rs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2021-11-13 21:31:55 +02:00
Georgios Konstantopoulos bfdf70cbea
feat(solc): allow providing --allow-args (#553)
* feat(solc): allow providing additional arguments

* feat(solc): allow providing --allow-args

* feat: more allow paths integration (#565)

* feat: more allow paths integration

* Update ethers-solc/src/compile.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* chore: only enable macros if feature is enabled

* test: add tests for multiple libs

* chore: fix solc test

* chore: only pas --allow-paths if there are any paths needed

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2021-11-08 22:11:45 +02:00
Georgios Konstantopoulos 23fb877c16
feat(solc): Multiple Solc Version detection (#551)
* test: ensure that compilation succeeds

* feat: add helper for parsing version req from a source

* feat: detect the latest compatible solc version for a VersionReq

* default to always enabling svm/async

* test: add project with multiple contract versions

* fix: always serde-default solc gas estimates

* fix: normalize evm version in settings before compiling

* feat: auto-detect version and compile if svm+async are on

* chore: warnings

* test: add a lock to ensure that there are no file conflicts when downloading solc

* test: add tests for finding solc installations

* chore: add features to ethers-rs config

* chore: s/first/latest on finding solc version fn docs

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2021-11-03 10:05:09 +02:00
Matthias Seitz 5c6ce6b0a1
feat: improved solc management (#539)
* feat: improved solc management

* test: add basic test

* rustfmt

* rustfmt

* feat: add support for lib paths

* test: add dapp testing data

* feat: support dapp style libs

* fix: doc test

* use SOLC_path by default

* docs: import readme

* feat: add diagnostics

* chore: cleanup

* docs: update compile docs

* style: use red for error msg

* style: simplifiy error format

* chore: add newline on successful compiler run log

* feat: allow ignoring error codes so that they do not get logged

* chore: use solc 0.6.6 to match CI Version

* fix: make constructor public in hardhat tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-10-30 20:59:44 +03:00
Matthias Seitz 241491a237
feat: add ethers-solc crate (#522)
* feat: initial draft dedicated solc crate

* feat: add sources helper

* feat: more utility functions

* chore: more ergonomics

* chore: more ergonomics

* rustfmt

* feat: add solc error

* feat: replace eyre with thiserror

* fix: use serde default

* fix: compliant semver

* docs: fix comments
2021-10-26 14:28:10 +03:00