Giter VIP home page Giter VIP logo

counter-program's Introduction

Basic Solana Developing Process with Anchor Framework (v0.29.0)

This repo is refernce by https://github.com/emersonliuuu/counter-program

Full tutorial: https://emersonliuuu.notion.site/Basic-Solana-Developing-Process-with-Anchor-Framework-v0-29-0-527e8d64db4c4b4e8449e76e12e437a1?pvs=4

Run the following commands to start the project:

git clone https://github.com/ak8893893/counter-program.git

cd counter-program
git submodule update --init

anchor keys list

Replace the key with your own key in

  1. program/src/lib.rs declare_id!("------Your key here------");
  2. Anchor.toml [programs.localnet] my_program = "------Your key here------"

Then run the following commands:

anchor test

NOTICE: anchor test will build, deploy and run the all tests under tests folder. You can change the cluster in Anchor.toml to test on different clusters, e.g. localnet, devnet, testnet.

Start the frontend

cd app
yarn
yarn dev
# open localhost:3000  (http://localhost:3000/)

Use the frontend to test your Counter Program

  1. Connect your wallet (suggest using Phantom wallet).
  2. Change the wallet's network to the Devnet.
  3. Claim the airdrop if you don't have the testing sol in you wallet. alt text
  4. Click Counter to switch the page of counter Program. alt text
  5. Initialize an account.
  6. Add an even number into the account's value.
  7. Minus an odd number into the account's value.
  8. You can check you account's value on the front end or solscan with you Counter Address. For example: https://explorer.solana.com/address/2qASV856oDJE6yQBKRxAZuKUHjUoU52N656JmeFyoKqo/anchor-account?cluster=devnet alt text

counter-program's People

Contributors

ak8893893 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.