This is a simple decentralized application built using Ethereum blockchain (smart contracts in contracts/
) and Vue JS for the front-end (in app-users/
).
- NPM >5.8.0 (or better yarn)
- TRUFFLE >4.1.5
- Ganache or your private network
- Metamask: not mandatory but better if you want to act as different users
- Clone the project into a folder of your choice (from here on ~/dapp).
- Start ganache (or your private blockchain, change the
--network
parameter accordingly). - Open the terminal (if you are using Windows you must use the Power Shell) in the folder ~/dapp and run the command:
$ truffle --network ganache migrate --reset --compile-all
- If the migration was successful, copy the compiled contracts ~/dapp/build/contracts/*.json into the folder ~/dapp/app-users/src/assets/contracts/
- Open another terminal in the folder ~/dapp/app-users and run the command:
$ yarn install
- Once all the dependencies are installed run the command:
$ yarn run dev
If everything went fine, the terminal will display a message similar to:
DONE Compiled successfully in 5166ms 15:54:53
Your application is running here: http://localhost:8080
- Open the browser, go to the URL shown by your terminal and play with the DApp!
NOTE: if you want to act as different users, you have to install metamask in your browser, then import the accounts into metamask and finally change account on metamask in order to register a new user.
-
Make sure that Ganache is running on Port 8545
-
Deploy the contract with
truffle migrate --network NETWORK --reset
-
Truffle will return the address of the contract. For example "> contract address: 0x524BFAeeE766c7AEA06903207382Cc3ce3a67b72"
-
Start RemixIDE (https://remix.ethereum.org)
-
Select the Tab "Run" on the right side
-
Choose Environment "Web3 Provider" and confirm that you want to connect to the node
-
Paste the contract address in the field "At Address" and click on the Button "At Address"
-
You should now see the "Schwungrat" Contract in the "Deployed Categories" window and all available methods
App framework from: DanieleFavi.com.