Steps
-
Create an
.env
file over project and include all the project variable. -
Add project variables to the
.env
file- INFURA_PROJECT_ID
- INFURA_PROJECT_SECRET
- MNEMONIC_PHRASE
- ETHERSCAN_API_KEY
-
For local ganache deploy
Runtruffle deploy
-
For Rinkeby deploy
Runtruffle deploy --network rinkeby
-
Lastly is verify you etherscan code
Runtruffle run verify Investment --network rinkeby
Pass - Verified: https://rinkeby.etherscan.io/address/0x2CEA970AE626C8114Ca12942e96c7c2E189C16b2#contracts