Clone proto and substreams from tycho-indexer
This commit is contained in:
44
proto/tycho/evm/v1/common.proto
Normal file
44
proto/tycho/evm/v1/common.proto
Normal file
@@ -0,0 +1,44 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package tycho.evm.v1;
|
||||
|
||||
message Block {
|
||||
bytes hash = 1;
|
||||
bytes parent_hash = 2;
|
||||
uint64 number = 3;
|
||||
uint64 ts = 4;
|
||||
}
|
||||
|
||||
message Transaction {
|
||||
bytes hash = 1;
|
||||
bytes from = 2;
|
||||
bytes to = 3;
|
||||
uint64 index = 4;
|
||||
}
|
||||
|
||||
enum ChangeType {
|
||||
CHANGE_TYPE_UNSPECIFIED = 0;
|
||||
CHANGE_TYPE_UPDATE = 1;
|
||||
CHANGE_TYPE_CREATION = 2;
|
||||
CHANGE_TYPE_DELETION = 3;
|
||||
}
|
||||
|
||||
message Attribute {
|
||||
string name = 1;
|
||||
bytes value = 2;
|
||||
ChangeType change = 3;
|
||||
}
|
||||
|
||||
message ProtocolComponent {
|
||||
string id = 1;
|
||||
repeated bytes tokens = 2;
|
||||
repeated string contracts = 3;
|
||||
repeated Attribute static_att = 4;
|
||||
ChangeType change = 5;
|
||||
}
|
||||
|
||||
message BalanceChange {
|
||||
bytes token = 1;
|
||||
bytes balance = 2;
|
||||
bytes component_id = 3;
|
||||
}
|
||||
22
proto/tycho/evm/v1/entity.proto
Normal file
22
proto/tycho/evm/v1/entity.proto
Normal file
@@ -0,0 +1,22 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package tycho.evm.v1;
|
||||
|
||||
import "tycho/evm/v1/common.proto";
|
||||
|
||||
message EntityChanges {
|
||||
string component_id = 1;
|
||||
repeated Attribute attributes = 2;
|
||||
}
|
||||
|
||||
message TransactionEntityChanges {
|
||||
Transaction tx = 1;
|
||||
repeated EntityChanges entity_changes = 2;
|
||||
repeated ProtocolComponent component_changes = 3;
|
||||
repeated BalanceChange balance_changes = 4;
|
||||
}
|
||||
|
||||
message BlockEntityChanges {
|
||||
Block block = 1;
|
||||
repeated TransactionEntityChanges changes = 2;
|
||||
}
|
||||
34
proto/tycho/evm/v1/vm.proto
Normal file
34
proto/tycho/evm/v1/vm.proto
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package tycho.evm.v1;
|
||||
|
||||
import "tycho/evm/v1/common.proto";
|
||||
|
||||
message ContractSlot {
|
||||
bytes slot = 2;
|
||||
bytes value = 3;
|
||||
}
|
||||
|
||||
message ContractChange {
|
||||
bytes address = 1;
|
||||
// empty bytes indicates no change
|
||||
bytes balance = 2;
|
||||
// empty bytes indicates no change
|
||||
bytes code = 3;
|
||||
// empty sequence indicates no change
|
||||
repeated ContractSlot slots = 4;
|
||||
// Whether this is an update, creation or deletion
|
||||
ChangeType change = 5;
|
||||
}
|
||||
|
||||
message TransactionContractChanges {
|
||||
Transaction tx = 1;
|
||||
repeated ContractChange contract_changes = 2;
|
||||
repeated ProtocolComponent component_changes = 3;
|
||||
repeated BalanceChange balance_changes = 4;
|
||||
}
|
||||
|
||||
message BlockContractChanges {
|
||||
Block block = 1;
|
||||
repeated TransactionContractChanges changes = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user