Skip to content

JustinaPetr/arbitrum-stylus-lava-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create and interact with a ERC-20 token on Arbitrum Sepolia using Arbitrum Stylus and Lava RPC

A minimal dApp to showcase the process of creating an ERC-20 token on Arbitrum Sepolia. The contract, written in Rust, is deployed using Arbitrum Stylus. Lava RPC is used for contract deployment as well as dApp interactions.

Project Structure

  • /contracts - Rust smart contract using Arbitrum Stylus SDK
  • /react-frontend - Simple React frontend with ethers.js integration

Smart Contract

The ERC20 token contract is written in Rust using the Arbitrum Stylus SDK. It implements the standard ERC20 functionality with an additional minting capability for the contract owner.

Features

A simple dApp allows the users to:

  1. Connect their wallet
  2. Mint the token
  3. Transfer to an address
  4. Get the receipt of the Mint and Transer transactions
  5. Continuously monitor Lava network performance

Getting Started

  1. Clone the directory
  2. Configure Rust, Node.js on your machine
  3. Deploy the contract
cd contracts

cargo stylus check 

cargo stylus deploy --no-verify --endpoint='https://arbitrums.lava.build' --private-key="your-private-key"

  1. Run the frontend Update the config.js file with the address of your deployed contract
cd react-frontend

npm install

npm start

Open your browser and navigate to http://localhost:3000.

Prerequisites

  • Node.js and npm
  • Rust and Cargo
  • Arbitrum Stylus SDK
  • MetaMask or another Ethereum wallet

License

This project is open source and available under the MIT License.

About

A demo application showing how to deploy an ERC-20 token contract using Arbitrum Stylus, powered by Lava RPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages