Skip to content

Commit

Permalink
snip20_roles_impl implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-1857 committed Apr 22, 2024
1 parent 87d4d2e commit 70c7b2c
Show file tree
Hide file tree
Showing 53 changed files with 34,599 additions and 3,085 deletions.
27 changes: 23 additions & 4 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ serde = { version = "1.0.158", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.21" ,default-features = false}
cosmwasm-schema = { git = "https://github.com/scrtlabs/cosmwasm/", branch = "secret",default-features = false }
snip20-reference-impl = { path = "./contracts/external/snip20-reference-impl/",default-features = false }
snip721-roles-impl = { path = "./contracts/external/snip721-roles-impl/" ,default-features = false}
snip721-reference-impl = { path = "./contracts/external/snip721-reference-impl/" ,default-features = false}
cosmos-sdk-proto = { version = "0.20.0", default-features = false }
shade-protocol = { git = "https://github.com/securesecrets/shade", rev = "lend-v1",features = [
Expand Down
52 changes: 52 additions & 0 deletions contracts/external/snip721-reference-impl/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 2.1

jobs:
build:
docker:
- image: rust:1.65
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
- run:
name: Build
command: cargo wasm --locked
- run:
name: Unit tests
env: RUST_BACKTRACE=1
command: cargo unit-test --locked
- run:
name: Integration tests
command: cargo integration-test --locked
- run:
name: Format source code
command: cargo fmt
- run:
name: Build and run schema generator
command: cargo schema --locked
- run:
name: Ensure checked-in source code and 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/debug/.fingerprint
- target/debug/build
- target/debug/deps
- target/wasm32-unknown-unknown/release/.fingerprint
- target/wasm32-unknown-unknown/release/build
- target/wasm32-unknown-unknown/release/deps
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml

on: [push, pull_request]

name: Basic

jobs:

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.65.0
target: wasm32-unknown-unknown
override: true

- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: unit-test
args: --locked
env:
RUST_BACKTRACE: 1

- name: Compile WASM contract
uses: actions-rs/cargo@v1
with:
command: wasm
args: --locked
env:
RUSTFLAGS: "-C link-arg=-s"

- name: Run integration tests
uses: actions-rs/cargo@v1
with:
command: integration-test
args: --locked


lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.65.0
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

# TODO: we should check
# CHANGES_IN_REPO=$(git status --porcelain)
# after this, but I don't know how
- name: Generate Schema
uses: actions-rs/cargo@v1
with:
command: schema
args: --locked
11 changes: 5 additions & 6 deletions contracts/external/snip721-reference-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ crate-type = ["cdylib", "rlib"]
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-std = {workspace=true }
secret-toolkit = {workspace=true }
cosmwasm-storage = {workspace=true }
schemars = {workspace=true }
serde = {workspace=true }
cosmwasm-std = { package = "secret-cosmwasm-std", version = "1.1.11" }
secret-toolkit = { version = "0.10.0", default-features = false, features = ["storage", "serialization", "utils", "permit", "viewing-key", "crypto"] }
cosmwasm-storage = { package = "secret-cosmwasm-storage", version = "1.1.10" }
schemars = "0.8.12"
serde = { version = "1.0.190", default-features = false, features = ["derive"] }
bincode2 = "2.0.1"
base64 = "0.21.2"
primitive-types = { version = "0.12.2", default-features = false }
dao-snip721-extensions ={ workspace = true }


[dev-dependencies]
Expand Down
Loading

0 comments on commit 70c7b2c

Please sign in to comment.