https://github.com/metaXchain/dapper-create-org
First install git
, node
, npm
, & truffle
if you do not have them already.
To install project dependencies run: npm install
If you get installation error try deleting the package-lock.json
file if it exists
You will see two additional contracts added to this repository.
1.) Answers.sol: which includes the completed version of the annotated Organizations.sol
2.) Members.sol: This contract is and extended version of the Organization.sol contract. It includes functionality to for organizations to add members. First the contract creator must register and organizaiton to its public key, then only the organization itself can add and remove members in the organization. This means if an organization was registered to a public key, now only that public key/wallet that the organization is registered with is able to update their own member list.
-
If not done so already install
testrpc
on your computer -
Development deployment/testing utilizes
testrpc
-
mnemonic for your network should be copied into the
secrets.json
file -
Look in
truffle.js
for deployment configurations. You shouldn't need to modify this unless you want to modify network
Depending on which contract you want to test and deploy, you will need to go to the migrations/2_deploy_contracts.js
folder and change the name of the contract you wish to work with. Currently it is set up to deploy Answers.sol
.
Run testrpc in your terminal: testrpc -m 'put your mnemonic from secrets.json here'
Then run: npm run test
npm run compile
npm run deploy
When you run npm run compile
truffle compiles the contracts and puts the abi
files in the /build
directory.
truffle test
truffle compile
truffle migrate --reset --network=development
1.) Open Organizatoion.sol
in Remix IDE
2.) Read over commented document
3.) Try and recreate this Solidity code based on the comments
4.) Work with others
- Answers will be provided after class
- This repository includes working tests with correctly constuceted code
MIT