Skip to content

Implement support for hardhat_metadata #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 83 commits into
base: master
Choose a base branch
from

Conversation

hwrdtm
Copy link

@hwrdtm hwrdtm commented Oct 12, 2023

This is so that, running hardhat against anvil will make hardhat think it is running atop a hardhat network, and use a faster polling interval - 50ms vs. 500ms!

This is where the hardhat checks whether it is running atop a hardhat network or not. https://github.com/NomicFoundation/hardhat/blob/b2a551f7354c6937200556c431f69acef6493d9c/packages/hardhat-ethers/src/internal/hardhat-ethers-provider.ts#L808

glitch003 and others added 30 commits August 20, 2023 11:12
…foundry-rs#5391)

* chore: install create_2_deployer

* chore: docs

* chore: comment codes

* fix: set proper runtime code

* fmt
* chore: add tryffi cheatcode to abi

* feat: impl

* chore: tests
* refactor: clean up evm inspectors

* tests
Updating git repository `https://github.com/bluealloy/revm/`
    Updating git repository `https://github.com/gakonst/ethers-rs`
    Updating anyhow v1.0.72 -> v1.0.75
    Updating clap v4.3.21 -> v4.3.23
    Updating clap_builder v4.3.21 -> v4.3.23
    Updating const-hex v1.6.1 -> v1.6.2
    Updating ethers v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-addressbook v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-contract v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-contract-abigen v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-contract-derive v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-core v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-etherscan v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-middleware v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-providers v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-signers v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating ethers-solc v2.0.8 (https://github.com/gakonst/ethers-rs#fa301771) -> #179891d4
    Updating flate2 v1.0.26 -> v1.0.27
    Updating ordered-float v3.7.0 -> v3.9.0
    Updating quote v1.0.32 -> v1.0.33
 Downgrading serde v1.0.183 -> v1.0.171
 Downgrading serde_derive v1.0.183 -> v1.0.171
    Updating serde_json v1.0.104 -> v1.0.105
    Updating syn v2.0.28 -> v2.0.29
    Updating tempfile v3.7.1 -> v3.8.0
    Updating thiserror v1.0.44 -> v1.0.47
    Updating thiserror-impl v1.0.44 -> v1.0.47
    Updating time v0.3.25 -> v0.3.26
    Updating time-macros v0.2.11 -> v0.2.12
    Updating tokio v1.31.0 -> v1.32.0
    Updating windows-targets v0.48.2 -> v0.48.5
    Updating windows_aarch64_gnullvm v0.48.2 -> v0.48.5
    Updating windows_aarch64_msvc v0.48.2 -> v0.48.5
    Updating windows_i686_gnu v0.48.2 -> v0.48.5
    Updating windows_i686_msvc v0.48.2 -> v0.48.5
    Updating windows_x86_64_gnu v0.48.2 -> v0.48.5
    Updating windows_x86_64_gnullvm v0.48.2 -> v0.48.5
    Updating windows_x86_64_msvc v0.48.2 -> v0.48.5
    Updating winnow v0.5.10 -> v0.5.14

Co-authored-by: mattsse <[email protected]>
* refactor: parallelize invariants

* chore: clippy

* collect before
* Revert "fix(`evm`): revert all revm changes (foundry-rs#5610)"

This reverts commit a0a31c3.

* upgrade revm

* fmt
* Initial implementation

* More comprehensive test

* Added TODOs

* Test passes

* Cleaning up PR

* Tests pass

* Cleaned up get_logs, starting to work on rpc

* eth get logs should be done. still working on rpc

* RPC test works with get_balance

* Formatting

* Removed pub

* Minor solidity fixes

* Remake public

* Cheats -> vm

* chore: docs

* chore: docs

* chore: clippy

* fmt

* chore: fix path

* chore: enable permissions

* enable permissions

---------

Co-authored-by: Enrique Ortiz <[email protected]>
…rs#5683)

* chore: avoid cloning `CompileOutput` to parse inline config

* chore: clippy

* use new solc methods

* chore: bump ethers

* chore: clippy

* fmt
* feat(cast): add JWT secret configuration

* set patches to branch

* fix cli test

* remove patches

* change `jwt` to `jwt-secret`

* change usages oops

* fix rpc_jwt_secret docs, add usage docs

* chore: use const-hex

---------

Co-authored-by: Enrique Ortiz <[email protected]>
…undry-rs#5695)

* Revert "feat(`evm`): Use latest `revm` main commit (foundry-rs#5669)"

This reverts commit efedf1f.

* test: add basic coverage test

* bump
…oundry-rs#5703)

* fix(ci): exclude rusoto/ethers-providers from deny

* chore: add deny.toml to paths
* fix: remove tui from cargo

* fix: switch to ratatui

* chore: clippy
bernard-wagner and others added 26 commits September 12, 2023 09:22
* feat(cast): support websockets

* add tests and rework ipc path
* refactor: move evm-spec-id to config

* chore: make util general and wrap it on config

* chore: remove duped util on evm crate

* chore: fix fixtures

---------

Co-authored-by: Enrique Ortiz <[email protected]>
* feat: cast decode can decode raw eip2718 txns

* fix: refactor impl, reformat result, qol changes

* fix: failing doctests

* refactor: merged json output object
* feat: add new serializeJson cheatcode that receives an id and a json string

* Add comment to test_serializeRootObject

---------

Co-authored-by: Enrique Ortiz <[email protected]>
Updating git repository `https://github.com/bluealloy/revm/`
    Updating git repository `https://github.com/gakonst/ethers-rs`
    Updating bytes v1.4.0 -> v1.5.0
    Updating chrono v0.4.28 -> v0.4.30
    Updating clap_complete v4.4.0 -> v4.4.1
    Updating crypto-bigint v0.5.2 -> v0.5.3
    Updating ctrlc v3.4.0 -> v3.4.1
    Updating ethers v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-addressbook v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-contract v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-contract-abigen v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-contract-derive v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-core v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-etherscan v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-middleware v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-providers v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-signers v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating ethers-solc v2.0.9 (https://github.com/gakonst/ethers-rs#df28b2a4) -> #a28c5ae9
    Updating linux-raw-sys v0.4.5 -> v0.4.7
      Adding nix v0.27.1
    Updating object v0.32.0 -> v0.32.1
    Updating openssl-sys v0.9.92 -> v0.9.93
    Updating prettyplease v0.2.12 -> v0.2.15
    Updating rustix v0.38.11 -> v0.38.12
    Updating serde_json v1.0.105 -> v1.0.106
    Updating shlex v1.1.0 -> v1.2.0
    Updating syn v2.0.29 -> v2.0.31
    Updating toml v0.7.6 -> v0.7.8
    Updating toml_edit v0.19.14 -> v0.19.15
    Updating walkdir v2.3.3 -> v2.4.0
    Updating which v4.4.0 -> v4.4.2
    Updating xml-rs v0.8.16 -> v0.8.18

Co-authored-by: mattsse <[email protected]>
* chore: bump revm

* chore: update env chain ID to u64

* chore: drop fork

* fix tests

* bump
* fuzz single refactor

* add struct docs

* Update crates/evm/src/fuzz/mod.rs

Co-authored-by: DaniPopes <[email protected]>

* add docs and move types to types.rs

* fmt

* add new debugger args type

* add minimal debugger-refactor changes

* finish him!

* fmt

* remove TODO

* minimal diff

* apply review suggestions

* add TODO

* looks better

* make ContractSources wrapper

* add more docki docs

* write file_id docs!

---------

Co-authored-by: DaniPopes <[email protected]>
* feat(cast): subscribe to logs

* undo generic signal

* fix tokio signal feature

---------

Co-authored-by: Enrique Ortiz <[email protected]>
This is so that, running hardhat against anvil will make hardhat think it is running atop a hardhat network, and use a faster polling interval - 50ms vs. 500ms!
@hwrdtm hwrdtm requested a review from glitch003 October 12, 2023 22:14
@hwrdtm hwrdtm self-assigned this Oct 12, 2023
glitch003 pushed a commit that referenced this pull request Feb 19, 2025
* feat: use alloy revm branch

* fuzz/mod migrated

* progress

* progress, fmt

* fix imdb

* feat: cheatcodes compile

* feat: fork backend compiles

* feat: trace

* fuzz

* anvil progress

* chore: mem, fmt

* chore: db.rs

* chore: it lives

* fix test

* chore: clippy

* workin

* main backend stuff migrated

* chore: add glue on other crates

* chore: make executor use alloy types

* add glue for executor migration

* chore: use workspace alloy

* chore: undo revm bump changes

* chore: remove unneded prefix

* chore: fix fork fixture

* chore: uncomment tests

* chore: switch to up-to-date revm

* chore: clippy

* (#2) Alloy Migration: Migrate non-cheatcode inspectors (foundry-rs#5770)

* feat: migrate non-cheatcode inspectors

* fix: properly create both create and create2 addresses

* chore: clippy

* (#3) Alloy Migration: migrate fork-adjacent files to alloy primitives (foundry-rs#5771)

* chore: use create2_from_code

* borrow it brah

* chore: use from word

* chore: drop to_be_bytes

* fmt

* chore: use from_word on both palces

* chore: use address::random

* chore: make failure slot b256

* chore: use address::random

* chore: fix indexes

* chore: use contract.hash

* chore: do not collect

* chore: use display on alloy nums

* use + operator

* chore: unwrap bytes and replace import

* chore: Into:: -> ::from

* chore: fix test

* chore: use alloy imports

* chore: switch to alloy typesd

* chore: fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.