Skip to content

Commit afa1c45

Browse files
committed
Adjust docs and naming
1 parent 0f0f7d6 commit afa1c45

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

contracts/ibc-reflect/schema/ibc/packet_msg.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
"type": "object",
420420
"required": [
421421
"ack_fee",
422-
"recv_fee",
422+
"receive_fee",
423423
"timeout_fee"
424424
],
425425
"properties": {
@@ -429,7 +429,7 @@
429429
"$ref": "#/definitions/Coin"
430430
}
431431
},
432-
"recv_fee": {
432+
"receive_fee": {
433433
"type": "array",
434434
"items": {
435435
"$ref": "#/definitions/Coin"
@@ -597,7 +597,7 @@
597597
"additionalProperties": false
598598
},
599599
{
600-
"description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { recv_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```",
600+
"description": "Incentivizes the next IBC packet sent after this message with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.\n\n# Example\n\nMost commonly, you will attach this message to a response right before sending a packet using [`IbcMsg::SendPacket`] or [`IbcMsg::Transfer`].\n\n```rust # use cosmwasm_std::{IbcMsg, IbcEndpoint, IbcFee, IbcTimeout, Coin, coins, CosmosMsg, Response, Timestamp};\n\nlet incentivize = IbcMsg::PayPacketFee { port_id: \"transfer\".to_string(), channel_id: \"source-channel\".to_string(), fee: IbcFee { receive_fee: coins(100, \"token\"), ack_fee: coins(201, \"token\"), timeout_fee: coins(200, \"token\"), }, relayers: vec![], }; let transfer = IbcMsg::Transfer { channel_id: \"source-channel\".to_string(), to_address: \"receiver\".to_string(), amount: Coin::new(100u32, \"token\"), timeout: IbcTimeout::with_timestamp(Timestamp::from_nanos(0)), memo: None, };\n\n# #[cfg(feature = \"stargate\")] let _: Response = Response::new() .add_message(CosmosMsg::Ibc(incentivize)) .add_message(CosmosMsg::Ibc(transfer)); ```",
601601
"type": "object",
602602
"required": [
603603
"pay_packet_fee"
@@ -624,7 +624,7 @@
624624
"type": "string"
625625
},
626626
"relayers": {
627-
"description": "Allowlist of relayer addresses that can receive the fee. This is currently not implemented and *must* be empty.",
627+
"description": "Allowlist of relayer addresses that can receive the fee. An empty list means that any relayer can receive the fee.\n\nThis is currently not implemented and *must* be empty.",
628628
"type": "array",
629629
"items": {
630630
"type": "string"
@@ -637,7 +637,7 @@
637637
"additionalProperties": false
638638
},
639639
{
640-
"description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled.",
640+
"description": "Incentivizes the existing IBC packet with the given port, channel and sequence with a fee. Note that this does not necessarily have to be a packet sent by this contract. The fees are taken from the contract's balance immediately and locked until the packet is handled. They are added to the existing fees on the packet.",
641641
"type": "object",
642642
"required": [
643643
"pay_packet_fee_async"
@@ -665,7 +665,7 @@
665665
"type": "string"
666666
},
667667
"relayers": {
668-
"description": "Allowlist of relayer addresses that can receive the fee. This is currently not implemented and *must* be empty.",
668+
"description": "Allowlist of relayer addresses that can receive the fee. An empty list means that any relayer can receive the fee.\n\nThis is currently not implemented and *must* be empty.",
669669
"type": "array",
670670
"items": {
671671
"type": "string"

contracts/reflect/schema/raw/query.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
"additionalProperties": false
358358
},
359359
"IbcQuery": {
360-
"description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. Most of these will return errors if the contract is not \"ibc enabled\"",
360+
"description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. Most of these will return errors if the contract is not \"ibc enabled\".",
361361
"oneOf": [
362362
{
363363
"description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.",

contracts/reflect/schema/reflect.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@
14501450
"additionalProperties": false
14511451
},
14521452
"IbcQuery": {
1453-
"description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. Most of these will return errors if the contract is not \"ibc enabled\"",
1453+
"description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. Most of these will return errors if the contract is not \"ibc enabled\".",
14541454
"oneOf": [
14551455
{
14561456
"description": "Gets the Port ID the current contract is bound to.\n\nReturns a `PortIdResponse`.",

packages/go-gen/tests/cosmwasm_std__IbcMsg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type IBCAcknowledgement struct {
6262
}
6363
type IBCFee struct {
6464
AckFee Array[Coin] `json:"ack_fee"`
65-
RecvFee Array[Coin] `json:"recv_fee"`
65+
ReceiveFee Array[Coin] `json:"receive_fee"`
6666
TimeoutFee Array[Coin] `json:"timeout_fee"`
6767
}
6868

packages/std/src/ibc.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub enum IbcMsg {
9191
/// port_id: "transfer".to_string(),
9292
/// channel_id: "source-channel".to_string(),
9393
/// fee: IbcFee {
94-
/// recv_fee: coins(100, "token"),
94+
/// receive_fee: coins(100, "token"),
9595
/// ack_fee: coins(201, "token"),
9696
/// timeout_fee: coins(200, "token"),
9797
/// },
@@ -118,12 +118,15 @@ pub enum IbcMsg {
118118
channel_id: String,
119119
fee: IbcFee,
120120
/// Allowlist of relayer addresses that can receive the fee.
121+
/// An empty list means that any relayer can receive the fee.
122+
///
121123
/// This is currently not implemented and *must* be empty.
122124
relayers: Vec<String>,
123125
},
124126
/// Incentivizes the existing IBC packet with the given port, channel and sequence with a fee.
125127
/// Note that this does not necessarily have to be a packet sent by this contract.
126128
/// The fees are taken from the contract's balance immediately and locked until the packet is handled.
129+
/// They are added to the existing fees on the packet.
127130
#[cfg(feature = "cosmwasm_2_2")]
128131
PayPacketFeeAsync {
129132
/// The port id on the chain where the packet is sent from (this chain).
@@ -134,6 +137,8 @@ pub enum IbcMsg {
134137
sequence: u64,
135138
fee: IbcFee,
136139
/// Allowlist of relayer addresses that can receive the fee.
140+
/// An empty list means that any relayer can receive the fee.
141+
///
137142
/// This is currently not implemented and *must* be empty.
138143
relayers: Vec<String>,
139144
},
@@ -142,7 +147,7 @@ pub enum IbcMsg {
142147
#[derive(Serialize, Deserialize, Default, Clone, Debug, PartialEq, Eq, JsonSchema)]
143148
pub struct IbcFee {
144149
// the packet receive fee
145-
pub recv_fee: Vec<Coin>,
150+
pub receive_fee: Vec<Coin>,
146151
// the packet acknowledgement fee
147152
pub ack_fee: Vec<Coin>,
148153
// the packet timeout fee

0 commit comments

Comments
 (0)