Skip to content

Update cosmwasm-std #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 92 commits into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
af22dfa
update cosmwasm-std, change math api
yihuang Mar 26, 2021
c9e8d34
rename KV -> Pair
yihuang Apr 2, 2021
420dfec
address change: cw0,cw1,cw2,cw3,cw4
yihuang Apr 8, 2021
470c2ba
address change: cw20,cw721,cw1155
yihuang Apr 8, 2021
e654cef
address change: cw-controllers
yihuang Apr 8, 2021
a3dde73
address change: multi-test
yihuang Apr 8, 2021
01d4e95
address change: cw20-base,cw721-base,cw1155-base
yihuang Apr 8, 2021
be013e0
Adjust Addr/String in cw1,3,4
ethanfrey Apr 8, 2021
57d574d
Add cw1155 package+contract to CI
ethanfrey Apr 8, 2021
18df393
Add cw1155 to deploy scripts
ethanfrey Apr 8, 2021
0c08564
Update cw1-whitelist
ethanfrey Apr 8, 2021
2cf5432
cw1-subkey compiles, only Addr, no CanonicalAddr
ethanfrey Apr 8, 2021
5e8e8ba
Fix all tests for cw1-subkeys
ethanfrey Apr 8, 2021
5de3e18
Update schemas
ethanfrey Apr 8, 2021
401a2a7
Add AddrRef for better lifetimes
ethanfrey Apr 8, 2021
55f97f5
Use AddrRef in cw1-subkeys
ethanfrey Apr 8, 2021
49e2be0
Update package cw20
ethanfrey Apr 8, 2021
e3bfa99
Update cw721 spec
ethanfrey Apr 8, 2021
1335006
Update cw1155
ethanfrey Apr 8, 2021
7140497
Remove Canonical helpers
ethanfrey Apr 8, 2021
a82070c
Update controllers to store Addr, not CanonicalAddr
ethanfrey Apr 8, 2021
c4ea90c
cw3-fixed-multisig fixed, temporarily remove integration tests
ethanfrey Apr 8, 2021
c8a8468
Add maybe_addr() helper
maurolacy Apr 8, 2021
d213c97
cargo fmt
maurolacy Apr 8, 2021
bee6474
cw4-group compiles
maurolacy Apr 8, 2021
a332725
Migrate cw4-group unit tests
maurolacy Apr 8, 2021
924240e
cw20-base compiles, tests broken
ethanfrey Apr 8, 2021
b6f055e
Update cw4-group schema
ethanfrey Apr 8, 2021
385600c
cw4-stake compiles
maurolacy Apr 8, 2021
fbb6c17
Update cw4-stake schemas
maurolacy Apr 8, 2021
0ed8772
Remove commented code
maurolacy Apr 9, 2021
e23f7cf
Update cw4-group unit tests
maurolacy Apr 9, 2021
92eca49
Update/fix fw20-base tests
maurolacy Apr 9, 2021
40f2c7e
Use Cw20CoinVerified for Balance
maurolacy Apr 10, 2021
656964f
Use Addr / Cw20CoinVerified for state
maurolacy Apr 10, 2021
e0a3a94
Use String / Cw20Coin for msg
maurolacy Apr 10, 2021
38c40ea
cw20-escrow compiles
maurolacy Apr 10, 2021
a3a086a
Update cw20-escrow unit tests
maurolacy Apr 10, 2021
5ef5bba
Update cw20-escrow integration test
maurolacy Apr 10, 2021
319de31
Use Addr for state
maurolacy Apr 10, 2021
d04994a
Use String 7 Cw20Coin for msg
maurolacy Apr 10, 2021
ba8f272
Update cw20-atomic-swap
maurolacy Apr 10, 2021
42f76a2
Update cw20-escrow schemas
maurolacy Apr 10, 2021
f27698e
Update cw20-atomic-swap schemas
maurolacy Apr 10, 2021
2710be7
Use String for msg
maurolacy Apr 10, 2021
a8c3b4e
Update cw20-bonding
maurolacy Apr 10, 2021
f8edebd
Update cw20-bonding schemas
maurolacy Apr 10, 2021
83d0f6f
Update cw20-ics20
maurolacy Apr 10, 2021
9b927c5
Update cw20-ics20 schema
maurolacy Apr 10, 2021
f8b07cd
Add address validation
maurolacy Apr 10, 2021
11f1b34
Remove closure
maurolacy Apr 10, 2021
72f1650
cw20-staking compiles
maurolacy Apr 10, 2021
37ffc87
Update cw20-staking unit tests
maurolacy Apr 10, 2021
c6d50f5
Update cw20-staking schema
maurolacy Apr 10, 2021
e4f0c0c
Use Addr, member_key str key
maurolacy Apr 10, 2021
1ac1818
Use str key for ballots
maurolacy Apr 10, 2021
6cf17a7
Use String for msg and error
maurolacy Apr 10, 2021
0a1de48
cw3-flex-multisig compiles
maurolacy Apr 10, 2021
9d93a30
group_addr validation using map_err
maurolacy Apr 10, 2021
b88d6b0
Update cw3-flex-multisig schema
maurolacy Apr 10, 2021
6e20287
Remove redundant clone
maurolacy Apr 10, 2021
878950d
Update cw3-flex-multisig unit tests
maurolacy Apr 10, 2021
f90599b
Use Addr, &str key for state
maurolacy Apr 10, 2021
da499bb
Use String for msg
maurolacy Apr 10, 2021
010f5ab
cw721-base compiles
maurolacy Apr 10, 2021
90c1858
Add Approval is_expired() helper
maurolacy Apr 10, 2021
5b8f926
Update cw721-base schema
maurolacy Apr 11, 2021
d45e56f
Update cw721-base unit tests
maurolacy Apr 11, 2021
1f9818e
Use Vec::from
maurolacy Apr 11, 2021
87b4013
Add start_after addr validation to all paginated queries
maurolacy Apr 11, 2021
f427977
Remove redundant clones
maurolacy Apr 11, 2021
08c6388
Use Addr, &str keys for state
maurolacy Apr 11, 2021
cddeafd
Use String form msg
maurolacy Apr 11, 2021
e618606
cw1155-base compiles
maurolacy Apr 11, 2021
c2a2fa3
Add cw1155-base cargo config
maurolacy Apr 11, 2021
4e105a4
Update cw1155-base unit tests
maurolacy Apr 11, 2021
07ad611
Remove redundant calls
maurolacy Apr 11, 2021
779b4fe
cargo fmt
maurolacy Apr 11, 2021
6cb71b9
cargo clippy
maurolacy Apr 11, 2021
d8894e3
Update version of wasm checker
ethanfrey Apr 12, 2021
e8f3eb5
Add schema to cw1155-base
ethanfrey Apr 12, 2021
81f571f
Merge branch 'master' into update-cosmwas-std
ethanfrey Apr 12, 2021
f7c0e43
Implement PrimaryKey for &Addr
webmaster128 Apr 11, 2021
f35a0ab
Use &Addr in cw3-fixed-multisig
webmaster128 Apr 12, 2021
e529858
Use &Addr not AddrRef in cw1-subkeys
ethanfrey Apr 13, 2021
91c59cc
Remove AddrRef from storage-plus
ethanfrey Apr 13, 2021
f6c8ae0
Use &Addr not AddrRef in cw20-base
ethanfrey Apr 13, 2021
d68af14
Fix cw4-stake and cw4-group
ethanfrey Apr 13, 2021
c0ce30e
Update cw20-staking
ethanfrey Apr 13, 2021
7583b2e
Update cw3-flex-multisig
ethanfrey Apr 13, 2021
289d26a
Cleanup
ethanfrey Apr 13, 2021
120857d
Use Addr in cw1155 state keys
ethanfrey Apr 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ workflows:
- contract_cw20_ics20
- contract_cw20_staking
- contract_cw721_base
- contract_cw1155_base
- package_controllers
- package_cw0
- package_cw1
Expand All @@ -24,6 +25,7 @@ workflows:
- package_cw4
- package_cw20
- package_cw721
- package_cw1155
- package_multi_test
- package_storage_plus
- lint
Expand Down Expand Up @@ -509,6 +511,42 @@ jobs:
- target
key: cargocache-cw721-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}

