Skip to content

Commit 2dae633

Browse files
authored
chore(deps): add dependencies ci workflow + update deps + fix clippy (#102)
Add `dependencies.yml` workflow to automated dependency upgrades + apply cargo update + fix clippy issue
1 parent 562a316 commit 2dae633

File tree

4 files changed

+41
-15
lines changed

4 files changed

+41
-15
lines changed

.github/workflows/dependencies.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Runs `cargo update` periodically.
2+
3+
name: dependencies
4+
5+
on:
6+
schedule:
7+
# Run weekly
8+
- cron: "0 0 * * SUN"
9+
workflow_dispatch:
10+
# Needed so we can run it manually
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
jobs:
17+
update:
18+
uses: ithacaxyz/ci/.github/workflows/cargo-update-pr.yml@main
19+
secrets:
20+
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ exclude = [".github/", "scripts/", "test-data/"]
1818

1919
[workspace.dependencies]
2020
alloy-chains = "0.2"
21-
alloy-primitives = { version = "1.0", default-features = false, features = [
21+
alloy-primitives = { version = "1.3", default-features = false, features = [
2222
"std",
2323
"serde",
2424
] }
25-
alloy-json-abi = { version = "1.0", default-features = false }
26-
alloy-rpc-types-eth = "1.0.3"
27-
alloy-eips = "1.0.3"
28-
alloy-serde = "1.0.3"
25+
alloy-json-abi = { version = "1.3", default-features = false }
26+
alloy-rpc-types-eth = "1.0"
27+
alloy-eips = "1.0"
28+
alloy-serde = "1.0"
2929

3030
reqwest = { version = "0.12", default-features = false, features = ["json"] }
3131
serde = { version = "1.0", features = ["derive"] }
3232
serde_json = "1.0"
3333

34-
tokio = { version = "1.37" }
34+
tokio = { version = "1.47" }

crates/block-explorers/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ alloy-primitives = { workspace = true, default-features = false, features = [
3333
reqwest = { workspace = true, default-features = false, features = ["json"] }
3434
serde = { workspace = true, features = ["derive"] }
3535
serde_json.workspace = true
36-
thiserror = "1.0"
37-
tracing = "0.1.37"
36+
thiserror = "2.0"
37+
tracing = "0.1.41"
3838
semver = "1.0"
3939

40-
foundry-compilers = { version = "0.18.0", optional = true }
40+
foundry-compilers = { version = "0.18.2", optional = true }
4141

4242
[dev-dependencies]
43-
tempfile = "3.8"
43+
tempfile = "3.20"
4444
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] }
45-
serial_test = "3.0.0"
46-
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "fmt"] }
45+
serial_test = "3.2.0"
46+
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "fmt"] }
4747

4848
[features]
4949
default = ["rustls"]

crates/block-explorers/src/gas.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ mod tests {
137137
assert_eq!(gas_oracle.message, "OK");
138138
assert_eq!(
139139
gas_oracle.result.propose_gas_price,
140-
parse_units("141.9", "gwei").unwrap().into()
140+
Into::<U256>::into(parse_units("141.9", "gwei").unwrap())
141141
);
142142

143143
let v = r#"{
@@ -154,7 +154,10 @@ mod tests {
154154
}"#;
155155
let gas_oracle: Response<GasOracle> = serde_json::from_str(v).unwrap();
156156
assert_eq!(gas_oracle.message, "OK");
157-
assert_eq!(gas_oracle.result.propose_gas_price, parse_units(22, "gwei").unwrap().into());
157+
assert_eq!(
158+
gas_oracle.result.propose_gas_price,
159+
Into::<U256>::into(parse_units(22, "gwei").unwrap())
160+
);
158161

159162
// remove quotes around integers
160163
let v = r#"{
@@ -171,6 +174,9 @@ mod tests {
171174
}"#;
172175
let gas_oracle: Response<GasOracle> = serde_json::from_str(v).unwrap();
173176
assert_eq!(gas_oracle.message, "OK");
174-
assert_eq!(gas_oracle.result.propose_gas_price, parse_units(22, "gwei").unwrap().into());
177+
assert_eq!(
178+
gas_oracle.result.propose_gas_price,
179+
Into::<U256>::into(parse_units(22, "gwei").unwrap())
180+
);
175181
}
176182
}

0 commit comments

Comments
 (0)