Extract crate cw-proof
This commit is contained in:
parent
c62453b782
commit
9417a1e08e
14 changed files with 2591 additions and 10 deletions
2528
utils/cw-proof/Cargo.lock
generated
Normal file
2528
utils/cw-proof/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
16
utils/cw-proof/Cargo.toml
Normal file
16
utils/cw-proof/Cargo.toml
Normal file
|
@ -0,0 +1,16 @@
|
|||
[package]
|
||||
name = "cw-proof"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
cosmrs = { version = "0.15.0", default-features = false }
|
||||
ibc-relayer-types = { version = "=0.26.4", default-features = false }
|
||||
ics23 = { version = "0.11.0", default-features = false }
|
||||
prost = { version = "0.12.3", default-features = false }
|
||||
tendermint = { version = "0.34.0", default-features = false }
|
||||
tendermint-rpc = { version = "0.34.0", default-features = false, features = ["http-client"] }
|
||||
|
||||
[dev-dependencies]
|
||||
hex = { version = "0.4.3", default-features = false }
|
19
utils/cw-proof/src/lib.rs
Normal file
19
utils/cw-proof/src/lib.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
#![no_std]
|
||||
#![forbid(unsafe_code)]
|
||||
#![warn(
|
||||
clippy::checked_conversions,
|
||||
clippy::panic,
|
||||
clippy::panic_in_result_fn,
|
||||
clippy::unwrap_used,
|
||||
trivial_casts,
|
||||
trivial_numeric_casts,
|
||||
rust_2018_idioms,
|
||||
unused_lifetimes,
|
||||
unused_import_braces,
|
||||
unused_qualifications
|
||||
)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod proof;
|
||||
pub mod verifier;
|
|
@ -1,3 +1,4 @@
|
|||
use alloc::{boxed::Box, vec::Vec};
|
||||
use core::fmt::Debug;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
|
@ -1,4 +1,10 @@
|
|||
use alloc::{
|
||||
string::{String, ToString},
|
||||
vec,
|
||||
vec::Vec,
|
||||
};
|
||||
use core::marker::PhantomData;
|
||||
|
||||
use cosmrs::AccountId;
|
||||
|
||||
use crate::proof::prefix::ConstPrefix;
|
|
@ -1,3 +1,5 @@
|
|||
use alloc::vec::Vec;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
||||
use ics23::CommitmentProof;
|
||||
use tendermint::merkle::proof::ProofOps;
|
|
@ -1,3 +1,5 @@
|
|||
use alloc::vec::Vec;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
||||
use ics23::CommitmentProof;
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
use alloc::vec::Vec;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
use ibc_relayer_types::core::ics23_commitment::error::Error as ProofError;
|
17
utils/cw-prover/Cargo.lock
generated
17
utils/cw-prover/Cargo.lock
generated
|
@ -437,16 +437,27 @@ dependencies = [
|
|||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cw-proof"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"cosmrs",
|
||||
"ibc-relayer-types",
|
||||
"ics23",
|
||||
"prost",
|
||||
"tendermint",
|
||||
"tendermint-rpc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cw-prover"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"cosmrs",
|
||||
"cw-proof",
|
||||
"hex",
|
||||
"ibc-relayer-types",
|
||||
"ics23",
|
||||
"prost",
|
||||
"serde_json",
|
||||
"tendermint",
|
||||
"tendermint-rpc",
|
||||
|
|
|
@ -8,9 +8,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
clap = { version = "4.1.8", features = ["derive"] }
|
||||
cosmrs = "0.15.0"
|
||||
ibc-relayer-types = "=0.26.4"
|
||||
ics23 = "0.11.0"
|
||||
prost = "0.12.3"
|
||||
cw-proof = {path = "../cw-proof"}
|
||||
serde_json = "1.0.108"
|
||||
tendermint = "0.34.0"
|
||||
tendermint-rpc = { version = "0.34.0", features = ["http-client"] }
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
unused_qualifications
|
||||
)]
|
||||
|
||||
mod proof;
|
||||
mod verifier;
|
||||
|
||||
use std::{
|
||||
error::Error,
|
||||
fmt::Debug,
|
||||
|
@ -34,7 +31,7 @@ use tendermint_rpc::{
|
|||
Client, HttpClientUrl,
|
||||
};
|
||||
|
||||
use crate::proof::{cw::RawCwProof, key::CwAbciKey, Proof};
|
||||
use cw_proof::proof::{cw::RawCwProof, key::CwAbciKey, Proof};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
|
|
Loading…
Reference in a new issue