Skip to content

Commit 7af9271

Browse files
chore: Misc minor alloy related updates (#2734)
* primitives: Enable patched encode topic sanity check * deps: Update `alloy-sol-types` version * revive-types: Remove `alloy-core` dependency, use `const-hex` directly
1 parent 9c86c8a commit 7af9271

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ trybuild = { version = "1.0.110" }
8282
which = { version = "8.0.0" }
8383
xxhash-rust = { version = "0.8" }
8484
const_env = { version = "0.1" }
85+
const-hex = { version = "1.17.0", default-features = false }
8586

8687
# Substrate dependencies
8788
frame-metadata = { version = "23.0.0", default-features = false }
@@ -100,8 +101,7 @@ xcm = { package = "staging-xcm", version = "18.0.0", default-features = false }
100101
polkavm-derive = { version = "0.29.0", default-features = false }
101102

102103
# Solidity dependencies
103-
alloy-core = { version = "1.1.0", default-features = false }
104-
alloy-sol-types = { version = "1.3.0", default-features = false }
104+
alloy-sol-types = { version = "1.4.1", default-features = false }
105105
const_format = { version = "0.2.34", features = ["fmt"] }
106106
keccak-const = "0.2.0"
107107
impl-trait-for-tuples = "0.2.3"

crates/primitives/src/sol/tests.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,18 +1111,12 @@ fn event_topic_works() {
11111111
(sol_data::Bool, sol_data::Bytes),
11121112
(false, AlloyBytes::new())
11131113
);
1114-
// TODO: (@davidsemakula) Enable after padding fix in `alloy` is released.
1115-
// References:
1116-
// - https://github.com/alloy-rs/core/issues/998
1117-
// - https://github.com/alloy-rs/core/pull/1000
1118-
/*
11191114
test_case!(
11201115
Option<DynBytes>,
11211116
Some(DynBytes(vec![100u8; 64])),
11221117
(sol_data::Bool, sol_data::Bytes),
11231118
(true, AlloyBytes(vec![100u8; 64].into()))
11241119
);
1125-
*/
11261120
test_case!(Option<()>, None, (sol_data::Bool, ()), (false, ()));
11271121
test_case!(Option<()>, Some(()), (sol_data::Bool, ()), (true, ()));
11281122
test_case!(

crates/revive-types/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ ink_primitives = { workspace = true }
2121
derive_more = { workspace = true, features = ["from", "try_into"] }
2222
sp-runtime = { workspace = true }
2323
pallet-revive-uapi = { workspace = true, features = ["scale"] }
24-
alloy-core = { workspace = true, features = ["sol-types"] }
24+
const-hex = { workspace = true }
2525

2626
[dev-dependencies]
2727
serde_json = { workspace = true }
2828

2929
[features]
3030
default = ["std"]
3131
std = [
32-
"alloy-core/std",
32+
"const-hex/std",
3333
"scale/std",
3434
"scale-info/std",
3535
"ink_primitives/std",

crates/revive-types/src/byte.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use alloc::{
2121
vec,
2222
vec::Vec,
2323
};
24-
use alloy_core::hex;
24+
use const_hex as hex;
2525
use core::{
2626
fmt::{
2727
Debug,

crates/revive-types/src/hex_serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use alloc::{
2020
string::String,
2121
vec::Vec,
2222
};
23-
use alloy_core::hex;
23+
use const_hex as hex;
2424
use serde::{
2525
Deserialize,
2626
Deserializer,

0 commit comments

Comments
 (0)