Commit Graph

19 Commits

Author SHA1 Message Date
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 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
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 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
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 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
Matthias Seitz f1eaee52ef
feat: add contract code not verified check (#962) 2022-02-24 14:07:34 +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
Roman Krasiuk 78161f07e7
revert constructor arg change (#916) 2022-02-16 11:29:19 +02:00
Roman Krasiuk a8cdfe60e9
fix(etherscan): url params naming (#911)
* fix url params naming

* rm log & fail
2022-02-14 12:07:44 +02:00
Roman Krasiuk d39c02474d
flatten before verification (#828) 2022-02-04 10:08:52 +02:00
Georgios Konstantopoulos 0c949f65bb chore: lints 2022-01-29 21:19:49 +02:00
Matthias Seitz e24117a1e1
chore(clippy): make clippy happy (#705) 2021-12-19 06:28:38 +02:00
Alexey Shekhirin dd2c589102
feat(etherscan, middleware): implement gas endpoints and use in oracle middleware (#621)
* 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
2021-11-27 09:54:20 +02:00
Matthias Seitz dcf20022c6
chore: add rustfmt.toml (#537)
* chore: add rustfmt.toml

* rustfmt

* chore: Update readme with fmt info

* ci: update ci

* chore: rustfmt

* rustfmt

* rustfmt

* ci: install libudev

* chore(clippy): make clippy happy

* chore(clippy): make clippy happy

* revert ci

* ci: install libudev
2021-10-29 14:29:35 +02:00
Alexey Shekhirin cba1a85483
refactor(core, contract, etherscan): move Chain enum, use HashMap::from (#524)
* refactor(contract, etherscan): make use of HashMap::from

* feat(core): Chain enum

* rename unknown chain error

* reorg imports
2021-10-24 21:41:50 +03:00
Alexey Shekhirin 071a41605b
feat(etherscan): transaction endpoints (#512)
* feat(etherscan): transaction endpoints

* bump ethers-etherscan version to 0.1.1

* feat: replace anyhow::Result with thiserror strong types

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-10-17 13:01:20 +03:00