Skip to content

Commit 4099566

Browse files
authored
Merge pull request #260 from yihuang/update-cosmwas-std
Update cosmwasm-std
2 parents 3995ea9 + 120857d commit 4099566

File tree

235 files changed

+4720
-3830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+4720
-3830
lines changed

.circleci/config.yml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ workflows:
1616
- contract_cw20_ics20
1717
- contract_cw20_staking
1818
- contract_cw721_base
19+
- contract_cw1155_base
1920
- package_controllers
2021
- package_cw0
2122
- package_cw1
@@ -24,6 +25,7 @@ workflows:
2425
- package_cw4
2526
- package_cw20
2627
- package_cw721
28+
- package_cw1155
2729
- package_multi_test
2830
- package_storage_plus
2931
- lint
@@ -509,6 +511,42 @@ jobs:
509511
- target
510512
key: cargocache-cw721-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}
511513

514+
contract_cw1155_base:
515+
docker:
516+
- image: rust:1.51.0
517+
working_directory: ~/project/contracts/cw1155-base
518+
steps:
519+
- checkout:
520+
path: ~/project
521+
- run:
522+
name: Version information
523+
command: rustc --version; cargo --version; rustup --version
524+
- restore_cache:
525+
keys:
526+
- cargocache-cw1155-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}
527+
- run:
528+
name: Unit Tests
529+
environment:
530+
RUST_BACKTRACE: 1
531+
command: cargo unit-test --locked
532+
- run:
533+
name: Build and run schema generator
534+
command: cargo schema --locked
535+
- run:
536+
name: Ensure checked-in schemas are up-to-date
537+
command: |
538+
CHANGES_IN_REPO=$(git status --porcelain)
539+
if [[ -n "$CHANGES_IN_REPO" ]]; then
540+
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
541+
git status && git --no-pager diff
542+
exit 1
543+
fi
544+
- save_cache:
545+
paths:
546+
- /usr/local/cargo/registry
547+
- target
548+
key: cargocache-cw1155-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}
549+
512550
package_controllers:
513551
docker:
514552
- image: rust:1.51.0
@@ -770,6 +808,44 @@ jobs:
770808
- target
771809
key: cargocache-v2-cw721:1.51.0-{{ checksum "~/project/Cargo.lock" }}
772810

811+
812+
package_cw1155:
813+
docker:
814+
- image: rust:1.51.0
815+
working_directory: ~/project/packages/cw1155
816+
steps:
817+
- checkout:
818+
path: ~/project
819+
- run:
820+
name: Version information
821+
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
822+
- restore_cache:
823+
keys:
824+
- cargocache-v2-cw1155:1.51.0-{{ checksum "~/project/Cargo.lock" }}
825+
- run:
826+
name: Build library for native target
827+
command: cargo build --locked
828+
- run:
829+
name: Run unit tests
830+
command: cargo test --locked
831+
- run:
832+
name: Build and run schema generator
833+
command: cargo schema --locked
834+
- run:
835+
name: Ensure schemas are up-to-date
836+
command: |
837+
CHANGES_IN_REPO=$(git status --porcelain)
838+
if [[ -n "$CHANGES_IN_REPO" ]]; then
839+
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
840+
git status && git --no-pager diff
841+
exit 1
842+
fi
843+
- save_cache:
844+
paths:
845+
- /usr/local/cargo/registry
846+
- target
847+
key: cargocache-v2-cw1155:1.51.0-{{ checksum "~/project/Cargo.lock" }}
848+
773849
lint:
774850
docker:
775851
- image: rust:1.51.0
@@ -833,7 +909,7 @@ jobs:
833909
# Uses --debug for compilation speed
834910
# FIXME: Change when `check_contract` (part of `cosmwasm-0.14.0`) is published
835911
#command: cargo install --debug --features iterator --example check_contract -- cosmwasm-vm
836-
command: cargo install --debug --features iterator --git https://github.com/CosmWasm/cosmwasm --tag=v0.14.0-beta1 --example check_contract -- cosmwasm-vm
912+
command: cargo install --debug --features iterator --git https://github.com/CosmWasm/cosmwasm --tag=v0.14.0-beta2 --example check_contract -- cosmwasm-vm
837913
- save_cache:
838914
paths:
839915
- /usr/local/cargo/registry

