Skip to content

Commit 7cf0e6f

Browse files
committed
Update contract schemas
1 parent e4e8373 commit 7cf0e6f

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

contracts/ibc-callbacks/schema/ibc-callbacks.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,22 @@
148148
"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>.",
149149
"type": "string"
150150
},
151+
"Coin": {
152+
"type": "object",
153+
"required": [
154+
"amount",
155+
"denom"
156+
],
157+
"properties": {
158+
"amount": {
159+
"$ref": "#/definitions/Uint256"
160+
},
161+
"denom": {
162+
"type": "string"
163+
}
164+
},
165+
"additionalProperties": false
166+
},
151167
"IbcAckCallbackMsg": {
152168
"type": "object",
153169
"required": [
@@ -191,6 +207,14 @@
191207
"ack": {
192208
"$ref": "#/definitions/IbcAcknowledgement"
193209
},
210+
"funds": {
211+
"description": "When the underlying packet is a transfer message and the receiver is the contract that receives the callback, this field contains the coins that were transferred. Otherwise it is empty.\n\nWhen the callback is executed, the transfer is completed already and the coins are now owned by the contract.\n\nThis is always empty on chains using CosmWasm < 3.0",
212+
"default": [],
213+
"type": "array",
214+
"items": {
215+
"$ref": "#/definitions/Coin"
216+
}
217+
},
194218
"packet": {
195219
"$ref": "#/definitions/IbcPacket"
196220
}
@@ -333,6 +357,10 @@
333357
}
334358
]
335359
},
360+
"Uint256": {
361+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
362+
"type": "string"
363+
},
336364
"Uint64": {
337365
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
338366
"type": "string"

contracts/ibc-callbacks/schema/raw/response_to_callback_stats.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,22 @@
3838
"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>.",
3939
"type": "string"
4040
},
41+
"Coin": {
42+
"type": "object",
43+
"required": [
44+
"amount",
45+
"denom"
46+
],
47+
"properties": {
48+
"amount": {
49+
"$ref": "#/definitions/Uint256"
50+
},
51+
"denom": {
52+
"type": "string"
53+
}
54+
},
55+
"additionalProperties": false
56+
},
4157
"IbcAckCallbackMsg": {
4258
"type": "object",
4359
"required": [
@@ -81,6 +97,14 @@
8197
"ack": {
8298
"$ref": "#/definitions/IbcAcknowledgement"
8399
},
100+
"funds": {
101+
"description": "When the underlying packet is a transfer message and the receiver is the contract that receives the callback, this field contains the coins that were transferred. Otherwise it is empty.\n\nWhen the callback is executed, the transfer is completed already and the coins are now owned by the contract.\n\nThis is always empty on chains using CosmWasm < 3.0",
102+
"default": [],
103+
"type": "array",
104+
"items": {
105+
"$ref": "#/definitions/Coin"
106+
}
107+
},
84108
"packet": {
85109
"$ref": "#/definitions/IbcPacket"
86110
}
@@ -223,6 +247,10 @@
223247
}
224248
]
225249
},
250+
"Uint256": {
251+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
252+
"type": "string"
253+
},
226254
"Uint64": {
227255
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
228256
"type": "string"

0 commit comments

Comments
 (0)