Skip to content

deprecated-near-examples/donation-rust-deprecated

Repository files navigation

Donation 💸

Build Status

Our Donation example enables to forward money to an account while keeping track of it. It is one of the simplest examples on making a contract receive and send money.

What This Example Shows

  1. How to receive and transfer $NEAR on a contract.
  2. How to divide a project into multiple modules.
  3. How to handle the storage costs.
  4. How to handle transaction results.
  5. How to use a Map.

Quickstart

Clone this repository locally or open it in gitpod. Then follow these steps:

1. Install Dependencies

npm install

2. Test the Contract

Deploy your contract in a sandbox and simulate interactions from users.

npm test

3. Deploy the Contract

Build the contract and deploy it in a testnet account

npm run deploy

4. Start the Frontend

Start the web application to interact with your smart contract

npm start

Learn More

  1. Learn more about the contract through its README.
  2. Check our documentation.