Skip to content

Commit

Permalink
Merge pull request #61 from public-awesome/shanev/update-2
Browse files Browse the repository at this point in the history
  • Loading branch information
shanev authored Apr 21, 2022
2 parents e715567 + e83afb5 commit 584e015
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 86 deletions.
41 changes: 19 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ workflows:
jobs:
contract_cw721_base:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
working_directory: ~/project/contracts/cw721-base
steps:
- checkout:
Expand All @@ -31,7 +31,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw721-base-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-cw721-base-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -53,12 +53,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw721-base-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}

key: cargocache-cw721-base-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}

contract_cw721_metadata_onchain:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
working_directory: ~/project/contracts/cw721-metadata-onchain
steps:
- checkout:
Expand All @@ -68,7 +67,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw721-metadata-onchain-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-cw721-metadata-onchain-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -90,12 +89,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw721-metadata-onchain-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}

key: cargocache-cw721-metadata-onchain-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}

contract_cw721_fixed_price:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
working_directory: ~/project/contracts/cw721-fixed-price
steps:
- checkout:
Expand All @@ -105,7 +103,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw721-fixed-price-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-cw721-fixed-price-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -127,12 +125,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw721-fixed-price-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}

key: cargocache-cw721-fixed-price-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}

package_cw721:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
working_directory: ~/project/packages/cw721
steps:
- checkout:
Expand All @@ -142,7 +139,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-cw721:1.55.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-v2-cw721:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Build library for native target
command: cargo build --locked
Expand All @@ -165,19 +162,19 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-v2-cw721:1.55.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-v2-cw721:1.58.1-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-lint-rust:1.55.0-{{ checksum "Cargo.lock" }}
- cargocache-v2-lint-rust:1.58.1-{{ checksum "Cargo.lock" }}
- run:
name: Add rustfmt component
command: rustup component add rustfmt
Expand All @@ -196,15 +193,15 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-lint-rust:1.55.0-{{ checksum "Cargo.lock" }}
key: cargocache-v2-lint-rust:1.58.1-{{ checksum "Cargo.lock" }}

# This runs one time on the top level to ensure all contracts compile properly into wasm.
# We don't run the wasm build per contract build, and then reuse a lot of the same dependencies, so this speeds up CI time
# for all the other tests.
# We also sanity-check the resultant wasm files.
wasm-build:
docker:
- image: rust:1.55.0
- image: rust:1.58.1
steps:
- checkout:
path: ~/project
Expand All @@ -213,7 +210,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-wasm-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-wasm-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
Expand All @@ -228,12 +225,12 @@ jobs:
- run:
name: Install check_contract
# Uses --debug for compilation speed
command: cargo install --debug --version 1.0.0-beta2 --features iterator --example check_contract --locked -- cosmwasm-vm
command: cargo install --debug --version 1.0.0-beta8 --features iterator --example check_contract --locked -- cosmwasm-vm
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-wasm-rust:1.55.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-wasm-rust:1.58.1-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Check wasm contracts
command: |
Expand Down
54 changes: 27 additions & 27 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions contracts/cw2981-royalties/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cw2981-royalties"
version = "0.13.1"
version = "0.13.2"
authors = ["Alex Lynham <[email protected]>"]
edition = "2018"
description = "Basic implementation of royalties for cw721 NFTs with token level royalties"
Expand All @@ -25,14 +25,14 @@ backtraces = ["cosmwasm-std/backtraces"]
library = []

[dependencies]
cw721 = { path = "../../packages/cw721", version = "0.13.1" }
cw721-base = { path = "../cw721-base", version = "0.13.1", features = [
cw721 = { path = "../../packages/cw721", version = "0.13.2" }
cw721-base = { path = "../cw721-base", version = "0.13.2", features = [
"library",
] }
cosmwasm-std = { version = "1.0.0-beta7" }
cosmwasm-std = { version = "1.0.0-beta8" }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0-beta7" }
cosmwasm-schema = { version = "1.0.0-beta8" }
8 changes: 4 additions & 4 deletions contracts/cw2981-royalties/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ mod tests {
let token_id = "Enterprise";
let mint_msg = MintMsg {
token_id: token_id.to_string(),
owner: "JeanLuc".to_string(),
owner: "jeanluc".to_string(),
token_uri: Some("https://starships.example.com/Starship/Enterprise.json".into()),
extension: Some(Metadata {
description: Some("Spaceship with Warp Drive".into()),
name: Some("Starship USS Enterprise".to_string()),
royalty_payment_address: Some("JeanLuc".to_string()),
royalty_payment_address: Some("jeanluc".to_string()),
royalty_percentage: Some(10),
..Metadata::default()
}),
Expand Down Expand Up @@ -221,12 +221,12 @@ mod tests {
let voyager_token_id = "Voyager";
let second_mint_msg = MintMsg {
token_id: voyager_token_id.to_string(),
owner: "Janeway".to_string(),
owner: "janeway".to_string(),
token_uri: Some("https://starships.example.com/Starship/Voyager.json".into()),
extension: Some(Metadata {
description: Some("Spaceship with Warp Drive".into()),
name: Some("Starship USS Voyager".to_string()),
royalty_payment_address: Some("Janeway".to_string()),
royalty_payment_address: Some("janeway".to_string()),
royalty_percentage: Some(4),
..Metadata::default()
}),
Expand Down
Loading

0 comments on commit 584e015

Please sign in to comment.