Drinkers

The local dive bar goer, the fist pumping clubber, the high class fancy rooftop lounger, or the occasional casual drinker, this is the DAO for you.

Drinkers (holders of $HOUR): These are the users and community members interacting with the Happy Hour Protocol Engine. These are the happy hour goers, nightlife fist-pumpers, bartenders, and all other alcoholics who make it a priority to support the F&B industry.

Start earning $HOUR function. Requires a minimum happy hour fee stake, the PDE's PDEid and its Access Code.

function startHOUR(uint _PDEid, uint _accessCode) public payable {

    uint validPDE;

    for (uint i = 0; i < pdes.length; i++) {
        if (pdes[i]._PDEid == _PDEid && pdes[i]._accessCode == _accessCode) {
            validPDE = 1;
        } else {
            validPDE = 0;
        }
    }

    require(validPDE == 1);
    require(msg.value == happyHourFee, "Invalid Happy Hour Fee.");
    givePoolDrinkingId();
    drinkingIDtoPDEid[drinkingID[msg.sender]] = _PDEid;
    happyHourFeePool += 1;
    timeIN = block.timestamp;
}

Function to stop earning $HOUR

Each Drinker is designated an ID in order to keep track of current hours accumulated per Drinker during 1 session.

Getter function to view ETH amount staked in current happy hour fee pool.

Last updated