diff --git a/Cargo.toml b/Cargo.toml index 88318e68..425edd12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ base64 = { version = "0.21", default-features = false, features = ["alloc"] } bincode = "1.3.3" borsh = { version = "0.10.3", default-features = false } derive_more = "0.99.17" -ibc = { version = "0.45.0", default-features = false, features = ["serde", "mocks", "std"] } +ibc = { version = "0.45.0", default-features = false, features = ["serde", "mocks", "std", "borsh"] } ibc-proto = { version = "0.35.0", default-features = false, features = ["serde"] } pretty_assertions = "1.4.0" rand = { version = "0.8.5" } diff --git a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs index 54a3e476..a4e3902d 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/execution_context.rs @@ -62,7 +62,6 @@ impl ClientExecutionContext for SolanaIbcStorage<'_, '_> { &lib::hash::CryptoHash::digest(serialized_client_state.as_bytes()), ) .unwrap(); - self.clients.insert(client_state_key, serialized_client_state); Ok(()) } @@ -363,13 +362,13 @@ impl ExecutionContext for SolanaIbcStorage<'_, '_> { channel_end_path.1.clone().to_string(), )); - let serialized_channel_end = - serde_json::to_string(&channel_end).unwrap(); + let serialized_channel_end = + borsh::to_vec(&channel_end).unwrap(); let channel_end_trie_key = &TrieKey::from(channel_end_path).to_vec(); let trie = self.trie.as_mut().unwrap(); trie.set( channel_end_trie_key, - &lib::hash::CryptoHash::digest(serialized_channel_end.as_bytes()), + &lib::hash::CryptoHash::digest(&serialized_channel_end), ) .unwrap();