├── .gitignore ├── hard.config.js ├── package.json ├── contracts └── MyToken.sol ├── scriptcodes ├── deploy.js ├── bloxroute.js └── abi.js ├── README.md └── test-shell └── Lock.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | 4 | # Hardhat files 5 | /cache 6 | /artifacts 7 | 8 | # TypeChain files 9 | /typechain 10 | /typechain-types 11 | 12 | # solidity-coverage files 13 | /coverage 14 | /coverage.json 15 | -------------------------------------------------------------------------------- /hard.config.js: -------------------------------------------------------------------------------- 1 | require("@nomicfoundation/hardhat-toolbox"); 2 | 3 | /** @type import('hardhat/config').HardhatUserConfig */ 4 | module.exports = { 5 | solidity: "0.8.19", 6 | networks: { 7 | hardhat: { 8 | forking: { 9 | url: "https://small-thrilling-county.bsc.quiknode.pro/5309cc3b81880102c3951f4132560fa48f13a448/", // Replace with your Alchemy Mainnet RPC URL 10 | // blockNumber: 44716540, // Optional: specify a block number to fork from 11 | }, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "contract", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "keywords": [], 6 | "author": "", 7 | "license": "ISC", 8 | "description": "", 9 | "devDependencies": { 10 | "@nomicfoundation/hardhat-toolbox": "^4.0.0", 11 | "@uniswap/v3-sdk": "^3.10.2", 12 | "hardhat": "^2.19.5" 13 | }, 14 | "dependencies": { 15 | "@ethersproject/abi": "^5.7.0", 16 | "@openzeppelin/contracts": "^4.9.6", 17 | "dotenv": "^16.4.7" 18 | }, 19 | "scripts": { 20 | "sn": "npx hardhat node --network hardhat", 21 | "t": "npx hardhat test --network localhost" 22 | } 23 | } -------------------------------------------------------------------------------- /contracts/MyToken.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.9; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | 7 | // 1000000000000000000000 8 | contract MyToken is ERC20 { 9 | /** 10 | * @dev Constructor that gives msg.sender all of existing tokens. 11 | * @param name The name of the token. 12 | * @param symbol The symbol of the token. 13 | * @param initialSupply The initial supply of tokens (in wei, taking decimals into account). 14 | */ 15 | constructor(string memory name, string memory symbol, uint256 initialSupply) ERC20(name, symbol) { 16 | _mint(msg.sender, initialSupply); 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /scriptcodes/deploy.js: -------------------------------------------------------------------------------- 1 | // We require the Hardhat Runtime Environment explicitly here. This is optional 2 | // but useful for running the script in a standalone fashion through `node