The repository that contains real code examples of work with Cross Contract Calls in Near Protocol Rust SDK
Explore other projects
·
Report a bug
The repository provides practical use cases that showcase Cross Contract Calls in action
This pack of examples covers everything from simple implementation to managing parallel and sequential requests with callbacks
💡 Before starting, please ensure that you have all the necessary installations completed
Follow these simple instructions to set up a local development environment
- Clone the repo
git clone https://github.com/nearuaguild/near-rust-cross-contract-examples.git
- Open root folder
cd near-rust-cross-contract-examples
- Move to a folder of the example you're interesting in (e.g.
state_rollback
)
cd state_rollback
Each example has script that performs compiling of the project
Make sure you've added wasm32-unknown-unknown
target for rustc
compiler
If not, run this command
rustup target add wasm32-unknown-unknown
Finally, run ./build.sh
inside the example folder to compile to WASM
Keep in mind that compiled WASM file would be located in `target/wasm32-unknown-unknown/release/{EXAMPLE_NAME}.wasm
Please note that the provided examples are not intended to be run locally, and because of it there's no deployment guide
You can use them to improve your coding skills/understanding of Near Protocol architecture or directly incorporate them into your project
Also, consider reading this beautiful post that outlines common solutions for Exceeded Gas problems that can arise when working with Cross Contract Calls
Near Ukraine Guild is a fast-growing guild based in Ukraine, aimed at providing high-quality educational content and assistance to grow a strong community of developers/entrepreneurs/enthusiasts within the Near Protocol ecosystem
Our validator has been active for a few months now, and the funds it generates are being put towards sponsoring community activities
Join us now to stake and earn 10% APY
Click below to get started 👇
See LICENSE.txt
for more information