Next version of Comunion contract project
-
develop is the development branch, not allowed push directly.
-
release is the pre production branch,only merged by develop, just for the test.
-
main is the production branch, only merged by release branch,
-
feat/xxx or feature/xxx is the function branch,
-
fix/xxx for fix bug
-
hotfix/xxx for ambulance bug
-
install truffle
npm install -g truffle
-
add a sol in contract dir
-
add it to 2_deploy_contract
const Startup = artifacts.require('Startup'); module.exports = (deployer) => { deployer.deploy(Startup); };
-
migrate contract to development
yarn dev
-
migrate contract to goerli
yarn goerli
-
how to test your contract -. write your test sol in test dir -. the test function name must start with "test" -. migrate your contract -. run
truffle test
-
use npm install remixed tools
npm install -g @remix-project/remixd
-
open remixed page ( http://remix.ethereum.org)
-
start in your source code, run
remixed -s [your source code list] --remix-ide http://remix.ethereum.org
-
click home -> file -> connect to local host;
-
after loading, happy coding
-
if you installed ganache, you can use ganache;
- npm install -g ganache-cli
- use ganache, run ganache-cli in your terminal
ganache-cli
- if you installed ganache by GUI, you can start it directly
- after deployed contract, please update contract address in contractAddress.json file