-
Notifications
You must be signed in to change notification settings - Fork 795
feat(core): add helpers to unwrap TypedTransaction
#1278
Conversation
TypedTransaction
@@ -398,6 +401,143 @@ impl From<&Transaction> for TypedTransaction { | |||
} | |||
} | |||
|
|||
impl TypedTransaction { | |||
#[allow(dead_code)] | |||
fn as_legacy_ref(&self) -> Result<&TransactionRequest, TypedTransactionError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all private, and marked as dead?
I think they should rather return a simple Option<>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
} | ||
|
||
impl TypedTransaction { | ||
fn as_legacy(&self) -> TransactionRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we basically clone every field, I think we should take ownership here so the caller can decide if a clone is necessary, otherwise, converting always requires a clone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah seems like we should not have as_*
methods then, let's remove them and replace with into_*
} | ||
|
||
impl TypedTransaction { | ||
fn as_legacy(&self) -> TransactionRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah seems like we should not have as_*
methods then, let's remove them and replace with into_*
f6bb408
to
a38062e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gg
commit 4c75e4a Author: Georgios Konstantopoulos <[email protected]> Date: Wed May 18 13:40:56 2022 -0700 test: expose test provider url commit 96391a0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed May 18 07:49:40 2022 -0700 chore(deps): bump syn from 1.0.94 to 1.0.95 (gakonst#1280) Bumps [syn](https://github.com/dtolnay/syn) from 1.0.94 to 1.0.95. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](dtolnay/syn@1.0.94...1.0.95) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7509e42 Author: Matthias Seitz <[email protected]> Date: Wed May 18 16:49:32 2022 +0200 fix: serialize eth_getStorageAt position param as quantity (gakonst#1281) * fix: serialize eth_getStorageAt position param as quantity * test: add quantity test commit d77f925 Author: Matthias Seitz <[email protected]> Date: Wed May 18 16:49:08 2022 +0200 chore: bump latest solc release (gakonst#1282) commit f5ea2bd Author: joshieDo <[email protected]> Date: Wed May 18 00:50:14 2022 +0200 feat(core): add helpers to unwrap `TypedTransaction` (gakonst#1278) * add different helpers for type transactions * remove as_() on TypedTransaction * specify into_eip2930 when it matches a legacy tx * remove unused error type * specify into_legacy when it matches an eip2930 tx commit 991d538 Author: Tomas Tauber <[email protected]> Date: Wed May 18 01:57:48 2022 +0800 feat(etherscan): added Cronos testnet (gakonst#1276) commit 082f2c8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue May 17 10:57:30 2022 -0700 chore(deps): bump proc-macro2 from 1.0.38 to 1.0.39 (gakonst#1275) Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.38 to 1.0.39. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](dtolnay/proc-macro2@1.0.38...1.0.39) --- updated-dependencies: - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 4047613 Author: Matthias Seitz <[email protected]> Date: Tue May 17 19:26:51 2022 +0200 fix(solc): follow symlinks in source files (gakonst#1277) commit 1271308 Author: Matthias Seitz <[email protected]> Date: Tue May 17 01:48:47 2022 +0200 fix(solc): purge obsolete cached artifacts (gakonst#1273) * fix(solc): purge obsolete cached artifacts * fix add cfg commit 75ba3f4 Author: oblique <[email protected]> Date: Tue May 17 00:10:02 2022 +0300 fix(core): On pending block `miner` field is always `null` (gakonst#1272) * fix(core): On pending block `miner` field is always `null` * Fix formatting commit 83dc3e2 Author: Georgios Konstantopoulos <[email protected]> Date: Mon May 16 12:33:38 2022 -0700 chore: fmt commit ceafcb2 Author: Shawn Harmsen <[email protected]> Date: Tue May 17 04:28:35 2022 +0900 fix: unify name of supported chains with strum (gakonst#1249) * add strum * update strum version * whitespace * revert strum * using strum EnumVariantNames * fix strum serialize kebab case and edge cases commit d7b9c59 Author: Meet Mangukiya <[email protected]> Date: Mon May 16 22:58:53 2022 +0530 fix(ethers-solc/ConfigurableArtifacts): output methodIdentifiers by default (gakonst#1266) Related foundry-rs/foundry#1497 commit adaa82a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 16 10:21:33 2022 -0700 chore(deps): bump rayon from 1.5.2 to 1.5.3 (gakonst#1269) Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/rayon-rs/rayon/releases) - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](rayon-rs/rayon@v1.5.2...v1.5.3) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 6053c92 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 16 10:21:27 2022 -0700 chore(deps): bump tokio-util from 0.7.1 to 0.7.2 (gakonst#1270) Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.1 to 0.7.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-util-0.7.1...tokio-util-0.7.2) --- updated-dependencies: - dependency-name: tokio-util dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7afae38 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 16 10:11:10 2022 -0700 chore(deps): bump syn from 1.0.93 to 1.0.94 (gakonst#1271) Bumps [syn](https://github.com/dtolnay/syn) from 1.0.93 to 1.0.94. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](dtolnay/syn@1.0.93...1.0.94) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit b15d0f8 Author: Meet Mangukiya <[email protected]> Date: Mon May 16 20:41:25 2022 +0530 feat(providers): load previous logs before subscribing (gakonst#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 gakonst#988 * docs: add subscribe_logs example * fix clippy errors * refactor: use VecDeque and address review commit 3df1527 Author: oliver-giersch <[email protected]> Date: Sun May 15 01:31:40 2022 +0200 fix: all request ids start at 1 (gakonst#1265) Co-authored-by: Oliver Giersch <[email protected]> commit f3699d0 Author: Roman Krasiuk <[email protected]> Date: Sun May 15 02:29:45 2022 +0300 fix(solc): add `RuntimeOrHandle` & fix solc blocking installation (gakonst#1260) * rt wrapper for solc install * fix * uncomment feat flag * feature deps & comment * async it tests * use svm::block_install for wasm * hide rt or handle for wasm * hide import for wasm commit eb94e53 Author: Leo <[email protected]> Date: Fri May 13 22:29:13 2022 +0200 Add basic solc model checker options (gakonst#1258) * Add basic solc model checker options * Changelog entry * review 1 * chore: fmt Co-authored-by: Georgios Konstantopoulos <[email protected]> commit b21d7b2 Author: Georgios Konstantopoulos <[email protected]> Date: Fri May 13 13:22:35 2022 -0700 chore(addressbook): add metadata for release commit 6d5bebd Author: Meet Mangukiya <[email protected]> Date: Sat May 14 01:40:05 2022 +0530 Release process and CI (gakonst#1240) * Fix the crate versions * release.toml: add cargo-release config * CONTRIBUTING.md: Update Releasing section * feat: add release github workflow * feat: generate CHANGELOGs and create github releases in CI commit 135bca4 Author: Roman Krasiuk <[email protected]> Date: Fri May 13 22:59:47 2022 +0300 update & lock solang (gakonst#1256) commit 94cf8a8 Author: Matthias Seitz <[email protected]> Date: Fri May 13 21:56:14 2022 +0200 feat: add eip-1898 deserialize for BlockId (gakonst#1257) commit f5efbbb Author: Matthias Seitz <[email protected]> Date: Thu May 12 23:48:16 2022 +0200 feat(solc): add strip and join functions to sources and contracts (gakonst#1252) commit 494af08 Author: Matthias Seitz <[email protected]> Date: Thu May 12 23:47:45 2022 +0200 feat(solc): add source map access functions (gakonst#1253) commit 1e2b029 Author: Bjerg <[email protected]> Date: Thu May 12 23:47:38 2022 +0200 fix: make ast node ids optional (gakonst#1254) commit 4ba8adf Author: Remco Bloemen <[email protected]> Date: Wed May 11 10:19:02 2022 -0700 Add Block::time (gakonst#1250) * Add Block::time * Doc fixes commit 98fc8c8 Author: Remco Bloemen <[email protected]> Date: Wed May 11 07:35:30 2022 -0700 impl TryFrom<U256> for Chain (gakonst#1247) commit 847110a Author: Matthias Seitz <[email protected]> Date: Wed May 11 16:34:41 2022 +0200 fix: filter out empty bytecode (gakonst#1248) commit 0a03141 Author: Bjerg <[email protected]> Date: Tue May 10 19:43:22 2022 +0200 feat: remaining AST nodes (gakonst#1201) * feat: remaining AST nodes * docs: few rustdocs * feat: add more node fields * feat: add more ast nodes * fix: actually deserialize node type Note: This breaks `NodeType::Other` :/ commit ab8ec1f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue May 10 08:31:55 2022 -0700 chore(deps): bump syn from 1.0.92 to 1.0.93 (gakonst#1244) Bumps [syn](https://github.com/dtolnay/syn) from 1.0.92 to 1.0.93. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](dtolnay/syn@1.0.92...1.0.93) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7a6919a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue May 10 08:31:49 2022 -0700 chore(deps): bump unicode-xid from 0.2.2 to 0.2.3 (gakonst#1243) Bumps [unicode-xid](https://github.com/unicode-rs/unicode-xid) from 0.2.2 to 0.2.3. - [Release notes](https://github.com/unicode-rs/unicode-xid/releases) - [Commits](https://github.com/unicode-rs/unicode-xid/commits) --- updated-dependencies: - dependency-name: unicode-xid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 0926ead Author: Tomas Tauber <[email protected]> Date: Tue May 10 23:31:28 2022 +0800 fix(core): removed Cronos mainnet beta from `is_legacy` (gakonst#1246) it now supports EIP1559 after the network upgrade at the height 2693800 commit 790550c Author: Matthias Seitz <[email protected]> Date: Mon May 9 19:46:43 2022 +0200 feat(abi): add human readable tokenizer and parser (gakonst#1234) * feat(abi): add human readable tokenizer and parser * feat(abi): support nested tuples commit dc199f3 Author: Roman Krasiuk <[email protected]> Date: Mon May 9 20:44:32 2022 +0300 feat(etherscan): lookup solc build metadata (gakonst#1242) * lookup solc version build meta * accept Version as an arg * add docs * remove redundant lifetime * rm regex commit c3c08e2 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 9 09:29:02 2022 -0700 chore(deps): bump proc-macro2 from 1.0.37 to 1.0.38 (gakonst#1237) Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.37 to 1.0.38. - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](dtolnay/proc-macro2@1.0.37...1.0.38) --- updated-dependencies: - dependency-name: proc-macro2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 2ba786c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 9 09:28:55 2022 -0700 chore(deps): bump spki from 0.5.4 to 0.6.0 (gakonst#1238) Bumps [spki](https://github.com/RustCrypto/formats) from 0.5.4 to 0.6.0. - [Release notes](https://github.com/RustCrypto/formats/releases) - [Commits](RustCrypto/formats@spki/v0.5.4...spki/v0.6.0) --- updated-dependencies: - dependency-name: spki dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 4b462e6 Author: Matthias Seitz <[email protected]> Date: Mon May 9 18:26:36 2022 +0200 test(abigen): ensure structs in events work (gakonst#1235) * test(abigen): ensure structs in events work * chore: rename vars * chore: use ganache chain id * chore: disable ganache test on celo commit fd994d7 Author: Matthias Seitz <[email protected]> Date: Sat May 7 18:31:53 2022 +0200 feat(abigen): support overloaded events (gakonst#1233) * feat(abigen): support overloaded events * chore: update CHANGELOG commit 44cbbc7 Author: Matthias Seitz <[email protected]> Date: Fri May 6 20:42:01 2022 +0200 feat(solc): store source files with their solc version (gakonst#1231) * feat(solc): add versioned sources * feat(solc): support versioned sources commit c7765e1 Author: Matthias Seitz <[email protected]> Date: Fri May 6 20:34:09 2022 +0200 feat(etherscan): add moonbeam urls (gakonst#1232) commit 18b4ef4 Author: Remco Bloemen <[email protected]> Date: Fri May 6 08:16:43 2022 -0700 Robust gas oracles (gakonst#1222) * Pass reqwest Client to constructors * Add Median oracle aggregator * DRY * Weighted median * Add cache layer * Simplify lifetimes * Add with_client constructors * Update GasNow urls * Add u256_from_f64_saturating * Add polygon oracle * Fixes * Fix lints * Remove dbg statements commit ce3ebae Author: Matthias Seitz <[email protected]> Date: Fri May 6 17:15:49 2022 +0200 chore(clippy): make clippy happy (gakonst#1230) commit 2768a6b Author: Matthias Seitz <[email protected]> Date: Thu May 5 16:47:52 2022 +0200 feat(solc): add missing options for configurable artifact (gakonst#1223) commit f5c5468 Author: inconspicuous99 <[email protected]> Date: Thu May 5 09:40:48 2022 -0500 Add: Make Ganache Startup Timeout *Configurable*. (gakonst#1224) * Add: Configurable Ganache Startup TImeout * fix lint, add docs. commit 16e1707 Author: Matthias Seitz <[email protected]> Date: Thu May 5 16:31:52 2022 +0200 fix(solc): respect auto detection in additional compile functions (gakonst#1226) commit 67e3480 Author: Matthias Seitz <[email protected]> Date: Thu May 5 16:31:26 2022 +0200 chore(core): update moonbeam url (gakonst#1228) commit c70cd81 Author: James Prestwich <[email protected]> Date: Thu May 5 07:22:47 2022 -0700 feature: pending transaction retries repeatedly before assuming dropped (gakonst#1221) commit bc95879 Author: Matthias Seitz <[email protected]> Date: Thu May 5 16:21:51 2022 +0200 perf: short circuit remapping detection on recursive symlink (gakonst#1225) commit a656830 Author: Roman Krasiuk <[email protected]> Date: Wed May 4 08:33:25 2022 +0300 fix(solc): flatten import aliases (gakonst#1192) * import aliases * fix solang alias parsing * fix token replacement * minor * remove log * remove log * address pr comments * rollback commit b34c034 Author: Matthias Seitz <[email protected]> Date: Wed May 4 01:40:41 2022 +0200 chore(etherscan): update VerifyArgs (gakonst#1212) commit 2304ed5 Author: Matthias Seitz <[email protected]> Date: Wed May 4 01:39:36 2022 +0200 fix(solc): make scoped reporter work in parallel (gakonst#1214) * fix(solc): make scoped reporter work in parallel * typo commit c8c81b4 Author: Matthias Seitz <[email protected]> Date: Wed May 4 01:38:17 2022 +0200 feat(solc): support logging multiple files via io logger (gakonst#1216) commit e7e5abc Author: Matthias Seitz <[email protected]> Date: Tue May 3 07:51:28 2022 +0200 fix(solc): ensure std json sources are unique (gakonst#1210) commit f074f3d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 2 22:51:03 2022 -0700 chore(deps): bump semver from 1.0.7 to 1.0.9 (gakonst#1211) Bumps [semver](https://github.com/dtolnay/semver) from 1.0.7 to 1.0.9. - [Release notes](https://github.com/dtolnay/semver/releases) - [Commits](dtolnay/semver@1.0.7...1.0.9) --- updated-dependencies: - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f5de81e Author: Georgios Konstantopoulos <[email protected]> Date: Mon May 2 22:47:42 2022 +0300 chore: fix typo in provider readme supersedes gakonst#1203 commit b0d33a7 Author: Georgios Konstantopoulos <[email protected]> Date: Mon May 2 22:36:09 2022 +0300 chore: bump rusoto-kms/core commit 25834c7 Author: Georgios Konstantopoulos <[email protected]> Date: Mon May 2 22:35:41 2022 +0300 fix: pass tx with chain by ref commit 5e5d17f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 2 12:34:06 2022 -0700 chore(deps): bump async from 2.6.3 to 2.6.4 in /examples/ethers-wasm (gakonst#1196) Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](caolan/async@v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit fcc2151 Author: Astronaut Sleuth <[email protected]> Date: Tue May 3 03:33:55 2022 +0800 update document to enable ws & rustls / openssl if user wants to use websockets (gakonst#1197) commit 4d24acd Author: CyMule <[email protected]> Date: Mon May 2 15:33:33 2022 -0400 Adds From<H160> trait to ValueOrArray<H160> (gakonst#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: gakonst#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: gakonst#1199 commit c44872f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon May 2 11:54:22 2022 -0700 chore(deps): bump thiserror from 1.0.30 to 1.0.31 (gakonst#1206) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.30 to 1.0.31. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](dtolnay/thiserror@1.0.30...1.0.31) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit ab80665 Author: Astronaut Sleuth <[email protected]> Date: Tue May 3 02:53:20 2022 +0800 fixed typo when determining to token address (gakonst#1208) commit da38083 Author: Max <[email protected]> Date: Tue May 3 01:53:11 2022 +0700 Fix: Ledger should have correct signature v value for chains with large chain ID (gakonst#1204) * fix: Ledger should have correct signature v value * format code Co-authored-by: Georgios Konstantopoulos <[email protected]> commit d5de795 Author: Dan Cline <[email protected]> Date: Mon May 2 14:51:25 2022 -0400 Use EIP155 for all signers with empty transaction `chain_id` (gakonst#1198) * remove error when signing with a different chain - a chain_id mismatch between the signer and the transaction is valid since the behavior is the same between two signers with different chain ids - a specified chain_id should be signed regardless of the chain_id of the signer - refactor `sign_hash` to no longer take an `eip155` flag - it now _just_ signs hashes. EIP155 is specific to transactions, so we now normalize the `v` value in `sign_transaction_sync` * use signer chain_id for tx in trezor signer - use the trezor signer's chain_id if the transaction's chain_id doesn't exist - sets the chain_id in both `sign_tx` and the Signer implementation's `sign_transaction` * use signer chain_id for tx in ledger signer - use the ledger signer's chain_id if the transaction's chain_id doesn't exist - sets the chain_id in both `sign_tx` and the Signer implementation's `sign_transaction` * prefer transaction chain_id in aws signer - uses the signer chain_id if the transaction chain_id doesn't exist - refactor `sign_digest_with_eip155` to take an input chain_id, so the signer chain_id is not used every time. If we want to enforce transaction and signer chain ids to be consistent, this should be undone * add private key signing test for an empty chain_id * Apply suggestions from code review Co-authored-by: Matthias Seitz <[email protected]> * Update ethers-signers/src/ledger/mod.rs Co-authored-by: Georgios Konstantopoulos <[email protected]> Co-authored-by: Matthias Seitz <[email protected]> commit 81e7fea Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 29 04:26:24 2022 -0700 chore(deps): bump syn from 1.0.91 to 1.0.92 (gakonst#1194) Bumps [syn](https://github.com/dtolnay/syn) from 1.0.91 to 1.0.92. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](dtolnay/syn@1.0.91...1.0.92) --- updated-dependencies: - dependency-name: syn dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit c686135 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Apr 29 04:25:59 2022 -0700 chore(deps): bump http from 0.2.6 to 0.2.7 (gakonst#1195) Bumps [http](https://github.com/hyperium/http) from 0.2.6 to 0.2.7. - [Release notes](https://github.com/hyperium/http/releases) - [Changelog](https://github.com/hyperium/http/blob/master/CHANGELOG.md) - [Commits](hyperium/http@v0.2.6...v0.2.7) --- updated-dependencies: - dependency-name: http dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 281913b Author: Matthias Seitz <[email protected]> Date: Fri Apr 29 13:25:52 2022 +0200 feat(etherscan): add ClientBuilder type (gakonst#1193) * style: clean up order * feat(etherscan): add client builder * fix: set correct field commit c81254a Author: Matthias Seitz <[email protected]> Date: Thu Apr 28 16:07:08 2022 +0200 test(solc): add another link with remapping test (gakonst#1191) commit a978bc9 Author: Matthias Seitz <[email protected]> Date: Thu Apr 28 14:18:24 2022 +0200 fix(solc): remapping aware libraries (gakonst#1190) * feat(solc): add Libraries type * feat: add lib applied remappings * test: add lib linking tests * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <[email protected]> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <[email protected]> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <[email protected]> * Update ethers-solc/src/artifacts/mod.rs Co-authored-by: Georgios Konstantopoulos <[email protected]> * chore: rustfmt Co-authored-by: Georgios Konstantopoulos <[email protected]> commit 19f7a93 Author: Matthias Seitz <[email protected]> Date: Wed Apr 27 20:46:06 2022 +0200 feat(core): add block conversion helpers (gakonst#1186) * feat: add full to sparse block conversion * feat: add sparse to full block conversion commit 5de7086 Author: Matthias Seitz <[email protected]> Date: Wed Apr 27 20:27:54 2022 +0200 fix(solc): use correct empty output selection (gakonst#1185) commit 82d5741 Author: Josh Stevens <[email protected]> Date: Wed Apr 27 13:40:59 2022 +0100 fix: add to and from into the transaction receipt to follow spec (gakonst#1184) * fix: add to and from into the transaction receipt to follow spec * update changelog commit 3d9fc21 Author: Dan Cline <[email protected]> Date: Wed Apr 27 08:39:59 2022 -0400 fix(core): decode `from` field for typed transactions (gakonst#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 commit 8afd670 Author: Matthias Seitz <[email protected]> Date: Wed Apr 27 14:37:40 2022 +0200 chore(solc): remove async feature requirement (gakonst#1181) commit a0f41c5 Author: joshieDo <[email protected]> Date: Wed Apr 27 16:37:09 2022 +0400 fix(solc): when compiler-out metadata is empty and there's no `internalType` (gakonst#1182) * add another compiler-out with fixes * update changelog commit 6faceb2 Author: oblique <[email protected]> Date: Wed Apr 27 15:33:22 2022 +0300 feat: Relax `Clone` requirements when `Arc<M>` is used (gakonst#1183) `#[derive(Clone)]` was implementing `Clone` only if `M` was `Clone`, however because of `Arc<M>` this can be relaxed. commit 86908bc Author: Matthias Seitz <[email protected]> Date: Wed Apr 27 14:29:09 2022 +0200 fix(solc): only write cache file if build was successful (gakonst#1177) commit a866cd5 Author: georgewhewell <[email protected]> Date: Mon Apr 25 17:50:55 2022 +0200 feat: blocknative gas oracle (gakonst#1175) * gas oracle: add more error variants * gas oracle: adds BlockNative oracle * pdate changelog commit 9d53c73 Author: Nicolas Gailly <[email protected]> Date: Sun Apr 24 15:10:21 2022 +0100 Update event.rs (gakonst#1173) commit a115e95 Author: oliver-giersch <[email protected]> Date: Sun Apr 24 16:09:56 2022 +0200 refactors ipc transport internals (gakonst#1174) * refactors ipc transport internals ran cargo +nightly fmt fixes typo remove some commented out code * remove one unnecessary return stmt Co-authored-by: Oliver Giersch <[email protected]> Co-authored-by: Oliver Giersch <[email protected]> commit 77bd9d4 Author: Matthias Seitz <[email protected]> Date: Sat Apr 23 12:09:29 2022 +0200 test: add ethcall derive test for vec tuples (gakonst#1144) commit 8dd7272 Author: Matthias Seitz <[email protected]> Date: Sat Apr 23 11:20:46 2022 +0200 feat: add minimal ast bindings (gakonst#1167) * feat: add minimal ast bindings * feat: add recursive nodes commit 6fcde37 Author: Bjerg <[email protected]> Date: Sat Apr 23 10:48:39 2022 +0200 feat: function debug data in extra output (gakonst#1165) * feat: support function debug data in output * chore: `ConfigurableArtifacts::output_selection` * chore: lint commit 2b2ec11 Author: Matthias Seitz <[email protected]> Date: Sat Apr 23 10:42:12 2022 +0200 fix: proper fantom api urls (gakonst#1170) * fix: proper fantom api urls * Update ethers-etherscan/Cargo.toml Co-authored-by: Georgios Konstantopoulos <[email protected]> * chore: remove dbg Co-authored-by: Georgios Konstantopoulos <[email protected]> commit f4eb402 Author: Matthias Seitz <[email protected]> Date: Sat Apr 23 10:41:13 2022 +0200 chore(solc): include error code in diagnostic (gakonst#1171) commit 1cba287 Author: YYY <[email protected]> Date: Sat Apr 23 16:40:34 2022 +0800 solc: adjust flatten format (gakonst#1172) commit 8444b8e Author: Bjerg <[email protected]> Date: Sat Apr 23 10:40:25 2022 +0200 feat: abi as an extra file (gakonst#1166) commit 1b04465 Author: Rohit Narurkar <[email protected]> Date: Sat Apr 23 10:40:01 2022 +0200 chore(core): derive default for log (gakonst#1168) commit ac3e12f Author: Matthias Seitz <[email protected]> Date: Sat Apr 23 10:39:31 2022 +0200 feat: add standardjson compiler input type (gakonst#1169) commit 35c29c8 Author: Matthias Seitz <[email protected]> Date: Thu Apr 21 19:30:02 2022 +0200 chore: silence unused warnings (gakonst#1162) commit 9047f96 Author: Matthias Seitz <[email protected]> Date: Thu Apr 21 19:29:40 2022 +0200 feat: make stream mod public (gakonst#1160) commit 92b1ad8 Author: Matthias Seitz <[email protected]> Date: Thu Apr 21 19:29:21 2022 +0200 feat: add debug info bindings (gakonst#1161) commit 20f7ac2 Author: Devan Non <[email protected]> Date: Thu Apr 21 19:23:51 2022 +0200 Cleanup of links and requirements in README (gakonst#1163) * chore: remove broken link and old unused test * chore: add solc version required and geth requirement for tests commit 48e2920 Author: Matthias Seitz <[email protected]> Date: Thu Apr 21 19:22:52 2022 +0200 feat: add anvil bindings (gakonst#1164) commit 969d4e0 Author: Matthias Seitz <[email protected]> Date: Thu Apr 21 17:05:23 2022 +0200 feat: accept different middlewares for contract connect (gakonst#1159)
Motivation
ref: foundry-rs/foundry#1208 (comment)
Helpers to unwrap
TypedTransaction
into whichever type the user requires.Solution
PR Checklist