Skip to content

Commit

Permalink
feat: update rs counter example (#1809)
Browse files Browse the repository at this point in the history
Co-authored-by: Matias Benary <[email protected]>
  • Loading branch information
matiasbenary and Matias Benary authored Mar 22, 2024
1 parent 4689ab8 commit d2720b7
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions docs/3.tutorials/examples/count-near.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,10 @@ The example is divided in two main components:
<TabItem value="πŸ¦€ Rust">

```bash
β”Œβ”€β”€ sandbox-ts # sandbox testing
β”‚ β”œβ”€β”€ src
β”‚ β”‚ └── main.ava.ts
β”‚ β”œβ”€β”€ ava.config.cjs
β”‚ └── package.json
β”œβ”€β”€ src # contract's code
β”Œβ”€β”€ src # contract's code
β”‚ └── lib.rs
β”œβ”€β”€ build.sh # build script
β”œβ”€β”€ tests # sandbox test
β”‚ └── test_basics.rs
β”œβ”€β”€ Cargo.toml # package manager
β”œβ”€β”€ README.md
└── rust-toolchain.toml
Expand Down Expand Up @@ -129,7 +125,7 @@ The contract presents 4 methods: `get_num`, `increment`, `decrement`, and `reset
<Language value="πŸ¦€ Rust" language="rust">
<Github fname="lib.rs"
url="https://github.com/near-examples/counters/blob/main/contract-rs/src/lib.rs"
start="5" end="35" />
start="22" end="47" />
</Language>
</CodeTabs>

Expand All @@ -153,7 +149,7 @@ yarn test

```bash
cd contract-rs
./test.sh
cargo test
```

</TabItem>
Expand Down Expand Up @@ -192,7 +188,7 @@ near create-account <accountId> --useFaucet
# Deploy the contract
cd contract-rs
./build.sh
cargo build
near deploy <accountId> ./target/wasm32-unknown-unknown/release/counter.wasm
```

Expand Down

0 comments on commit d2720b7

Please sign in to comment.