Skip to content

Commit

Permalink
Merge pull request #1236 from dusk-network/clippy-contract-types
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia authored Jan 7, 2024
2 parents d9774ca + ae86e44 commit 60acc6c
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS := alice bob transfer stake governance license
SUBDIRS := stake-types transfer-types alice bob transfer stake governance license

all: $(SUBDIRS) ## Build all the contracts

Expand Down
28 changes: 28 additions & 0 deletions contracts/stake-types/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
all: ## Build the transfer contract
@cargo build --release

help: ## Display this help screen
@grep -h \
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

check: wasm ## Run the Rust check on the project features
@cargo check --target wasm32-unknown-unknown
@cargo check

test: ## Perform the contract tests defined in the host module
@cargo test --release

wasm: ## Build the WASM files
@RUSTFLAGS="$(RUSTFLAGS) --remap-path-prefix $(HOME)= -C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown

clippy: ## Run clippy
@cargo clippy --all-features --release -- -D warnings
@cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings

.PHONY: all check test wasm help
2 changes: 1 addition & 1 deletion contracts/transfer-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dusk-bls12_381 = { version = "0.12", default-features = false, features = ["rkyv
dusk-jubjub = { version = "0.13", default-features = false, features = ["rkyv-impl"] }
dusk-poseidon = { version = "0.31", default-features = false, features = ["rkyv-impl", "alloc"] }
phoenix-core = { version = "0.21", default-features = false, features = ["rkyv-impl", "alloc"] }
rkyv = { version = "0.7", default-features = false }
rkyv = { version = "0.7", default-features = false, features = ["size_32"] }
bytecheck = { version = "0.6", default-features = false }
28 changes: 28 additions & 0 deletions contracts/transfer-types/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
all: ## Build the transfer contract
@cargo build --release

help: ## Display this help screen
@grep -h \
-E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

check: wasm ## Run the Rust check on the project features
@cargo check --target wasm32-unknown-unknown
@cargo check

test: ## Perform the contract tests defined in the host module
@cargo test --release

wasm: ## Build the WASM files
@RUSTFLAGS="$(RUSTFLAGS) --remap-path-prefix $(HOME)= -C link-args=-zstack-size=65536" \
cargo +dusk build \
--release \
--color=always \
-Z build-std=core,alloc \
--target wasm64-unknown-unknown

clippy: ## Run clippy
@cargo clippy --all-features --release -- -D warnings
@cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings

.PHONY: all check test wasm help

0 comments on commit 60acc6c

Please sign in to comment.