Commit Graph

82 Commits

Author SHA1 Message Date
DaniPopes 439a0c7de0
chore(deps): bump and use workspace dependencies (#2222)
* chore: update all deps

* chore: update dependabot

* chore: separate ethers package from workspace

* chore: package metadata

* chore: use package.*.workspace = true

* fix: docs.rs build

* chore: update examples manifests

* chore: use workspace dependencies for ethers-* crates

* fix: test

* chore: use workspace dependencies for all dependencies

* chore: pin rust-crypto

* chore: add license field to example crates

* fixes

* more fixes

* fix: test

* last fixes

* fix: wasm

* fix: docs.rs build

* fix

* fix: wasm-pack error

see also https://github.com/rustwasm/wasm-pack/issues/1238

* fix: wasm deps and example

* ci: update

* fix: wasm tests

* fix: eip712 tests

* fix: windows ci

* fix

* chore: update docsrs metadata

* chore: bump version to match crates.io

* chore: rm bad release.toml config

* chore: rm release.toml

bad configuration

* chore: add exclude to workspace

* fix: middleware

* fix: solc feature flags

* chore: run cargo upgrade

* chore: update deps

* chore: update remaining deps

* undo fix

* update lock

* bump yubi

* fix: update coins-* and fix spki breaking changes
2023-03-16 12:28:35 -07:00
DaniPopes 203e350940
docs: fix broken links, update documentation (#2203)
* docs: fix broken links

* docs: update READMEs and module-level documentation
2023-02-27 13:03:17 -07:00
Jared Tokuz b06452c6ea
feat: warnings as errors (#1838)
* feat: warnings as errors

* changed the bool arg to Severity and updated its traits

* reformat the test based on the linter

* renamed variable based on property type change and changed a few refs

* updated changelog

* revert changelog iden change

* added test for combining compiler severity filter and ignored error codes and adjusted has error for the added test case

* adjusted has_error to utilize ge functionality in case of info errors

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-11-10 12:19:43 -08:00
DaniPopes debd6fec3d
chore: clippy (#1812)
* chore: clippy

* fmt
2022-11-07 15:43:11 -08:00
Matthias Seitz b47567bfd2
fix(solc): handle absolute paths properly on conflict (#1784) 2022-10-13 14:54:36 -07:00
Roman Krasiuk 62dd635a75
fix(solc): remove default include paths (#1691)
* fix path resolution for projects paths passed as included

* fix lookup

* remove default include paths

* remove default include paths usage
2022-09-14 09:41:25 -07:00
Matthias Seitz ff754263a3
fix(solc): use cache context when determining artifact files (#1621)
* fix(solc): use cache context when determining artifact files

* update  changelog
2022-08-19 14:33:28 -07:00
Matthias Seitz bda5a7657f
fix(solc): ensure base-path is not include-path (#1596) 2022-08-13 16:12:30 -07:00
Matthias Seitz 2c33acb3ad
feat(solc): resolve absolute imports in libraries (#1590)
* feat(solc): resolve absolute imports in libraries

* feat(solc): support --include-path

* update test

* only add base path if not empty

* simplify solc config

* include root in include paths

* test: add test for absolute imports

* fix: bad predicate

* cleanup

* fix: use base-path directly

* fix: exclude root from include set
2022-08-12 12:11:08 -07:00
Matthias Seitz e62c84d650
fix(solc): convert source paths on windows (#1540)
* fix(solc): convert source paths on windows

* refactor: slash all paths

* fix: use correct import

* feat: slash compiler output

* add util function

* slash by default

* slash artifact id

* typo

* updat cfg

* unify cfg

* update changelog
2022-08-01 09:47:41 -07:00
Matthias Seitz fb8ebd8231
feat(solc): handle conflicting artifacts properly (#1491)
* feat(solc): handle conflicting artifacts properly

* refactor(solc): update write extras function

* chore: update CHANGELOG
2022-07-24 14:39:37 -07:00
Matthias Seitz a600acb4f5
docs: fix broken doc links (#1497) 2022-07-24 03:16:55 +02:00
Matthias Seitz 958e0902a0
chore(deps): bump paths-slash (#1462) 2022-07-06 13:23:33 -07:00
Mark Tyneway 3bafe5b9e4
feat(ethers-solc): configurable build-info output dir (#1433)
* feat(ethers-solc): configurable build-info output dir

* chore: update changelog
2022-06-30 09:21:46 -07:00
Matthias Seitz e3389f336a
feat(solc): emit build info files if configured (#1338)
* feat(solc): emit build info files if configured

* feat: add content hashing
2022-06-15 12:44:20 -07:00
Matthias Seitz 54f1b9dee8
feat(solc): use relative paths and --base-path option (#1317)
* feat(solc): use relative paths and --base-path option

* chore: update CHANGELOG

* strip lib paths
2022-05-27 13:31:11 -07:00
Matthias Seitz 75835a9280
feat(solc): emit artifacts for standalone source files (#1296)
* feat(solc): emit artifact files for sources with no contracts

* test(solc): add tests for emitting standalone sources

* chore: update CHANGELOG

* style: check ast is some
2022-05-22 15:19:59 -07:00
Matthias Seitz 44cbbc769a
feat(solc): store source files with their solc version (#1231)
* feat(solc): add versioned sources

* feat(solc): support versioned sources
2022-05-06 11:42:01 -07:00
Matthias Seitz 16e17078fd
fix(solc): respect auto detection in additional compile functions (#1226) 2022-05-05 07:31:52 -07:00
Matthias Seitz e7e5abcd0d
fix(solc): ensure std json sources are unique (#1210) 2022-05-02 22:51:28 -07:00
Matthias Seitz 8afd670a65
chore(solc): remove async feature requirement (#1181) 2022-04-27 15:37:40 +03:00
Matthias Seitz ac3e12fe8a
feat: add standardjson compiler input type (#1169) 2022-04-23 01:39:31 -07:00
Matthias Seitz 3d4356f531
fix(solc): strip root path from remappings and sources for standard json (#1136)
* fix(solc): strip root path from remappings and sources for standard json input

* fix: use consistent contract for tests
2022-04-11 13:36:06 -07:00
James Prestwich 9206efa46c
fixes: correct etherscan url address, remove double quotes in solc error (#1130) 2022-04-10 09:04:43 -07:00
pyk 247f08f1a9
feat(solc): Add standard-json-input (#1126)
* Add standard-json-input

* remove debugging

* Update the error message

* Remove unnecessary changes

* Refactor

* make clippy happy

* Return CompilerInput instead of String
2022-04-08 17:18:39 -07:00
Matthias Seitz 2689981782
feat(solc): include source file ast in artifact (#1081)
* refactor: extend artifactsoutput interface

* add source file to trait

* fix: make it compile again
2022-03-27 09:56:33 -07:00
Matthias Seitz 95a384b121
fix(solc): bundle new svm-solc feature (#1071)
* fix(solc): bundle new svm-solc feature

* chore: update CHANGELOG

* fix: enabled new feature in full
2022-03-21 01:58:56 -07:00
Matthias Seitz 916e9a7334
chore(clippy): add some deny lints (#1064)
* feat: add deny lints

* trim ethers core

* trim ethers eip712

* deny ethers contract derive

* deny ethers contract abigen

* deny ethers contract

* deny ethers providers

* chore: add denies and fix unused deps

* doc: fix links

* fix: wasm build

* doc: fix links

* doc: fix links

* doc: fix inline doc links

* docs: fix intra doc links
2022-03-19 10:05:39 -07:00
Matthias Seitz 65b1751cf8
style: split artifacts mod and create contract and bytecode mods (#1052)
* style: split artifacts mod and create contract and bytecode mods

* chore: rustfmt
2022-03-17 07:51:43 -07:00
Matthias Seitz 2d75f9f1e7
feat(solc): support customized output selection pruning (#1039)
* feat(solc): support customized output selection pruning

* chore(clippy): make clippy happy
2022-03-16 07:36:35 -07:00
Matthias Seitz ff29e96380
feat(solc): optimize output selection in cache mode (#1029)
* feat(solc): add mock project generator

* feat: mock project

* refactor: rename to mock

* feat(solc): mock project support

* refactor: move output selection to new type

* refactor: revert filter implementation

* feat: filter sources

* feat: support filtering

* refactor: update function signatures

* feat: optimize output

* chore: export helper macros

* fix(deps): add required features

* style: allow unused

* feat: also generate artifactless files

* feat: add create function

* chore(clippy): make clippy happy

* feat: add helper function

* test: add state machine test

* test: add more mock tests
2022-03-15 08:58:33 -07:00
Matthias Seitz 0c42c23746
fix(solc): fix cache and allowed paths bug (#998)
* fix: don't emit on error

* fix: allowed-paths condition

* fix(solc): cache and allowed paths bug
2022-03-09 10:52:40 -08:00
Matthias Seitz 3effda2804
feat(solc): add helper functions to compile standalone files (#931) 2022-02-19 15:56:34 +02:00
Matthias Seitz 7d2d96d761
feat(solc): add tree printer implementation (#933)
* feat(solc): add tree printer implementation

* test: feature gate windows

* typos
2022-02-19 15:55:21 +02:00
Matthias Seitz 19d2fd1155
feat(solc): add configurable Artifact type (#907)
* refactor: make artifacts a sub mod

* feat: more options for output selection

* feat(solc): make ArtifactOutput struct functions

* fix: migrate all features

* feat: add configurable artifacts type

* refactor: move configurable to separate file

* feat: impl ArtifactOutput

* refactor: write extras

* simplify write extra

* feat: more helper functions

* feat: implement delegate

* fix: failing doc test

* fix: rustfmt

* chore: update CHANGELOG

* feat: add helper functions

* refactor: remove flatten

* feat: add link function

* feat: replace default type

* fix: doc tests

* feat: more utility functions

* fix: failing tests

* chore: rename types

* chore: bump ethers-solc 0.3.0

* fix: set metadata file extension properly
2022-02-17 17:31:35 +02:00
Matthias Seitz cc5c67ed0a
chore: fix all warnings (#890) 2022-02-10 08:54:39 +02:00
Matthias Seitz 36c3adeec9
feat(solc): add Reporter type (#883)
* feat(solc): add Reporter type

* chore(clippy): make clippy happy
2022-02-09 01:14:57 +02:00
Matthias Seitz b295d73c4a
refactor(solc): rewrite compiler passes and cache change detection (#802)
* chore: clippy

* refactor: rewrite compiler passes and cache

* feat: more work on compile pipeline

* feat: add cache constructor

* add artifact filtering

* fine tune api

* feat: prepare version integration

* docs: more docs

* feat: add cacheentry2

* replace cacheentry types

* integrate new api

* docs: more docs

* feat: implement new output handler

* feat: integrate cached files in new compile pipeline

* refactor: more cache refactor

* docs: more docs

* feat: add source name mapping

* feat: implement new parallel solc

* refactor: do a little cleanup

* refactor: even more cleanup

* even more cleanup

* chore: make it compile

* chore: make it compile with all features

* chore: clippy fix

* feat: integrate new compiler pipeline

* docs: more docs

* refactor: move stuff around

* refactor: start deprecating output type

* chore: make it compile again

* chore(deps): bump solc version 0.2.0

* feat: unify output types

* cargo fix

* refactor: add contracts wrapper

* chore: replace ProjectCompileOutput

* docs: add more docs

* feat: add offline mode

* feat: more artifact helpers

* chore: cleanup cache

* chore: streamline types

* fix: better artifacts mapping

* chore: some cleanup

* chore: change artifact

* chore: add configure solc fn

* feat: add artifact reading

* feat: implement retain and extend

* feat: add cache extending

* feat: write to disk

* chore: make clippy happy

* feat: implement path mapping

* chore: nits

* feat: introduce states

* feat: add compiler state machine

* chore: move cache types to cache mod

* chore: make clippy happy

* feat: add debug derives

* fix: use resolved import source unit names

* fix: failing tests

* test: test multiple libs properly

* chore: make clippy happy

* chore: update CHANGELOG

* fix: doc tests

* fix: set offline mode correctly

* chore: make it compile again

* Update ethers-solc/src/artifacts.rs

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

* feat: find remappings by default

* typos

* add eth_syncing RPC (#848)

* add eth_syncing RPC

* Changelo updated

* small comments

* Intermediate SyncingStatus

* fix(core): adjust Ganache for new cli output (#851)

* fix: review comments

* fix: cache relative path bug

* chore: add cache example

* chore: use absolute paths

* fix: remove overwritten files from cache

* fix: rustfmt

* chore: more helper functions

* chore: export AggregatedOutput

* feat: implement helper functions

* feat: even more helpers

* fix: failing doc tests

* refactor: remove source name map tracking

* fix: determine artifacts in ephemeral mode

* refactor: allowed paths should not fail

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: rakita <rakita@users.noreply.github.com>
Co-authored-by: wolflo <33909953+wolflo@users.noreply.github.com>
2022-02-04 18:20:24 +02:00
brockelmore 24c39bd32a
write `CompactContractBytecode` instead of `CompactContract` (#833)
* write `CompactContractBytecode` instead of `CompactContract`

* chore: fix doctest

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-28 09:23:28 +02:00
Matthias Seitz f9fadf06c4
chore(solc): also rm cache dir if empty (#822) 2022-01-21 03:51:41 +02:00
Matthias Seitz 6d7875a44c
chore(solc): add more convenience functions (#810)
* chore(solc): simplify solcconfig

* chore: more helper functions

* chore: copy all

* fix: add trailing slash

* chore: make clippy happy
2022-01-20 21:41:19 +02:00
Georgios Konstantopoulos 141e2f1807 Revert "Remove entire cache folder, not just contents (#820)"
This reverts commit 2945104d39.
2022-01-20 15:49:59 +02:00
Bjerg 2945104d39
Remove entire cache folder, not just contents (#820) 2022-01-20 11:01:35 +02:00
Roman Krasiuk afcba9567f
feat(solc): flatten (#774)
* solc flatten implementation

* upd changelog

* upd docs

* revamp flattening

* clippy

* use resolve_import method

* extract recursive flatenning into a separate func

* change content iteration for flatten

* remove redundant result

* clean up solimport

* add comment to project.flatten

* add support for ver pragma loc

* address pr comments

* uncomment the test

* improve test cov

* add handling of sdpx license identifiers

* change arg name

* match license only at the beginning of the file

* add comments

* lint

* morrre comments
2022-01-17 14:27:40 +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
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
Bjerg 86044bc0c3
Add `ProjectCompileOutput::has_compiler_warnings` (#773)
* Add `ProjectCompileOutput::has_compiler_warnings`

* Nits
2022-01-07 17:29:19 +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