├── .gitattributes ├── README.md ├── package.json ├── hardhat.config.js ├── scripts └── sample-script.js ├── test ├── 1x-mytoken-tests.js ├── 4x-masterchef-tests.js ├── 2x-erc20liquiditypool-tests.js ├── 3x-ethliquiditypool-tests.js └── 5x-lprewards-tests.js ├── .gitignore ├── contracts ├── MyToken.sol ├── MasterChef.sol └── WETH9.sol └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Basic Sample Hardhat Project 2 | 3 | This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts. 4 | 5 | Try running some of the following tasks: 6 | 7 | ```shell 8 | npx hardhat accounts 9 | npx hardhat compile 10 | npx hardhat clean 11 | npx hardhat test 12 | npx hardhat node 13 | node scripts/sample-script.js 14 | npx hardhat help 15 | ``` 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hardhat-project", 3 | "dependencies": { 4 | "@nomiclabs/hardhat-waffle": "^2.0.2", 5 | "@openzeppelin/contracts": "4.3.2", 6 | "chai": "^4.3.4", 7 | "hardhat": "^2.8.3", 8 | "@openzeppelin/contracts-upgradeable": "4.3.2", 9 | "@openzeppelin/hardhat-upgrades": "1.10.0", 10 | "@uniswap/v2-core": "1.0.1", 11 | "@uniswap/v2-periphery": "1.1.0-beta.0", 12 | "@nomiclabs/hardhat-ethers": "^2.0.0", 13 | "ethereum-waffle": "^3.2.0", 14 | "ethers": "^5.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hardhat.config.js: -------------------------------------------------------------------------------- 1 | require("@nomiclabs/hardhat-waffle"); 2 | 3 | // This is a sample Hardhat task. To learn how to create your own go to 4 | // https://hardhat.org/guides/create-task.html 5 | task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { 6 | const accounts = await hre.ethers.getSigners(); 7 | 8 | for (const account of accounts) { 9 | console.log(account.address); 10 | } 11 | }); 12 | 13 | // You need to export an object to set up your config 14 | // Go to https://hardhat.org/config/ to learn more 15 | 16 | /** 17 | * @type import('hardhat/config').HardhatUserConfig 18 | */ 19 | module.exports = { 20 | solidity: { 21 | compilers: [ 22 | { version: "0.8.4" }, 23 | { version: "0.7.6" }, 24 | { version: "0.6.6" } 25 | ] 26 | }, 27 | mocha: { 28 | timeout: 60000. 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /scripts/sample-script.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