Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 7 additions & 4 deletions .github/scripts/matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ def __init__(
profile = os.environ.get("PROFILE")
is_pr = os.environ.get("EVENT_NAME") == "pull_request"
t_linux_x86 = Target("ubuntu-latest", "x86_64-unknown-linux-gnu", "linux-amd64")
# TODO: Figure out how to make this work
# t_linux_arm = Target("ubuntu-latest", "aarch64-unknown-linux-gnu", "linux-aarch64")
t_linux_arm = Target("ubuntu-24.04-arm", "aarch64-unknown-linux-gnu", "linux-aarch64")
t_macos = Target("macos-latest", "aarch64-apple-darwin", "macosx-aarch64")
t_windows = Target("windows-latest", "x86_64-pc-windows-msvc", "windows-amd64")
targets = [t_linux_x86, t_windows] if is_pr else [t_linux_x86, t_macos, t_windows]
targets = (
[t_linux_x86, t_windows]
if is_pr
else [t_linux_x86, t_linux_arm, t_macos, t_windows]
)

config = [
Case(
Expand Down Expand Up @@ -120,7 +123,7 @@ def main():
s = f"{partition}/{case.n_partitions}"
name += f" ({s})"
flags += f" --partition count:{s}"

if profile == "isolate":
flags += " --features=isolate-by-default"
name += os_str
Expand Down
62 changes: 38 additions & 24 deletions crates/cast/tests/cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3146,35 +3146,48 @@ forgetest_async!(cast_run_impersonated_tx, |_prj, cmd| {
});

// <https://github.com/foundry-rs/foundry/issues/4776>
casttest!(fetch_src_blockscout, |_prj, cmd| {
let url = "https://eth.blockscout.com/api";

let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");

cmd.args([
"source",
&weth.to_string(),
"--chain-id",
"1",
"--explorer-api-url",
url,
"--flatten",
])
.assert_success()
.stdout_eq(str![[r#"
casttest!(
#[cfg_attr(all(target_os = "linux", target_arch = "aarch64"), ignore = "no 0.4 solc")]
fetch_src_blockscout,
|_prj, cmd| {
let url = "https://eth.blockscout.com/api";

let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");

cmd.args([
"source",
&weth.to_string(),
"--chain-id",
"1",
"--explorer-api-url",
url,
"--flatten",
])
.assert_success()
.stdout_eq(str![[r#"
...
contract WETH9 {
string public name = "Wrapped Ether";
string public symbol = "WETH";
uint8 public decimals = 18;
..."#]]);
});

casttest!(fetch_src_default, |_prj, cmd| {
let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");
let etherscan_api_key = next_etherscan_api_key();

cmd.args(["source", &weth.to_string(), "--flatten", "--etherscan-api-key", &etherscan_api_key])
}
);

casttest!(
#[cfg_attr(all(target_os = "linux", target_arch = "aarch64"), ignore = "no 0.4 solc")]
fetch_src_default,
|_prj, cmd| {
let weth = address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");
let etherscan_api_key = next_etherscan_api_key();

cmd.args([
"source",
&weth.to_string(),
"--flatten",
"--etherscan-api-key",
&etherscan_api_key,
])
.assert_success()
.stdout_eq(str![[r#"
...
Expand All @@ -3183,7 +3196,8 @@ contract WETH9 {
string public symbol = "WETH";
uint8 public decimals = 18;
..."#]]);
});
}
);

// <https://github.com/foundry-rs/foundry/issues/10553>
// <https://basescan.org/tx/0x17b2de59ebd7dfd2452a3638a16737b6b65ae816c1c5571631dc0d80b63c41de>
Expand Down
Loading