Skip to content

Commit 2338f8e

Browse files
committed
Encode default as defaulting
1 parent fbe7c88 commit 2338f8e

File tree

12 files changed

+87
-142
lines changed

12 files changed

+87
-142
lines changed

contracts/burner/schema/cw_schema/burner.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"type": "struct",
2626
"properties": {
2727
"delete": {
28+
"defaulting": true,
2829
"description": "Optional amount of items to delete in this call.\nIf it is not provided, nothing will be deleted.\nYou can delete further items in a subsequent execute call.",
29-
"value": 4
30+
"value": 3
3031
},
3132
"denoms": {
3233
"description": "The denoms of the final payout. Balances of tokens not listed here\nwill remain in the account untouched.",
@@ -52,11 +53,6 @@
5253
"type": "integer",
5354
"precision": 32,
5455
"signed": false
55-
},
56-
{
57-
"name": "core::option::Option<u32>",
58-
"type": "optional",
59-
"inner": 3
6056
}
6157
]
6258
},

contracts/burner/schema/cw_schema/raw/migrate.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
"type": "struct",
88
"properties": {
99
"delete": {
10+
"defaulting": true,
1011
"description": "Optional amount of items to delete in this call.\nIf it is not provided, nothing will be deleted.\nYou can delete further items in a subsequent execute call.",
11-
"value": 4
12+
"value": 3
1213
},
1314
"denoms": {
1415
"description": "The denoms of the final payout. Balances of tokens not listed here\nwill remain in the account untouched.",
@@ -34,11 +35,6 @@
3435
"type": "integer",
3536
"precision": 32,
3637
"signed": false
37-
},
38-
{
39-
"name": "core::option::Option<u32>",
40-
"type": "optional",
41-
"inner": 3
4238
}
4339
]
4440
}

