Commit Graph

180 Commits

Author SHA1 Message Date
Matthias Seitz 0b04ffe787
feat: add uint8 type (#1639)
* feat: add uint8 type

* update changelog

* derive default

* fix: failing test
2022-08-28 12:17:48 -07:00
Jacob b71e6ad00b
ethers-etherscan: derive debug, clone and copy (#1634)
* ethers-etherscan: derive debug, clone and copy

Derive Debug, Clone and Copy on all appropriate Structs and Enums.

* Update changelog
2022-08-24 12:50:29 -07:00
Clifton King b1124441ec
feat(abigen): descriptive deserialization errors (#1633)
* feat(abigen): descriptive deserialization errors

* update changelog

* map_err -> wrap_err
2022-08-23 17:54:56 -07:00
Jacob ff66008cbe
Fix 'get_transactions' response. (#1632)
* Fix 'get_transactions' response.

* Add some explanation to GenesisOption.

* One-line-ifying

* Update changelog
2022-08-23 09:17:00 -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 e6c1927a1c
feat(abigen): add contract filter (#1564)
* feat(abigen): add contract filter

* refactor: move to top of file

* add tests

* update changelog
2022-08-04 08:22:00 -07:00
Matthias Seitz 27a184db45
feat: add EthError trait and derive (#1549)
* feat: add EthError trait and derive

* update changelog
2022-08-02 11:03:52 -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
Marcelo Fornet c7563a5f64
Add support to Aurora network (#1535)
* Add support to Aurora network

Documentation about aurora chain:
https://doc.aurora.dev/getting-started/network-endpoints

* Update changelog

* Format code using rustfmt.toml
2022-07-30 12:42:04 -07:00
Mark Tyneway 16f686df26
ethers-solc: add immutableReferences output selector (#1523)
* ethers-solc: add immutableReferences output selector

It is a property on the deployed bytecode object
on the compiler output. This is the precursor for
`forge inspect <contract-name> immutableReferences`.

* chore: update changelog
2022-07-28 11:07:24 -07:00
Clifton King c418f4ef34
fix(abigen): abigen feature required for bindings (#1508)
* fix(abigen): abigen feature required for bindings

traits such as ethers::contract::EthDisplay require abigen

* update changelog

* abigen now uses re-exported version of serde_json
2022-07-26 08:28:39 -07:00
Hari 3766c2b47c
feat(etherscan): erc1155 token transfer events endpoint (#1503)
Added the function `get_erc1155_transfer_events` and the corresponding struct `ERC1155TokenTransferEvent`.
2022-07-26 08:28:09 -07:00
wren cb7e586645
feat(debug_traceTransaction): initial commit (#1469)
* feat(debug_traceTransaction): initial commit

* chore(changelog): updated changelog

* feat(debug_traceTransaction): type adjusments

* feat(debug_traceTransaction): type adjusments

* Update ethers-providers/src/provider.rs

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

* Update ethers-providers/src/provider.rs

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

* chore(format): cargo +nightly fmt

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-07-24 14:46:38 -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 a5c326162a
fix: use correct model for txpool_content endpoint (#1501)
* fix: use correct model for txpool_content endpoint

* chore: update CHANGELOG

* update failing tests

* Update ethers-providers/tests/txpool.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-07-24 03:21:09 +02:00
Clifton King aa008727ee
fix(abigen): contract names can be reserve words (#1498)
* fix(abigen): contract names can be reserve words

* update changelog

* clippy warning

* module names consistent with other safe_*

* update refs to generated abis

* move reserved words tests to their own fn

* added note to changelog re: module name changes
2022-07-24 03:18:24 +02:00
James Prestwich 13ce18fd3b
feature: allow event builder to stream with meta (#1483)
* feature: allow event builder to stream with meta

* doc: improve rustdoc

* feature: subscribe_with_meta

* chore: fmt
2022-07-17 11:26:16 -07:00
Matthias Seitz fb3fb161c0
chore: make ethers-solc optional (#1463)
* chore: make ethers-solc optional

* chore: update CHANGELOG

* add missing requirement

* add abigen req
2022-07-06 14:11:56 -07:00
Mark Tyneway 1efdadefc0
ethers-solc: fix build info default directory (#1458)
* ethers-solc: fix build info default directory

This commit fixes the default behavior for the `build-info`
directory when it is unconfigured. It should end up in
the configured artifacts directory, taking into account
whatever the config for the artifacts directory is.
If the build info is specifically configured, then that
will take precendence over the default.

* chore: add changelog entry
2022-07-06 11:44:47 -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 f5793525f2
feat: capture unknown fields (#1423)
* feat(core): add OtherFields type

* feat: capture unknown fields

* chore: update CHANGELOG

* test: update tests

* docs: fix doc tests

* fix: make docs compile on stable
2022-06-28 15:18:15 -07:00
h00p30 94c7559ab5
TypedTransaction methods into builder style (#1414) 2022-06-25 20:44:55 -04:00
Julian Popescu ec379da527
Use H64 for Block Nonce (#1396)
* Use H64 for Block Nonce

Signed-off-by: Julian Popescu <hi@julian.dev>

* Update changelog

Signed-off-by: Julian Popescu <hi@julian.dev>
2022-06-23 11:02:29 -04:00
Matthias Seitz 05864ff9ed
fix: net_version returns string (#1376)
* fix: net_version returns string

* chore: update CHANGELOG
2022-06-14 13:00:46 -07:00
Matthias Seitz 980649060a
feat(solc): emit additional raw metadata field (#1365)
* feat(solc): emit additional raw metadata field

* chore: update CHANGELOG

* test: updata test

* fix(solc): proper metadata deserialization
2022-06-10 16:49:19 +03:00
Dave Belvedere 6b6c511583
Add Arithmetic Shift Right operation for I256 (#1324)
Update the changelog for https://github.com/gakonst/ethers-rs/issues/1323

Format the file correctly
2022-05-29 19:03:03 -04: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
oblique 526f40e88f
feat(core): Add `as_*_mut` methods on `TypedTransaction` (#1310) 2022-05-27 10:11:18 -04:00
Luke Tchang 4d9916570f
fix(signers): aws eip712 does not use eip155 (#1309)
* fix(signers): aws eip712 does not use eip155

* chore: update changelog

* chore: lints

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-05-25 14:15:00 -07:00
Matthias Seitz 95862bc62c
feat(solc): make cache entries relative to root dir (#1307)
* feat(solc): make cache entries relative to root dir

* chore: update CHANGELOG
2022-05-24 07:51:09 -07:00
Meet Mangukiya a150666d54
feat: add paginated logs (#1285)
* feat: add paginated logs

* docs: add paginated_logs example

* remove unpin
2022-05-23 14:23:35 -07:00
Bryan Stitt 9ed9395c2c
return instead of ignore error (#1287)
* return error instead of swallow error

* changelog

Co-authored-by: Bryan Stitt <bryan@satoshiandkin.com>
2022-05-23 11:58:41 -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
Meet Mangukiya 5d604edd5c
feat(ContractDeployer): add tx builder methods (#1289) 2022-05-21 17:48:41 -07:00
Tomas Tauber 991d538bd0
feat(etherscan): added Cronos testnet (#1276) 2022-05-17 10:57:48 -07:00
oblique 75ba3f4a9a
fix(core): On pending block `miner` field is always `null` (#1272)
* fix(core): On pending block `miner` field is always `null`

* Fix formatting
2022-05-16 14:10:02 -07:00
Meet Mangukiya b15d0f8643
feat(providers): load previous logs before subscribing (#1264)
* feat(providers): load previous logs before subscribing

Load previous logs and stream it back to the user before establishing
a new stream for streaming future logs.

Closes #988

* docs: add subscribe_logs example

* fix clippy errors

* refactor: use VecDeque and address review
2022-05-16 08:11:25 -07:00
Leo eb94e53d1f
Add basic solc model checker options (#1258)
* Add basic solc model checker options

* Changelog entry

* review 1

* chore: fmt

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-05-13 13:29:13 -07:00
Tomas Tauber 0926ead2bc
fix(core): removed Cronos mainnet beta from `is_legacy` (#1246)
it now supports EIP1559 after the network upgrade at the height 2693800
2022-05-10 08:31:28 -07:00
Matthias Seitz fd994d7fde
feat(abigen): support overloaded events (#1233)
* feat(abigen): support overloaded events

* chore: update CHANGELOG
2022-05-07 09:31:53 -07:00
James Prestwich c70cd81de0
feature: pending transaction retries repeatedly before assuming dropped (#1221) 2022-05-05 07:22:47 -07:00
CyMule 4d24acdd84
Adds From<H160> trait to ValueOrArray<H160> (#1200)
* Adds From<H160> trait to ValueOrArray<H160>

The trait From<H160> for ValueOrArray<H160> was not implemented which
prevented compilation when using
pub fn address<T: Into<ValueOrArray<Address>>>(self, address: T)
for ethers_core::types::Filter.

Fixes: #1199

* update CHANGELOG.md

* Adds From<Vec<H160>> trait to ValueOrArray<H160> and documentation

The trait From<Vec<H160>> for ValueOrArray<H160> was not implemented which
prevented compilation when passing a Vec<H160> into
pub fn address<T: Into<ValueOrArray<Address>>>(self, address: T)
for ethers_core::types::Filter.

This commit also includes documentation on how to use fn address for
ethers_core::types::Filter.

Fixes: #1199
2022-05-02 12:33:33 -07:00
Josh Stevens 82d5741bcc
fix: add to and from into the transaction receipt to follow spec (#1184)
* fix: add to and from into the transaction receipt to follow spec

* update changelog
2022-04-27 15:40:59 +03:00
Dan Cline 3d9fc21ba9
fix(core): decode `from` field for typed transactions (#1180)
* fix(core): add eip1559 prefix for sighash

 - add a test which properly tests the `from` address decoding, which
   was incorrect due to the tx type not being hashed before recovery

* fix(core): decode from for EIP2930 transactions

 - add test which checks signed decoding for an EIP2930 transaction

* ignore decoding tests for celo

* remove type constant and use typed sighash

* update CHANGELOG
2022-04-27 15:39:59 +03:00
joshieDo a0f41c51af
fix(solc): when compiler-out metadata is empty and there's no `internalType` (#1182)
* add another compiler-out with fixes

* update changelog
2022-04-27 15:37:09 +03:00
oblique 6faceb20d7
feat: Relax `Clone` requirements when `Arc<M>` is used (#1183)
`#[derive(Clone)]` was implementing `Clone` only if `M` was `Clone`,
however because of `Arc<M>` this can be relaxed.
2022-04-27 15:33:22 +03:00
georgewhewell a866cd5726
feat: blocknative gas oracle (#1175)
* gas oracle: add more error variants

* gas oracle: adds BlockNative oracle

* pdate changelog
2022-04-25 08:50:55 -07:00
Michael Sproul 286f842a2a
fix(core): encode absent tx access_list correctly (#1137)
The optional access list on `Transaction` was being incorrectly encoded
as an empty string (0x80) when omitted, when it should be encoded as an
empty list (0xc0).

Fixes #1134.
2022-04-13 08:26:14 -07:00
Dan Cline 1d14f9d26e
Ensure a consistent chain ID between a signer and provider in SignerMiddleware (#1095)
* feat(middleware): fetch chainid from middleware

Require SignerMiddleware to fetch the inner middleware's to set for the
signer. SignerMiddleware now requires an instantiated middleware with
an accessible get_chainid method.

* ci: update ganache

newer ganache version is needed to specify the ganache provider chain id
in tests

* set SignerMiddleware constructor return to result

* create new method for pulling chainid

* add consistent chainid CHANGELOG entry

* remove awaits

* switch test_derive_eip712 to use consistent signer

 * remove gas estimation equality assert in deploy_and_call_contract -
   updated version of ganache no longer returns the same value for gas
   estimation and gas_used

* revert with_signer to non-async non-result

* cargo fmt

* expand SignerMiddleware::new comment

* remove doc indent
2022-04-10 10:55:30 -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
Dan Cline 6e004e7780
feat(core): implemented signed transaction RLP decoding (#1096)
* feat(core): implement signed transaction decoding

* add geth signed transaction test vectors

* add signed tx decoding CHANGELOG entry
2022-04-08 19:05:16 -07:00
Connor Mendenhall 18dda9aa83
feat(solc): pass compile time to reporter (#1098)
* Pass compile time to solc_success/on_solc_success

* Update changelog
2022-04-02 14:37:38 -07:00
Luke Tchang b3679fe113
fix: aws signer does not throw error on unnormalized sig (#1099)
* fix: reverts aws signer fix around sig normalization

* chore: update changelog
2022-03-31 10:04:28 -07:00
Meet Mangukiya fa04247808
Tx optional from (#1075)
* doc(core/Signature): methods are all using normalized v, dont need to be 0 or 1 only

* feat(core/Transaction): make from optional, add method to recover from

* fix recovery

* add recover_from_mut

* update changelog
2022-03-23 22:06:55 -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 b6b5b09f4a
feat(abigen): add abi object deserializer and generate deploy function (#1030)
* feat(abigen): add abi object deserializer

* chore: rustfmt

* refactor: use enum type for deser abi

* refactor: use enum types for deser

* chore: rustfmt

* feat: add bytecode field

* feat: generate bytecode static

* feat: generate deployment function

* refactor: deploy function

* feat: add contract deployer type

* feat: make 0x prefix optional

* feat: add deploy function

* feat: add deploy example

* chore: update CHANGELOG

* chore(clippy): make clippy happy
2022-03-18 21:23:33 -07:00
oblique 367f3444ec
fix: Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` (#1012) 2022-03-13 13:58:29 +02:00
AlexK e1d66b8cd3
feat(solc): yul compilation (#994)
* added yul compilation

* fix doctest

* fixes

* changelog

* cleanup

* fmt

* test update

* lint

* ci fix

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-03-10 10:42:02 -08:00
Simon Bihel 1641be7395
Enforce commutativity of reverse resolution (#996)
As specified in https://docs.ens.domains/dapp-developer-guide/resolving-names#reverse-resolution
2022-03-08 06:45:45 -08:00
oblique 46d7afd65b
fix(abigen): safe ident field names (#989) 2022-03-05 20:25:03 +02:00
wolflo a1accbf6ac
fix(providers): Propogate gas limit with access list (#901)
* fix(providers): Propogate gas price with access list

* Update CHANGELOG.md

* Fix clippy lint

* Clarify fill_transaction comments

* Fill tx gas price before gas limit

Updates Provider::fill_transaction() to fill the gas price of a
transaction before filling the gas limit. There are cases where the gas
used by a transaction may be dependent on the gas price. For example,
the following contract bytecode branches based on the result of the GASPRICE
opcode:
GASPRICE PUSH1 0xff GT PUSH1 {label} JUMPI

* Cleanup

* Propogate eth_estimateGas failure
2022-03-01 14:13:06 +02:00
Tomas Tauber e7befcaaa0
feat(etherscan): account endpoints (#939)
* feat(etherscan): account endpoints

* a more restricted normal transaction response

* doc fix

* extended restricted types to other functions
2022-02-26 16:35:43 +02:00
Matthias Seitz 184cffaca3
fix(abigen/solc): make abigen work with ethers-solc and abiencoderv2 (#952)
* feat(solc): add lossless abi

* fix(abigen): make abigen work with ethers-solc and abiencoderv2

* chore: update CHANGELOG
2022-02-23 12:46:52 +02:00
Alexandre Bazeaud 901d0c6e00
Add missing chains into parse method (#941)
* Add missing chains into parse method

* Update changelog
2022-02-21 18:01:19 +01:00
georgewhewell ce8c671218
Add Ftm multicall addresses (#927)
* add multicall addresses for fantom

* update changelog

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-18 16:05:08 +02:00
Tomas Tauber d5a1570fa2
feat(chain): add Cronos and Cronos testnet (#926) 2022-02-18 16:04:11 +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
Simon Bihel cd8a9b5a97
Add ENS avatar and TXT records resolution (#889)
* Add ENS avatar resolution

As well as arbitrary fields.

* Use try_join

* Improve reqwest's error passing

* Split avatar resolution in ERC token parsing and resolution

* no_run examples

* Rename token to NFT

* A bit more documentation

* Nightly cargo fmt

* Use different ERC-721 test

* Update CHANGELOG

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-16 16:25:41 +02:00
Rohit Narurkar 17d5b0ef38
Chore/update eth keystore (#910)
* chore(signers): bump up eth-keystore

* doc(signers): update doc for new_keystore

* chore: add changelog
2022-02-14 12:08:33 +02:00
Mark Tyneway faba6e014d
feat: add getter to `ProjectCompileOutput` (#908)
* feat: add getter to `ProjectCompileOutput`

Add a function `compiled_contracts_by_compiler_version`
to the `ProjectCompileOutput` that returns a `BTreeMap`
that maps the compiler version to a vector of the contract
names and contract structs.

* changelog: update

* chore(solc): remove &mut

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-13 21:47:00 +02:00
Meet Mangukiya 1f0eb725a7
feat(ethers-core/Chain): make to_string and from_str inverse functions (#903) 2022-02-12 17:41:18 +02:00
Mark Tyneway 100f121202
feat(ethers-contract): add `send_with_receipt` to `Deployer` (#865)
* feat(ethers-contract): add `send_with_receipt` to `Deployer`

The `Deployer` is used to deploy contracts and its `send`
function returns an attached instance of a `Contract`.
There is no way to know the transaction hash of the
deployment transaction, so this commit adds another
method `send_with_receipt` that returns an attached
`Contract` as well as a `TransactionReceipt`.

* changelog: update

* tests: call `send_with_receipt` in tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-05 16:37:09 +02:00
0xTomoyo 75fbec0706
feat(chain): add arbitrum support (#869)
* feat: add arbitrum chainid & block explorer

* chore: update changelog

* feat: add arbitrum to is_legacy

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-02-05 16:36:21 +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
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
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
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
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
Roman Krasiuk a48496000a
fix(solc): flatten replacement target location (#846)
* adjust the end location

* upd changelog
2022-01-31 10:08:04 +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
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
Roman Krasiuk f9b0360d90
fix(solc): flatten duplicates (#813)
* fix solc flatten duplicates

* upd changelog

* sample eof newlines

* fix test name

* linter
2022-01-19 18:11:37 +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 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 11406ee8d4
feat: add EventStream::select to combine multiple event streams (#725)
* feat: add EventStream::select to combine multiple event streams

* chore: update changelog
2021-12-23 21:23:55 +02:00
Matthias Seitz c7cf5bedbd
feat(abigen): add MultiAbigen to generate multiple contract bindings (#724)
* feat(abigen): add MultiAbigen to generate multiple contract bindings

* docs: more docs

* chore: update changelog

* rustmft

* chore: add json extension check
2021-12-23 16:38:07 +02:00
Matthias Seitz 1f4ecc6e75
feat(abigen): add provided derives for call and event enums (#721)
* feat(abigen): add provided derives for call and event enums

* chore: update CHANGELOG
2021-12-20 23:24:21 +02:00
Matthias Seitz 3c164bc9bf
feat(abigen): add EthAbiCodec proc macro (#704)
* feat(abigen): add EthAbiCodec proc macro

* rustfmt

* fix: tuple codec
2021-12-19 16:40:17 +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
James Prestwich 060dd6033d
refactor: move fill_transaction impl to provider rather than default (#697)
* refactor: move fill_transaction impl to provider rather than default

* chore: changelog and docstring for fill_transaction
2021-12-16 01:09:09 +02:00
Georgios Konstantopoulos f037fc0243
fix: do not panic on invalid units conversion (#691)
* fix: do not panic on invalid units conversion

This is done by switching the From implementations to TryFrom and
making the conversion functions return a thiserror Error instead of
the previous Boxed error object

* chore: update changelog
2021-12-15 03:32:29 +01:00
James Prestwich 3338cdead1
feature: set nonce in fill transaction (#687)
* feature: set nonce in fill transaction

* chore: update changelog

* refactor: remove nonce_setting in fill_transaction

* refactor: set nonce in send_escalating
2021-12-14 00:50:13 +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
Ivan Porto Carrero a8b0885c25
add support for polygonscan and snowtrace for abigen (#666) 2021-12-10 09:05:45 -07:00
Nicholas Rodrigues Lordello 7bd42be0d8
Serialize `eth_feeHistory` block count as `QUANTITY` (#668)
* Serialize eth_feeHistory block count as QUANTITY

* update changelog
2021-12-10 08:49:27 -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
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