generated from wslyvh/nexth
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCommon.sol
41 lines (37 loc) · 773 Bytes
/
Common.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
error AccessDenied();
error AlreadyRegistered();
error AlreadyStarted();
error InactiveRecord();
error IncorrectValue();
error InvalidAddress();
error InvalidDate();
error LimitReached();
error NoAttendees();
error NotFound();
error NotWhitelisted();
error UnexpectedConditionModuleError();
enum Status {
Active,
Cancelled,
Settled
}
struct Record {
uint256 id;
uint256 endDate;
uint256 limit;
address owner;
Status status;
string contentUri;
address conditionModule;
//
uint256 totalRegistrations;
uint256 totalAttendees;
mapping(uint256 => address) registrationIndex;
mapping(address => Registrations) registrations;
}
struct Registrations {
bool registered;
bool attended;
}