Skip to content

Commit

Permalink
chore: bunch of fixes
Browse files Browse the repository at this point in the history
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
  • Loading branch information
aeryz committed Sep 21, 2024
1 parent 7f49ad8 commit fc19e24
Show file tree
Hide file tree
Showing 20 changed files with 157 additions and 7,883 deletions.
810 changes: 140 additions & 670 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ members = [

"hubble",

"lib/aptos-rpc",
"lib/beacon-api",
"lib/cometbft-rpc",

Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/ucs01-relay/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ impl<'a> TransferProtocol for Ucs01Protocol<'a> {
}

#[cfg(test)]
#[allow(deprecated)] // TODO: Remove useage of mock_info
#[allow(deprecated)] // TODO: Remove usage of mock_info
mod tests {
use cosmwasm_std::{
testing::{message_info, mock_dependencies, mock_env},
Expand Down
1 change: 1 addition & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ pedersen
permissioned
permissionless
permissionlessly
persistable
pflag
phang
pingpong
Expand Down
27 changes: 0 additions & 27 deletions lib/aptos-rpc/Cargo.toml

This file was deleted.

7 changes: 0 additions & 7 deletions lib/aptos-rpc/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion lib/aptos-verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repository = { workspace = true }
version = "0.1.0"

[dependencies]
bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" }
bcs = { workspace = true }
hex-literal = { workspace = true }
sha3 = { workspace = true }
thiserror = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion lib/unionlabs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ uint = "*"
wasmparser = { version = "0.113" }

base64.workspace = true
bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" }
bcs = { workspace = true }
borsh = { workspace = true, features = ["borsh-derive"], optional = true }
bs58 = "0.4"
near-primitives-core = { version = "0.21", optional = true }
Expand Down
33 changes: 0 additions & 33 deletions lib/unionlabs/src/ibc/lightclients/cometbls/consensus_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,36 +84,3 @@ impl TryFrom<contracts::glue::OptimizedConsensusState> for ConsensusState {
})
}
}

#[cfg(test)]
mod tests {
use hex_literal::hex;

use super::*;
use crate::encoding::{Bcs, DecodeAs, EncodeAs};

#[test]
fn bcs() {
let consensus_state = ConsensusState {
timestamp: 42,
app_hash: MerkleRoot {
hash: hex!("0000000000000000000000000000000000000000000000000000000000000000")
.into(),
},
next_validators_hash: hex!(
"0000000000000000000000000000000000000000000000000000000000000000"
)
.into(),
};

let bz = consensus_state.encode_as::<Bcs>();

dbg!(hex::encode(bz));

let bz = hex!("2a00000000000000200000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000");

let cs = ConsensusState::decode_as::<Bcs>(&bz).unwrap();

dbg!(cs);
}
}
21 changes: 0 additions & 21 deletions lib/unionlabs/src/ibc/lightclients/movement/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,3 @@ impl TryFrom<protos::union::ibc::lightclients::movement::v1::Header> for Header
})
}
}

#[cfg(test)]
mod tests {
use hex_literal::hex;

use super::*;
use crate::{
encoding::{DecodeAs, Proto},
google::protobuf::any::Any,
ibc::lightclients::wasm,
};

#[test]
fn proto_decode() {
let bz = hex!("0a0210011202100d1ae4010adf010ada010ab50108011a208d9a33063437840ba00febb694e974210eed56e6caa516ad7203eb995afee5612220db75b1d646d3c0f0f37dee8833313fac3b556cf65ff1d12b40e4af16ed65d06d288c0430a38986c6caba88033a610801125d0a5b0a20d1126ce48bd65fb72190dbd9a6eaa65ba973f1e1664ac0cfba4db1d071fd0c3612320a3086fb211f41a07c6399ccc6ab3a8fe568fb0f574ce1b811896c44c6da4f267d543c6cac9fb8f4e9b92a3b809eefb91cbd1880c2d72f12200000000000000000000000000000000000000000000000000000000000000000120012002281040a20fe64accd475b2ed5e58d856d0765d3cae338e807d9636a0b19ef9457037380f00a2065c0370ceee1ef5adaa85f91ae33dd192aa049d734aafdfc0341bfe5e37ac00b0a20c6ae59a74870796c4331aaa80dc0554d15fcb7a324868654bd046f52a7cdb3890a207ff0d6738e83dd48d8b8d05ac8211c91883d318cedef72b16c8b17e3f4c57d320a20ee7e340551ccd5f30b2aecb382be10512ea8e05a70ad90bc1e7cfc9fe809200e0a20ae1eab32192ab3bacfcdb1529ee19ab4c27ffacae767af086ba777a8eacf1fde0a204a68f4c4f71c1f100b5419a5ff7b1505cee664255d51005faa8164b51ad89b780a20131c397a721488283850b780e774b5853d5591ba58971db473713635de1a20070a20fc470e4b79fc08d92c09ac8b31fd371f0bf0d7d79951089e69accac5e3e1980a0a200a045c1e2051aca6576dcca5369f31dcc1318f6e5a5a2ee7f26ae582193a21fa12aa011220d857831148f5e61c04f3e67ed93f04777c8615e555bdb5a8335e8c08042165da1a20414343554d554c41544f525f504c414345484f4c4445525f48415348000000002220afb6e14fe47d850fd0a7395bcfb997ffacf4715e0f895cc162c218e4a7564bc62a20e142d7896721539b32f737318f4565272c9d9f6eb05661e666c3c16754b23734322000000000000000000000000000000000000000000000000000000000000000002a440a2000000000000000000000000000000000000000000000000000000000000000001220000000000000000000000000000000000000000000000000000000000000000032220a20000000000000000000000000000000000000000000000000000000000000000038b201");

let header = Header::decode_as::<Proto>(bz.as_slice()).unwrap();

dbg!(header);
}
}
16 changes: 0 additions & 16 deletions lib/unionlabs/src/union/ics23/merkle_proof.rs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions light-clients/movement/ics08-movement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version = "0.1.0"

