Skip to content

Cargo extension for building Rust smart contracts on NEAR

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

near/cargo-near

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b3a245f · Nov 10, 2022

History

62 Commits
Nov 10, 2022
Nov 10, 2022
Nov 10, 2022
Sep 1, 2022
Nov 10, 2022
Nov 10, 2022
Nov 10, 2022
Jun 8, 2022
Jun 8, 2022
Oct 14, 2022

cargo-near

Cargo extension for building near-sdk-rs smart contracts and ABI schemas on NEAR

Github CI Build Crates.io version Download

Release notes

Release notes and unreleased changes can be found in the CHANGELOG

Installation

From crates.io:

$ cargo install cargo-near

To install from source:

$ git clone https://github.com/near/cargo-near
$ cargo install --path cargo-near

Usage

See cargo near --help for a complete list of available commands. Help is also available for each individual command with a --help flag, e.g. cargo near build --help.

cargo near build

Builds a NEAR smart contract along with its ABI (while in the directory containing contract's Cargo.toml).

You can also make this command embed ABI into your WASM artifact by adding --embed-abi parameter. Once deployed, this will allow you to call a view function __contract_abi to retrieve a ZST-compressed ABI.

cargo near abi

Generates NEAR smart contract's ABI (while in the directory containing contract's Cargo.toml).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

Licensed under either of

at your option.