Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2fae1c4

Browse files
committedSep 27, 2023
fix: add wasm proto
1 parent 89cdd1d commit 2fae1c4

26 files changed

+2487
-596
lines changed
 

‎Cargo.lock

+521-57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ cw-mock-dapp = { git="https://github.com/icon-project/xCall.git", branch="main"
2424
cw-mock-dapp-multi = { git="https://github.com/icon-project/xCall.git", branch="main" }
2525
cw2 = "1.0.1"
2626

27-
ibc-proto = { version = "0.35.0", default-features = false,features = ["std", "schemars","serde"]}
27+
ibc-proto = { version = "0.26.0", default-features = false}
28+
2829
prost = { version = "0.11.8", default-features = false,features=["prost-derive"]}
2930

3031
serde-json-wasm = {version="0.5.0", default-features = false}

‎contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/handler.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> {
131131
message: RawMsgUpdateClient,
132132
) -> Result<Response, ContractError> {
133133
let client_id = to_ibc_client_id(&message.client_id)?;
134-
let header = message.client_message.ok_or(ContractError::IbcClientError {
135-
error: ClientError::MissingRawHeader,
136-
})?;
134+
let header = message
135+
.client_message
136+
.ok_or(ContractError::IbcClientError {
137+
error: ClientError::MissingRawHeader,
138+
})?;
137139

138140
let client = self.get_light_client(deps.as_ref().storage, &client_id)?;
139141
let client_state = self.client_state(deps.as_ref(), &client_id)?;
@@ -547,8 +549,6 @@ impl<'a> IbcClient for CwIbcCoreContext<'a> {
547549
}
548550
}
549551

550-
551-
552552
#[cfg(test)]
553553
mod tests {
554554
use cosmwasm_std::{from_binary, to_binary};

‎contracts/cosmwasm-vm/cw-ibc-core/src/ics02_client/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ use cw_common::raw_types::Any;
2323
use events::{create_client_event, update_client_event, upgrade_client_event};
2424

2525
use std::time::Duration;
26-

‎contracts/cosmwasm-vm/cw-ibc-core/src/ics03_connection/connection.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ impl<'a> CwIbcCoreContext<'a> {
2727
conn_id: &ConnectionId,
2828
conn_end: &ConnectionEnd,
2929
) -> Result<(), ContractError> {
30-
let data = conn_end
31-
.encode_vec();
32-
30+
let data = conn_end.encode_vec();
31+
3332
match self.ibc_store().connections().save(store, conn_id, &data) {
3433
Ok(_) => Ok(()),
3534
Err(error) => Err(ContractError::Std(error)),
@@ -284,9 +283,7 @@ impl<'a> CwIbcCoreContext<'a> {
284283
) -> Result<(), ContractError> {
285284
let connection_commit_key = commitment::connection_commitment_key(connection_id);
286285

287-
let connection_end_bytes =
288-
connection_end
289-
.encode_vec();
286+
let connection_end_bytes = connection_end.encode_vec();
290287

291288
let commitment_bytes = keccak256(&connection_end_bytes).to_vec();
292289

‎contracts/cosmwasm-vm/cw-wasm-light-client/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ cw-common = { path="../cw-common",default-features = false }
4949
prost = { workspace=true}
5050
serde-json-wasm = {workspace=true}
5151
debug_print = {workspace=true}
52-
ibc-proto = { workspace=true}
53-
52+
ibc-proto = {package = "ibc-proto", git="https://github.com/ComposableFi/composable-ibc.git", branch = "main"}
53+
base64 = { version = "0.13", default-features = false, features = ["alloc"] }
5454

5555
[dev-dependencies]
5656
cosmwasm = "0.7.2"

‎contracts/cosmwasm-vm/cw-wasm-light-client/src/contract.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ use cw_common::raw_types::Any;
2121
use cw_common::types::VerifyChannelState;
2222

2323
use crate::constants::{CLIENT_STATE_HASH, CONSENSUS_STATE_HASH, HEIGHT};
24-
use crate::ContractError;
2524
use crate::light_client::IconClient;
2625
use crate::state::CwContext;
2726
use crate::traits::{Config, IContext, ILightClient};
27+
use crate::ContractError;
2828
use cw_common::client_msg::{
2929
ExecuteMsg, InstantiateMsg, LightClientPacketMessage, QueryMsg, VerifyClientConsensusState,
3030
VerifyClientFullState, VerifyConnectionState,
@@ -532,4 +532,3 @@ pub fn ensure_owner(deps: Deps, info: &MessageInfo) -> Result<(), ContractError>
532532
}
533533
Ok(())
534534
}
535-

0 commit comments

Comments
 (0)
Please sign in to comment.