My first stab at updating the contract to mint tickets, notably, update contract terms to accept inventory then check want against inventory to make sure we have enough inventory and check give against total price to make sure user offers enough tokens.
This is still pretty rough so any and all feedbacks are welcomed.
TODOs:
[x] make the last test case in test-contract.js pass, it's using mockBootstrap and I don't know quite understand how it works
My first stab at updating the contract to mint tickets, notably, update contract terms to accept
inventory
then checkwant
against inventory to make sure we have enough inventory and checkgive
against total price to make sure user offers enough tokens.This is still pretty rough so any and all feedbacks are welcomed.
TODOs:
test-contract.js
pass, it's usingmockBootstrap
and I don't know quite understand how it works