* refactor: update test config to include `coins`
* refactor: rename package to `ethereum_curve` and add repository URL in substreams.yaml
---------
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
* feat: add DCI message definitions
#time 4m
#time 2m
* fix: Make entrypoints into a HashSet instead of Vec
#time 0m
* fix: Rollback on message index change in ContractSlot
#time 5m
* feat: Add get_block_storage_changes
#time 34m
#time 0m
* Update substreams/crates/tycho-substreams/src/block_storage.rs
Co-authored-by: Louise Poole <louisecarmenpoole@gmail.com>
* Update substreams/crates/tycho-substreams/src/block_storage.rs
Co-authored-by: Louise Poole <louisecarmenpoole@gmail.com>
* fix: Filter out calls that are reverted and sort change by ordinal
#time 0m
* fix: Improve performance of get_block_storage_changes
We expect this util function to collect and handle a lot of information repeatedly (on every single block). So top performance optimisation (both memory and computation) is vital to minimise substream lags.
#time 6m
* fix: Use filter and flat_map instead of if and for loops
#time 1m
---------
Co-authored-by: Louise Poole <louise@datarevenue.com>
Co-authored-by: Louise Poole <louisecarmenpoole@gmail.com>
* feat(curve): add coins in static attributes
This will be used by tycho-execution when executing swaps on the pool. It is needed because the `exchange` function takes token indexes and not addresses as input.
* style: make clippy happy with `format!`
---------
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
* feat: add DCI message definitions
#time 4m
#time 0m
* feat: Add add_entrypoint to TransactionChangesBuilder
#time 15m
#time 0m
* fix: Make entrypoints into a HashSet instead of Vec
#time 0m
* fix: Rollback on message index change in ContractSlot
#time 5m
* fix: Ignore examples in docstrings when running cargo test
---------
Co-authored-by: Louise Poole <louise@datarevenue.com>
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>
* fix: add `balance_owner` attribute for ekubo_v2 components
* refactor: rename `ekubo` into `ekubo-v2`
* refactor: freeze `substreams-helper` version in ekubo V2 module
* docs: improve integration test comment
* docs: add TODO to remove `balance_owner` in favor of `AccountBalances`
---------
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
* feat: add unichain config for uniswapv4
* refactor: remove `sf/substreams` from excluded proto.
This folder has been removed because it was not used, so we don't need to have it in the excluded paths anymore.
* refactor: add url into substreams config for uniswap v4 modules
---------
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
* feat: Add Pancakeswap V3 Substreams module
At this point it's just hard copy of Uniswap V3. It will be adapted in the following commits to make reviewing easier.
* refactor: adapt uniswapv3 module logic for pancakeswap v3
The main change is how they handle protocol fees. Protocol fees are set by default depending on the fee of the pool.
* refactor: use new protobuf structs
The "EntityChanges" got deprecated in favor of the hybrid messages. This commit makes PancakeswapV3 module use the new structs.
* fix: set correct factory address
---------
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
Co-authored-by: Louise Poole <louise@datarevenue.com>
Also fixes a bug that would lead to emitting wrong balances if there is a `CollectProtocol` event triggered (currently not affecting because it's not enabled)
Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This new interface allos the pool id to exceed 32 bytes. Some protocol have more complex pool ids that exceed 32 bytes this adds support for these.
Additionally, it allows passing additional data if required. This allows more sophisticated features such as fee reduction or potentially offchain data that is required during swap simulation.
* 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>
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
* feat: import to tycho simulation initialized accounts defined on yaml file
* feat: update tycho-simulation dep, black formatting
* feat: Add additional logging to test runner
* feat: Fail test if expected component fails to get decoded
* feat: Warn if initialized contracts are not specified on ProtocolComponent contracts