Skip to content

Commit e4e8373

Browse files
committed
Add funds to IbcDestinationCallbackMsg
1 parent 1ce8364 commit e4e8373

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/std/src/ibc/callbacks.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use schemars::JsonSchema;
55
use serde::{Deserialize, Serialize};
66

7-
use crate::{Addr, IbcAcknowledgement, IbcPacket, Uint64};
7+
use crate::{Addr, Coin, IbcAcknowledgement, IbcPacket, Uint64};
88

99
/// This is just a type representing the data that has to be sent with the IBC message to receive
1010
/// callbacks. It should be serialized and sent with the IBC message.
@@ -191,6 +191,15 @@ impl IbcTimeoutCallbackMsg {
191191
pub struct IbcDestinationCallbackMsg {
192192
pub packet: IbcPacket,
193193
pub ack: IbcAcknowledgement,
194+
/// When the underlying packet is a transfer message and the receiver is the contract that receives
195+
/// the callback, this field contains the coins that were transferred. Otherwise it is empty.
196+
///
197+
/// When the callback is executed, the transfer is completed already and the coins are now owned
198+
/// by the contract.
199+
///
200+
/// This is always empty on chains using CosmWasm < 3.0
201+
#[serde(default)]
202+
pub funds: Vec<Coin>,
194203
}
195204

196205
#[cfg(test)]

0 commit comments

Comments
 (0)