contract_cw1155_base:
docker:
- image: rust:1.51.0
working_directory: ~/project/contracts/cw1155-base
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw1155-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
RUST_BACKTRACE: 1
command: cargo unit-test --locked
- run:
name: Build and run schema generator
command: cargo schema --locked
- run:
name: Ensure checked-in schemas are up-to-date
command: |
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw1155-base-rust:1.51.0-{{ checksum "~/project/Cargo.lock" }}

package_controllers:
docker:
- image: rust:1.51.0
Expand Down Expand Up @@ -770,6 +808,44 @@ jobs:
- target
key: cargocache-v2-cw721:1.51.0-{{ checksum "~/project/Cargo.lock" }}


package_cw1155:
docker:
- image: rust:1.51.0
working_directory: ~/project/packages/cw1155
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-cw1155:1.51.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Build library for native target
command: cargo build --locked
- run:
name: Run unit tests
command: cargo test --locked
- run:
name: Build and run schema generator
command: cargo schema --locked
- run:
name: Ensure schemas are up-to-date
command: |
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-v2-cw1155:1.51.0-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
- image: rust:1.51.0
Expand Down Expand Up @@ -833,7 +909,7 @@ jobs:
# Uses --debug for compilation speed
# FIXME: Change when `check_contract` (part of `cosmwasm-0.14.0`) is published
#command: cargo install --debug --features iterator --example check_contract -- cosmwasm-vm
command: cargo install --debug --features iterator --git https://github.com/CosmWasm/cosmwasm --tag=v0.14.0-beta1 --example check_contract -- cosmwasm-vm
command: cargo install --debug --features iterator --git https://github.com/CosmWasm/cosmwasm --tag=v0.14.0-beta2 --example check_contract -- cosmwasm-vm
- save_cache:
paths:
- /usr/local/cargo/registry
Expand Down
34 changes: 19 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ incremental = false
codegen-units = 1
incremental = false

