Skip to content

Commit

Permalink
feat(devnet): add ics08-movement to union devnet
Browse files Browse the repository at this point in the history
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
  • Loading branch information
aeryz committed Aug 29, 2024
1 parent e458319 commit fb603ab
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ opt-level = 3
strip = true

[workspace.dependencies]
aptos-verifier = { path = "lib/aptos-verifier", default-faetures = false }
aptos-verifier = { path = "lib/aptos-verifier", default-features = false }
arbitrum-verifier = { path = "lib/arbitrum-verifier", default-features = false }
beacon-api = { path = "lib/beacon-api", default-features = false }
block-message = { path = "lib/block-message", default-features = false }
Expand Down
9 changes: 9 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ appchain
appchains
appmodule
appparams
aptos
arbitrum
arbtest
arethetypeswrong
Expand Down Expand Up @@ -303,6 +304,7 @@ bitfield
bitfield's
bitfields
bitlist
bitmask
bitsize
bitslice
bitsong
Expand Down Expand Up @@ -376,6 +378,7 @@ commitmenttypes
committes
compat
composability
compr
concat
configurator
confix
Expand Down Expand Up @@ -473,6 +476,7 @@ dymension
echarts
eitherway
elems
elfutils
elgafar
elit
endianness
Expand Down Expand Up @@ -1068,6 +1072,7 @@ stridevalcons
stridevalconspub
stridevaloper
stridevaloperpub
strlen
struct
structs
strxor
Expand All @@ -1076,6 +1081,7 @@ subaccount
subdenom
subdenoms
subdetail
subdir
submessage
submessages
submsg
Expand Down Expand Up @@ -1175,6 +1181,7 @@ umee
unbond
unbonded
unbonding
uncompr
uncons
undelegate
undelegations
Expand Down Expand Up @@ -1222,8 +1229,10 @@ upgradability
upgradeclient
upgradekeeper
upgradetypes
upsert
urql
ursi
usecs
usertransfers
usizes
ustars
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
./light-clients/linea-light-client/linea-light-client.nix
./light-clients/berachain-light-client/berachain-light-client.nix
./light-clients/evm-in-cosmos-light-client/evm-in-cosmos-light-client.nix
./light-clients/movement/ics08-movement/ics08-movement.nix
./lib/cometbls-groth16-verifier/default.nix
./lib/linea-verifier/default.nix
./lib/linea-zktrie/default.nix
Expand Down
2 changes: 1 addition & 1 deletion lib/unionlabs/src/aptos/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use super::bit_vec::BitVec;
from
)
)]
/// Either (1) a BLS signature share from an individual signer, (2) a BLS multisignature or (3) a
/// Either (1) a BLS signature share from an individual signer, (2) a BLS multi-signature or (3) a
/// BLS aggregate signature
pub struct Signature {
pub sig: Vec<u8>,
Expand Down
2 changes: 1 addition & 1 deletion lib/unionlabs/src/aptos/state_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use super::{
};
use crate::errors::{required, MissingField};

/// A convenience type for the collection of sub-proofs that consistitute a
/// A convenience type for the collection of sub-proofs that constitute a
/// response to a `get_state_proof` request.
///
/// From a `StateProof` response, a client should be able to ratchet their
Expand Down
19 changes: 19 additions & 0 deletions light-clients/movement/ics08-movement/ics08-movement.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ ... }: {
perSystem = { crane, lib, ensure-wasm-client-type, ... }:
let
workspace = (crane.buildWasmContract {
crateDirFromRoot = "light-clients/movement/ics08-movement";
checks = [
(file_path: ''
${ensure-wasm-client-type {
inherit file_path;
type = "Movement";
}}
'')
];
});
in
{
inherit (workspace) packages checks;
};
}
7 changes: 2 additions & 5 deletions move/move-ibc/sources/IBC.move
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ module IBC::Core {
proof_client: Any,
_proof_consensus: vector<u8>,
proof_height: height::Height,
_consenseus_height: height::Height,
_consensus_height: height::Height,
):String acquires IBCStore {
// Generate a new connection identifier
let connection_id = generate_connection_identifier();
Expand Down Expand Up @@ -789,7 +789,7 @@ module IBC::Core {
_proof_consensus: vector<u8>,
counterparty_connection_id: String,
proof_height: height::Height,
_consenseus_height: height::Height
_consensus_height: height::Height
) acquires IBCStore {
let store = borrow_global_mut<IBCStore>(get_vault_addr());

Expand Down Expand Up @@ -1241,9 +1241,6 @@ module IBC::Core {
channel::set_state(&mut channel, CHAN_STATE_OPEN);
update_channel_commitment(port_id, channel_id);

// TODO(aeryz): this funciton is gonna be called by the ibc app
// IBCModule::on_chan_open_confirm(port_id, channel_id);

smart_table::upsert(&mut borrow_global_mut<IBCStore>(get_vault_addr()).channels, channel_port, channel);

event::emit(
Expand Down
2 changes: 1 addition & 1 deletion move/move-ibc/sources/ProtoUtils.move
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ module IBC::proto_utils {
let exp = vector<String> [
string::utf8(b"h"),
string::utf8(b"hello world"),
string::utf8(b"hello worldas enednsedn eansd"),
string::utf8(b"hello world hello again"),
];

let i = 0;
Expand Down
10 changes: 5 additions & 5 deletions move/move-ibc/tests/channel_test.move
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ module IBC::ChannelTest {
assert!(is_lowercase, 7001);

// Test case where the string is not lowercase
let mixedcase_string = string::utf8(b"MixedCase");
let is_not_lowercase = Core::is_lowercase(&mixedcase_string);
let mixed_case_string = string::utf8(b"Mixed_Case");
let is_not_lowercase = Core::is_lowercase(&mixed_case_string);
assert!(!is_not_lowercase, 7002);

// Test case where the string is not lowercase
let mixedcase_string = string::utf8(b"ItsWrong");
let is_not_lowercase = Core::is_lowercase(&mixedcase_string);
let mixed_case_string = string::utf8(b"ItsWrong");
let is_not_lowercase = Core::is_lowercase(&mixed_case_string);
assert!(!is_not_lowercase, 7002);


let lowercase_string = string::utf8(b"thisshouldbecorrecttoo");
let lowercase_string = string::utf8(b"this_should_be_correct_too");
let is_lowercase = Core::is_lowercase(&lowercase_string);
assert!(is_lowercase, 7001);

Expand Down
1 change: 0 additions & 1 deletion move/move-ibc/tests/connection_test.move
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ module IBC::ConnectionTest {
// let client_id = string::utf8(b"client-0");
// let version = Core::default_ibc_version();
// let delay_period: u64 = 0;
// let counterparty_prefix = Core::new_merkleprefix(vector::empty<u8>());
// let counterparty = Core::new_connection_counterparty(
// string::utf8(b"counterparty-client"),
// string::utf8(b"connection-0"),
Expand Down
1 change: 1 addition & 0 deletions networks/devnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
# self'.packages.scroll-light-client
self'.packages.arbitrum-light-client
# self'.packages.berachain-light-client
self'.packages.ics08-movement
];
cosmwasmContracts = [
{
Expand Down

0 comments on commit fb603ab

Please sign in to comment.