-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into poc_easy_polls
- Loading branch information
Showing
29 changed files
with
4,940 additions
and
279 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
## | ||
# I Am Human | ||
|
||
res: | ||
mkdir -p res | ||
|
||
add-deps: | ||
rustup target add wasm32-unknown-unknown | ||
|
||
build: | ||
build: res | ||
@RUSTFLAGS='-C link-arg=-s' cargo build --all --target wasm32-unknown-unknown --release | ||
@mkdir -p res | ||
@cp target/wasm32-unknown-unknown/release/*.wasm res/ | ||
|
||
cp-builds: | ||
@mkdir -p res | ||
@cp target/wasm32-unknown-unknown/release/*.wasm res/ | ||
|
||
test: | ||
test: build | ||
@cargo test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
build: | ||
res: | ||
mkdir -p res | ||
|
||
build: res | ||
@RUSTFLAGS='-C link-arg=-s' cargo build --target wasm32-unknown-unknown --release | ||
@cp ../target/wasm32-unknown-unknown/release/*.wasm ../res/ | ||
# @cargo near abi | ||
|
||
build-quick: | ||
build-debug: res | ||
@RUSTFLAGS='-C link-arg=-s' cargo build --target wasm32-unknown-unknown | ||
@cp ../target/wasm32-unknown-unknown/release/*.wasm ../res/ | ||
@cp ../target/wasm32-unknown-unknown/debug/*.wasm ../res/ | ||
|
||
build-abi: res | ||
@cargo near abi | ||
@cp ../target/near/*/*_abi.json ../res | ||
|
||
|
||
build-all: | ||
build-all: res | ||
@RUSTFLAGS='-C link-arg=-s' cargo build --all --target wasm32-unknown-unknown --release | ||
@cp ../target/wasm32-unknown-unknown/release/*.wasm ../res/ | ||
@cargo near abi | ||
@cp ../target/near/*/*_abi.json ../res | ||
|
||
lint: | ||
cargo clippy -- --no-deps | ||
|
||
test: | ||
lint-fix: | ||
cargo clippy --fix -- --no-deps | ||
|
||
|
||
test: build | ||
# to test specific test run: cargo test <test name> | ||
@cargo test | ||
|
||
test-unit-debug: | ||
@RUST_BACKTRACE=1 cargo test --lib -- --nocapture | ||
@RUST_BACKTRACE=1 cargo test --lib -- --show-output | ||
|
||
test-unit: | ||
@cargo test --lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Contracts | ||
|
||
## Requirements | ||
|
||
- Rust v1.69. | ||
Note: near-sdk doesn't work with Rust v1.70: https://github.com/near/nearcore/issues/9143 | ||
- Cargo | ||
- [cargo-near](https://github.com/near/cargo-near) | ||
|
||
## Building | ||
|
||
To create release WASM and ABI in the `res` directory, run: | ||
|
||
```shell | ||
cd <contract> | ||
make build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.