Commit Graph

758 Commits

Author SHA1 Message Date
Matthias Seitz ede6570567
chore: rm no longer valid todo (#870) 2022-02-05 16:30:18 +02:00
Matthias Seitz b26b505651
feat(solc): add optimizer details (#868) 2022-02-05 16:13:03 +02:00
Matthias Seitz 7463e2da11
feat(solc): compiler pipeline improvements (#866)
* feat(solc): try to unify solc versions

* chore: some tracing

* feat: add compile exact
2022-02-05 16:07:37 +02:00
Matthias Seitz b2b891dcf2
fix: bump ethers-solc version (#864) 2022-02-04 18:28:10 +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
MistApproach 5005a3621a
Hide Infura API key from docs (#863) 2022-02-04 16:58:53 +02:00
joshieDo 0526e920eb
add dese default_for_null (#860) 2022-02-04 10:09:53 +02:00
dependabot[bot] 8d0d5a2d9a
chore(deps): bump tracing from 0.1.29 to 0.1.30 (#862)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.29 to 0.1.30.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.29...tracing-0.1.30)

---
updated-dependencies:
- dependency-name: tracing
  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>
2022-02-04 10:09:02 +02:00
Roman Krasiuk d39c02474d
flatten before verification (#828) 2022-02-04 10:08:52 +02:00
James Prestwich 99230afd32
dep: replace anyhow with eyre in examples (#859) 2022-02-03 22:36:05 +02:00
Matthias Seitz d08f3ed2d4
fix(solc): bump solang (#861) 2022-02-03 22:35:46 +02:00
James Prestwich 7e4e8e200a
refactor: replace anyhow with eyre (#858)
* refactor: replace anyhow with eyre

* chore: update changelog

* refactor: simplify bail logic for duplicate method signatures

* refactor: simplify bail logic throughout

* refactor: use eyre::ensure

* refactor: more idiomatic use of eyre
2022-02-02 22:44:53 +02:00
wolflo 885aa9c967
fix(providers): doc test for dev_rpc (#857) 2022-02-02 19:20:01 +02:00
dependabot[bot] d56e34c512
chore(deps): bump ethabi from `c622438` to `6f18e11` (#853)
Bumps [ethabi](https://github.com/rust-ethereum/ethabi) from `c622438` to `6f18e11`.
- [Release notes](https://github.com/rust-ethereum/ethabi/releases)
- [Commits](c622438f9f...6f18e11621)

---
updated-dependencies:
- dependency-name: ethabi
  dependency-type: direct:production
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 15:59:19 +02:00
dependabot[bot] 66c9fadea3
chore(deps): bump pretty_assertions from 1.0.0 to 1.1.0 (#854)
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  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-02-02 15:58:14 +02:00
James Prestwich 5f68bf52d2
refactor: MultiAbigen rework (#852)
* refactor: MultiAbigen rework

* docs: update ensure family docs

* feature: FromIterator for MultiAbigen

* refactor: cleaner instantiation of Abigen from files

* docs: update examples to use build step

* chore: add 854 to changelog

* lint: clippy

* Update ethers-contract/ethers-contract-abigen/src/lib.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-02 15:57:31 +02:00
Matthias Seitz 8c07861b09
feat(codec): impl codec for Bytes (#856) 2022-02-02 13:57:39 +02:00
wolflo dc1565c014
fix(core): adjust Ganache for new cli output (#851) 2022-02-01 12:59:54 +02:00
rakita 24e7c471e4
add eth_syncing RPC (#848)
* add eth_syncing RPC

* Changelo updated

* small comments

* Intermediate SyncingStatus
2022-02-01 12:58:45 +02:00
Matthias Seitz 5fefb2b721
fix(solc): can parse secondary source locations (#849) 2022-01-31 23:54:49 +02:00
teebaumcrypto 2b178e9cf7
Add pub fn initialize_nonce in NonceMiddleManager (#840)
* Public function added "initialize_nonce"

Initialize the nonce manager with the current nonce

* Update CHANGELOG.md

* return generic

* Added current nonce as return value
Will now compile.

* Load nonce to return, fixes compile.

* chore: fmt

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-31 21:04:26 +02:00
joshieDo dd915c99f6
write outputs to file, if selected (#847) 2022-01-31 18:19:57 +02:00
Georgios Konstantopoulos 67f7dc017d chore: bump svm-rs 2022-01-31 10:15:23 +02:00
dependabot[bot] 0df00a9bd5
chore(deps): bump elliptic-curve from 0.11.10 to 0.11.12 (#845)
Bumps [elliptic-curve](https://github.com/RustCrypto/traits) from 0.11.10 to 0.11.12.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/elliptic-curve-v0.11.10...elliptic-curve-v0.11.12)

---
updated-dependencies:
- dependency-name: elliptic-curve
  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>
2022-01-31 10:08:14 +02:00
Roman Krasiuk a48496000a
fix(solc): flatten replacement target location (#846)
* adjust the end location

* upd changelog
2022-01-31 10:08:04 +02:00
Dan Cline 01544ec4b7
Implement RLP decoding for transactions (#805)
* Implement RLP decoding for transactions

* set chain_id in fill_transaction
2022-01-30 21:21:16 +02:00
Options Eskimo 44499ae008
feat(chain): add BSC networks to the is_legacy helper (#843)
also fix formatting
2022-01-29 21:36:22 +02:00
Georgios Konstantopoulos 0c949f65bb chore: lints 2022-01-29 21:19:49 +02:00
juniorbeef 97744b87a6
core: fix overflow and panic in priority fee estimation (#839)
The U256 priority fees were being coerced into u32, which was not big
enough for actual values. The overflow was happening but not checked.
This led to a possible divide-by-zero panic in this code as well.

This change does the math as I256 -- overkill, but it works.
2022-01-29 14:54:38 +02:00
odyslam.eth 8b9a18ce01
chore: add info messages to solc install/compile (#838)
* chore: add info messages to solc install/compile

* chore: update changelog

* fix: remove added ';'

* Update ethers-solc/src/compile.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-29 10:32:38 +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
ChainsightAnalytics ec2b51539d
fix(solc): use already instantiated tokio runtime if exists (#811)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-28 09:17:54 +02:00
Georgios Konstantopoulos 61eb749677 chore: bump deps 2022-01-28 09:07:48 +02:00
Georgios Konstantopoulos 415903b1fb chore: fmt 2022-01-28 09:06:35 +02:00
dependabot[bot] 5078008009
chore(deps): bump elliptic-curve from 0.11.9 to 0.11.10 (#837)
Bumps [elliptic-curve](https://github.com/RustCrypto/traits) from 0.11.9 to 0.11.10.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/elliptic-curve-v0.11.9...elliptic-curve-v0.11.10)

---
updated-dependencies:
- dependency-name: elliptic-curve
  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>
2022-01-28 08:56:12 +02:00
Tarrence van As 9e6ed0522a
fix(ethers-providers): make http crate required (#836) 2022-01-28 08:51:13 +02:00
Tarrence van As c22dd8eab4
feat(types/chain): is_legacy helper (#835)
moving this into ethers-rs from foundry so it can be more easily use elsewhere
2022-01-27 20:33:01 +02:00
Options Eskimo f434e0f57f
feat(chain): add BSC and BSC testnet (#831)
* feat(chain): add BSC and BSC testnet

* docs(changelog): add note about new BSC known chains
2022-01-27 16:50:11 +02:00
th4s a97526d6fe
Add authorization for http and websocket (#829)
* Added  basic and bearer authentication for http and websocket transport

* Improved api for websocket `connect_with_auth`

* Bugfix in doc

* Moved use statement into non-wasm imports

* Adapted changelog

* Fixed doc test

* Added constructors for Authorization

* Improved code quality and implemented feedback

* Made bas64 crate for basic auth encoding non-optional

* Added `Display` for `Authorization` instead of `into_auth_string`
2022-01-27 12:04:53 +02:00
Matthias Seitz 5da2eb1eb9
fix(solc): duplicate contracts segments (#832)
* chore: simplify touch

* forge install: ds-test

* fix: fix duplicate contracts segments

* fix: typos
2022-01-27 12:04:14 +02:00
dependabot[bot] 80e1b4f079
chore(deps): bump tracing-subscriber from 0.3.6 to 0.3.7 (#830)
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.6...tracing-subscriber-0.3.7)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  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>
2022-01-26 11:15:11 +02:00
Georgios Konstantopoulos 78dfd7591d chore: remove broken celo test
the error was on the alfajores testnet:
'missing trie node c04caafad74d59d8ca27dbbbc49e257d4f4d490bbe40534691dbb101618e2e87'

unclear why this is happening, but tx validation for celo is working otherwise
2022-01-24 19:40:46 +02:00
dependabot[bot] 75eca0116f
chore(deps): bump quote from 1.0.14 to 1.0.15 (#826)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.14...1.0.15)

---
updated-dependencies:
- dependency-name: quote
  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>
2022-01-24 15:38:07 +02:00
Erwan f9f77e829b
fix(ws): propagate deserialization errors upstream + infura quickfix (#827)
* fix(ws): propagate error when deserialization fails

* fix(ws): tolerate case-insensitive match on the jsonrpc field

Infura streams notifications with jsonrpc all capitalized. This fails to
deserialize on our end because serde expect a precise match ressembling
the Notification jsonrpc field.

Fixes #684.

* chore(fmt): use nightly rustfmt

* chore: fmt

* chore: fix failing celo test

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-01-24 15:38:00 +02:00
Rohit Narurkar af94479d81
fix: derive serde Ser and De for log metadata (#823) 2022-01-21 14:30:57 +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
Matthias Seitz fe12d10f29
Revert "Remove entire cache folder, not just contents (#820)" (#821)
This reverts commit 2945104d39.
2022-01-20 15:50:13 +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
dependabot[bot] 4864ddab43
chore(deps): bump wasm-bindgen-test from 0.3.28 to 0.3.29 (#815)
Bumps [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) from 0.3.28 to 0.3.29.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: wasm-bindgen-test
  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>
2022-01-20 15:47:58 +02:00