[dependencies]
aptos-verifier = { workspace = true }
bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" }
bcs = { workspace = true }
cosmwasm-std = { workspace = true, features = ["abort"] }
ethereum-verifier = { workspace = true }
hex = { workspace = true, features = ["alloc"] }
Expand All @@ -23,8 +23,8 @@ thiserror = { workspace = true }
unionlabs = { workspace = true, features = ["cosmwasm", "stargate"] }

[dev-dependencies]
aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core" }
aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core" }
aptos-crypto = { workspace = true }
aptos-types = { workspace = true }

[lints]
workspace = true
Expand Down
97 changes: 0 additions & 97 deletions move/mock_ibc_module.move

This file was deleted.

3,631 changes: 0 additions & 3,631 deletions move/move-ibc/tx.hash

This file was deleted.

3,331 changes: 0 additions & 3,331 deletions tx.json

This file was deleted.

4 changes: 2 additions & 2 deletions voyager/modules/chain/movement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ aptos-crypto = { workspace = true }
aptos-move-ibc.workspace = true
aptos-rest-client = { workspace = true }
aptos-types = { workspace = true }
bcs = "0.1.6"
bcs = { workspace = true }
clap = { workspace = true, features = ["derive"] }
enumorph.workspace = true
frunk.workspace = true
futures.workspace = true
hex-literal = "0.4.1"
hex-literal = { workspace = true }
hex.workspace = true
jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] }
macros.workspace = true
Expand Down
33 changes: 0 additions & 33 deletions voyager/modules/chain/movement/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,36 +1430,3 @@ pub fn convert_channel(channel: aptos_move_ibc::channel::Channel) -> Channel {
version: channel.version,
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn connection_end_serde() {
let ret =
serde_json::from_value::<(Option<aptos_move_ibc::connection_end::ConnectionEnd>,)>(
json!([{
"vec": [{
"client_id": "cometbls-0",
"counterparty": {
"client_id": "08-wasm-5",
"connection_id": "connection-11",
"prefix": {
"key_prefix": "0x696263"
}
},
"delay_period": "0",
"state": "2",
"versions": [
{
"features": ["ORDER_UNORDERED"],
"identifier": "1"
}
]
}]
}]),
)
.unwrap();
}
}
2 changes: 1 addition & 1 deletion voyager/modules/client/movement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ chain-utils = { workspace = true }
enumorph.workspace = true
frunk.workspace = true
futures.workspace = true
jsonrpsee = { version = "0.24.1", features = ["macros", "server", "tracing"] }
jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] }
macros.workspace = true
prost.workspace = true
protos.workspace = true
Expand Down
10 changes: 5 additions & 5 deletions voyager/modules/consensus/movement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ enumorph.workspace = true
ethers = { workspace = true, features = ["rustls", "ws"] }
frunk.workspace = true
futures.workspace = true
jsonrpsee = { version = "0.24.1", features = ["macros", "server", "tracing"] }
macros.workspace = true
num-bigint = "0.4.6"
prost.workspace = true
protos.workspace = true
jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] }
macros = { workspace = true }
num-bigint = { workspace = true }
prost = { workspace = true }
protos = { workspace = true }
queue-msg = { workspace = true }
reqwest = { workspace = true, features = ["json"] }
serde = { workspace = true, features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions voyager/modules/transaction/aptos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ aptos-types = { workspace = true }
move-core-types = { workspace = true }

aptos-move-ibc.workspace = true
bcs = "0.1.6"
bcs = { workspace = true }
bip32 = { workspace = true }
chain-utils = { workspace = true }
enumorph = { workspace = true }
frunk = { workspace = true }
futures = { workspace = true }
jsonrpsee = { version = "0.24.1", features = ["macros", "server", "tracing"] }
jsonrpsee = { workspace = true, features = ["macros", "server", "tracing"] }
macros = { workspace = true }
move-bindgen = { workspace = true }
queue-msg = { workspace = true }
Expand Down

0 comments on commit fc19e24

Please sign in to comment.