Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bbc3cef

Browse files
authored
Revamp metadata and RPC (#7)
* `v0.9.3` * Revamp metadata and RPC
1 parent 7ead160 commit bbc3cef

11 files changed

Lines changed: 581 additions & 309 deletions

File tree

.maintain/release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
cargo publish --locked -p subcryptor
44
cargo publish --locked -p subhasher
5-
cargo publish --locked -p submetadatan
65
cargo publish --locked -p subrpcer
76
cargo publish --locked -p subruntimer
87
cargo publish --locked -p subspector
98
# substorager depends on subhasher, sleep for 30s
109
sleep 30
1110
cargo publish --locked -p substorager
11+
# submetadatan depends on substorager, sleep for 30s
12+
cargo publish --locked -p submetadatan
1213
cargo publish --locked -p subversioner

Cargo.lock

Lines changed: 94 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ members = [
2020

2121
[workspace.dependencies]
2222
# crates.io
23-
array-bytes = { version = "6.0" }
23+
array-bytes = { version = "6.1" }
2424
fxhash = { version = "0.2" }
2525
once_cell = { version = "1.17" }
2626
parity-scale-codec = { version = "3.4" }
2727
reqwest = { version = "0.11" }
28+
scale-info = { version = "2.5" }
2829
serde = { version = "1.0" }
2930
serde_json = { version = "1.0" }
3031
thiserror = { version = "1.0" }

subhasher/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ where
135135
v
136136
}
137137

138+
/// Return data directly.
139+
pub fn identity(data: &[u8]) -> &[u8] {
140+
data
141+
}
142+
138143
/// Hash the data into a 32-bytes array with Keccak algorithm.
139144
pub fn keccak256<D>(data: D) -> [u8; 32]
140145
where

submetadatan/Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ readme = "README.md"
99
repository.workspace = true
1010
version.workspace = true
1111

12+
[features]
13+
cmp = []
14+
1215
[dependencies]
1316
# crates.io
14-
frame-metadata = { version = "15.1" }
15-
scale-info = { version = "2.5" }
16-
thiserror = { workspace = true }
17+
array-bytes = { workspace = true }
18+
frame-metadata = { version = "15.1" }
19+
fxhash = { workspace = true }
20+
parity-scale-codec = { workspace = true }
21+
scale-info = { workspace = true }
22+
substorager = { workspace = true }
23+
thiserror = { workspace = true }

0 commit comments

Comments
 (0)