An event ticketing app with low transaction fees and blockchain-driven anti-scalping protections
-
Open the Ganache app (dock)
a. Open the hard-to-find-sponge workspace
-
Open the Metamask browser extension (Google Chrome)
a. Log in if needed
b. Switch to the Ganache TEST network
-
In Terminal,
cd
into the project directory -
In Terminal, run
truffle compile
-
In Terminal, run
truffle migrate --reset
(pushes new code to the blockchain!) -
In Terminal, run
truffle console
(optional)a. If so desired, run the following test commands:
`marketplace = await Marketplace.deployed()` `marketplace.address` `name = await marketplace.name()` `name` `sup = await marketplace.supervisor()` `sup`
-
In Terminal, run
truffle test
-
Open remix.ethereum.org
-
Upload any relevant
.sol
files to the File Explorer -
In the
Solidity Compiler
tab, do the following:a. Choose the correct compiler given the
.sol
filesb. Compile the selected code
-
In the
Deploy and Run Transactions
tab, do the following:a. In the
Environment
dropdown menu, choose the JavaScript VMb. In the
Account
dropdown menu, choose the first address to deploy the contractc. Press the
Deploy
buttond. Click on the dropdown menu that says
Marketplace at (some address)
e. Test the various functions, e.g.,
createProduct
,purchaseProduct
, and othersi. Recommendation: use the second address as ticket issuer, and use the third address as ticket holder
-
If errors arise in the console, press the
Debug
button to view line-by-line code execution
-
Open the Ganache app (dock)
a. Open the hard-to-find-sponge workspace
-
Open the Metamask browser extension (Google Chrome)
a. Log in if needed
b. Switch to the Ganache TEST network
-
In Terminal,
cd
into the project directory -
In Terminal, run
npm run start
Should I be using modifiers to collapse duplicate code as much as possible? Or will I cause high gas/security problems?
Credits to Dapp University for the starter code for this app: https://github.com/dappuniversity/marketplace https://www.dappuniversity.com/articles/how-to-build-a-blockchain-app#dependencies
Good source on using Remix for debugging: https://medium.com/linum-labs/error-vm-exception-while-processing-transaction-revert-8cd856633793