Commit Graph

33 Commits

Author SHA1 Message Date
zizou
e064ea7aae fix(substreams-sdk): fix a bug in aggregate_balances_changes that was causing some balance changes loss.
The `aggregate_balances_changes` was keeping a map of token -> balance_change per transaction. Therefore, if a transaction was causing a balance change for the same token but on differents components we would only keep the update for the last component updated and drop the others.
2024-10-25 16:10:14 +02:00
zizou
18f4446344 fix(balancer): index PoolBalanceManaged balance changes 2024-10-17 12:49:03 +02:00
zizou
065c162c5a fix(balancer-susbtreams): fix a bug with pool id in case of Swap event. Also bump the Substreams version. 2024-09-06 11:04:29 +02:00
Florian Pellissier
27768ce114 refactor(balancer-substreams): remove pool_id static attr and use ProtocolComponent.id instead 2024-08-22 10:04:15 +02:00
kayibal
75b66a85af fix(balancer): Get all balancer tests working. 2024-08-01 12:03:01 +02:00
kayibal
f5b4c54a99 chore: code formatting 2024-07-25 14:11:29 +01:00
kayibal
2eb41d82f0 feat(tycho-substreams): Add builder for TransactionChanges.
This builder allows easier access to already changed contract addresses, and entity attributes while avoiding duplicated entries.

This is needed to implement the update markers on balancer substreams.
2024-07-25 14:11:29 +01:00
Florian Pellissier
1bd5e39956 feat: Add Balancer vault indexing 2024-07-22 03:48:47 +02:00
Florian Pellissier
a2e951aff3 refactor: make pool_id a static attribute 2024-07-22 03:48:47 +02:00
Florian Pellissier
84a3642f95 refactor: remove substreams logs 2024-07-22 03:48:47 +02:00
Florian Pellissier
7ce86db2d6 fix: correct change type for pool_id 2024-07-22 03:48:29 +02:00
Florian Pellissier
c48532a5c4 feat: Update protobuf messages for Balancer, add pool_id and balance_owner as entity changes 2024-07-22 03:48:29 +02:00
Florian Pellissier
3895a3332c Fix bugs in balance substreams 2024-03-15 17:38:36 +01:00
kayibal
3b51123311 Normalise module names for balancer.
This way the module names are in sync with the gitbook docs.
2024-03-14 12:52:29 +00:00
kayibal
6b6e42e2f8 Run rustfmt 2024-03-14 00:27:52 +00:00
kayibal
425628ae97 Create a workspace and make clippy happy. 2024-03-14 00:19:54 +00:00
kayibal
29e5984a3a Add prelude; Move pb implementations.
Else the implementations would get overwritten.
2024-03-13 23:49:40 +00:00
kayibal
312d322585 Add tycho pb type constructors.
This allows us to remove a lot of unnecessary boilerplate code.
2024-03-13 23:02:14 +00:00
kayibal
18e9dfcec4 Remove TransactionWrapper from SDK & Balancer.
This type is not needed anymore.
2024-03-13 21:09:01 +00:00
kayibal
d9fe9b1e1c Integrate balancer substream with sdk.
We defer the contract storage extraction as well as the balance handling (apart from actually extracing relative deltas) to the SDK.
2024-03-13 21:06:55 +00:00
kayibal
0d621a4545 Improve the naming of utils. 2024-03-13 12:29:41 +00:00
kayibal
4b2437dab6 Revert "Don't include balancer specific pb in tycho pbs."
This reverts commit a1864e3c.

We will actually make the balance delta messages part of the tycho packages since this makes a few things simpler when trying to factor out an sdk.
2024-03-13 12:11:38 +00:00
Florian Pellissier
7601072e87 fix: encode component_id as UTF8 2024-03-13 10:19:59 +01:00
Florian Pellissier
2a1b83f6c5 fix: index balance changes from Swap events 2024-03-12 22:53:30 +01:00
Florian Pellissier
38dcd9d843 fix: BalanceChange encoding 2024-03-12 12:51:26 +01:00
Florian Pellissier
1e546230de fix: map_balance_deltas pool_id check 2024-03-12 12:49:09 +01:00
kayibal
a1864e3cd4 Don't include balancer specific pb in tycho pbs. 2024-03-11 19:10:28 +00:00
Florian Pellissier
c283a81341 Make clippy happy 2024-03-11 18:32:42 +01:00
Florian Pellissier
51275f0ccf fix: remove balancer factory from components' contracts 2024-03-11 17:53:09 +01:00
Florian Pellissier
66a048fbe2 refactor: update protobuf messages 2024-03-11 17:52:46 +01:00
0xMochan
10f2e04c02 fix: only emit balance changes if the component is tracked 2024-02-05 13:58:25 -05:00
0xMochan
0a031d8bf5 fix: prune empty transaction protocol component groups from map_pools_created 2024-02-01 13:52:02 -05:00
0xMochan
9f82671082 feat: lots of refactoring (file splitting
- `lib.rs` split into multiple files with `modules.rs` being the main entrypoint for substreams
- contract changes are tracked similiarly to ambient (generalized to use a store of tracked contracts)
- static attributes were pruned of the dynamic ones
2024-01-29 11:12:27 -05:00