[profile.release.package.cw1155-base]
codegen-units = 1
incremental = false

[profile.release]
rpath = false
lto = true
Expand Down
6 changes: 3 additions & 3 deletions contracts/cw1-subkeys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ cw0 = { path = "../../packages/cw0", version = "0.6.0-alpha3" }
cw1 = { path = "../../packages/cw1", version = "0.6.0-alpha3" }
cw2 = { path = "../../packages/cw2", version = "0.6.0-alpha3" }
cw1-whitelist = { path = "../cw1-whitelist", version = "0.6.0-alpha3", features = ["library"] }
cosmwasm-std = { version = "0.14.0-beta1", features = ["iterator", "staking"] }
cosmwasm-std = { version = "0.14.0-beta2", features = ["iterator", "staking"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.6.0-alpha3", features = ["iterator"] }
schemars = "0.7"
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.20" }

[dev-dependencies]
cosmwasm-schema = { version = "0.14.0-beta1" }
cosmwasm-schema = { version = "0.14.0-beta2" }
7 changes: 1 addition & 6 deletions contracts/cw1-subkeys/schema/admin_list_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
"admins": {
"type": "array",
"items": {
"$ref": "#/definitions/HumanAddr"
"type": "string"
}
},
"mutable": {
"type": "boolean"
}
},
"definitions": {
"HumanAddr": {
"type": "string"
}
}
}
14 changes: 7 additions & 7 deletions contracts/cw1-subkeys/schema/all_allowances_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"$ref": "#/definitions/Expiration"
},
"spender": {
"$ref": "#/definitions/HumanAddr"
"type": "string"
}
}
},
Expand Down Expand Up @@ -63,7 +63,8 @@
"format": "uint64",
"minimum": 0.0
}
}
},
"additionalProperties": false
},
{
"description": "AtTime will expire when `env.block.time` >= time",
Expand All @@ -77,7 +78,8 @@
"format": "uint64",
"minimum": 0.0
}
}
},
"additionalProperties": false
},
{
"description": "Never will never expire. Used to express the empty variant",
Expand All @@ -89,13 +91,11 @@
"never": {
"type": "object"
}
}
},
"additionalProperties": false
}
]
},
"HumanAddr": {
"type": "string"
},
"NativeBalance": {
"type": "array",
"items": {
Expand Down
9 changes: 6 additions & 3 deletions contracts/cw1-subkeys/schema/allowance.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"format": "uint64",
"minimum": 0.0
}
}
},
"additionalProperties": false
},
{
"description": "AtTime will expire when `env.block.time` >= time",
Expand All @@ -59,7 +60,8 @@
"format": "uint64",
"minimum": 0.0
}
}
},
"additionalProperties": false
},
{
"description": "Never will never expire. Used to express the empty variant",
Expand All @@ -71,7 +73,8 @@
"never": {
"type": "object"
}
}
},
"additionalProperties": false
}
]
},
Expand Down
Loading