diff --git a/packages/std/src/ibc.rs b/packages/std/src/ibc.rs index 1ce06432a6..990861c6e0 100644 --- a/packages/std/src/ibc.rs +++ b/packages/std/src/ibc.rs @@ -36,6 +36,13 @@ pub enum IbcMsg { amount: Coin, /// when packet times out, measured on remote chain timeout: IbcTimeout, + /// When set, a [MsgPayPacketFee] with the provided fee is created and + /// emitted before the packet is sent. + /// `signer` gets filled automatically with the contract address. + /// No relayer restrictions will be in place. + /// + /// [MsgPayPacketFee]: https://github.com/cosmos/ibc-go/blob/v7.2.0/proto/ibc/applications/fee/v1/tx.proto#L76-L93 + packet_fee: Option, }, /// Sends an IBC packet with given data over the existing channel. /// Data should be encoded in a format defined by the channel version, @@ -45,12 +52,29 @@ pub enum IbcMsg { data: Binary, /// when packet times out, measured on remote chain timeout: IbcTimeout, + /// When set, a [MsgPayPacketFee] with the provided fee is created and + /// emitted before the packet is sent. + /// `signer` gets filled automatically with the contract address. + /// No relayer restrictions will be in place. + /// + /// [MsgPayPacketFee]: https://github.com/cosmos/ibc-go/blob/v7.2.0/proto/ibc/applications/fee/v1/tx.proto#L76-L93 + packet_fee: Option, }, /// This will close an existing channel that is owned by this contract. /// Port is auto-assigned to the contract's IBC port CloseChannel { channel_id: String }, } +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)] +pub struct IbcFee { + /// The packet receive fee + pub recv: Vec, + /// The packet acknowledgement fee + pub ack: Vec, + /// The packet timeout fee + pub timeout: Vec, +} + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] pub struct IbcEndpoint { pub port_id: String,