-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherc20.proto
64 lines (49 loc) · 1.29 KB
/
erc20.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
syntax = "proto3";
package erc20.types.v1;
message BalanceChanges {
repeated BalanceChange balance_changes = 1;
}
enum BalanceChangeType {
TYPE_UNKNOWN = 0; // cannot determine balance change
TYPE_1 = 1; // easy case where storage change is in the same call as the Transfer call
TYPE_2 = 2; // storage change is in a different call than the Transfer call
}
message BalanceChange {
string contract = 1;
string owner = 2;
string old_balance = 3;
string new_balance = 4;
string transaction = 5;
string storage_key = 6;
uint32 call_index = 7;
string transfer_value = 8;
BalanceChangeType change_type = 9;
}
message ValidBalanceChanges {
repeated ValidBalanceChange valid_balance_changes = 1;
}
message ValidBalanceChange {
string contract = 1;
string owner = 2;
string old_balance = 3;
string new_balance = 4;
string transaction = 5;
}
message UnknownBalanceChanges {
repeated UnknownBalanceChange unknown_balance_changes = 1;
}
message UnknownBalanceChange {
string contract = 1;
string owner = 2;
string transaction = 3;
uint32 call_index = 4;
string transfer_value = 5;
}
message BalanceChangeStats {
uint64 type0_count = 1;
uint64 type1_count = 2;
uint64 type2_count = 3;
uint64 total_count = 42;
string valid_rate = 43;
uint64 block_number = 99;
}