Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added ibc hooks ack
  • Loading branch information
Kayanski committed Nov 12, 2024
commit 8478b7876eb3246798fc3491f8ce09eec08a291d
51 changes: 36 additions & 15 deletions framework/Cargo.lock

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

8 changes: 6 additions & 2 deletions framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ abstract-cw-multi-test = { git = "https://github.com/abstractsdk/cw-multi-test-f
# abstract-cw-multi-test = { path = "../../cw-multi-test" }
cw-orch-interchain-core = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
cw-orch-core = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
# cw-orch-interchain-daemon = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
# cw-orch-interchain-mock = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
cw-orch-interchain-daemon = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
cw-orch-interchain-mock = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
# cw-orch-interchain-core = { path = "../../cw-orchestrator/packages/interchain/interchain-core" }
# cw-orch-core = { path = "../../cw-orchestrator/packages/cw-orch-core" }
# cw-orch-interchain-daemon = { path = "../../cw-orchestrator/packages/interchain/interchain-daemon" }
# cw-orch-interchain-mock = { path = "../../cw-orchestrator/packages/interchain/interchain-mock" }

[workspace.metadata.cargo-udeps.ignore]
# ensures CI doens't flag workspace-hack as unused dep
Expand Down
15 changes: 8 additions & 7 deletions framework/contracts/account/tests/token_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ fn transfer_with_account_rename_message() -> AResult {

pub const INITIAL_AMOUNT: u128 = 100_000;
pub const LOCAL_TRANSFER_AMOUNT: u128 = 50_000;
let funds_to_transfer = coin(100_000, "usource");
let funds_remaining = coin(INITIAL_AMOUNT, "usource1");
let funds_to_transfer = coin(INITIAL_AMOUNT, "usource");
let funds_after_ics20 = coin(INITIAL_AMOUNT, "usource1");

src.add_balance(
&account.address()?,
vec![funds_to_transfer.clone(), funds_remaining.clone()],
vec![funds_to_transfer.clone(), funds_after_ics20.clone()],
)?;

// Here we send some funds on the remote account and then change the name of the account on callback
Expand All @@ -123,13 +123,14 @@ fn transfer_with_account_rename_message() -> AResult {
funds_to_transfer.clone(),
TruncatedChainId::from_chain_id(&dst.chain_id()),
)?;

interchain.await_and_check_packets(SOURCE_CHAIN_ID, tx_response)?;

let src_account_balance = src.balance(&account.address()?, None)?;
assert_eq!(src_account_balance, coins(INITIAL_AMOUNT, "usource1"));
let result = interchain.await_and_check_packets(SOURCE_CHAIN_ID, tx_response)?;
println!("{:?}", result);
let src_account_balance = src.balance(&account.address()?, None)?;
assert_eq!(
src_account_balance,
coins(INITIAL_AMOUNT - LOCAL_TRANSFER_AMOUNT, "usource1")
coins(LOCAL_TRANSFER_AMOUNT, "usource1")
);

let dst_host_balance = dst.balance(&dest_abstr.ibc.host.address()?, None)?;
Expand Down