You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add support for IBCv2 Send entry point (#2477)
* feat: Add support for IBCv2 Sent entry point
* Update packages/std/src/ibc2.rs
Co-authored-by: Christoph Otter <[email protected]>
* chore: Update static analysis with ack entry point
* chore: Update schema
---------
Co-authored-by: Christoph Otter <[email protected]>
Copy file name to clipboardExpand all lines: contracts/ibc2/schema/ibc2.json
+103-1Lines changed: 103 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,16 @@
59
59
"format": "uint32",
60
60
"minimum": 0.0
61
61
},
62
+
"last_packet_sent": {
63
+
"anyOf": [
64
+
{
65
+
"$ref": "#/definitions/Ibc2PacketSendMsg"
66
+
},
67
+
{
68
+
"type": "null"
69
+
}
70
+
]
71
+
},
62
72
"last_packet_seq": {
63
73
"type": "integer",
64
74
"format": "uint64",
@@ -68,7 +78,99 @@
68
78
"type": "string"
69
79
}
70
80
},
71
-
"additionalProperties": false
81
+
"additionalProperties": false,
82
+
"definitions": {
83
+
"Addr": {
84
+
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
85
+
"type": "string"
86
+
},
87
+
"Binary": {
88
+
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
89
+
"type": "string"
90
+
},
91
+
"Ibc2PacketSendMsg": {
92
+
"description": "Ibc2PacketSendMsg represents a payload sent event in the IBC2 protocol. Since sending IBCv2 packet is permissionless, the IBC protocol introduces an extra entry point, in which the application can verify the message sent from a port ID belonging to the contract.\n\nIt includes details about the source and destination clients, the sequence number of the packet and the signer that sent the message.",
93
+
"type": "object",
94
+
"required": [
95
+
"destination_client",
96
+
"packet_sequence",
97
+
"payload",
98
+
"signer",
99
+
"source_client"
100
+
],
101
+
"properties": {
102
+
"destination_client": {
103
+
"description": "The identifier of the client that was the intended recipient.",
104
+
"type": "string"
105
+
},
106
+
"packet_sequence": {
107
+
"description": "The sequence number of the sent packet.",
108
+
"type": "integer",
109
+
"format": "uint64",
110
+
"minimum": 0.0
111
+
},
112
+
"payload": {
113
+
"description": "The payload to be sent.",
114
+
"allOf": [
115
+
{
116
+
"$ref": "#/definitions/Ibc2Payload"
117
+
}
118
+
]
119
+
},
120
+
"signer": {
121
+
"description": "The address of the signer that sent the packet.",
122
+
"allOf": [
123
+
{
124
+
"$ref": "#/definitions/Addr"
125
+
}
126
+
]
127
+
},
128
+
"source_client": {
129
+
"description": "The identifier of the client that originally sent the packet.",
130
+
"type": "string"
131
+
}
132
+
},
133
+
"additionalProperties": false
134
+
},
135
+
"Ibc2Payload": {
136
+
"description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.",
137
+
"type": "object",
138
+
"required": [
139
+
"destination_port",
140
+
"encoding",
141
+
"source_port",
142
+
"value",
143
+
"version"
144
+
],
145
+
"properties": {
146
+
"destination_port": {
147
+
"description": "The port id on the chain where the packet is sent to.",
148
+
"type": "string"
149
+
},
150
+
"encoding": {
151
+
"description": "Encoding used to serialize the [Ibc2Payload::value].",
152
+
"type": "string"
153
+
},
154
+
"source_port": {
155
+
"description": "The port id on the chain where the packet is sent from.",
156
+
"type": "string"
157
+
},
158
+
"value": {
159
+
"description": "Encoded payload data.",
160
+
"allOf": [
161
+
{
162
+
"$ref": "#/definitions/Binary"
163
+
}
164
+
]
165
+
},
166
+
"version": {
167
+
"description": "Version of the receiving contract.",
Copy file name to clipboardExpand all lines: contracts/ibc2/schema/raw/response_to_query_state.json
+103-1Lines changed: 103 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,16 @@
25
25
"format": "uint32",
26
26
"minimum": 0.0
27
27
},
28
+
"last_packet_sent": {
29
+
"anyOf": [
30
+
{
31
+
"$ref": "#/definitions/Ibc2PacketSendMsg"
32
+
},
33
+
{
34
+
"type": "null"
35
+
}
36
+
]
37
+
},
28
38
"last_packet_seq": {
29
39
"type": "integer",
30
40
"format": "uint64",
@@ -34,5 +44,97 @@
34
44
"type": "string"
35
45
}
36
46
},
37
-
"additionalProperties": false
47
+
"additionalProperties": false,
48
+
"definitions": {
49
+
"Addr": {
50
+
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
51
+
"type": "string"
52
+
},
53
+
"Binary": {
54
+
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
55
+
"type": "string"
56
+
},
57
+
"Ibc2PacketSendMsg": {
58
+
"description": "Ibc2PacketSendMsg represents a payload sent event in the IBC2 protocol. Since sending IBCv2 packet is permissionless, the IBC protocol introduces an extra entry point, in which the application can verify the message sent from a port ID belonging to the contract.\n\nIt includes details about the source and destination clients, the sequence number of the packet and the signer that sent the message.",
59
+
"type": "object",
60
+
"required": [
61
+
"destination_client",
62
+
"packet_sequence",
63
+
"payload",
64
+
"signer",
65
+
"source_client"
66
+
],
67
+
"properties": {
68
+
"destination_client": {
69
+
"description": "The identifier of the client that was the intended recipient.",
70
+
"type": "string"
71
+
},
72
+
"packet_sequence": {
73
+
"description": "The sequence number of the sent packet.",
74
+
"type": "integer",
75
+
"format": "uint64",
76
+
"minimum": 0.0
77
+
},
78
+
"payload": {
79
+
"description": "The payload to be sent.",
80
+
"allOf": [
81
+
{
82
+
"$ref": "#/definitions/Ibc2Payload"
83
+
}
84
+
]
85
+
},
86
+
"signer": {
87
+
"description": "The address of the signer that sent the packet.",
88
+
"allOf": [
89
+
{
90
+
"$ref": "#/definitions/Addr"
91
+
}
92
+
]
93
+
},
94
+
"source_client": {
95
+
"description": "The identifier of the client that originally sent the packet.",
96
+
"type": "string"
97
+
}
98
+
},
99
+
"additionalProperties": false
100
+
},
101
+
"Ibc2Payload": {
102
+
"description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.",
103
+
"type": "object",
104
+
"required": [
105
+
"destination_port",
106
+
"encoding",
107
+
"source_port",
108
+
"value",
109
+
"version"
110
+
],
111
+
"properties": {
112
+
"destination_port": {
113
+
"description": "The port id on the chain where the packet is sent to.",
114
+
"type": "string"
115
+
},
116
+
"encoding": {
117
+
"description": "Encoding used to serialize the [Ibc2Payload::value].",
118
+
"type": "string"
119
+
},
120
+
"source_port": {
121
+
"description": "The port id on the chain where the packet is sent from.",
122
+
"type": "string"
123
+
},
124
+
"value": {
125
+
"description": "Encoded payload data.",
126
+
"allOf": [
127
+
{
128
+
"$ref": "#/definitions/Binary"
129
+
}
130
+
]
131
+
},
132
+
"version": {
133
+
"description": "Version of the receiving contract.",
0 commit comments