├── test ├── .gitkeep ├── utils.js ├── vault.test.js └── Lock.js ├── vault.png ├── migrations ├── 1_initial_migration.js └── 2_contract_deployment.js ├── scripts ├── networks │ └── core.js ├── deployLpToken.js ├── deployOracle.js ├── deployVault.js ├── deploy-core.json ├── deploy.js └── deployContractMEME.js ├── env.json ├── contracts ├── implementations │ └── MockOracle.sol ├── interfaces │ ├── ICoin.sol │ ├── AggregatorV3Interface.sol │ ├── IVault.sol │ └── MyERC20.sol ├── priceFeed.sol ├── BOB.sol ├── DOGE.sol ├── PEPE.sol ├── LADYS.sol └── WOJAK.sol ├── package.json ├── shared ├── syncParams.js └── helpers.js ├── hardhat.config.js └── README.md /test/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vault.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burner0621/meme-coin-deploy/HEAD/vault.png -------------------------------------------------------------------------------- /migrations/1_initial_migration.js: -------------------------------------------------------------------------------- 1 | const Migrations = artifacts.require("Migrations"); 2 | 3 | module.exports = function (deployer) { 4 | deployer.deploy(Migrations); 5 | }; 6 | -------------------------------------------------------------------------------- /scripts/networks/core.js: -------------------------------------------------------------------------------- 1 | const deployContractMEME = require("../deployContractMEME.js"); 2 | const deploy_core = async () => { 3 | await deployContractMEME() 4 | } 5 | 6 | module.exports = { deploy_core }; -------------------------------------------------------------------------------- /env.json: -------------------------------------------------------------------------------- 1 | { 2 | "CORE_RPC": "https://goerli.blockpi.network/v1/rpc/public", 3 | "CORE_DEPLOY_KEY": "76bb38c4616f10e26b6a16a7a63052ff8f4cd5fa3382c16c5b0e44fee7f1977f", 4 | "CORESCAN_API_KEY": "FAQHXR8Q49UY22ZRVPCNQFTMI5IBV8Z5XT" 5 | } -------------------------------------------------------------------------------- /test/utils.js: -------------------------------------------------------------------------------- 1 | module.exports.printEvents = function (title, logs) { 2 | for (let i=0; i { 9 | networkInfo.network = _network 10 | networkInfo.gasUsed = 0 11 | } 12 | 13 | const addGasUsed = (gas) => { 14 | networkInfo.gasUsed += parseInt(gas) 15 | } 16 | 17 | const getGasUsed = () => { 18 | return networkInfo.gasUsed 19 | } 20 | 21 | const getNetwork = () => { 22 | return networkInfo.network 23 | } 24 | 25 | const getDeployInfo = () => { 26 | try { 27 | return JSON.parse(fs.readFileSync(`scripts/deploy-${networkInfo.network}.json`)); 28 | } catch (err) { 29 | // console.log(err) 30 | return [] 31 | } 32 | } 33 | 34 | const getDeployFilteredInfo = (name) => { 35 | try { 36 | const tr = JSON.parse(fs.readFileSync(`scripts/deploy-${networkInfo.network}.json`)); 37 | return tr.find(t => t.name === name) 38 | } catch (err) { 39 | // console.log(err) 40 | return [] 41 | } 42 | } 43 | 44 | const syncDeployInfo = (_name, _info) => { 45 | let _total = getDeployInfo() 46 | 47 | _total = [..._total.filter(t => t.name !== _name), _info]; 48 | fs.writeFileSync(`scripts/deploy-${networkInfo.network}.json`, JSON.stringify(_total)); 49 | return _total; 50 | } 51 | 52 | module.exports = { getNetwork, setNetwork, getDeployFilteredInfo, syncDeployInfo, addGasUsed, getGasUsed } 53 | -------------------------------------------------------------------------------- /scripts/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