This is a demo project for embark framework.
-
clone repository and move into folder
git clone git@github.com:3esmit/my-governance-example.git cd my-governance-example
-
install node 10.17.0, recommended using nvm https://github.com/creationix/nvm
nvm install 10.17.0 nvm alias default 10.17.0
-
install go-ethereum (geth)
sudo add-apt-repository -y ppa:ethereum/ethereum sudo apt-get update sudo apt-get install geth -y
-
install a.
ipfs
or b.swarm
and initialize it.- IPFS:
sudo snap install ipfs ipfs init
- SWARM:
#TODO
- IPFS:
-
run unit test
npx embark test
-
run development environment
npx embark run
To deploy to ropsten you must provide the environment variable ETH_DEPLOY_ADDRESS
:
$ export ETH_DEPLOY_ADDRESS="0x<your-address>"
This account must appear in the accounts list (npm run list-accs-ropsten
), and it must be encrypted with the password written in the file config/ropsten/.password
.
If you don't have an address, use npm run new-acc-ropsten
to create a new account, copy the address outputed in the terminal and go to a faucet to get some ropsten test ether. This keys will be saved in ~/keys/ropsten/
.
To customize the behavior, look into config/ropsten/.env
, script/ethereum.sh
and package.json
.
See your address in a block explorer: https://ropsten.etherscan.io/address/0x<your-address>
To upload to a descentralized storage run npm run upload-ropsten
.
The manual command to upload the build folder is ipfs add -r dist/
To access the uploaded dapp in localhost, run ipfs service:
ipfs daemon
TODO
The manual command to upload the build folder is swarm --defaultpath dist/index.html --recursive up dist/
Setup ENS domain (go to https://app.ens.domains/)
Runs dapp on development network (ganache):
npx embark test
Runs unit tests on development network (ganache):
npx embark run
Creates a new account for ropsten:
npm run new-acc-ropsten
Lists ropsten accounts:
npm run list-accs-ropsten
Starts an ETH node for ropsten:
npm run eth-ropsten
Waits until ropsten network is synced:
npm run wait-ropsten
Starts ropsten node, waits network sync, deploy contracts and start webserver:
npm run run-ropsten
Builds ropsten, waits network sync, deploy contracts and upload to ipfs:
npm run upload-ropsten