23 Commits

Author SHA1 Message Date
dianacarvalho1
128de3037e fix: Misc improvements (#291)
* fix: Misc improvements

Make module_name optional and default to map_protocol_changes
Add build instructions for the DB image inside of the docker-compose
Improve error message
Remove unnecessary module_name from yaml files

#time 39m

* fix: Bring back module_name in balancer v3 tests

#time 8m

* fix: Fix balance and allowance overwrites

For tokens with proxies we need to use the address that is returned by the detector

#time 13m
2025-10-03 14:37:49 +00:00
Zizou
3c6f9c2083 fix: update balancer_v2 dependency after a fix in tycho-substreams (#281)
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-09-26 21:28:39 +00:00
Tamara
eaca47479b feat: Simulate txs against RPC (#261)
* feat: (WIP) Simulate txs against RPC

* fix: include test_executor_addresses.json

We should probably fetch this from execution instead. Will do later

* feat: (WIP) Attempt to use TokenProxyOverwriteFactory

* feat: (WIP) Attempt to use TokenProxyOverwriteFactory

* feat: Add simulating execution using debug_traceCall

Decoded amount out from execution and compared with the one from simulation
Allow for printing the execution traces
Moved all execution methods into execution.rs
Created traces.rs (heavily clauded) that prints the traces nicely and gets the function selectors frm 4byte (I decided not to use EtherscanIdentifier from foundry because adding foundry as a dependency is really heavy and I expect problems because of it)

Temporary: hardcoded storage slots for test_weighted_pool_v4 to pass

#time 1h 55m

* feat: Use BalanceSlotDetector and AllowanceSlotDetector from tycho_ethereum

#time 1h 14m

* fix: Improve traces.rs

#time 2m

* feat: Add skip_execution

Also get tycho router bytecode at compile time

#time 22m

* test: Skip tests that are before the Shanghai upgrade

Remove unnecessary TODOs

#time 35m

* feat: Point tycho dependencies to specific commits

#time 9m

* fix: Set historical_trade to true in TychoRouterEncoderBuilder

#time 41m


#time 0m

* feat: Improve traces.rs (use foundry instead of 4bytes)

Improved the format of the printed trace as well

#time 1h 7m

* fix: After merge fixes

#time 3m

* feat: Use new executors_addresses in tycho-execution and read it at startup

#time 1h 25m

* feat: Create a new flag to enable execution_traces

#time 9m

* fix: Small code, log and trace improvements

Add trying to decode method's calldatas in tracing

#time 1m

* fix: Simplify simulate_transactions_with_tracing by introducing a new method: bytes_to_fixed_32

#time 13m

* fix: After merge fixes

#time 1m

* fix: Include executor's bytecode at compile time

#time 11m

---------

Co-authored-by: TAMARA LIPOWSKI <data.lipowski@extaccount.com>
Co-authored-by: Diana Carvalho <diana@propellerheads.xyz>
2025-09-23 15:57:43 +01:00
TAMARA LIPOWSKI
2c0c4d97fb refactor: Move module_name to integration test yaml
It's not good to keep this in the test_runner because then we have multiple points that we need to edit the test config, which can be hard to find.

We need this because the module name for uniswap_v2 is so far different from the rest of the protocols.
2025-09-23 00:42:23 -04:00
adrian
b1315d1863 test: remove test_composable_stable_pool_creation for balancer-v2 2025-09-17 10:27:44 +02:00
dianacarvalho1
22843cfd3b feat: Add encoding to test suite (#259)
* feat: Add encoding to test suite

Use execution from simulation
Add protocol_system to all test files and pass it to run tycho
Add encoding_utils.rs

#time 5h 0m

#time 1m

#time 7m

* refactor: Move encoding swap to its own method to simplify main code

Rename encoding_utils.rs to encoding.rs

#time 20m


#time 0m

#time 0m
2025-09-11 14:30:49 +01:00
Zizou
ed43a079c9 feat: update balancer v2 spkg to make it return old slot values (#252)
* feat: update balancer v2 spkg to make it return old slot values

This is needed for the new DCI version that uses old values to look into exactly what part of the slot change and compare with the retrigger offset

* refactor: use crate registry instead of github

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-09-09 10:38:35 +02:00
Louise Poole
58324a199f chore: fix typos 2025-06-26 12:33:31 +02:00
Louise Poole
dfa87f662d fix(balancer_v2): skip adding zero address rate_provider entrypoints (#224) 2025-06-25 15:52:49 +00:00
Louise Poole
648a3bf419 fix: skip processing balances of bpt tokens (#220) 2025-06-19 16:27:26 +02:00
Zizou
7da01c745b feat: Balancer V2 DCI integration (#219)
* feat: Add DCI Entrypoints to BalancerV2 components

* fix: miscellaneous fixes before Balancer V2 resync

This commit fixes the entrypoints created by Balancer v2 packages, removes some disabled factories and remove support for BPT tokens (this is still to be investigated but so far we won't be able to support them)

* refactor: fix CI and bump version

* chore: update comments

---------

Co-authored-by: Thales <thales@datarevenue.com>
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
Co-authored-by: Louise Poole <louise@datarevenue.com>
2025-06-16 11:35:59 +02:00
zizou
7e73061f8e chore: add repository URL to substreams.yaml for ethereum_balancer_v2 2025-05-19 13:49:34 +02:00
Zizou
e8bde64a23 fix: update tycho-substreams version in all vm packages (#206)
This is needed after https://github.com/propeller-heads/tycho-protocol-sdk/pull/201

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-05-14 10:57:22 +02:00
Louise Poole
409cf15864 Revert "chore: update format! macro use to satisfy latest clippy version (#194)" (#196)
This reverts commit f29de67f1f.
2025-04-25 18:09:38 +02:00
Louise Poole
f29de67f1f chore: update format! macro use to satisfy latest clippy version (#194) 2025-04-25 15:13:01 +00:00
Zizou
b1e7ba9e2f refactor(substreams): add rust-toolchain to the templates and modules. (#155)
* refactor(substreams): add `rust-toolchain` to the templates and modules.

This freezes the wasm output for each module, allowing us to have full control over each packages and when we break the modules hashes.

* fix(testing): allow no `initialized_accounts` in tests

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-02-17 08:29:07 +00:00
kayibal
22f70ca110 formatting & lints 2025-02-06 11:04:39 -06:00
kayibal
d0e73a20ea feat(template): More detailed template.
Add a more detailed protocol implementation in the template. This should allow more ppl to get started quicker. Additionally more people will follow a predetermined structure
2025-02-06 11:04:39 -06:00
Zizou
5f319a6875 refactor: ensure consistent ABI iteration order in build files (#131)
Previously, build files iterated through ABIs in an inconsistent order, causing unwanted changes when the build was rerun, as the iteration order would differ. This commit resolves the issue by sorting ABIs by name, ensuring consistent formatting and preventing unintended changes in future commits.

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-01-10 11:45:14 +01:00
Zizou
39934347b3 refactor(substreams): remove workspace dependencies (#129)
This is to make each substreams completely independent, before when we would need a new version of a dependency, we would have to change it for every crate which would lead to a change of every substreams module hash. We want to make every Substreams completely independant and frozen, this also helps to maintain a correct versionning.

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-01-07 16:04:17 +00:00
Zizou
4d4d05203a fix(curve-substreams): miscellaneous fixes for balances extractions in Curve (#118)
* fix(curve-substreams): filter out reverted calls in `emit_eth_deltas`

* feat(substreams-sdk): extract balances from `Deposit` events in `extract_balance_deltas_from_tx`

* ci: ignore fmt for abi files

* feat(sdk): also account for `Withdrawal` event from WETH

* chore: reorder mod.rs, remove unused import

* chore: cargo fmt

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
Co-authored-by: Thales <thales@datarevenue.com>
2024-12-06 18:21:07 -03:00
Zizou
baadd0212d fix(balancer): Ignore PoolBalanceManaged for not indexed pools (#106)
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2024-11-01 11:13:56 +07:00
Zizou
eea8b27112 fix(balancer): miscellaneous improvements before resync (#104)
* fix(balancer): ignore self balance change

Euler pool emit a balance change for the pool itself. We don't want to have it because it's an unknown token from Tycho's perspective.

example: https://etherscan.io/tx/0x4a9ea683052afefdae3d189862868c3a7dc8f431d1d9828b6bfd9451a8816426#eventlog#338

* refactor(balancer): rename balancer module to balancer-v2

* ci: make clippy happy

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2024-10-31 15:12:37 +02:00