scroll-sepolia-erc20-basics
v1.0.0
Published
Basic ERC20 implementation for Scroll Sepolia.
Readme
scroll-sepolia-ERC20-Basics
This repository contains a basic implementation of an ERC20 token called MyToken using Hardhat and OpenZeppelin. The token supports minting, burning, transferring, and approving functionality.
Table of Contents
Installation
Clone the repository:
git clone https://github.com/naufalprtm/scroll-sepolia-ERC20-Basics.git cd scroll-sepolia-ERC20-BasicsInstall the necessary dependencies:
npm installor
npm install --legacy-peer-deps
Contract Overview
MyToken.sol The MyToken contract is an implementation of the ERC20 standard with the following features:
Minting: Allows new tokens to be created and assigned to a specified address.Burning: Allows tokens to be destroyed from a specified address.Transfer: Allows the owner to transfer tokens to another address.Approval: Allows the owner to approve a spender to spend a certain amount of tokens on their behalf.TransferFrom: Allows a spender to transfer tokens from the owner's account to another account.
Configuration:
example.env rename to .env
SCROLL_SEPOLIA_RPC_URL=https://sepolia-rpc.scroll.io
PRIVATE_KEY=your_private_key_here
SCROLLSCAN_API_KEY=your_scrollscan_api_key_hereUsage:
-scrollSepolia
npx hardhat run scripts/deploy.ts --network scrollSepolianpx hardhat test --network scrollSepolia-localhost
npx hardhat nodenpx hardhat run scripts/deploy.ts --network localhostnpx hardhat test --network localhostverify contracts:
npx hardhat verify --network scrollSepolia your-contracts <param_constructor>example
npx hardhat verify --network scrollSepolia 0xD2573985B0D6C9FbAeE5481f1EEa979d4927767D 1000000000000000000000