Skip to content

Instantly share code, notes, and snippets.

@jefflau
Last active November 13, 2017 19:07
Show Gist options
  • Save jefflau/97dcbeec33591b78c41fcd492915c816 to your computer and use it in GitHub Desktop.
Save jefflau/97dcbeec33591b78c41fcd492915c816 to your computer and use it in GitHub Desktop.
Ticketer.sol
contract Ticketer {
address owner;
uint tickets;
uint sellStartDate;
uint sellEndDate;
uint eventStartDate;
uint buffer;
uint maxTicketsPerAddress;
event LogTicketSold(_address, _amount)
function Ticketer(
uint _tickets,
uint _sellStartDate,
uint _sellEndDate,
uint _eventStartDate,
uint _buffer,
uint _maxTicketsPerAddress)
{
tickets = _tickets,
sellStartDate = _sellStartDate,
sellEndDate = _sellEndDate,
eventStartDate = _eventStartDate,
buffer = _buffer,
maxTicketsPerAddress _maxTicketsPerAddress
//create ERC20 token
}
function buyTicket payable(uint _amount){
if(_amount > maxTicketsPerAddress){
revert()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment