This is the repository that keeps the Smart Contract of the BookBnB project.
This is for educational purposes do not use this in production
For this project you should have NVM installed(or the exact same version of node described in .nvmrc)
For the tests to be run, just execute
npm run test
For the tests to be run and a coverage report to be generated, just execute
npm run coverage
For the linters to be generated, just execute
npm run lint
For the deployment of this project in each network read the relevant subsection.
The configs to be used are set on migrations/config.json
For this you have to have ganache, or any eth-json-rpc server, running on http://localhost:8545. This can be achieved executing:
npm run ganache
And later deploy using:
npm run deploy-local
For the Ropsten deployment you, having INFURA_ROPSTEN_NODE
(URL given by infura) and MNEMONIC
(12 words with balance in the ropsten network) set as environment variables, have to run:
npm run deploy-ropsten
In order to deploy in other networks, you first have to define the network in truffle-config.js
and later define a script analog to the deploy-* scripts.