Skip to content

Commit 3cc434a

Browse files
committed
Update schemas
1 parent f11c063 commit 3cc434a

File tree

15 files changed

+77
-117
lines changed

15 files changed

+77
-117
lines changed

contracts/hackatom/schema/hackatom.json

Lines changed: 25 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
"$schema": "http://json-schema.org/draft-07/schema#",
77
"title": "InstantiateMsg",
88
"type": "object",
9-
"required": [
10-
"beneficiary",
11-
"verifier"
12-
],
9+
"required": ["beneficiary", "verifier"],
1310
"properties": {
1411
"beneficiary": {
1512
"type": "string"
@@ -27,15 +24,11 @@
2724
{
2825
"description": "Releasing all funds of the given denom in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.",
2926
"type": "object",
30-
"required": [
31-
"release"
32-
],
27+
"required": ["release"],
3328
"properties": {
3429
"release": {
3530
"type": "object",
36-
"required": [
37-
"denom"
38-
],
31+
"required": ["denom"],
3932
"properties": {
4033
"denom": {
4134
"type": "string"
@@ -49,9 +42,7 @@
4942
{
5043
"description": "Infinite loop to burn cpu cycles (only run when metering is enabled)",
5144
"type": "object",
52-
"required": [
53-
"cpu_loop"
54-
],
45+
"required": ["cpu_loop"],
5546
"properties": {
5647
"cpu_loop": {
5748
"type": "object",
@@ -63,9 +54,7 @@
6354
{
6455
"description": "Infinite loop making storage calls (to test when their limit hits)",
6556
"type": "object",
66-
"required": [
67-
"storage_loop"
68-
],
57+
"required": ["storage_loop"],
6958
"properties": {
7059
"storage_loop": {
7160
"type": "object",
@@ -77,9 +66,7 @@
7766
{
7867
"description": "Infinite loop reading and writing memory",
7968
"type": "object",
80-
"required": [
81-
"memory_loop"
82-
],
69+
"required": ["memory_loop"],
8370
"properties": {
8471
"memory_loop": {
8572
"type": "object",
@@ -91,9 +78,7 @@
9178
{
9279
"description": "Infinite loop sending message to itself",
9380
"type": "object",
94-
"required": [
95-
"message_loop"
96-
],
81+
"required": ["message_loop"],
9782
"properties": {
9883
"message_loop": {
9984
"type": "object",
@@ -105,15 +90,11 @@
10590
{
10691
"description": "Allocate large amounts of memory without consuming much gas",
10792
"type": "object",
108-
"required": [
109-
"allocate_large_memory"
110-
],
93+
"required": ["allocate_large_memory"],
11194
"properties": {
11295
"allocate_large_memory": {
11396
"type": "object",
114-
"required": [
115-
"pages"
116-
],
97+
"required": ["pages"],
11798
"properties": {
11899
"pages": {
119100
"type": "integer",
@@ -129,9 +110,7 @@
129110
{
130111
"description": "Trigger a panic to ensure framework handles gracefully",
131112
"type": "object",
132-
"required": [
133-
"panic"
134-
],
113+
"required": ["panic"],
135114
"properties": {
136115
"panic": {
137116
"type": "object",
@@ -143,9 +122,7 @@
143122
{
144123
"description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.",
145124
"type": "object",
146-
"required": [
147-
"user_errors_in_api_calls"
148-
],
125+
"required": ["user_errors_in_api_calls"],
149126
"properties": {
150127
"user_errors_in_api_calls": {
151128
"type": "object",
@@ -163,9 +140,7 @@
163140
{
164141
"description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests",
165142
"type": "object",
166-
"required": [
167-
"verifier"
168-
],
143+
"required": ["verifier"],
169144
"properties": {
170145
"verifier": {
171146
"type": "object",
@@ -177,16 +152,11 @@
177152
{
178153
"description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into",
179154
"type": "object",
180-
"required": [
181-
"recurse"
182-
],
155+
"required": ["recurse"],
183156
"properties": {
184157
"recurse": {
185158
"type": "object",
186-
"required": [
187-
"depth",
188-
"work"
189-
],
159+
"required": ["depth", "work"],
190160
"properties": {
191161
"depth": {
192162
"type": "integer",
@@ -207,9 +177,7 @@
207177
{
208178
"description": "GetInt returns a hardcoded u32 value",
209179
"type": "object",
210-
"required": [
211-
"get_int"
212-
],
180+
"required": ["get_int"],
213181
"properties": {
214182
"get_int": {
215183
"type": "object",
@@ -225,9 +193,7 @@
225193
"title": "MigrateMsg",
226194
"description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)",
227195
"type": "object",
228-
"required": [
229-
"verifier"
230-
],
196+
"required": ["verifier"],
231197
"properties": {
232198
"verifier": {
233199
"type": "string"
@@ -242,16 +208,11 @@
242208
"oneOf": [
243209
{
244210
"type": "object",
245-
"required": [
246-
"steal_funds"
247-
],
211+
"required": ["steal_funds"],
248212
"properties": {
249213
"steal_funds": {
250214
"type": "object",
251-
"required": [
252-
"amount",
253-
"recipient"
254-
],
215+
"required": ["amount", "recipient"],
255216
"properties": {
256217
"amount": {
257218
"type": "array",
@@ -272,22 +233,19 @@
272233
"definitions": {
273234
"Coin": {
274235
"type": "object",
275-
"required": [
276-
"amount",
277-
"denom"
278-
],
236+
"required": ["amount", "denom"],
279237
"properties": {
280238
"amount": {
281-
"$ref": "#/definitions/Uint128"
239+
"$ref": "#/definitions/Uint256"
282240
},
283241
"denom": {
284242
"type": "string"
285243
}
286244
},
287245
"additionalProperties": false
288246
},
289-
"Uint128": {
290-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
247+
"Uint256": {
248+
"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); ```",
291249
"type": "string"
292250
}
293251
}
@@ -297,9 +255,7 @@
297255
"$schema": "http://json-schema.org/draft-07/schema#",
298256
"title": "IntResponse",
299257
"type": "object",
300-
"required": [
301-
"int"
302-
],
258+
"required": ["int"],
303259
"properties": {
304260
"int": {
305261
"type": "integer",
@@ -313,9 +269,7 @@
313269
"$schema": "http://json-schema.org/draft-07/schema#",
314270
"title": "RecurseResponse",
315271
"type": "object",
316-
"required": [
317-
"hashed"
318-
],
272+
"required": ["hashed"],
319273
"properties": {
320274
"hashed": {
321275
"description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address",
@@ -338,9 +292,7 @@
338292
"$schema": "http://json-schema.org/draft-07/schema#",
339293
"title": "VerifierResponse",
340294
"type": "object",
341-
"required": [
342-
"verifier"
343-
],
295+
"required": ["verifier"],
344296
"properties": {
345297
"verifier": {
346298
"type": "string"

contracts/hackatom/schema/raw/response_to_other_balance.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
],
2525
"properties": {
2626
"amount": {
27-
"$ref": "#/definitions/Uint128"
27+
"$ref": "#/definitions/Uint256"
2828
},
2929
"denom": {
3030
"type": "string"
3131
}
3232
},
3333
"additionalProperties": false
3434
},
35-
"Uint128": {
36-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
35+
"Uint256": {
36+
"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); ```",
3737
"type": "string"
3838
}
3939
}

contracts/hackatom/schema/raw/sudo.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
],
4242
"properties": {
4343
"amount": {
44-
"$ref": "#/definitions/Uint128"
44+
"$ref": "#/definitions/Uint256"
4545
},
4646
"denom": {
4747
"type": "string"
4848
}
4949
},
5050
"additionalProperties": false
5151
},
52-
"Uint128": {
53-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
52+
"Uint256": {
53+
"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); ```",
5454
"type": "string"
5555
}
5656
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
],
186186
"properties": {
187187
"amount": {
188-
"$ref": "#/definitions/Uint128"
188+
"$ref": "#/definitions/Uint256"
189189
},
190190
"denom": {
191191
"type": "string"
@@ -662,8 +662,8 @@
662662
}
663663
]
664664
},
665-
"Uint128": {
666-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
665+
"Uint256": {
666+
"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); ```",
667667
"type": "string"
668668
},
669669
"Uint64": {
@@ -962,7 +962,7 @@
962962
],
963963
"properties": {
964964
"amount": {
965-
"$ref": "#/definitions/Uint128"
965+
"$ref": "#/definitions/Uint256"
966966
},
967967
"denom": {
968968
"type": "string"
@@ -978,8 +978,8 @@
978978
}
979979
]
980980
},
981-
"Uint128": {
982-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
981+
"Uint256": {
982+
"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); ```",
983983
"type": "string"
984984
},
985985
"Uint64": {
@@ -1062,7 +1062,7 @@
10621062
],
10631063
"properties": {
10641064
"amount": {
1065-
"$ref": "#/definitions/Uint128"
1065+
"$ref": "#/definitions/Uint256"
10661066
},
10671067
"denom": {
10681068
"type": "string"
@@ -1078,8 +1078,8 @@
10781078
}
10791079
]
10801080
},
1081-
"Uint128": {
1082-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
1081+
"Uint256": {
1082+
"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); ```",
10831083
"type": "string"
10841084
},
10851085
"Uint64": {

contracts/ibc-reflect-send/schema/ibc/acknowledgement_msg_balances.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@
5757
],
5858
"properties": {
5959
"amount": {
60-
"$ref": "#/definitions/Uint128"
60+
"$ref": "#/definitions/Uint256"
6161
},
6262
"denom": {
6363
"type": "string"
6464
}
6565
},
6666
"additionalProperties": false
6767
},
68-
"Uint128": {
69-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
68+
"Uint256": {
69+
"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); ```",
7070
"type": "string"
7171
}
7272
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
],
127127
"properties": {
128128
"amount": {
129-
"$ref": "#/definitions/Uint128"
129+
"$ref": "#/definitions/Uint256"
130130
},
131131
"denom": {
132132
"type": "string"
@@ -603,8 +603,8 @@
603603
}
604604
]
605605
},
606-
"Uint128": {
607-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 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 `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
606+
"Uint256": {
607+
"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); ```",
608608
"type": "string"
609609
},
610610
"Uint64": {

0 commit comments

Comments
 (0)