DaniPopes
da743fc8b2
ci/test: improve CI jobs and tests ( #2189 )
...
* ci: move to scripts directory
* nits
* ci: improve main CI jobs
* fix: install script
* fix
* fix: use curl for windows installation
* fix: wasm typo
* tests: move to single binary
* chore: clippy
* chore: clippy
* chore: clippy
* fix: test command
* fix: quote tests
* update script
* fix: action exclude
* fix: dev deps
* fix: only run wasm in own job
* ci: add aarch64 targets
* test: rm useless test
* ci: update security audit
* ci: add deny CI
* chore: rm unused audit.toml
* chore: update geth.rs
* ci: remove unusable targets
* fix: install script path
* fix: wasm
* improve script
* fix: failing ci
* fix: contract tests
* ci: improve install script
* update middleware tests
* move integration etherscan tests to tests/ dir
* fix: eip2930 access_list field name
* add pendingtransaction must_use
* add random anvil comment
* ci: add miri job
* ci: simplify
* fixci
* Revert "add pendingtransaction must_use"
This reverts commit 770b21b4a3
.
* fix: macos script
* fix: use curl in script
* unused ci
* update script
* fix wasm
* rm_miri
* fix: signer test
* fix: wasm ci
* fix: ipc test
* fix: live celo tests
* fix: abi online source test
* fix: windows paths in test
* chore: update serial_test
* ci: run live tests separately
* fix: provider tests
* fix: unused var
* fix: feature
* fix merge
* fix: etherscan key tests
* ci: rm duplicate audit
* fix: split etherscan test ci
* fix: etherscan test
* fix: generate multiple unused ports
* fix: source test
* fix: udeps
* rm unused
2023-02-28 17:26:27 -07:00
OliverNChalk
34775178f9
feat: deseralize other fields on tx receipts ( #2209 )
2023-02-28 17:22:39 -07:00
Dan Cline
9c09c2d98b
fix(core): set miner.etherbase in clique mode ( #2210 )
...
* fix(core): set miner.etherbase in clique mode
* https://github.com/ethereum/go-ethereum/pull/26413 caused the default
clique configuration for the GethInstance to fail to start, because
we did not pass a `miner.etherbase` flag on startup
* adds a `miner.etherbase` flag with the clique signer address as the
argument
* use format str instead of to_string
* add comment on Debug
* update is_clique comment for miner.etherbase
* fix first etherbase flag
* cargo fmt
2023-02-28 17:21:44 -07:00
James Prestwich
ded611e714
feature: contract revert trait ( #2182 )
...
* feature: contract revert trait
* fix: proper link to abigen in docs
* fix: don't borrow Bytes, better valid_slector
* fix: mattsse's nits
* opt: hardcode selector for Error(string)
* fix: add docstring to RevertString
* docs: enhance docs on ContractRevert
* chore: add doc on decoding error reverts as strings
* docs: more docstring on ContractRevert
* fix: fix try_into invocation
---------
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-28 00:59:32 -07:00
Amean Asad
47b56a65b1
feat: add filecoin chains ( #2177 )
...
* feat: add filecoin chains
* formatting
* fix: add missing match
---------
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-27 16:00:04 -07:00
Dan Cline
537d0a9deb
fix(core): properly parse genesis alloc storage ( #2205 )
...
* fix(core): properly parse genesis alloc storage
* Previously we were not properly parsing the storage field of
GenesisAlloc. The first issue was in using serde(flatten), which is
just incorrect because storage is not encoded flattened. The second
issue was in the parsing of H256 keys and values. Some of the storage
values in hive genesis examples were encoded in less than 64 hex
characters, such as the string `0x12`. This would not succeed normal
H256 parsing.
* Introduce from_unformatted_hex_map to properly deserialize the
storage map.
* Modify existing genesis parsing tests to check parsed storage and
code values against expected values.
* Introduce new genesis parsing test from the hive smoke tests,
checking full struct equality.
* remove unused from_unformatted hex
* make clippy happy
2023-02-27 15:22:01 -07:00
DaniPopes
1861b98896
chore: move etherscan api key env var matching to Chain enum ( #2204 )
...
* fix: mainnet, optimism blocktimes
* chore: move etherscan api key env var matching to Chain enum
* docs: missing exhaustiveness comment
2023-02-27 13:14:36 -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
DaniPopes
f59153ba66
fix(core): i256 docs ( #2187 )
...
* fix(core): i256 docs
* add doc
2023-02-24 16:44:47 -08:00
DaniPopes
7e12f3ba36
feat(core): improve I256 implementation ( #2180 )
...
* feat(core): improve I256 implementation
* chore: reorganize impls
* chore: update docs, add attributes, use Self
* fix: signum
* chore: use inline(always), update implementations
* fix: use usize for shifting, add more shift ops
* feat: make arithmetic ops generic to match U256
* chore: clippy
* chore: return
2023-02-23 16:21:41 -08:00
James Prestwich
2090bf560e
Expose contract revert errors in the ContractError struct ( #2172 )
...
* feature: spelunk for revert errors
* feature: bubble up revert to contract error
* feature: bubble up reverts to multicall
* fix: correctly remove signature when deserializing EthErrors
* chore: remove redundant test
* chore: clippy
* fix: allow empty revert string
* docs: add all missing rustdoc for ethers-contract
* chore: rustfmt
* chore: Changelog
* fix: danipope test comment
2023-02-22 14:52:25 -08:00
James Prestwich
ee5e3e52c0
fmt: run rustfmt ( #2176 )
2023-02-21 16:52:20 -08:00
DaniPopes
e55b8116f3
feat(contract): improve Multicall result handling ( #2164 )
...
* nits
* clippy
* ordering
* move
* chore: edition 2021
* chore: detokenize nit
* feat(contract): improve Multicall result handling
* docs: update CHANGELOG.md
* feat: make fields public
* chore: clippy
2023-02-20 18:50:28 -08:00
DaniPopes
3732de844c
fix(abigen): builtin trait derives ( #2170 )
...
* fix(abigen): builtin trait derives
* refactor: EthDisplay
* feat(derive): improve type detection
* chore: cleanup
* chore: edition 2021
* chore: clippy
* chore: use unreachable
2023-02-20 16:27:43 -08:00
Muhammad Syahrul Nizam
33ed94851c
chore: added canto network ( #2171 )
2023-02-20 13:51:06 -08:00
Dan Cline
228f944726
use Option for CliqueConfig fields ( #2162 )
2023-02-17 12:01:12 -08:00
WillQ
fd83e203b4
feat: add debug for geth default api ( #2140 )
2023-02-15 10:54:58 -08:00
DaniPopes
a69036f07b
fix(core): block FromStr implementation ( #2155 )
2023-02-14 13:15:58 -08:00
Dan Cline
a064657234
fix(core): test hive genesis parsing ( #2145 )
...
* add genesis tests from hive
* add another genesis from hive
* add execution-apis genesis
* add correct u64 hex decoding in GenesisAccount
* use default chainid of 1 without config
* add genesis test field asserts
* use better serde(default) settings
2023-02-13 17:06:57 -08:00
Matthias Seitz
a474a95cc5
chore: use arbiscan urls for arbitrum goerli ( #2127 )
2023-02-10 11:51:32 -08:00
YuFei Wang
14be402f40
feat: add support for Geth built-in tracer and config ( #2121 )
...
* feat: add 4byteTracer
* feat: add prestateTracer
* feat: add noopTracer
* refactor: geth tracer layout
* feat: call tracer config
* fix: compatible with legacy call trace
* feat: pre state tracer config
* test: serialize/deserialize tracer
* refactor: deserialize type
* style: update refs
* chore: update CHANGELOG.md
* style: json string to object
2023-02-07 10:50:44 -08:00
James Prestwich
e5e4da07c5
feature: allow signature to recover typed_data payloads ( #2120 )
...
* feature: allow signature to recover typed_data payloads
* fix: under feature flag and Changelog
* fix: undo accidental doc mangling
2023-02-06 13:27:35 -08:00
Matthias Seitz
0bb6f51082
chore: add convenient from impls ( #2112 )
2023-02-05 17:33:25 -08:00
DaniPopes
cabb15e346
feat(abi): packed encoding ( #2104 )
...
* feat(abi): packed encoding
* clippy
* fix: use least number of bits for int/uint
* docs: update CHANGELOG.md
* fix: doctest
2023-02-04 19:23:27 -08:00
Matthias Seitz
a544d4076c
feat: add DerefMut for OtherFields ( #2109 )
2023-02-02 11:12:52 -08:00
Vid Kersic
7e7f9041b3
feat: add support for js tracer to geth trace, fix different return types ( #2064 )
...
* feat: add support for js tracer to geth trace, fix different return types
* chore: fix clippy
* chore: update geth structs
2023-01-31 09:58:06 -08:00
DaniPopes
9b7d184fd6
feat(core): more type parsing ( #2095 )
...
* feat(core): more type parsing
* c
* doc
2023-01-31 09:37:33 -08:00
DaniPopes
93e1850646
refactor/feat(abigen,types): add bytes::Bytes static methods, refactor struct declaration ( #2089 )
...
* refactor: final struct expansion
* feat(types): implement bytes::Bytes static methods
* feat: use static Bytes for bytecode
* chore: add rustfmt skip directive
* clippy
2023-01-30 12:12:35 -08:00
Matthias Seitz
71c6fd4928
feat: add convenience impl From Log ( #2087 )
2023-01-30 12:06:46 -08:00
Dan Cline
9ebc5b378c
feat(core): expose genesis and private key in Geth ( #2091 )
...
* feat(core): expose genesis and private key in Geth
* expose the genesis and clique_private_key fields in GethInstance
* add tests which initialize geth with clique_private_key, making sure
the genesis and clique_private_key fields are exposed on the
GethInstance
* add clique p2p port test
* refactor tests to clean up properly
2023-01-30 11:57:34 -08:00
Matthias Seitz
ff05a8762b
fix: add getrandom with js feature for wasm ( #2076 )
2023-01-27 13:14:26 -05:00
Dan Cline
e9a808e84f
fix(core): fix geth --init temp dir race condition ( #2068 )
...
* fix(core): fix geth --init temp dir race condition
* previously, if multiple instances of geth were spawned concurrently,
only one directory would be used to populate geth's genesis.json.
this can lead to a race condition where the genesis.json would be
re-written by a second instance, before the first instance reads the
genesis.json for populating its db and genesis block with the geth
--init command. this was possible because directory returned by
std::env::temp_dir() is often shared
* fixes the race condition by using tempfile::tempdir(), which creates
a unique directory per call to tempdir()
* only use tempfile on non-wasm32
2023-01-21 18:13:40 -08:00
Georgios Konstantopoulos
b8fa524e8e
feat(core/geth): enable Clique mode ( #2063 )
...
* feat(core/geth): add method for initing Clique genesis
* feat(core/geth): add Clique mode
this is ported from https://github.com/paradigmxyz/reth/pull/623/files\#diff-99e7bcdfb85c75ffe5fb2ccfbc5fd8234fced6704c34b622fbf24289b8522515R228-R245
* feat(core/geth): disable discovery in clique mode
* examples: add Geth Clique example
2023-01-19 10:49:47 -08:00
Georgios Konstantopoulos
27761d7acc
chore: derive default for enums
2023-01-13 11:07:52 -08:00
Dan Cline
3a01682edf
feat(core): switch shanghaiBlock to shanghaiTime ( #2049 )
...
* geth switched to time-based forking in
https://github.com/ethereum/go-ethereum/pull/25878 , this changes the
name of the `shanghai_block` field to `shanghaiTime` so it is
compatible with geth.
2023-01-13 10:19:25 -08:00
DaniPopes
b4b153a364
perf(utils): avoid unnecessary allocations ( #2046 )
...
* perf(utils): avoid unnecessary allocations
* docs: add more to_checksum information
* docs
* use address
2023-01-11 19:20:35 -08:00
joshieDo
3c65997eae
feat(core): add `strum::EnumIter` and `strum::EnumCount` to `Chain` ( #2043 )
...
* add strum EnumIter and EnumCount to Chain
* clippy
2023-01-11 19:17:46 -08:00
Matthias Seitz
01d3e4310f
feat: support parsing bytecode from evm object ( #2024 )
2023-01-07 16:22:07 +02:00
DaniPopes
2aa7bc3b99
chore(core): alias&export error as ParseChainError ( #2022 )
...
* chore(core): alias&export error as ParseChainError
`pub use TryFromPrimitiveError as ParseChainError`
for backwards compatibility
* fix: comment
* fully alias
2023-01-07 11:14:25 +02:00
Chris Cordle
c684220144
feat: Add arbitrum nova api and chain id 42170 ( #2020 )
...
* Add arbitrum nova api and chain id
* chore: fmt
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-01-06 11:32:54 +02:00
WillQ
4a8a6ad259
abigen adopt hardhat generated bytecode ( #2012 )
...
* abigen adopt hardhat generated bytecode
* update changelog
2023-01-05 11:46:32 +02:00
Dan Cline
c0e607da1e
feat(providers): support personal account apis ( #2009 )
...
* feat(providers): add personal key mgmt rpcs
* add personal_importRawKey and personal_unlockAccount
* expose geth personal api
* do not prefix with 0x
* serialize privkey as string
* add allow-insecure-unlock option to Geth
2023-01-04 23:35:44 +02:00
Dan Cline
9147ee8e63
feat(core): add ability to take geth stderr ( #2010 )
...
* makes the geth logs accessible by using take() on the GethInstance
stderr
2023-01-04 23:31:48 +02:00
Dan Cline
5f2476510b
feat(providers): add mining related apis ( #2008 )
...
* feat(providers): add miner_start endpoint
* add other mining related apis
* add eth_mining
* add miner_stop
* expose Geth miner rpc api
2023-01-04 23:30:03 +02:00
DaniPopes
97582cc346
feat(core, contract): improve `determine_ethers_crates` ( #1988 )
...
* refactor: determine_ethers_crates
* feat: improve crate resolution
* export new types and functions
* export
* fix: file name check
* fix: invert condition and check CARGO_MANIFEST_DIR
* use abigen macro to generate multicall
* chore: rm debug
* rm unnecessary .replace
* chore: clippy
* chore: clippy
* Revert "chore: clippy"
This reverts commit bd220f308d
.
* Revert "chore: clippy"
This reverts commit 5550f4e856
.
* add tests
* better tests, docs
* add another test
* fix docs
* refactor: add an environment struct for determining ethers crates
* fix: use fmt::Debug to escape paths
* docs: rename and rm old docs
* feat: use global path for crates
* fix: docs
* chore: move rand impl to tests mod
2023-01-03 15:11:57 +02:00
Dan Cline
228f9607fe
feat(core): expose all genesis related structs ( #1975 )
2022-12-30 14:48:47 +02:00
Georgios Konstantopoulos
48dbbbd829
chore: clippy
2022-12-30 14:18:58 +02:00
Vid Kersic
b27c7b0773
feat: debug_traceCall ( #1949 )
...
* feat: debug_traceCall
* chore: update changelog
* fix: rebase to master and change tracer from string to enum
2022-12-25 13:33:05 +02:00
DaniPopes
e007ea01b1
feat(core): chain macros and impls ( #1958 )
2022-12-22 14:44:51 +02:00
Dan Cline
6efa7ca85f
fix(core): decode to correctly in Transaction ( #1946 )
...
* would not correctly decode a create transaction because 0x80 was not
properly decoded
2022-12-18 13:40:43 +02:00