Commit Graph

242 Commits

Author SHA1 Message Date
Ale personal
81106d75f5 improve: Optimize sell function of Angle adapter 2024-03-27 15:24:15 +01:00
Alessandro Bergamaschi
2d21f988dd Update evm/src/angle/AngleAdapter.sol
Co-authored-by: pistomat <pistomat@users.noreply.github.com>
2024-03-27 15:09:58 +01:00
Ale personal
77843d0695 fix: Update manifest of Angle 2024-03-27 15:08:24 +01:00
Ale personal
045fa1cc0d improve: Change ITransmuter from abstract contract to interface 2024-03-27 14:59:07 +01:00
pistomat
dfa731a93d Remove IERC20 from ISwapAdapter and use SafeERC20 for IERC20 2024-03-27 13:14:24 +01:00
pistomat
66e25d1a09 fix the format check CI 2024-03-27 11:17:12 +01:00
pistomat
c1143c2601 Merge pull request #22 from propeller-heads/mp/formatting
Formatting
2024-03-27 10:53:09 +01:00
pistomat
9b9146c23b feat: add format check to evm CI 2024-03-27 10:43:17 +01:00
pistomat
87c0c8baba chore: forge fmt 2024-03-27 10:43:02 +01:00
pistomat
3dc290c3df Formatting 2024-03-27 10:31:00 +01:00
Alan Höng
9e62d1f6ae Merge pull request #19 from propeller-heads/zz/fix-balancer
Fix bugs in balance substreams
2024-03-25 23:28:43 +00:00
0xMochan
2a85ca849b changes 2024-03-22 14:34:08 -04:00
Ale personal
bce771b253 Merge branch 'main' into feature/angle-adapter 2024-03-16 19:47:04 +01:00
Ale personal
511ca59f59 feat: Improve adapter and tests 2024-03-16 19:45:15 +01:00
Florian Pellissier
3895a3332c Fix bugs in balance substreams 2024-03-15 17:38:36 +01:00
Alan Höng
4ca484eebc Merge pull request #18 from propeller-heads/ah/template-and-docs
Update template and docs
2024-03-14 14:07:06 +00:00
kayibal
d972da244f Remove outdated readme. Add docs about releasing. 2024-03-14 13:05:06 +00:00
kayibal
2e77405342 Update ethereum-template
Remove unecessary pb module, import models from tycho-substreams instead.

Integrate package directly into workspace.
2024-03-14 12:53:12 +00: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
Alan Höng
c1347f3504 Merge pull request #17 from propeller-heads/ah/clip-balances-at-zero
Clip balances at zero.
2024-03-14 11:10:49 +00:00
kayibal
e70d5f0e86 Clip balances at 0.
In case we get negative balances, which happens sometimes e.g. in balancer and seems to be due to some rounding issues within the protocol, we simply clip the balance at 0 so we never emit negative balances as tycho-indexer the upstream system will interpret the balance bytes as unsigned integers.
2024-03-14 11:04:41 +00:00
Alan Höng
d72efb41d9 Merge pull request #16 from propeller-heads/ah/ci-and-cd
CI & CD for Substreams
2024-03-14 10:54:58 +00:00
Alan Höng
bc4a7a1085 Merge pull request #14 from propeller-heads/ah/factor-tycho-substreams
Add shared tycho-substreams lib.
2024-03-14 10:54:24 +00:00
Alan Höng
d10c4e3ea3 Merge pull request #13 from propeller-heads/zz/fix-balancer-substream-naming
WIP: Balancer Substream integration fixes
2024-03-14 10:50:33 +00:00
kayibal
3f5a74260d Adjust and uncomment s3 path. 2024-03-14 09:34:28 +00:00
kayibal
f88fb952b0 Add substreams cli installation.
Comment out S3 upload for now.
2024-03-14 02:10:53 +00:00
kayibal
2288e12032 Implement a substreams CD 2024-03-14 02:03:59 +00:00
kayibal
b0fe5bc4e1 Add github CI for substreams 2024-03-14 02:03:59 +00:00
kayibal
981a091727 Add check and release scripts.
Had to slightly adjust package names to make this work.
2024-03-14 01:24:43 +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
e62cc13c0b Move crates under substreams directory.
This way we can run GHA jobs depending on what files changed.
2024-03-13 23:57:23 +00:00
kayibal
29e5984a3a Add prelude; Move pb implementations.
Else the implementations would get overwritten.
2024-03-13 23:49:40 +00:00
kayibal
ba2a4ced08 Use expect instead of unwrap. 2024-03-13 23:19:45 +00:00
kayibal
cfdb31b0c5 Add documentation for the main methods added. 2024-03-13 23:12:30 +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
3d248f3fa1 Implement helpers for relative balances.
Adds some helpers that will users help to convert relative balances changes to absolute ones.

The goal is to make this as reduce the effort of the user to  implementing a simple map handler that extracts relative balances changes.
2024-03-13 18:46:10 +00:00
kayibal
92f20d0521 Add shared tycho-substreams lib. 2024-03-13 12:34:35 +00:00
Alan Höng
fdd43ad38e Merge pull request #15 from propeller-heads/ah/revert-localising-balance-deltas
Revert localising balance deltas
2024-03-13 12:33:19 +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
accfa074fd fix: filter out changes that aren't balancer related 2024-03-11 17:53:17 +01:00