University of Zurich
- Create a new issue (automatically adds the issue to the To Do column of Ticketing dApp project)
- Assign yourself an issue from the To Do column of the Ticketing dApp project and move it to the In Progress column
- Pull the latest changes from
origin/master
- Create a new local branch beginning with the issue number (e.g.,
4-feature
). - Commit to this branch mentioning the issue number in the commit message (e.g.
add functionality xyz (#4)
- Finish your implementation on the branch
- Pull and merge the latest changes from
origin/master
into your local branch - Verify that your changes still work as expected
- Merge your branch into
master
and push the changes - Close the issue and move it to the Done column of the Ticketing dApp project
truffle compile
This generates the ABIs in a new folder idetix/abi
in the root directory. Use these files to interact with the smart contracts from your web app.
Make sure Ganache is running on port 7545
or change the port in truffle-config.js
.
truffle migrate --reset
Install the necessary dependencies:
npm install
Run the tests:
tuffle test
To quickly create many events, use the evaluation scripts under evaluation
.
- set the contract addresses in the environment:
export EVENT_FACTORY_ADDRESS=0x055b6e305864DC13E0b9F4ecB1591eE2e8a99C99 IDENTITY_ADDRESS=0x067b6772E882b541121a2af3Cf947E27D1edf4E9 TEST_ERC20_ADDRESS=0xf88D4b83Aa41d7E810d7235cC19365F0e522730C
- run the scripts:
truffle test evaluation/GasCostAnalysis.js --network ganachecli
The metadata of events, tickets and identity approvers is stored on IPFS to reduce storage on the blockchain. In the following it is shown what data is stored on the blockchain and what data is stored on IPFS and according to what JSON schema.
Following information is stored on the blockchain:
- IPFS hash (of the JSON below)
- Identity approver's Ethereum address
- Minimum required identity approvement level
- Accepted token for payment (Either the null address for ETH or a valid Ethereum address of an ERC20 token contract)
IPFS event metadata JSON schema:
{
"version": "1.0",
"event": {
"title": "string",
"location": "string",
"category": "string",
"description": "string",
"time": "unix",
"website": "url",
"twitter": "url",
"image": "base64",
}
}
Following information is stored on the blockchain:
- IPFS hash (of the JSON below)
- Whether the ticket is non-fungible
- Price
- Finalization time
- Supply
- Presale block (Optional - only for ticket types with a presale)
IPFS ticket metadata JSON schema:
{
"version": "1.0",
"ticket": {
"title": "string",
"description": "string",
"color": "hex",
"event": "constractHash",
"mapping": [
"x1/y1",
"x1/y2",
"x1/y3"
]
}
}
Following information is stored on the blockchain:
- IPFS hash (of the JSON below)
IPFS identity approver metadata JSON schema:
{
"version": "1.0",
"approver": {
"title": "string",
"methods": [
{
"level": 1,
"value": "method-name"
},
{
"level": 2,
"value": "method-name"
}
],
"website": "url",
"twitter": "url"
}
}
EventFactory deployed at: 0x3840DFe78536c4b27A928B1B86898302C938Ae9D
Identity deployed at: 0x2583d96704f7F0a6737b158b59739ac4b239F1dE
TestERC20Token deployed at: 0xBFd25cac00F0E9a0cdFA634bdaED379FdC69E24d