Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nomad related code. #70

Merged
merged 3 commits into from
Feb 2, 2024
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
702 changes: 30 additions & 672 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ members = [
"core",
"kate/recovery",
"kate",
"nomad/signature",
"nomad/core",
"nomad/base",
"nomad/merkle",
]

[profile.dev.package]
Expand Down
2 changes: 0 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ serde = { version = "1.0.196", default-features = false, features = ["derive", "
static_assertions = { version = "1.1.0" }
thiserror-no-std = { version = "2.0.2" }

nomad-core = {path = "../nomad/core", default-features = false}
tiny-keccak = { version = "2.0.2", default-features = false, features = ["keccak"] }


Expand Down Expand Up @@ -50,7 +49,6 @@ std = [
"hash256-std-hasher/std",
"hex",
"log/std",
"nomad-core/std",
"scale-info/std",
"serde/std",
"sp-arithmetic/std",
Expand Down
4 changes: 2 additions & 2 deletions core/src/data_proof_v2.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#[cfg(feature = "runtime")]
use crate::keccak256_concat;
#[cfg(feature = "runtime")]
use binary_merkle_tree::MerkleProof;
use codec::{Decode, Encode};
use ethabi::{encode, Token};
use frame_support::BoundedVec;
#[cfg(feature = "runtime")]
use nomad_core::keccak256_concat;
use scale_info::TypeInfo;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
Expand Down
28 changes: 28 additions & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,31 @@ macro_rules! ensure {
}
}};
}

/// Variadic macro used by `keccak256_concat` internally.
#[macro_export]
macro_rules! keccak256_concat_update {
($hasher:ident, $e:expr) => {{
$hasher.update($e.as_ref());
}};

($hasher:ident, $e:expr, $($es:expr),+) => {{
$hasher.update($e.as_ref());
$crate::keccak256_concat_update!($hasher, $($es),+);
}};
}

/// Calculates the Kecck 256 of arguments with NO extra allocations to join inputs.
#[macro_export]
macro_rules! keccak256_concat{
($($arg:tt)*) => {{
{
use tiny_keccak::Hasher as _;
let mut output = [0u8; 32];
let mut hasher = tiny_keccak::Keccak::v256();
$crate::keccak256_concat_update!(hasher, $($arg)*);
hasher.finalize(&mut output);
sp_core::H256::from(output)
}
}}
}
40 changes: 0 additions & 40 deletions nomad/base/Cargo.toml

This file was deleted.

111 changes: 0 additions & 111 deletions nomad/base/src/lib.rs

This file was deleted.

33 changes: 0 additions & 33 deletions nomad/base/src/testing.rs

This file was deleted.

45 changes: 0 additions & 45 deletions nomad/core/Cargo.toml

This file was deleted.

90 changes: 0 additions & 90 deletions nomad/core/src/lib.rs

This file was deleted.

Loading