blockparty
blockparty copied to clipboard
Create user state function
- 'not registered' if isRegistered(address) == false
- 'registered' if isRegistered(address) == true && isAttended(address) == false
- 'attended' if isAttended(address) == true && participants[address].payout == 0 isPaid(address) == false
- 'won' if isAttended(address) == true && participants[address].payout > 0 isPaid(address) == false
- 'earned' if isPaid(address) == true
Maybe is better if this user state function remains on app side and don't put on smart contract high level functions