* fix: remove unnecessary tx field in ProtocolComponent * chore: move ambient protobuf files to ambient module * chore: remove dependency on common message types This allows us to isolate the ambient specific messages within the ambient module * feat: update ambient substream with new message structs * chore: update substream configs And remove use of deprecated BlockContractChanges. * feat: implement From for AmbientProtocolComponent to ProtocolComponent
36 lines
1.1 KiB
Protocol Buffer
36 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package tycho.ambient.v1;
|
|
|
|
// A change to a pool's balance. Ambient specific.
|
|
message AmbientBalanceDelta {
|
|
// The address of the ERC20 token whose balance changed.
|
|
bytes pool_hash = 1;
|
|
// The token type: it can be base or quote.
|
|
string token_type = 2;
|
|
// The delta of the token.
|
|
bytes token_delta = 3;
|
|
// Used to determine the order of the balance changes. Necessary for the balance store.
|
|
uint64 ordinal = 4;
|
|
// Transaction index of the balance change
|
|
uint64 tx_index = 5;
|
|
}
|
|
|
|
message AmbientProtocolComponent {
|
|
// A unique identifier for the component within the protocol.
|
|
string id = 1;
|
|
// Addresses of the ERC20 tokens used by the component.
|
|
repeated bytes tokens = 2;
|
|
// Ambient pool index [static attribute for ambient pools]
|
|
bytes pool_index = 3;
|
|
// Transaction index for the component creation
|
|
uint64 tx_index = 4;
|
|
}
|
|
|
|
// Ambient pool changes within a single block
|
|
message BlockPoolChanges {
|
|
// New protocol components added in this block
|
|
repeated AmbientProtocolComponent new_components = 1;
|
|
// Balance changes on this block
|
|
repeated AmbientBalanceDelta balance_deltas = 2;
|
|
} |