forked from farcasterxyz/hub-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
onchain_event.proto
67 lines (59 loc) · 1.45 KB
/
onchain_event.proto
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
syntax = "proto3";
enum OnChainEventType {
EVENT_TYPE_NONE = 0;
EVENT_TYPE_SIGNER = 1;
EVENT_TYPE_SIGNER_MIGRATED = 2;
EVENT_TYPE_ID_REGISTER = 3;
EVENT_TYPE_STORAGE_RENT = 4;
}
message OnChainEvent {
OnChainEventType type = 1;
uint32 chain_id = 2;
uint32 block_number = 3;
bytes block_hash = 4;
uint64 block_timestamp = 5;
bytes transaction_hash = 6;
uint32 log_index = 7;
uint64 fid = 8;
oneof body {
SignerEventBody signer_event_body = 9;
SignerMigratedEventBody signer_migrated_event_body = 10;
IdRegisterEventBody id_register_event_body = 11;
StorageRentEventBody storage_rent_event_body = 12;
}
uint32 tx_index = 13;
uint32 version = 14;
}
enum SignerEventType {
SIGNER_EVENT_TYPE_NONE = 0;
SIGNER_EVENT_TYPE_ADD = 1;
SIGNER_EVENT_TYPE_REMOVE = 2;
SIGNER_EVENT_TYPE_ADMIN_RESET = 3;
}
message SignerEventBody {
bytes key = 1;
uint32 key_type = 2;
SignerEventType event_type = 3;
bytes metadata = 4;
uint32 metadata_type = 5;
}
message SignerMigratedEventBody {
uint32 migratedAt = 1;
}
enum IdRegisterEventType {
ID_REGISTER_EVENT_TYPE_NONE = 0;
ID_REGISTER_EVENT_TYPE_REGISTER = 1;
ID_REGISTER_EVENT_TYPE_TRANSFER = 2;
ID_REGISTER_EVENT_TYPE_CHANGE_RECOVERY = 3;
}
message IdRegisterEventBody {
bytes to = 1;
IdRegisterEventType event_type = 2;
bytes from = 3;
bytes recovery_address = 4;
}
message StorageRentEventBody {
bytes payer = 1;
uint32 units = 2;
uint32 expiry = 3;
}