Skip to content

Commit

Permalink
Update to cosmwasm-std 1.0.0-beta5
Browse files Browse the repository at this point in the history
  • Loading branch information
aelesbao committed Mar 4, 2022
1 parent a4ab128 commit f5860a7
Show file tree
Hide file tree
Showing 48 changed files with 684 additions and 888 deletions.
1 change: 1 addition & 0 deletions cw20/base/.cargo/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
1 change: 1 addition & 0 deletions cw20/base/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build results
/target
/artifacts

# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327)
.cargo-ok
Expand Down
23 changes: 12 additions & 11 deletions cw20/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,22 @@ library = []

[package.metadata.scripts]
optimize = """docker run --rm -v "$(pwd)":/code \
-e CARGO_TERM_COLOR=always \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.3
cosmwasm/rust-optimizer:0.12.5
"""

[dependencies]
cosmwasm-std = "0.16.2"
cosmwasm-storage = "0.16.2"
cw-storage-plus = "0.9.1"
cw0 = "0.9.1"
cw2 = "0.9.1"
cw20 = "0.9.1"
schemars = "0.8.8"
serde = { version = "1.0.130", default-features = false, features = ["derive"] }
thiserror = "1.0.26"
cosmwasm-std = "1.0.0-beta"
cosmwasm-storage = "1.0.0-beta"
cw-storage-plus = "0.12"
cw0 = "0.10"
cw2 = "0.12"
cw20 = "0.12"
schemars = "0.8"
serde = { version = "1.0", default-features = false, features = ["derive"] }
thiserror = "1.0"

[dev-dependencies]
cosmwasm-schema = "0.16.2"
cosmwasm-schema = "1.0.0-beta"
2 changes: 1 addition & 1 deletion cw20/base/examples/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::fs::create_dir_all;

use cosmwasm_schema::{export_schema, remove_schemas, schema_for};

use {{crate_name}}::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use cw20::{
AllAccountsResponse, AllAllowancesResponse, AllowanceResponse, BalanceResponse,
TokenInfoResponse,
};
use {{crate_name}}::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};

fn main() {
let mut out_dir = current_dir().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion cw20/base/schema/all_allowances_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"Expiration": {
"description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
"oneOf": [
"anyOf": [
{
"description": "AtHeight will expire when `env.block.height` >= height",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion cw20/base/schema/allowance_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"definitions": {
"Expiration": {
"description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
"oneOf": [
"anyOf": [
{
"description": "AtHeight will expire when `env.block.height` >= height",
"type": "object",
Expand Down
17 changes: 0 additions & 17 deletions cw20/base/schema/contract_info_response.json

This file was deleted.

8 changes: 4 additions & 4 deletions cw20/base/schema/cw20_execute_msg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Cw20ExecuteMsg",
"oneOf": [
"anyOf": [
{
"description": "Transfer is a base message to move tokens to another account without triggering actions",
"type": "object",
Expand Down Expand Up @@ -316,7 +316,7 @@
},
"EmbeddedLogo": {
"description": "This is used to store the logo on the blockchain in an accepted format. Enforce maximum size of 5KB on all variants.",
"oneOf": [
"anyOf": [
{
"description": "Store the Logo as an SVG file. The content must conform to the spec at https://en.wikipedia.org/wiki/Scalable_Vector_Graphics (The contract should do some light-weight sanity-check validation)",
"type": "object",
Expand Down Expand Up @@ -347,7 +347,7 @@
},
"Expiration": {
"description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
"oneOf": [
"anyOf": [
{
"description": "AtHeight will expire when `env.block.height` >= height",
"type": "object",
Expand Down Expand Up @@ -393,7 +393,7 @@
},
"Logo": {
"description": "This is used for uploading logo data, or setting it in InstantiateData",
"oneOf": [
"anyOf": [
{
"description": "A reference to an externally hosted logo. Must be a valid HTTP or HTTPS URL.",
"type": "object",
Expand Down
Loading

0 comments on commit f5860a7

Please sign in to comment.