Commit Graph

10 Commits

Author SHA1 Message Date
Matthias Seitz 88b342287a
feat(solc): add source map parser (#658)
* feat(solc): add source map parser

* merge branch master

* make some types private

* chore: make id an option

* fix: support negative field values

* check parsed element
2022-01-06 13:54:46 +02:00
Matthias Seitz 275f7179bf
feat(solc): add hardhat artifact support (#677)
* feat: add hardhat artifact support

* test: add hh test

* feat: add hh fallback artifact handler

* add format detection

* chore: update changelog

* chore: typos
2021-12-11 19:39:39 +02:00
korboismoe 41f8e295a0
fix: remove changed artifacts from the cache (#630)
Duplicate artifacts will be returned if there is a
changed artifact that was already present in the
cache
2021-11-28 14:33:24 +02:00
korboismoe d77068e26a
fix: pass partial artifact cache to project compiler output (#623)
* fix: pass partial artifact cache to project compiler output

If the cache contains some artifacts but not all, the
project compiler output now contains the cached artifacts
in addition to the newly compiled artifacts.

* chore: update changelog

* fix: remove missing cache files before getting changed files

* fix: propagate error if reading cached artifacts fails
2021-11-26 18:49:19 +02:00
Matthias Seitz 1da62d65d2
refactor!: make artifactoutput a trait (#579)
* feat: add artifacts trait

* add artifactsoutput trait

* deprecated old artifactoutput

* feat: better artifacts handling

* force update

* feat: update metadata artifacts

* feat: add default to types

* feat: make useliteralcontent optional

* feat: replace ProjectCompilerOutput with struct

* docs

* add output function

* feat: add Artifact trait for reading Abi/Bytes from an artifact

* feat(solc): replace () for empty artifacts with a conditional check

As discussed with @mattsse the abstraction here might not be super clean, so we should revisit this if we do not like it

* chore: fix doctest

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-11-16 01:29:06 +02:00
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