From bb56b050343d8fc49fa3a0b258dc24872acb715d Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Fri, 5 Jan 2024 16:21:16 +0100 Subject: [PATCH 1/4] stake-contract-types: add Makefile --- contracts/stake-types/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 contracts/stake-types/Makefile diff --git a/contracts/stake-types/Makefile b/contracts/stake-types/Makefile new file mode 100644 index 0000000000..ab50914d0b --- /dev/null +++ b/contracts/stake-types/Makefile @@ -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 From 9683bd7834542715b4ce98b5083be15367dc3a70 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Fri, 5 Jan 2024 16:21:40 +0100 Subject: [PATCH 2/4] transfer-contract-types: add Makefile --- contracts/transfer-types/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 contracts/transfer-types/Makefile diff --git a/contracts/transfer-types/Makefile b/contracts/transfer-types/Makefile new file mode 100644 index 0000000000..ab50914d0b --- /dev/null +++ b/contracts/transfer-types/Makefile @@ -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 From ea2b005281b37e5d2efab34e5e890ddd75a91b17 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Fri, 5 Jan 2024 16:23:02 +0100 Subject: [PATCH 3/4] contracts: add missing folders to Makefile - Add transfer-types folder - Add stake-types folder --- contracts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/Makefile b/contracts/Makefile index 6f23b2df37..3ba77ac8d8 100644 --- a/contracts/Makefile +++ b/contracts/Makefile @@ -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 From ae86e44baf73479745d83c2425d7898e557cf028 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Fri, 5 Jan 2024 16:23:39 +0100 Subject: [PATCH 4/4] transfer-contract-types: fix rkyv dependency --- contracts/transfer-types/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/transfer-types/Cargo.toml b/contracts/transfer-types/Cargo.toml index 320d55f7ca..2226c79221 100644 --- a/contracts/transfer-types/Cargo.toml +++ b/contracts/transfer-types/Cargo.toml @@ -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 }