Skip to content

Commit

Permalink
Merge pull request near-examples#215 from near-examples/update-and-fix
Browse files Browse the repository at this point in the history
Fix: CI + remove deprecated fn
  • Loading branch information
gagdiez authored Oct 20, 2023
2 parents aea6b04 + a0f2116 commit 4f0eecf
Show file tree
Hide file tree
Showing 14 changed files with 225 additions and 851 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Build wasm files
run: source scripts/flags.sh && cargo build --all --target wasm32-unknown-unknown --release && cp target/wasm32-unknown-unknown/release/*.wasm ./res/
run: source scripts/flags.sh && rustup target add wasm32-unknown-unknown && cargo build --all --target wasm32-unknown-unknown --release && cp target/wasm32-unknown-unknown/release/*.wasm ./res/
- name: Run unit tests
env:
IS_GITHUB_ACTION: true
run: cd nft && cargo test -- --nocapture --color=always
- name: Run Rust integration tests
run: cd integration-tests/rs && cargo run --example integration-tests
- name: Run TypeScript integration tests
run: cd integration-tests/ts && yarn && yarn test
run: cd integration-tests/ts && npm i && npm run test
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM gitpod/workspace-full
RUN bash -cl "rustup toolchain install stable && rustup target add wasm32-unknown-unknown"

RUN bash -c ". .nvm/nvm.sh \
&& nvm install v12 && nvm alias default v12"
&& nvm install v16 && nvm alias default v16"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ This repository includes an example implementation of a [non-fungible token] con
[non-fungible token]: https://nomicon.io/Standards/NonFungibleToken/README.html
[near-contract-standards]: https://github.com/near/near-sdk-rs/tree/master/near-contract-standards
[simulation]: https://github.com/near/near-sdk-rs/tree/master/near-sdk-sim

---

Prerequisites
=============

If you're using Gitpod, you can skip this step.

* Make sure Rust is installed per the prerequisites in [`near-sdk-rs`](https://github.com/near/near-sdk-rs).
Expand Down Expand Up @@ -147,8 +151,4 @@ Notes

* The maximum balance value is limited by U128 (2**128 - 1).
* JSON calls should pass U128 as a base-10 string. E.g. "100".
* This does not include escrow functionality, as ft_transfer_call provides a superior approach. An escrow system can, of course, be added as a separate contract or additional functionality within this contract.

AssemblyScript
==============
Currently, AssemblyScript is not supported for this example. An old version can be found in the [NEP4 example](https://github.com/near-examples/NFT/releases/tag/nep4-example), but this is not recommended as it is out of date and does not follow the standards the NEAR SDK has set currently.
* This does not include escrow functionality, as ft_transfer_call provides a superior approach. An escrow system can, of course, be added as a separate contract or additional functionality within this contract.
4 changes: 2 additions & 2 deletions integration-tests/rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ publish = false
edition = "2018"

[dev-dependencies]
near-sdk = "4.0.0"
near-sdk = "4.1.1"
anyhow = "1.0"
borsh = "0.9"
maplit = "1.0"
Expand All @@ -15,7 +15,7 @@ serde_json = { version = "1.0", features = ["arbitrary_precision"] }
tokio = { version = "1.18.1", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
workspaces = "0.4.0"
workspaces = "0.7.0"
pkg-config = "0.3.1"

[[example]]
Expand Down
Loading

0 comments on commit 4f0eecf

Please sign in to comment.