Skip to content

Commit eefb8a0

Browse files
authored
chore(forge bind): pin alloy to 1.0 + e2e test (#10724)
1 parent fe04be8 commit eefb8a0

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

crates/forge/tests/cli/cmd.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,3 +3869,22 @@ Generating bindings for 1 contracts
38693869
Bindings have been generated to [..]"#
38703870
]]);
38713871
});
3872+
3873+
// forge bind e2e
3874+
forgetest_init!(can_bind_e2e, |prj, cmd| {
3875+
cmd.args(["bind"]).assert_success().stdout_eq(str![[r#"No files changed, compilation skipped
3876+
Generating bindings for 2 contracts
3877+
Bindings have been generated to [..]"#]]);
3878+
3879+
let bindings_path = prj.root().join("out/bindings");
3880+
3881+
assert!(bindings_path.exists(), "Bindings directory should exist");
3882+
let out = Command::new("cargo")
3883+
.arg("build")
3884+
.current_dir(&bindings_path)
3885+
.output()
3886+
.expect("Failed to run cargo build");
3887+
// RUn `cargo build`
3888+
3889+
assert!(out.status.success(), "Cargo build should succeed");
3890+
});

crates/sol-macro-gen/src/sol_macro_gen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ edition = "2021"
420420
r#"alloy = {{ git = "https://github.com/alloy-rs/alloy", rev = "{alloy_rev}", features = ["sol-types", "contract"] }}"#,
421421
)
422422
} else {
423-
r#"alloy = { git = "https://github.com/alloy-rs/alloy", features = ["sol-types", "contract"] }"#.to_string()
423+
r#"alloy = { version = "1.0", features = ["sol-types", "contract"] }"#.to_string()
424424
}
425425
}
426426
}

0 commit comments

Comments
 (0)