Skip to content

Commit a15b22b

Browse files
committed
Make staking a default feature, update circle ci
1 parent 27386b4 commit a15b22b

File tree

5 files changed

+356
-4
lines changed

5 files changed

+356
-4
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ jobs:
6060
- run:
6161
name: Build library for native target
6262
working_directory: ~/project/packages/std
63-
command: cargo build --locked
63+
command: cargo build --locked --no-default-features
6464
- run:
6565
name: Build library for wasm target
6666
working_directory: ~/project/packages/std
67-
command: cargo wasm --locked
67+
command: cargo wasm --locked --no-default-features
6868
- run:
6969
name: Run unit tests
7070
working_directory: ~/project/packages/std
71-
command: cargo test --locked
71+
command: cargo test --locked --no-default-features
7272
- run:
7373
name: Build library for native target (with iterator support)
7474
working_directory: ~/project/packages/std
@@ -80,7 +80,7 @@ jobs:
8080
- run:
8181
name: Run unit tests (with iterator and staking support)
8282
working_directory: ~/project/packages/std
83-
command: cargo test --locked --features iterator,staking
83+
command: cargo test --locked --features iterator
8484
- run:
8585
name: Build and run schema generator
8686
working_directory: ~/project/packages/std

packages/std/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ circle-ci = { repository = "CosmWasm/cosmwasm", branch = "master" }
1313
maintenance = { status = "actively-developed" }
1414

1515
[features]
16+
default = ["staking"]
1617
# iterator allows us to iterate over all DB items in a given range
1718
# optional as some merkle stores (like tries) don't support this
1819
# given Ethereum 1.0, 2.0, Substrate, and other major projects use Tries

packages/std/schema/cosmos_msg_for__no_msg.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@
2424
}
2525
}
2626
},
27+
{
28+
"type": "object",
29+
"required": [
30+
"staking"
31+
],
32+
"properties": {
33+
"staking": {
34+
"$ref": "#/definitions/StakingMsg"
35+
}
36+
}
37+
},
2738
{
2839
"type": "object",
2940
"required": [
@@ -97,6 +108,112 @@
97108
"description": "NoMsg can never be instantiated and is a no-op placeholder for those contracts that don't explicitly set a custom message.",
98109
"enum": []
99110
},
111+
"StakingMsg": {
112+
"anyOf": [
113+
{
114+
"type": "object",
115+
"required": [
116+
"delegate"
117+
],
118+
"properties": {
119+
"delegate": {
120+
"type": "object",
121+
"required": [
122+
"amount",
123+
"validator"
124+
],
125+
"properties": {
126+
"amount": {
127+
"$ref": "#/definitions/Coin"
128+
},
129+
"validator": {
130+
"$ref": "#/definitions/HumanAddr"
131+
}
132+
}
133+
}
134+
}
135+
},
136+
{
137+
"type": "object",
138+
"required": [
139+
"undelegate"
140+
],
141+
"properties": {
142+
"undelegate": {
143+
"type": "object",
144+
"required": [
145+
"amount",
146+
"validator"
147+
],
148+
"properties": {
149+
"amount": {
150+
"$ref": "#/definitions/Coin"
151+
},
152+
"validator": {
153+
"$ref": "#/definitions/HumanAddr"
154+
}
155+
}
156+
}
157+
}
158+
},
159+
{
160+
"type": "object",
161+
"required": [
162+
"withdraw"
163+
],
164+
"properties": {
165+
"withdraw": {
166+
"type": "object",
167+
"required": [
168+
"validator"
169+
],
170+
"properties": {
171+
"recipient": {
172+
"anyOf": [
173+
{
174+
"$ref": "#/definitions/HumanAddr"
175+
},
176+
{
177+
"type": "null"
178+
}
179+
]
180+
},
181+
"validator": {
182+
"$ref": "#/definitions/HumanAddr"
183+
}
184+
}
185+
}
186+
}
187+
},
188+
{
189+
"type": "object",
190+
"required": [
191+
"redelegate"
192+
],
193+
"properties": {
194+
"redelegate": {
195+
"type": "object",
196+
"required": [
197+
"amount",
198+
"dst_validator",
199+
"src_validator"
200+
],
201+
"properties": {
202+
"amount": {
203+
"$ref": "#/definitions/Coin"
204+
},
205+
"dst_validator": {
206+
"$ref": "#/definitions/HumanAddr"
207+
},
208+
"src_validator": {
209+
"$ref": "#/definitions/HumanAddr"
210+
}
211+
}
212+
}
213+
}
214+
}
215+
]
216+
},
100217
"Uint128": {
101218
"type": "string"
102219
},

packages/std/schema/handle_result.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,17 @@
336336
}
337337
}
338338
},
339+
{
340+
"type": "object",
341+
"required": [
342+
"staking"
343+
],
344+
"properties": {
345+
"staking": {
346+
"$ref": "#/definitions/StakingMsg"
347+
}
348+
}
349+
},
339350
{
340351
"type": "object",
341352
"required": [
@@ -402,6 +413,112 @@
402413
"description": "NoMsg can never be instantiated and is a no-op placeholder for those contracts that don't explicitly set a custom message.",
403414
"enum": []
404415
},
416+
"StakingMsg": {
417+
"anyOf": [
418+
{
419+
"type": "object",
420+
"required": [
421+
"delegate"
422+
],
423+
"properties": {
424+
"delegate": {
425+
"type": "object",
426+
"required": [
427+
"amount",
428+
"validator"
429+
],
430+
"properties": {
431+
"amount": {
432+
"$ref": "#/definitions/Coin"
433+
},
434+
"validator": {
435+
"$ref": "#/definitions/HumanAddr"
436+
}
437+
}
438+
}
439+
}
440+
},
441+
{
442+
"type": "object",
443+
"required": [
444+
"undelegate"
445+
],
446+
"properties": {
447+
"undelegate": {
448+
"type": "object",
449+
"required": [
450+
"amount",
451+
"validator"
452+
],
453+
"properties": {
454+
"amount": {
455+
"$ref": "#/definitions/Coin"
456+
},
457+
"validator": {
458+
"$ref": "#/definitions/HumanAddr"
459+
}
460+
}
461+
}
462+
}
463+
},
464+
{
465+
"type": "object",
466+
"required": [
467+
"withdraw"
468+
],
469+
"properties": {
470+
"withdraw": {
471+
"type": "object",
472+
"required": [
473+
"validator"
474+
],
475+
"properties": {
476+
"recipient": {
477+
"anyOf": [
478+
{
479+
"$ref": "#/definitions/HumanAddr"
480+
},
481+
{
482+
"type": "null"
483+
}
484+
]
485+
},
486+
"validator": {
487+
"$ref": "#/definitions/HumanAddr"
488+
}
489+
}
490+
}
491+
}
492+
},
493+
{
494+
"type": "object",
495+
"required": [
496+
"redelegate"
497+
],
498+
"properties": {
499+
"redelegate": {
500+
"type": "object",
501+
"required": [
502+
"amount",
503+
"dst_validator",
504+
"src_validator"
505+
],
506+
"properties": {
507+
"amount": {
508+
"$ref": "#/definitions/Coin"
509+
},
510+
"dst_validator": {
511+
"$ref": "#/definitions/HumanAddr"
512+
},
513+
"src_validator": {
514+
"$ref": "#/definitions/HumanAddr"
515+
}
516+
}
517+
}
518+
}
519+
}
520+
]
521+
},
405522
"Uint128": {
406523
"type": "string"
407524
},

0 commit comments

Comments
 (0)