Skip to content
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

forge verify-bytecode #7319

Merged
merged 43 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d560b22
verify bytecode boilerplate
yash-atreya Mar 4, 2024
5d11405
Merge branch 'master' into yash/verify-bytecode
yash-atreya Mar 5, 2024
ada62d5
wip(verify-bytecode): fetch creation code and constructor args
yash-atreya Mar 5, 2024
32e4704
nit: todo comment
yash-atreya Mar 5, 2024
6663ecd
verify-bytecode: integrate build args and compile project
yash-atreya Mar 6, 2024
f431fd9
nits: use env eth_rpc_url
yash-atreya Mar 6, 2024
118f2a5
verify-bytecode: try_match
yash-atreya Mar 6, 2024
1165798
createFork
yash-atreya Mar 6, 2024
543535c
refactor VerifyBytecodeArgs and fix fork creation
yash-atreya Mar 6, 2024
2a12e49
deploy contract on fork
yash-atreya Mar 6, 2024
fd5a4f3
verify-bytecode: cmp runtime code
yash-atreya Mar 7, 2024
b6695a8
constructor_args_range in bytecode
yash-atreya Mar 7, 2024
6a4cd87
fix: NonceTooHigh issue and append constructor_args to local_bytecode
yash-atreya Mar 8, 2024
66cf4ab
pretty print
yash-atreya Mar 11, 2024
5cfe9c3
verify-bytecode: pinpoint compiler settings match
yash-atreya Mar 11, 2024
b6c3175
verify-bytecode: cross check provided constructor args
yash-atreya Mar 11, 2024
9c9a52a
Merge branch 'master': resolve conflicts and handle revm changes
yash-atreya Mar 11, 2024
5bbc83c
handle revm changes
yash-atreya Mar 11, 2024
98d39b6
rm ethers_core as dep
yash-atreya Mar 11, 2024
529bccb
nits
yash-atreya Mar 12, 2024
0a255cf
nit: is_runtime param
yash-atreya Mar 12, 2024
6723591
remove constructor args range check
yash-atreya Mar 12, 2024
7e433ad
nit
yash-atreya Mar 12, 2024
223676e
notify user on args mismatch, use args from etherscan by default.
yash-atreya Mar 12, 2024
24cd639
fix: handle create2 deployments
yash-atreya Mar 18, 2024
b037e06
add: checks for code at address and name mismatch
yash-atreya Mar 29, 2024
ed91609
nits
yash-atreya Apr 4, 2024
01a7ac3
add(verify-bytecode): check for bytecode hash config details and noti…
yash-atreya Apr 4, 2024
d26fee2
use cache
yash-atreya Apr 5, 2024
1fff6d0
Merge branch 'master' into yash/verify-bytecode
yash-atreya Apr 5, 2024
07d9ce3
nits
yash-atreya Apr 5, 2024
49f1685
use verification type enum
yash-atreya Apr 5, 2024
198a76b
nits
yash-atreya Apr 5, 2024
79ddc30
add(verify-bytecode): `--json` feature
yash-atreya Apr 5, 2024
faa9175
fmt nits
yash-atreya Apr 8, 2024
11837aa
control flow nits
yash-atreya Apr 8, 2024
a18d0d7
select cache version
yash-atreya Apr 8, 2024
53d7c63
nits and cleanup
yash-atreya Apr 8, 2024
65278fa
use etherscan compiler version
yash-atreya Apr 9, 2024
1fa4b36
smol nits
yash-atreya Apr 9, 2024
7201e1a
nit
yash-atreya Apr 9, 2024
dd6a4d1
Merge branch 'master' into yash/verify-bytecode
yash-atreya Apr 10, 2024
bae9434
fix(verify-bytecode): integrate alloy provider
yash-atreya Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/forge/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,6 @@ fn main() -> Result<()> {
ForgeSubcommand::Generate(cmd) => match cmd.sub {
GenerateSubcommands::Test(cmd) => cmd.run(),
},
ForgeSubcommand::VerifyBytecode(cmd) => utils::block_on(cmd.run()),
}
}
6 changes: 5 additions & 1 deletion crates/forge/bin/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::cmd::{
};
use clap::{Parser, Subcommand, ValueHint};
use forge_script::ScriptArgs;
use forge_verify::{VerifyArgs, VerifyCheckArgs};
use forge_verify::{bytecode::VerifyBytecodeArgs, VerifyArgs, VerifyCheckArgs};
use std::path::PathBuf;

const VERSION_MESSAGE: &str = concat!(
Expand Down Expand Up @@ -154,6 +154,10 @@ pub enum ForgeSubcommand {

/// Generate scaffold files.
Generate(generate::GenerateArgs),

/// Verify the deployed bytecode against its source.
#[clap(visible_alias = "vb")]
VerifyBytecode(VerifyBytecodeArgs),
}

#[cfg(test)]
Expand Down
7 changes: 5 additions & 2 deletions crates/verify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ foundry-config.workspace = true
foundry-cli.workspace = true
foundry-common.workspace = true
foundry-evm.workspace = true

serde_json.workspace = true
hex.workspace = true
alloy-json-abi.workspace = true
alloy-primitives.workspace = true
alloy-rpc-types.workspace = true
alloy-providers.workspace = true
revm-primitives.workspace = true
serde.workspace = true
eyre.workspace = true
ethers-providers.workspace = true
Expand All @@ -34,8 +36,9 @@ futures = "0.3"
semver = "1"
regex = { version = "1", default-features = false }
once_cell = "1"
yansi = "0.5"

[dev-dependencies]
tokio = { version = "1", features = ["macros"] }
foundry-test-utils.workspace = true
tempfile = "3"
tempfile = "3"
Loading
Loading