{"id":19303797,"url":"https://github.com/web3w/earn-contracts","last_synced_at":"2025-02-24T02:13:42.381Z","repository":{"id":111889734,"uuid":"314471796","full_name":"web3w/earn-contracts","owner":"web3w","description":"earn token contracts","archived":false,"fork":false,"pushed_at":"2021-01-18T19:13:07.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T23:42:16.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3w.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-20T06:56:53.000Z","updated_at":"2021-01-18T19:13:09.000Z","dependencies_parsed_at":"2023-05-06T22:00:49.032Z","dependency_job_id":null,"html_url":"https://github.com/web3w/earn-contracts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3w%2Fearn-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3w%2Fearn-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3w%2Fearn-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3w%2Fearn-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3w","download_url":"https://codeload.github.com/web3w/earn-contracts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240404751,"owners_count":19796064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T23:27:35.538Z","updated_at":"2025-02-24T02:13:42.337Z","avatar_url":"https://github.com/web3w.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":" \n\n## 快速调试\n1. 先在根目录下运行 ` remixd -s ./`\n\u003e remixd -s ./ --remix-ide https://remix.ethereum.org/\n   \n2. 启动remix, 打开 首页 在 File 点击 Connect to Localhost\n\u003e 在 remix-ide 中激活好 remixd插件 \n\n3. 在 左侧 FILE EXPLORERS 中看到一个新增加的 localhost目录。 \n\n开始使用 Remix \n\n##  部署\n验证部署脚本\n```\ntruffle develop\n```\n\n```\ntruffle migrate --network ropsten --reset\n```\n\n \n\n## 私有测试网络\n### Ganache-cli\n```js\n    npm install -g ganache-cli\n--debug\n\n    npx ganache-cli -h 0.0.0.0 -p 8545  --deterministic --gasPrice 5e9 --gasLimit 20000000 -e 10000 --networkId 1337 --db ./ganache \u003e gan.log \u0026 \n\n```\n\n### builder\n\u003e 介绍：https://buidler.hardhat.org/buidler-evm\nnode 大于  12.0版本\n```\n    mkdir buidler \u0026\u0026 cd ./buidler\n    npm init // 一致回车，不需要输入  \n    npm install --save-dev @nomiclabs/buidler\n    npm install --save-dev @nomiclabs/buidler-waffle\n    npm install --save-dev \"@nomiclabs/buidler-ethers@^2.0.0\"\n\n    npx builder // 选择 Create an empty buidler.config.js\n    //在buidler目录下执行 挂起服务 \n    npx builder node --hostname 0.0.0.0 --port 8555\u003e node.log \u0026 //31373\n\n    npm i --save ganache-cli \n    tail -f node.log\n\n```\n\nPM2 ecosystem.config.js 配置\n\u003e pm2 ecosystem\n\n```js\nmodule.exports = {\n  apps : [{\n    name: \"ganache\",\n    script: \"/usr/local/bin/ganache-cli\",\n    error_file:\"./logs/ganache-err.log\",\n    out_file: \"./logs/ganache-out.log\", \n    args:\"-h 0.0.0.0 -p 8545 --deterministic -a 20\\\n    --gasPrice 90e9 --gasLimit 2000e4  -n true\\\n    -m 'myth like bonus scare over problem client lizard pioneer submit female collect' \\\n    -e 20000 --chainId 8545 --networkId 8545 --db ./ganache\"\n  }],\n};\n\n```\n\u003e pm2 start npm -- run node \n```\n   \"scripts\": {\n      \"node\": \"npx builder node --hostname 0.0.0.0 --port 8545\"\n    },\n```\n\n.prettierrc\n```\n{\n    \"overrides\": [\n      {\n        \"files\": \"*.sol\",\n        \"options\": {\n          \"printWidth\": 80,\n          \"tabWidth\": 4,\n          \"useTabs\": true,\n          \"singleQuote\": false,\n          \"bracketSpacing\": true,\n          \"explicitTypes\": \"always\"\n        }\n      }\n    ]\n}\n  ``\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3w%2Fearn-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3w%2Fearn-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3w%2Fearn-contracts/lists"}