Skip to content

Commit 85ce6d2

Browse files
KayanskiBuckram123
andauthored
Sending ICS20 messages with callbacks (#527)
Co-authored-by: Buckram <buckram123@gmail.com>
1 parent 673505b commit 85ce6d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1001
-161
lines changed

framework/Cargo.lock

Lines changed: 85 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

framework/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ schemars = "0.8"
5050
serde = { version = "1.0", default-features = false, features = ["derive"] }
5151
thiserror = { version = "1.0.50" }
5252
protobuf = { version = "2", features = ["with-bytes"] }
53+
anybuf = { version = "0.5.0" }
5354

5455
clap = { version = "4.0.32", features = ["derive"] }
5556
semver = "1.0"
@@ -131,6 +132,19 @@ incremental = false
131132
# abstract-polytone-note = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
132133
# abstract-cw-orch-polytone = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
133134

135+
abstract-cw-multi-test = { git = "https://github.com/abstractsdk/cw-multi-test-fork", branch = "feature/add-ics20-transfer-data" }
136+
# abstract-cw-multi-test = { path = "../../cw-multi-test" }
137+
cw-orch-interchain-core = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
138+
cw-orch-core = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
139+
cw-orch-mock = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
140+
cw-orch-interchain = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
141+
cw-orch-interchain-daemon = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
142+
cw-orch-interchain-mock = { git = "https://github.com/abstractsdk/cw-orchestrator", branch = "interchain/add-ics-hooks-ack" }
143+
# cw-orch-interchain-core = { path = "../../cw-orchestrator/packages/interchain/interchain-core" }
144+
# cw-orch-core = { path = "../../cw-orchestrator/packages/cw-orch-core" }
145+
# cw-orch-interchain-daemon = { path = "../../cw-orchestrator/packages/interchain/interchain-daemon" }
146+
# cw-orch-interchain-mock = { path = "../../cw-orchestrator/packages/interchain/interchain-mock" }
147+
134148
[workspace.metadata.cargo-udeps.ignore]
135149
# ensures CI doens't flag workspace-hack as unused dep
136150
normal = ["workspace-hack"]
20.2 KB
Binary file not shown.
23 KB
Binary file not shown.
9.08 KB
Binary file not shown.
87 KB
Binary file not shown.
19 KB
Binary file not shown.
15 KB
Binary file not shown.
19.9 KB
Binary file not shown.
8.02 KB
Binary file not shown.

framework/artifacts/checksums.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
4bf416becdfe632df49cf8a7462752961066253bc85e6ffdafd77980d0fd8edb abstract_account-xion.wasm
2-
b04a125da587f70baacb6767044dcea01272ceb41808a820a43bac08a65b4f57 abstract_account.wasm
3-
55f36c4d96e50542da91b6b1cb6069fffb5ceda297fec483d21caae728ad0834 abstract_ans_host.wasm
4-
80e0a350981b11d8964c998d906a9c222da7f86173485faf6675efb3e827d54b abstract_ibc_client.wasm
5-
c320daf8e81a2e33252d30e436727085ca01ec81519b6b183aa62281c14b1fc6 abstract_ibc_host.wasm
6-
45316f6d205dc28279484ab3aa5bc23df2e58da274aeb2d8d7a4fc25176bdc65 abstract_ica_client.wasm
7-
496205b8d14615376ea9a5d12b002e9051e1cb17a1c34abc9ad91d50f7ff9bfd abstract_module_factory.wasm
8-
6041ca5e0f446878477d55ab174468581db51484a776da1efb506cd60d2e6276 abstract_registry.wasm
1+
b76f606133cc0abd55782483659cfc3f6152b37aa50ea303574db1ab60e9aeb1 abstract_account-xion.wasm
2+
8eaa27ae3b4e23cb7e60d299ab87f2912814eb9307f12ef39ed20a3946bd9055 abstract_account.wasm
3+
65fd38ecee0bc49f8720fe9a865a811aabb67375ea5f73a1f12ea2d0d313e6f4 abstract_ans_host.wasm
4+
1551033a7cc291e5834fc91a17c33848aca75846cd51ec421273e8d1eddbfef0 abstract_ibc_client.wasm
5+
3ade8af59fbfe549762c256ac2e8dc9f1dccd7967197f70bab074b02d7e1e222 abstract_ibc_host.wasm
6+
9d88ddf60e590c0b98d389911a3f7e750d38a1586e1d1087a2da1a847b549922 abstract_ica_client.wasm
7+
8c28d81e792a881356fb4afb82b899ca63de98386a65cb16df3def500309b607 abstract_module_factory.wasm
8+
143e5a9dc7197b50c8530ba27574b84661c61ce3c9adcb7072e2d8182da92100 abstract_registry.wasm

framework/contracts/native/ibc-client/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ abstract-sdk = { workspace = true }
3131
abstract-macros = { workspace = true }
3232
semver = { workspace = true }
3333
cw-paginate = "2.0.0"
34-
anybuf = "0.5.0"
34+
anybuf = { workspace = true }
3535

3636
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
3737
workspace-hack = { version = "0.1", path = "../../../workspace-hack" }
3838

3939
[dev-dependencies]
4040
cosmwasm-schema = { workspace = true }
4141
abstract-testing = { workspace = true }
42+
cw-orch = { workspace = true }
43+
cw-orch-interchain = { workspace = true }
44+
abstract-interface = { workspace = true, features = ["interchain"] }
4245

4346
ibc-proto = { version = "0.47.0", default-features = false }
4447
prost = { version = "0.13.1", default-features = false }

framework/contracts/native/ibc-client/src/anybuf.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unused)]
2+
13
use anybuf::Anybuf;
24

35
pub struct Coin {
@@ -85,6 +87,20 @@ pub mod ibc {
8587
.append_string(8, &self.memo)
8688
}
8789
}
90+
91+
pub struct MsgTransferResponse {
92+
pub sequence: u64, // 1
93+
}
94+
95+
impl MsgTransferResponse {
96+
pub fn decode(data: &cosmwasm_std::Binary) -> Result<Self, anybuf::BufanyError> {
97+
let bufany = anybuf::Bufany::deserialize(data.as_ref())?;
98+
let sequence = bufany
99+
.uint64(1)
100+
.ok_or(anybuf::BufanyError::UnexpectedEndOfData)?;
101+
Ok(Self { sequence })
102+
}
103+
}
88104
}
89105

90106
#[cfg(test)]

0 commit comments

Comments
 (0)