9 Commits

Author SHA1 Message Date
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
Zizou
52d502198e fix: stop using buggy account_creations for creation tagging. (#201)
the `call.account_creations` field had been deprecated by Substreams because of some edge cases where a new account wasn't detected.
This commit removes the usage of this field in our sdk contract extraction logic and some others specific places. We decided to rely on the call type instead. This approach should be much more robust.

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-05-13 12:25:14 +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
dceea46655 fmt(substreams): update auto generated files (#150)
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2025-02-06 17:13:25 +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
d766116421 fix: contract creation/update tagging (#117)
* chore: add sfrax to rust fmt ignore

* fix(substreams-sdk): correctly mark contract creation.

Previously we would mark a contract as created if it was created in any transaction in this block. This would lead to some unexpected behavior if the contract was created and updated in the same block but in different transactions. In that case the update would be tagged as creation.

* feat: extract asset types for ng factory

This will allow us to detect pools with rebasing tokens and blacklist them until we can support them in `tycho-simulation`

* fix: correctly index math implementation for twocrypto factory

This implementation is immutable and not dynamic.

* fix: index cryptopool factory

This factory is needed for simulations by pools that have admin fees.

* chore: fix build sfrax abi contract

* Bump curve version

---------

Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
Co-authored-by: tvinagre <tvinagre@gmail.com>
Co-authored-by: Thales <thales@datarevenue.com>
2024-12-06 17:59:39 -03:00
Zizou
9f75d47202 fix(sfrax): update aggregate_balances_changes usage to the new interface (#101)
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
2024-10-30 15:46:08 +07:00
Domenico
e484ea28ca Sdk implementation: Sfrax adapter and substream (#91)
* feat: initial setup

* feat: implemented getCapabilities and getTokens

* chore: adjusted getPoolIds

* feat: Initial implementation of getLimits()

* feat: implemented getLimits, getTokens and internal functions for amounts

* feat: implemented price

* feat: implemented swap function

* fix and test: fixed minor issues on adapter and setup test

* debugging price function

* fix: debugged price function and fixed getPriceAt function

* test: testOneIncreasingPriceFoundFraxV3SFrax

* fix: debugging and fixing buy function

* fix: fixed getPriceAt

* test: testing post trade price

* fix: Fixed getPriceAt

* fix: Fixed getLimits

* fix: Fixed prices and improved readability

* fix: Fixed price and transfers in swap

* feat: Finished tests

* chore: Changed approve to safeIncreaseAllowance

* feat: created substream for staked frax

* feat: remove useless files

* feat: fixed dependencies in cargo.toml

* feat: rename folder

* feat: updated cargo.lock

* feat: changed lib.rs, added modules.rs

* feat: update modules.rs with corrects addresses

* feat: rename folder in ethereum-sfrax

* feat: remove useless comments, change locked asset address, rename

* feat: undo changes on mod.rs in ethereum-balancer

* feat: rename variable

* feat: update substreams/cargo.toml

* feat: modify ristfmt.toml

* feat: performed code formatting

* feat: modify src/abi

* feat: performed formatting with nightly

* feat: fix addition opeation

* feat: adjust code with for i, f

* feat: performed fmt inside ethereum-sfrax folder

* feat: performed clippy

* feat: fix with clippy warning suggests

* feat: undo any change in ethereum-balancer

* feat: change stakedfrax_contract.rs

* fix: stakedfrax_contract.rs

* feat: add blank line

* feat: add #[allow(clippy::all)] on ethereum-sfrax/src/abi/mod.rs

* feat: update comments on pool_factories.rs

* feat: update cargo.toml and substreams.yaml

* feat: add tycho evm in pb folder

* feat: add params to take contracts' addresses

* feat: add logic to map rewards_cycle

* feat: performed fmt and fix versioning

* feat: remove useless functions

* feat: add logic to track rewards_to_distribute

* feat: passing CI

* fix: substreams.yaml

* feat: fixed params in manifest

Co-authored-by: mrBovo <bovo.ignazio@proton.me>

* feat: fixed error in map_relative_balances function

* feat: passing CI checks

* fix: 🐛 hex-binary address encoding + refactoring vault-> underlying map

* style: 💄 fix formatting

* feat: Implemented testPoolBehaviour

* alignment with propeller main

* Update forge-std submodule reference to include ds-test

* files update to match propeller/main

* creating integration_test fir sfrax

* fixed FraxV3SFraxAdapter.sol import paths

* updated with correct addresses FraxV3SFraxAdapter manifest.yaml

* updated sfrax manifest.yaml

* updated to support sdk

* integration_test sfrax updated

* fix: 🐛 add reward processing

* chore: ♻️ minor cleanups

* fix: Fixed adapter limits

* fix: fix adapter and substream sdk tests

* fix: Fixed CI errors

* chore: fmt

* chore: Removed unused line

* fix: Fixed clippy warnings

* chore: formatted with rustup

* chore: Removed unused line

* chore: post-build formatting

* chore: Formatting using different toolchain vesion

* chore: 💄 format

* chore: 💄 format 2

* chore: Using static address for frax

* feat: Added second constructor param for sfrax

* fix: Fixed limits on frax sell

* chore: Fixed merge conflict with sfraxeth

* chore: Remove sfraxeth_contract changes

* chore: Fixed EOFs

* fix: Fixed fmt on stakedfrax contract

---------

Co-authored-by: mp-web3 <mp.web3.t@gmail.com>
Co-authored-by: gabrir99 <gabri.ruini@gmail.com>
Co-authored-by: mrBovo <bovo.ignazio@proton.me>
Co-authored-by: Ignazio Bovo <ignazio@jsgenesis.com>
Co-authored-by: mrBovo <bovoignazio.dev@gmail.com>
Co-authored-by: Mattia <mp.web3@gmail.com>
2024-10-25 18:53:06 +01:00