Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions code/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-modu
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "a0751540591c88ccc2d4029464de887933727183", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "a0751540591c88ccc2d4029464de887933727183", default-features = false }

ibc = { git = "https://github.com/ComposableFi/centauri", rev = "1687de03194ba073b14ea7344efe35f0a95017b8", default-features = false }
ibc-rpc = { git = "https://github.com/ComposableFi/centauri", rev = "1687de03194ba073b14ea7344efe35f0a95017b8", default-features = false }
ibc-primitives = { git = "https://github.com/ComposableFi/centauri", rev = "1687de03194ba073b14ea7344efe35f0a95017b8", default-features = false }
ibc-runtime-api = { git = "https://github.com/ComposableFi/centauri", rev = "1687de03194ba073b14ea7344efe35f0a95017b8", default-features = false }
pallet-ibc = { git = "https://github.com/ComposableFi/centauri", rev = "1687de03194ba073b14ea7344efe35f0a95017b8", default-features = false }
ibc = { git = "https://github.com/ComposableFi/centauri", rev = "664429d7b929266549067a14a21cd74c27e3848b", default-features = false }
ibc-rpc = { git = "https://github.com/ComposableFi/centauri", rev = "664429d7b929266549067a14a21cd74c27e3848b", default-features = false }
ibc-primitives = { git = "https://github.com/ComposableFi/centauri", rev = "664429d7b929266549067a14a21cd74c27e3848b", default-features = false }
ibc-runtime-api = { git = "https://github.com/ComposableFi/centauri", rev = "664429d7b929266549067a14a21cd74c27e3848b", default-features = false }
pallet-ibc = { git = "https://github.com/ComposableFi/centauri", rev = "664429d7b929266549067a14a21cd74c27e3848b", default-features = false }

xcm-builder = { git = "https://github.com/paritytech/polkadot", rev = "c22e1c4173bf6966f5d1980f4299f7abe836f0c1", default-features = false }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", rev = "c22e1c4173bf6966f5d1980f4299f7abe836f0c1", default-features = false }
Expand Down
23 changes: 19 additions & 4 deletions code/parachain/frame/pallet-multihop-xcm-ibc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub mod pallet {
};
use xcm::latest::prelude::*;

use composable_traits::{prelude::ToString, xcm::memo::ChainInfo};
use composable_traits::xcm::memo::ChainInfo;
use sp_std::boxed::Box;

use frame_support::BoundedVec;
Expand Down Expand Up @@ -303,7 +303,7 @@ pub mod pallet {
}
}

impl<T: Config> Pallet<T> {
impl<T> Pallet<T> {
Comment thread
kkast marked this conversation as resolved.
/// Create memo from the route configuration using chain info, name and address
///
/// This function is called from deposit_asset XCM callback function in
Expand Down Expand Up @@ -356,16 +356,31 @@ pub mod pallet {
.into_iter()
.map(|byte| {
u5::try_from_u8(byte).map_err(|_| {
//write to log
frame_support::log::error!(
"Failed to convert u8 into u5: {:?}",
byte
);
DispatchError::Other("Failed to convert u8 into u5")
})
})
.collect::<Result<_, _>>()?;

let name = String::from_utf8(name).map_err(|_| {
let name = String::from_utf8(name.clone()).map_err(|_| {
//write to log
frame_support::log::error!(
"Failed to convert chain name from utf8: {:?}",
name
);
DispatchError::Other("Failed to convert chain name from utf8")
})?;
bech32_no_std::encode(&name, data.clone(), bech32_no_std::Variant::Bech32)
.map_err(|_| {
//write to log
frame_support::log::error!(
"Failed to convert chain name and address into bech32: {:?}",
data
);
DispatchError::Other(
"Failed to convert chain name and address into bech32",
)
Expand All @@ -376,7 +391,7 @@ pub mod pallet {
memo_receiver,
PortId::transfer(),
ChannelId::new(i.channel_id),
i.timeout.ok_or(DispatchError::Other("Timeout is none"))?.to_string(),
i.timeout.ok_or(DispatchError::Other("Timeout is none"))?,
i.retries.ok_or(DispatchError::Other("Retries is none"))?,
)
};
Expand Down
4 changes: 2 additions & 2 deletions code/xcvm/lib/core/src/transport/ibc/ics20/pfm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct ForwardingMemo {
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<ChannelId>,
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<String>,
pub timeout: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub retries: Option<u8>,

Expand Down Expand Up @@ -60,7 +60,7 @@ impl ForwardingMemo {
receiver: String,
port: PortId,
channel: ChannelId,
timeout: String,
timeout: u64,
retries: u8,
) -> Self {
Self {
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
centauri-src = {
flake = false;
url =
"github:ComposableFi/centauri/1687de03194ba073b14ea7344efe35f0a95017b8";
"github:ComposableFi/centauri/664429d7b929266549067a14a21cd74c27e3848b";
};
};

Expand Down