Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
the-frey committed Jan 10, 2022
2 parents fd75934 + 0ac4043 commit ea94e4d
Show file tree
Hide file tree
Showing 17 changed files with 1,249 additions and 12 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ workflows:
jobs:
- contract_cw721_base
- contract_cw721_metadata_onchain
- contract_cw721_fixed_price
- package_cw721
- lint
- wasm-build
Expand Down Expand Up @@ -92,6 +93,43 @@ jobs:
key: cargocache-cw721-metadata-onchain-rust:1.53.0-{{ checksum "~/project/Cargo.lock" }}


contract_cw721_fixed_price:
docker:
- image: rust:1.53.0
working_directory: ~/project/contracts/cw721-fixed-price
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw721-fixed-price-rust:1.53.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-cw721-fixed-price-rust:1.53.0-{{ checksum "~/project/Cargo.lock" }}


package_cw721:
docker:
- image: rust:1.53.0
Expand Down
114 changes: 102 additions & 12 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 @@ -9,6 +9,10 @@ incremental = false
codegen-units = 1
incremental = false

[profile.release.package.cw721-fixed-price]
codegen-units = 1
incremental = false

[profile.release]
rpath = false
lto = true
Expand Down
5 changes: 5 additions & 0 deletions contracts/cw721-fixed-price/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +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"
56 changes: 56 additions & 0 deletions contracts/cw721-fixed-price/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[package]
name = "cw721-fixed-price"
version = "0.1.0"
authors = ["Vernon Johnson <vtj2105@columbia.edu>"]
edition = "2018"

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
opt-level = 3
debug = false
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []

[package.metadata.scripts]
optimize = """docker run --rm -v "$(pwd)":/code \
--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.4
"""

[dependencies]
cosmwasm-std = { version = "1.0.0-beta" }
cosmwasm-storage = { version = "1.0.0-beta" }
cw-storage-plus = "0.11.1"
cw2 = "0.11.1"
schemars = "0.8.3"
cw721-base = { path = "../cw721-base", version = "0.11.0", features = [ "library"] }
cw20 = "0.11.1"
serde = { version = "1.0.127", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.26" }
cw-utils = { version= "0.11.1" }
prost = "0.9.0"

[dev-dependencies]
cosmwasm-schema = { version = "1.0.0-beta" }
13 changes: 13 additions & 0 deletions contracts/cw721-fixed-price/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2021 Vernon Johnson <vtj2105@columbia.edu>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading

0 comments on commit ea94e4d

Please sign in to comment.