Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🪄 Mana Token (ERC-20)

A simple ERC-20 token implementation that allows users to swap ETH for Mana Token. Built with Solidity, Hardhat, and a React frontend.


📌 Table of Contents

  1. Installation
  2. Usage
  3. Smart Contracts Overview
  4. Testing
  5. Frontend
  6. License

⚙️ Installation

Prerequisites

Ensure you have the following installed:

Clone the Repository

git clone https://github.com/welersonassis/mana-token.git
cd mana-token

Install Dependencies

cd contract
npm install

🚀 Usage

Running a Local Hardhat Node

npx hardhat node

Deploying Contracts Locally

npx hardhat ignition deploy ignition/modules/ManaToken.ts --network localhost

🔍 Smart Contracts Overview

🏛 Mana.sol

  • Implements the ERC-20 standard.
  • Allows users to swap ETH for Mana Token.
  • Mint function converts ETH into MANA tokens at a fixed rate of 1 ETH = 1,000,000 MANA.
  • Includes security checks such as max supply and owner withdrawal.

🧪 Testing

Run contract tests using Hardhat:

npx hardhat test

🎨 Frontend

The frontend is built with React and interacts with the smart contract using ethers.js.

Install Dependencies

cd frontend
npm install

Running the Frontend

npm run dev

This will start the frontend at http://localhost:5173/.


📜 License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages