Participating Drinking Establishments (PDEs)
The local bar, the city’s premier club, the skyline lounge, the speakeasy, the hotel restaurant, and etc.
struct PDE {
string _name;
string _location;
address _address;
uint _accessCode;
uint _PDEid;
}
PDE[] public pdes;
mapping (uint => address) public PDEtoOwner;function onboardPDE(string memory _name, string memory _location, address _address, uint _accessCode) public {
uint PDEid = uint(keccak256(abi.encodePacked(_name, _location, _address)));
pdes.push(PDE(_name, _location, _address, _accessCode, PDEid));
uint PDEindexNum = pdes.length - 1;
PDEtoOwner[PDEindexNum] = msg.sender;
emit newPDEonboarded(_name, _location, _address, PDEid, PDEindexNum, _accessCode);
}Last updated