In order to run the project, you need to have installed truffle and ganache
npm install -g truffle
npm install -g ganache
If you want to use metamask, it's recomended to use metamask.
Then:
- Start ganache:
cd Backend
npm run ganache-dev
- Deploy the contract:
cd Backend
truffle deploy
- If you want to update the contract, then:
- Redeploy the contract:
truffle migrate --reset
. - Copy the new deployed contract address (from the stdout of
truffe
) toFrontend/src/utils/SmartContractConnector.ts
.
- Redeploy the contract:
-
Start the ganache blockchains with the settings configured as in truffle-config.js
-
Load some addresses in metamask.
-
Open remix, paste the contract in the contracts folder.
-
Deploy the contract in remix if the contract isn't deployed already (with truffle migrate)
-
Now you should be able to interact with the contract !!