-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathProfileLib.sol
More file actions
40 lines (36 loc) · 1.41 KB
/
ProfileLib.sol
File metadata and controls
40 lines (36 loc) · 1.41 KB
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
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.20;
library ProfileLib {
struct OperatorFee {
uint16 feePercentage;
uint256 effectiveDate;
}
struct ProfileInfo {
string name;
bytes nodeId;
uint96 ask;
OperatorFee[] operatorFees;
// Network State Registry (RFC 04 v0.3 / Issue #461). Appended to the
// tail of the struct so existing storage layouts in mappings stay
// backwards-compatible at the slot level: old keys read this as
// false until the operator opts in via Profile.updateRelayCapable.
// Multiaddrs are deliberately NOT stored on Profile — they live in
// per-round attestation KCs (RFC 04 §5.2).
bool relayCapable;
}
error IdentityAlreadyExists(uint72 identityId, address wallet);
error TooManyOperationalWallets(uint16 allowed, uint16 provided);
error EmptyNodeName();
error EmptyNodeId();
error NodeNameAlreadyExists(string nodeName);
error NodeIdAlreadyExists(bytes nodeId);
error OperatorFeeOutOfRange(uint16 operatorFee);
error ZeroAsk();
error AskUpdateOnCooldown(uint72 identityId, uint256 cooldownEnd);
error NoOperatorFees(uint72 identityId);
error ProfileDoesntExist(uint72 identityId);
error ProfileAlreadyExists(uint72 identityId);
error NoPendingNodeAsk();
error NoPendingOperatorFee();
error InvalidOperatorFee();
}