Commit Graph

75 Commits

Author SHA1 Message Date
Alejandro Banzas 50c7ff1d8e
adding chiado support (#1811) 2022-10-31 09:01:34 -07:00
Matthias Seitz 676f039230
chore(clippy): make clippy happy (#1778) 2022-10-11 10:49:05 -07:00
DaniPopes d2c9db5ae9
fix(core, etherscan): RawAbi and Abi (#1757) 2022-09-29 11:15:04 -07:00
DaniPopes 62beb6cf53
feat(etherscan): parse SourceCode field (#1747)
* wip

* feat(etherscan): parse SourceCode field

* feat: add project builder method

* chore: dependencies

* docs

* refactor: impls

* refactor: create verify submodule

* refactor: use untagged enum

* test: add more assertions

* docs

* feat: add more utility methods

* feat: deserialize ABI and improve SourceCode deserialization

* fix: lookup_compiler_version

* refactor: source tree methods

* docs

* chore: add solc feature

* fix: test

* chore: use only optional dependency

* chore: re-add dev-dependency
2022-09-29 08:07:50 -07:00
Matthias Seitz d655d22125
feat: add arbitrum-goerli (#1734) 2022-09-24 12:39:35 -07:00
Matthias Seitz fa55ee8c3f
chore: add cloudflare test case (#1721) 2022-09-19 10:51:24 -07:00
Matthias Seitz 63f1742357
feat(etherscan): add blocked by cloudflare error (#1703) 2022-09-15 12:44:52 -07:00
Matthias Seitz 6b4007f619
chore(etherscan): log response data on error (#1698) 2022-09-14 09:43:10 -07:00
Matthias Seitz 6a86d4ff22
chore(clippy): make clippy happy (#1659) 2022-09-04 10:57:52 -07:00
Danilo Tuler ea8bcd11be
feat: add support for Optimism Goerli (#1641) 2022-08-30 09:45:43 -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
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
Bjerg 92b51b6d9f
fix: sanitize absolute paths from etherscan (#1603) 2022-08-17 14:15:00 -07:00
Matthias Seitz 1af17deeb5
feat(etherscan): add invalid api key error type (#1600) 2022-08-15 10:30:30 -07:00
Matthias Seitz 8105d8be9b
chore(etherscan): add set cache helper (#1589) 2022-08-11 16:43:46 -07:00
Matthias Seitz 922b23fad6
feat: add etherscan urls function (#1582) 2022-08-09 14:50:18 -07:00
Matthias Seitz 45f8c2e9ae
chore: add aurora etherscan endpoints (#1572) 2022-08-08 10:30:23 -07:00
Matthias Seitz c75608eda1
ci: rm pinned nightly (#1541)
* ci: rm pinned nightly

* chore(clippy): make clippy happy
2022-07-31 19:00:31 -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
Matthias Seitz 81a2a5ed68
fix(etherscan): support stringified numbers in response (#1524)
* fix(etherscan): support stringified numbers in response

* feat: add helper function

* improve string parsing

* chore(clippy): make clippy happy
2022-07-28 11:06:56 -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
Matthias Seitz 12292dd920
test: add avalanche test (#1494) 2022-07-24 03:19:19 +02:00
sea-edge 7566c3d71e
For fix test code, Added morden to chainid as a Mock-like value. (#1472) 2022-07-10 14:28:39 -07:00
sea-edge d12c98d0cc
feat: add Sepolia endpoint (#1467)
- https://docs.etherscan.io/getting-started/endpoint-urls
2022-07-09 15:20:14 -07:00
Matthias Seitz 1ce2310874
feat: add evmos support (#1398) 2022-06-22 13:09:05 -04:00
Matthias Seitz c2f5a87b63
chore: add moonbase chain id (#1397) 2022-06-21 13:44:42 -04:00
Matthias Seitz 0abc3ca39a
feat: add anvil hardhat chain id (#1356)
* feat: add anvil hardhat chain id

* chore: cover anvil hh
2022-06-08 03:29:00 -07:00
Roman Krasiuk f4712fa47c
feat(etherscan): additional chain apis (#1343)
* xdai

* sokol

* poa & rsk

* oasis chains

* fix test

* test
2022-06-03 09:16:35 -07:00
Matthias Seitz 89bc6420bb
test: replace ganache with anvil (#1286)
* ci: install anvil

* test: use anvil instead of ganache

* ci: fix anvil ver

* ci: re-enable example tests

* test: remove unnecessary assertions

* test: enable anvil launch test

* docs: typo

* test: fix anvil chain id

* ci: install ganache

Ganache is needed for the Ganache tests

* chore: remove legacy feature from some examples

* ci: correctly build examples

* test: use correct account balance for anvil

* chore: remove sub_id == 1 check

this was only possible in ganache because it gives serial
sub ids, but in every other reasonable client the ids are generated
randomly, so we cannot test for its value

* test: ensure txs are different

There is a bug in Ganache's mempool which accepts duplicate transactions (here with the same nonce), whereas here we pre-set all the nonces so that they end up having a different transaction hash.

* test: ignore ganache tests

* fix: terzor api changes

* ci(examples): install Anvil, remove geth/ganache

* test(provider): Anvil instead of Geth

some tests start to fail now

* fix: revert usage of Anvil in ipc tests

Anvil does not support IPC yet

* fix: update examples script

* ci: use anvil for wasm example

* replace last ganache usage

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-06-01 08:22:39 -07:00
Tomas Tauber 991d538bd0
feat(etherscan): added Cronos testnet (#1276) 2022-05-17 10:57:48 -07:00
Roman Krasiuk dc199f3b75
feat(etherscan): lookup solc build metadata (#1242)
* lookup solc version build meta

* accept Version as an arg

* add docs

* remove redundant lifetime

* rm regex
2022-05-09 10:44:32 -07:00
Matthias Seitz c7765e1721
feat(etherscan): add moonbeam urls (#1232) 2022-05-06 11:34:09 -07:00
Matthias Seitz ce3ebaefa0
chore(clippy): make clippy happy (#1230) 2022-05-06 08:15:49 -07:00
Matthias Seitz b34c034bc4
chore(etherscan): update VerifyArgs (#1212) 2022-05-03 16:40:41 -07:00
Matthias Seitz 281913b187
feat(etherscan): add ClientBuilder type (#1193)
* style: clean up order

* feat(etherscan): add client builder

* fix: set correct field
2022-04-29 04:25:52 -07:00
Matthias Seitz 2b2ec1101a
fix: proper fantom api urls (#1170)
* fix: proper fantom api urls

* Update ethers-etherscan/Cargo.toml

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* chore: remove dbg

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-04-23 01:42:12 -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
pyk 247f08f1a9
feat(solc): Add standard-json-input (#1126)
* Add standard-json-input

* remove debugging

* Update the error message

* Remove unnecessary changes

* Refactor

* make clippy happy

* Return CompilerInput instead of String
2022-04-08 17:18:39 -07:00
Bjerg 8f9832d1a6
fix: correctly check cache expiry (#1114) 2022-04-05 23:42:40 -07:00
Bjerg c436d19a9c
feat(etherscan): add caching (#1108)
* feat(etherscan): add caching

* feat: write to cache if not exists

* fix: flush `BufWriter`

* fix: fix serialization

* fix: read cache without truncating the file

* chore: remove comments

* feat: rate limit errors

* test: fix tests

* test: fix tests

* fix: don't fail if cache doesn't exist

* fix: catch all rate limits

* feat: add ttl

* feat: also cache when contracts are not verified

* chore: clippy

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-04-05 19:01:44 -07:00
abigger87 33f5b7c5fa
fix(ethers-etherscan): Broken Etherscan URL Construction (#1100)
* 👷 fix etherscan url stringification

* 🎨 fmt
2022-03-31 16:42:31 -07:00
Dan Cline 842f4d260f
feat(core): add dev as a chain (#1093)
adds a new error message to etherscan if the user tries to create an
etherscan client with a 1337/ganache/dev chain
2022-03-30 11:20:23 -07:00
Curtis Spencer 3c0d8c36dd
chore(source_tree): add .sol extension when missing (#1077)
Just ensure that any paths with no extension default to a .sol

Tests: cargo test --lib ethers-etherscan -- source_tree
2022-03-24 10:04:46 -07:00
Curtis Spencer a0d7995f94
chore(etherscan): Return error for unverified contracts (#1065)
Given contract source code is not useful in the case of unverified contracts
have the contract_source_code method return an error in the case if the item.abi
has the "Contract source code not verified" string.

Uncomment unit test ignore and run test:
> cargo test --lib ethers-etherscan -- get_error
2022-03-19 11:32:19 -07:00
Matthias Seitz 916e9a7334
chore(clippy): add some deny lints (#1064)
* feat: add deny lints

* trim ethers core

* trim ethers eip712

* deny ethers contract derive

* deny ethers contract abigen

* deny ethers contract

* deny ethers providers

* chore: add denies and fix unused deps

* doc: fix links

* fix: wasm build

* doc: fix links

* doc: fix links

* doc: fix inline doc links

* docs: fix intra doc links
2022-03-19 10:05:39 -07:00
Matthias Seitz 3d4feccabf
fix(core): check against ethers internal crate names (#1060)
* fix(core): check against ethers internal crate names

* fix: add import back
2022-03-17 15:14:53 -07:00
Matthias Seitz 20a01a260d
fix(solc/etherscan): trim constructor args (#1024) 2022-03-14 13:28:19 +02:00
Curtis Spencer 96dd34287e
feat(etherscan): source tree support (#990)
* Create a source tree of paths and their respective contents from the
ContractMetadata.

This is useful for file level analysis or writing the resulting files to disk.

* Test writing to disk via cargo test
* Test etherscan by uncommenting the ignore on
can_fetch_contract_source_tree_for_multi_entry_contract
and can_fetch_contract_source_tree_for_singleton_contract
2022-03-06 07:21:19 -08: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 f1eaee52ef
feat: add contract code not verified check (#962) 2022-02-24 14:07:34 +02:00