* Parsing U256 from base10_parse::<u64>() instead of directly to U256
This fixes a bug for chain_ids that are > 10, base10_parse::<U256>() was
somehow parsing into hex.
When using the derive macro, chain_id = 10 was parsed as chain_id = 0x10 = 16,
causing an issue for some chains like Polygon.
* chore: fmt
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
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.
* feat(chain): map Chain enum to values
* feat(chain): support TryFrom<u64>
* chore: use parsechain error for the try_from impl
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* feat: macro and token (simplest form)
* fix: better structure to fetch token by string symbol
* chore: add tokenlist to prelude
* fix: from current dir
* fix: dir refactoring
* fix: clippy
* chore: refactor tokenlist to addressbook
* 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
* feat(etherscan, middleware): implement gas-related endpoints and use them in gas oracle
* cleanup deps
* better comment
* revertme: add debug print
* Revert "revertme: add debug print"
This reverts commit 63993642c4.
* make etherscan tests serial
* run each etherscan test at least 200ms
* 200ms -> 250ms
* Revert "200ms -> 250ms"
This reverts commit 29c7f6ed9a.
* add separate etherscan key for celo tests
* 200ms -> 250ms
* add Chain::Sepolia to match
* fix: unit8 encoding
* feat: use ethers::types::Bytes for solidity bytes type
* feat: add const generic from impls
* fix: failing tests
* fix: make compatible with bytes
* update changelog
* make compatible with encoding changes
* chore rm write to file
* feat(ethers-solc): deserialize bytecode as bytes
* feat(ethers-solc): add method to fetch compact contract
* feat(ethers-solc): use Abi type instead of Vec<serde_json::Value>
* test(contract): use new Solc bindings
* test(middleware): use new Solc bindings
* chore: remove solc from ethers-core
* chore: remove concurrent setup code from ethers-core
* feat(ethers-solc): add ArtifactOutput::Nothing as a no-op artifact logger
* feat: add ethers-solc to top level crate
* examples: use new solc building pattern
* chore(solc): re-use opt str impl for error code decoding
* fix abigen example
* chore: fix doctests
* chore: remove setup feature
* fix: decode string to bytes correctly
* chore: clippy lints
* feat: use const generics for array tokenize
* feat: add abi encode decode impls
* test: add some tests
* chore: move abi codec to core
* update changelog
* fix: ensure gas estimation includes the access list in 1559/2930 txs
* feat: add gas_price to typed tx
* feat: add access list to typed tx
* chore(providers): cleanup fill_transaction
* chore: fmt
* chore: enable 712 on ethers-contract at top level crate
* fix: do not error if eth_createAccessList is not available
* feat: only use access list if needed
* fix: do not sort event variants
* style: use deref over clone
* style: refactor some stuff
* feat: add ethcall trait
* feat: include in abigen
* feat: add bare bones eth call derive
* feat: impl EthCall derive
* feat: support enums
* feat: use abigen enum derive
* fix: concrete abi and map errors
* test: first call test
* rustfmt
* chore: use correct trait name on error
* feat: derive display for call structs
* feat: add from conversion
* test: add convert test
* chore: docs and test
* chore: update changelog
* cargo fix
* feat: add unit type derive support and more test
* chore: patch ethabi
* chore: rm ethabi patch
* feat: add encode/decode trait impls
* style: use AsRef<[u8]>
* Update ethers-contract/ethers-contract-abigen/src/contract/methods.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* style: reindent macro body
* test: add tuple event test
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>