Skip to content

Commit

Permalink
Adjust WriteAcknowledgement fields to other msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Dec 5, 2023
1 parent 472b002 commit 259ac5d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 213 deletions.
40 changes: 5 additions & 35 deletions contracts/ibc-reflect-send/schema/ibc-reflect-send.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,32 +396,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -543,20 +517,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
40 changes: 5 additions & 35 deletions contracts/ibc-reflect-send/schema/ibc/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,32 +334,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -481,20 +455,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
40 changes: 5 additions & 35 deletions contracts/ibc-reflect-send/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,32 +385,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -532,20 +506,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
40 changes: 5 additions & 35 deletions contracts/ibc-reflect/schema/ibc/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,32 +321,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -468,20 +442,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
40 changes: 5 additions & 35 deletions contracts/reflect/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,32 +439,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -586,20 +560,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
40 changes: 5 additions & 35 deletions contracts/reflect/schema/reflect.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,32 +449,6 @@
}
]
},
"IbcAcknowledgement": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/definitions/Binary"
}
}
},
"IbcEndpoint": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
}
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -596,20 +570,16 @@
"type": "object",
"required": [
"ack",
"dest_channel",
"channel_id",
"sequence"
],
"properties": {
"ack": {
"$ref": "#/definitions/IbcAcknowledgement"
"$ref": "#/definitions/Binary"
},
"dest_channel": {
"description": "The channel on the destination chain (the chain this is executed on) to write the acknowledgement to.",
"allOf": [
{
"$ref": "#/definitions/IbcEndpoint"
}
]
"channel_id": {
"description": "The local channel (on the chain this is executed on) to write the acknowledgement to.",
"type": "string"
},
"sequence": {
"description": "The sequence number of the packet to acknowledge.",
Expand Down
6 changes: 3 additions & 3 deletions packages/std/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ pub enum IbcMsg {
/// In this case, you can return an [`IbcReceiveResponse`] with an acknowledgement of `None`
/// from `ibc_packet_receive` and call this message later.
WriteAcknowledgement {
/// The channel on the destination chain (the chain this is executed on)
/// The local channel (on the chain this is executed on)
/// to write the acknowledgement to.
dest_channel: IbcEndpoint,
channel_id: String,
/// The sequence number of the packet to acknowledge.
sequence: u64,
ack: IbcAcknowledgement,
ack: Binary,
},
}

Expand Down

0 comments on commit 259ac5d

Please sign in to comment.