OffchainLabs / stylus-workshop-basic-nft

Stylus workshop for a basic NFT smart contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stylus workshop: Basic NFT

Simple NFT smart contract written in Rust.

Getting started

Follow the instructions in the Stylus quickstart to configure your development environment.

Testing the contract

The scripts folder contains several scripts that make individual calls to perform the most important actions:

  1. ./scripts/deploy.sh to deploy the contract
  2. ./scripts/getBalance.sh to get the current balance of an account
  3. ./scripts/mint.sh to mint an NFT
  4. ./scripts/burn.sh to burn an NFT
  5. ./scripts/transfer.sh to transfer an NFT
  6. ./scripts/getTokenUri.sh to get the tokenUri of an NFT

Remember to set the environment variables in an .env file.

How to run a local Stylus dev node

Instructions to setup a local Stylus dev node can be found here.

How to get ETH for the Stylus testnet

The Stylus testnet is an L3 chain that settles to Arbitrum Sepolia. The usual way of obtaining ETH is to bridge it from Arbitrum Sepolia through the Arbitrum Bridge. You can find a list of Arbitrum Sepolia faucets here.

Useful resources

Stylus reference links

About

Stylus workshop for a basic NFT smart contract


Languages

Language:Rust 81.4%Language:Shell 18.6%