This repo contains all files to launch a very simple web3 workflow:
- Voucher Operator(1) transfers an ERC1155 NFT to the customer
- Customer(2) creates a signature, which allows an touristic operator(3) to redeem the voucher (QR code)
- Operator scans the QR code and redeems the voucher.
- Redeem will burn one token quantity, and send 1 CAM to the the touristic service account(4).
- Access to a EVM blockchain like Camino's Columbus network
- Remix IDE (remix.ethereum.org)
- Web server
- Open ERC1155BonusCard in Remix IDE, compile and deploy
- Setup smart contract (Remix IDE):
- provide NFT metadata: setBaseMetadataURI
- allow (3) to call redeem: setFlightOperator
- set fund address (4): setFundAddress
- Mint n entities of a tokenId of your choice to (1), in general (1) is the account which has deployed the contract
- Edit the index html files in passenger and operator folders and replace the contract address
- Copy the folders passenger and operator to your web server
- Voucher handler (1) transfers 1 entity of minted tokenId to customer(2) address (Remix IDE / ERC1155 capable wallet)
- Customer(2) opens passenger web side in mobile MetaMask browser (make sure the correct network is selected), signs that he is willing to spend his NFT -> QR code is generated
- Operator(3) opens the operator website in a MetaMask browser, activates the QR scanner, and scans the QR code from step 2.
After successful scan, the balance of (2) is shown and the redeem link (burn and send funds) is available.
©2022 Chain4Travel AG