contracts/cyberpunk/schema/cw_schema/cyberpunk.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@
301301
"value": 1
302302
},
303303
"contract": {
304-
"value": 10
304+
"value": 9
305305
},
306306
"transaction": {
307307
"description": "Information on the transaction this message was executed in.\nThe field is unset when the `MsgExecuteContract`/`MsgInstantiateContract`/`MsgMigrateContract`\nis not executed as part of a transaction.",
308-
"value": 9
308+
"value": 8
309309
}
310310
}
311311
},
@@ -346,8 +346,9 @@
346346
"type": "struct",
347347
"properties": {
348348
"hash": {
349+
"defaulting": true,
349350
"description": "Hash of the transaction.\n\nIf the blockchain's CosmWasm version is below 3.0, this field\nwill default to being empty.",
350-
"value": 8
351+
"value": 7
351352
},
352353
"index": {
353354
"description": "The position of this transaction in the block. The first\ntransaction has index 0.\n\nThis allows you to get a unique transaction identifier in this chain\nusing the pair (`env.block.height`, `env.transaction.index`).\n",
@@ -366,11 +367,6 @@
366367
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization\nwith 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>.\nSee also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
367368
"type": "binary"
368369
},
369-
{
370-
"name": "core::option::Option<cosmwasm_std::binary::Binary>",
371-
"type": "optional",
372-
"inner": 7
373-
},
374370
{
375371
"name": "core::option::Option<cosmwasm_std::types::TransactionInfo>",
376372
"type": "optional",
@@ -381,7 +377,7 @@
381377
"type": "struct",
382378
"properties": {
383379
"address": {
384-
"value": 11
380+
"value": 10
385381
}
386382
}
387383
},

contracts/cyberpunk/schema/cw_schema/raw/response_to_mirror_env.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"value": 1
1111
},
1212
"contract": {
13-
"value": 10
13+
"value": 9
1414
},
1515
"transaction": {
1616
"description": "Information on the transaction this message was executed in.\nThe field is unset when the `MsgExecuteContract`/`MsgInstantiateContract`/`MsgMigrateContract`\nis not executed as part of a transaction.",
17-
"value": 9
17+
"value": 8
1818
}
1919
}
2020
},
@@ -55,8 +55,9 @@
5555
"type": "struct",
5656
"properties": {
5757
"hash": {
58+
"defaulting": true,
5859
"description": "Hash of the transaction.\n\nIf the blockchain's CosmWasm version is below 3.0, this field\nwill default to being empty.",
59-
"value": 8
60+
"value": 7
6061
},
6162
"index": {
6263
"description": "The position of this transaction in the block. The first\ntransaction has index 0.\n\nThis allows you to get a unique transaction identifier in this chain\nusing the pair (`env.block.height`, `env.transaction.index`).\n",
@@ -75,11 +76,6 @@
7576
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization\nwith 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>.\nSee also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
7677
"type": "binary"
7778
},
78-
{
79-
"name": "core::option::Option<cosmwasm_std::binary::Binary>",
80-
"type": "optional",
81-
"inner": 7
82-
},
8379
{
8480
"name": "core::option::Option<cosmwasm_std::types::TransactionInfo>",
8581
"type": "optional",
@@ -90,7 +86,7 @@
9086
"type": "struct",
9187
"properties": {
9288
"address": {
93-
"value": 11
89+
"value": 10
9490
}
9591
}
9692
},

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
"type": "named",
2727
"properties": {
2828
"callback_type": {
29+
"defaulting": true,
2930
"description": "Who should receive callbacks for the message",
30-
"value": 4
31+
"value": 3
3132
},
3233
"channel_id": {
3334
"description": "The channel to send the packet through",
@@ -72,11 +73,6 @@
7273
"type": "unit"
7374
}
7475
}
75-
},
76-
{
77-
"name": "core::option::Option<ibc_callbacks::msg::CallbackType>",
78-
"type": "optional",
79-
"inner": 3
8076
}
8177
]
8278
},
@@ -113,7 +109,7 @@
113109
"value": 14
114110
},
115111
"ibc_destination_callbacks": {
116-
"value": 24
112+
"value": 23
117113
},
118114
"ibc_timeout_callbacks": {
119115
"value": 16
@@ -278,8 +274,9 @@
278274
"value": 4
279275
},
280276
"transfer": {
277+
"defaulting": true,
281278
"description": "When the underlying packet is a successful transfer message,\nthis field contains information about the transfer. Otherwise it is empty.\n\nThis is always empty on chains using CosmWasm < 3.0",
282-
"value": 23
279+
"value": 22
283280
}
284281
}
285282
},
@@ -330,11 +327,6 @@
330327
"type": "optional",
331328
"inner": 18
332329
},
333-
{
334-
"name": "core::option::Option<core::option::Option<cosmwasm_std::ibc::callbacks::IbcTransferCallback>>",
335-
"type": "optional",
336-
"inner": 22
337-
},
338330
{
339331
"name": "alloc::vec::Vec<cosmwasm_std::ibc::callbacks::IbcDestinationCallbackMsg>",
340332
"type": "array",

contracts/ibc-callbacks/schema/cw_schema/raw/execute.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
"type": "named",
1111
"properties": {
1212
"callback_type": {
13+
"defaulting": true,
1314
"description": "Who should receive callbacks for the message",
14-
"value": 4
15+
"value": 3
1516
},
1617
"channel_id": {
1718
"description": "The channel to send the packet through",
@@ -56,11 +57,6 @@
5657
"type": "unit"
5758
}
5859
}
59-
},
60-
{
61-
"name": "core::option::Option<ibc_callbacks::msg::CallbackType>",
62-
"type": "optional",
63-
"inner": 3
6460
}
6561
]
6662
}

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"value": 14
1212
},
1313
"ibc_destination_callbacks": {
14-
"value": 24
14+
"value": 23
1515
},
1616
"ibc_timeout_callbacks": {
1717
"value": 16
@@ -176,8 +176,9 @@
176176
"value": 4
177177
},
178178
"transfer": {
179+
"defaulting": true,
179180
"description": "When the underlying packet is a successful transfer message,\nthis field contains information about the transfer. Otherwise it is empty.\n\nThis is always empty on chains using CosmWasm < 3.0",
180-
"value": 23
181+
"value": 22
181182
}
182183
}
183184
},
@@ -228,11 +229,6 @@
228229
"type": "optional",
229230
"inner": 18
230231
},
231-
{
232-
"name": "core::option::Option<core::option::Option<cosmwasm_std::ibc::callbacks::IbcTransferCallback>>",
233-
"type": "optional",
234-
"inner": 22
235-
},
236232
{
237233
"name": "alloc::vec::Vec<cosmwasm_std::ibc::callbacks::IbcDestinationCallbackMsg>",
238234
"type": "array",

contracts/reflect/schema/cw_schema/raw/execute.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"type": "named",
2727
"properties": {
2828
"msgs": {
29-
"value": 32
29+
"value": 31
3030
}
3131
}
3232
}
@@ -610,7 +610,7 @@
610610
"properties": {
611611
"gas_limit": {
612612
"description": "Gas limit measured in [Cosmos SDK gas](https://github.com/CosmWasm/cosmwasm/blob/main/docs/GAS.md).\n\nSetting this to `None` means unlimited. Then the submessage execution can consume all gas of the\ncurrent execution context.",
613-
"value": 30
613+
"value": 29
614614
},
615615
"id": {
616616
"description": "An arbitrary ID chosen by the contract.\nThis is typically used to match `Reply`s in the `reply` entry point to the submessage.",
@@ -620,19 +620,15 @@
620620
"value": 1
621621
},
622622
"payload": {
623+
"defaulting": true,
623624
"description": "Some arbitrary data that the contract can set in an application specific way.\nThis is just passed into the `reply` entry point and is not stored to state.\nAny encoding can be used. If `id` is used to identify a particular action,\nthe encoding can also be different for each of those actions since you can match `id`\nfirst and then start processing the `payload`.\n\nThe environment restricts the length of this field in order to avoid abuse. The limit\nis environment specific and can change over time. The initial default is 128 KiB.\n\nUnset/nil/null cannot be differentiated from empty data.\n\nOn chains running CosmWasm 1.x this field will be ignored.",
624-
"value": 29
625+
"value": 8
625626
},
626627
"reply_on": {
627-
"value": 31
628+
"value": 30
628629
}
629630
}
630631
},
631-
{
632-
"name": "core::option::Option<cosmwasm_std::binary::Binary>",
633-
"type": "optional",
634-
"inner": 8
635-
},
636632
{
637633
"name": "core::option::Option<u64>",
638634
"type": "optional",

0 commit comments

Comments
 (0)