Commit Graph

82 Commits

Author SHA1 Message Date
Georgios Konstantopoulos 19671e51de chore: fix lints / solc test 2022-01-11 12:13:09 +02:00
dependabot[bot] c95c12e0d1
chore(deps): bump tempfile from 3.2.0 to 3.3.0 (#780)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 12:03:09 +02:00
Matthias Seitz 4d2cd83698
fix(solc): invalid cached artifacts (#783)
* add some docs

* ignore malformed cache file

* more artifacts fixes

* fix(solc): remove quotation marks from tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-11 12:02:57 +02:00
Matthias Seitz e0b6f65359
refactor(solc): more temp project features (#778)
* chore: replace tempdir with tempfile crate

* update tempproject constructors

* make clippy happy

* add default impl
2022-01-10 21:43:34 +02:00
brockelmore 1287614e53
Implement `is_empty` for `AllowedLibPaths` (#777)
* pub svm_compile

* empty allowed paths
2022-01-09 00:20:28 +02:00
Georgios Konstantopoulos 270fe46d37 feat(solc): expose svm_compile 2022-01-08 22:51:18 +02:00
Bjerg 48bd3f13e2
Ignore SPDX and contract size for tests (#775)
* Filter for unignored warnings

* Pass compiler output to diagnostics

* Ignore SPDX and contract size warnings for tests

* Fix lint

* Skip lookups if error is not a warning
2022-01-08 22:26:23 +02:00
Eugene ba99bc1bca
make it work with latest solang (#776)
* make it work with latest solang

* rustfmt

* rm uneeded import
2022-01-08 22:16:54 +02:00
Bjerg 86044bc0c3
Add `ProjectCompileOutput::has_compiler_warnings` (#773)
* Add `ProjectCompileOutput::has_compiler_warnings`

* Nits
2022-01-07 17:29:19 +02:00
Bjerg 21a4adea3e
Check for warnings after compilation (#772)
* Check for warnings after compilation

* Always catch errors first
2022-01-07 16:53:36 +02:00
Matthias Seitz d54d381b74
feat(solc): add more contract utility types and functions (#765)
* feat(solc): add more contract utility functions

* Update ethers-solc/src/artifacts.rs

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

* docs: deindent docs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-07 14:10:33 +02:00
Matthias Seitz eeb2a84df4
fix(solc): allow cyclic imports (#766) 2022-01-07 02:12:33 +02:00
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 fc9f66c916
feat(solc): add dependency graph implementation (#750)
* docs: document public functions

* add mod

* feat(solc): add dependency graph

* detect version

* add into sources

* fix: canonicalize temp paths

* test: add graph tests

* chore(clippy): make clippy happy

* more wasm compat

* chore: update changelog

* wasm compat

* unused

* fix get source fill function

* Update ethers-solc/src/resolver.rs

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

* perf: use solang_parser to trim down deps

* resolve graph in compile

* refactor add node function

* docs: clear up comment

* docs: typos

* fix: make all versions unique based on their major minor path version

* prepare test

* docs: add more resolve docs

* test: add lib change detection test

* test: update tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-05 23:46:57 +02:00
Matthias Seitz 3da5a419fe
fix(solc): add timeout and error detection for releases lookup (#759)
* fix(solc): add timeout and error detection for releases lookup

* bump tokio cargo update

* fix: move timeout in async block
2022-01-05 20:42:07 +02:00
Matthias Seitz 2ca8f99e87
feat(solc): add path auto detection (#761) 2022-01-05 19:33:56 +02:00
Matthias Seitz bd03bda878
fix(solc): methods is object (#734) 2021-12-25 18:20:24 +02:00
Matthias Seitz 47e188793b
chore(solc): more verbose traces (#738) 2021-12-25 18:18:57 +02:00
Matthias Seitz 918063db9e
refactor(solc): remappings detection rewrite (#732)
* refactor(solc): remappings detection rewrite

* chore: follow symlinks
2021-12-25 06:52:26 +02:00
Matthias Seitz 4b4ebd74ba
fix: make evm bytecode optional (#735) 2021-12-25 06:45:53 +02:00
joshieDo ade8cd9553
add fn settings on CompilerInput (#729) 2021-12-23 17:03:37 +02:00
dependabot[bot] c22afee26a
chore(deps): bump num_cpus from 1.13.0 to 1.13.1 (#722)
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-21 19:37:31 +02:00
Matthias Seitz 8db70cead9
fix(solc): handle more remapping edge cases (#719)
* feat: ancestor finding

* feat: better remapping scanning

* fix(solc): handle more remapping edge cases

* fix: handle deeply nested libs

* chore: cleanup
2021-12-20 22:16:59 +02:00
Matthias Seitz debd1dd153
chore(solc): bump latest solc version (#720) 2021-12-20 22:15:56 +02:00
Matthias Seitz 0d2fc53541
fix(solc): prefere dapptools style remappings (#713) 2021-12-19 22:34:06 +02:00
Georgios Konstantopoulos 8d95f3bf33
fix: use lib for parsing paths correctly in windows (#712) 2021-12-19 22:03:16 +02:00
Georgios Konstantopoulos 9c11f6cb7b
fix(ethers): auto-enable asm when supported (x86/x64 and not msvc) (#710) 2021-12-19 18:02:22 +02:00
Georgios Konstantopoulos d7c29cc615
fix: configure rustls & openssl via feature flag (#703)
* chore(etherscan): allow specifying openssl or rustls

* chore(contract): allow specifying openssl or rustls

* chore(solc): allow specifying openssl or rustls

* chore: expose new rustls/openssl features at top level crate

* chore: bump tokio-tungstenite / remove dup rustls version

* chore: bump svm-rs

* fix: feature gate sha2-asm

* ci: remove --all-features from windows tests

* chore: do not enable sha2-asm by default

* fix: do not pull in svm-rs in wasm builds

* chore: use upstream svm again
2021-12-19 16:56:54 +02:00
Matthias Seitz 12334443eb
chore(solc): use svm global_version if it exists and no SOLC_PATH is set (#709)
* chore(solc): use svm global_version if it exists and no SOLC_PATH is set

* rustfmt

* fix: resolve global svm version
2021-12-19 16:30:54 +02:00
Matthias Seitz e0ac32a68f
chore(solc): add display impl for PathsConfig (#708) 2021-12-19 14:35:11 +02:00
Matthias Seitz 8f8a813181
chore: use new remapping detection (#707)
* chore: use newe remapping detection

* chore: update changelog

* Update ethers-solc/src/remappings.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-12-19 14:30:31 +02:00
Matthias Seitz 9096f4e170
feat(solc): revamped remapping auto detect (#706) 2021-12-19 06:32:14 +02:00
Matthias Seitz e24117a1e1
chore(clippy): make clippy happy (#705) 2021-12-19 06:28:38 +02:00
Alex Xiong 6cbdc89187
fix: avoid futures-util yanked err (#693) 2021-12-15 03:32:36 +01:00
Matthias Seitz 4bb2636b77
fix: remove assert to check cache format (#689)
* fix: remove assert

* rustmft
2021-12-13 16:37:35 -07:00
Georgios Konstantopoulos 8a7252fe58
fix: bump svm-rs for windows support (#685) 2021-12-13 18:20:38 +02:00
Matthias Seitz 4c677933ce
feat(solc): add workspace utils (#678)
* feat(solc): add workspace mocking

* test: add more tests

* test: update tests

* rename to project-utils

* add fs extra error

* clean up functions

* simplify path construction
2021-12-13 01:39:28 +02:00
Matthias Seitz 5dec757493
refactor(solc): add new io error with path info (#680)
* refactor(solc): add new io error with path info

* chore: rustfmt
2021-12-12 10:10:40 -07:00
Matthias Seitz ab8b5233d2
fix: exclude asm for msvc (#679) 2021-12-12 15:09:15 +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
Matthias Seitz 38e18463dc
feat(solc): extend Artifact trait (#673)
* feat(solc): extend Artifact trait

* chore: update changelog

* chore: rustfmt
2021-12-10 12:38:44 -07:00
Matthias Seitz f48fd88a97
fix(solc): skip 0x prefix for deserialize bytes decoding (#671) 2021-12-10 11:20:30 -07:00
Rohit Narurkar 991cda3f33
fix: naming and default impl (#665) 2021-12-10 10:22:25 -07:00
Matthias Seitz ab949f7858
fix: add allow paths (#667) 2021-12-10 08:50:15 -07:00
Matthias Seitz 59cf991828
feat(abigen): use structs for outputs (#664)
* feat(abigen): use structs for outputs

* update CHANGELOG

* make clippy happy

* fix lints
2021-12-09 16:00:59 -07:00
dependabot[bot] f0a8f01465
chore(deps): bump md-5 from 0.9.1 to 0.10.0 (#660)
Bumps [md-5](https://github.com/RustCrypto/hashes) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/md5-v0.9.1...md2-v0.10.0)

---
updated-dependencies:
- dependency-name: md-5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-09 10:45:34 -07:00
laizy eeaab21049
add buffer for file reading (#662) 2021-12-09 10:45:13 -07:00
Matthias Seitz 0b1f3b1dcf
feat(solc): add support for library linking (#656)
* feat(solc): add support for library linking

* chore: update changelog

* fixbreaking compactref api

* rm check

* return Bytes instead

* revert changes

* simplify resolve

* test: add lost tests
2021-12-08 02:38:29 +02:00
Matthias Seitz a9a47a4cd6
feat(solc): add support for compiling solc in parallel (#652)
* docs: more docs and tracing

* feat: add compile many

* feat: add compile many

* fix: make fields optional

* chore: add num_cpus and criterion

* add compile benchmark

* feat: add job option

* feat: add parallel compilation support

* use ful utilization

* chore: move pathmap to cache

* fix: async write all

* chore: clean up
2021-12-07 01:02:13 +02:00
Matthias Seitz f10b47e600
docs: more docs and tracing (#651) 2021-12-05 15:27:37 +02:00