Cargo.lock

Lines changed: 19 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ incremental = false
5353
codegen-units = 1
5454
incremental = false
5555

56+
[profile.release.package.cw1155-base]
57+
codegen-units = 1
58+
incremental = false
59+
5660
[profile.release]
5761
rpath = false
5862
lto = true

contracts/cw1-subkeys/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ cw0 = { path = "../../packages/cw0", version = "0.6.0-alpha3" }
2222
cw1 = { path = "../../packages/cw1", version = "0.6.0-alpha3" }
2323
cw2 = { path = "../../packages/cw2", version = "0.6.0-alpha3" }
2424
cw1-whitelist = { path = "../cw1-whitelist", version = "0.6.0-alpha3", features = ["library"] }
25-
cosmwasm-std = { version = "0.14.0-beta1", features = ["iterator", "staking"] }
25+
cosmwasm-std = { version = "0.14.0-beta2", features = ["iterator", "staking"] }
2626
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.6.0-alpha3", features = ["iterator"] }
27-
schemars = "0.7"
27+
schemars = "0.8.1"
2828
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
2929
thiserror = { version = "1.0.20" }
3030

3131
[dev-dependencies]
32-
cosmwasm-schema = { version = "0.14.0-beta1" }
32+
cosmwasm-schema = { version = "0.14.0-beta2" }

contracts/cw1-subkeys/schema/admin_list_response.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
"admins": {
1111
"type": "array",
1212
"items": {
13-
"$ref": "#/definitions/HumanAddr"
13+
"type": "string"
1414
}
1515
},
1616
"mutable": {
1717
"type": "boolean"
1818
}
19-
},
20-
"definitions": {
21-
"HumanAddr": {
22-
"type": "string"
23-
}
2419
}
2520
}

contracts/cw1-subkeys/schema/all_allowances_response.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"$ref": "#/definitions/Expiration"
3030
},
3131
"spender": {
32-
"$ref": "#/definitions/HumanAddr"
32+
"type": "string"
3333
}
3434
}
3535
},
@@ -63,7 +63,8 @@
6363
"format": "uint64",
6464
"minimum": 0.0
6565
}
66-
}
66+
},
67+
"additionalProperties": false
6768
},
6869
{
6970
"description": "AtTime will expire when `env.block.time` >= time",
@@ -77,7 +78,8 @@
7778
"format": "uint64",
7879
"minimum": 0.0
7980
}
80-
}
81+
},
82+
"additionalProperties": false
8183
},
8284
{
8385
"description": "Never will never expire. Used to express the empty variant",
@@ -89,13 +91,11 @@
8991
"never": {
9092
"type": "object"
9193
}
92-
}
94+
},
95+
"additionalProperties": false
9396
}
9497
]
9598
},
96-
"HumanAddr": {
97-
"type": "string"
98-
},
9999
"NativeBalance": {
100100
"type": "array",
101101
"items": {

contracts/cw1-subkeys/schema/allowance.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"format": "uint64",
4646
"minimum": 0.0
4747
}
48-
}
48+
},
49+
"additionalProperties": false
4950
},
5051
{
5152
"description": "AtTime will expire when `env.block.time` >= time",
@@ -59,7 +60,8 @@
5960
"format": "uint64",
6061
"minimum": 0.0
6162
}
62-
}
63+
},
64+
"additionalProperties": false
6365
},
6466
{
6567
"description": "Never will never expire. Used to express the empty variant",
@@ -71,7 +73,8 @@
7173
"never": {
7274
"type": "object"
7375
}
74-
}
76+
},
77+
"additionalProperties": false
7578
}
7679
]
7780
},

0 commit comments

Comments
 (0)