Files
tycho-protocol-sdk/protocol-testing/Cargo.toml
Tamara 93b969e41f feat(Testing SDK): Pass adapter path to decoder (#249)
* feat: Pass adapter contract to decoder

This was the most elegant solution we could come up with at the moment for having the proper adapter in the builder.

Notes:
- The default adapter bytecode in tycho-simulation is still loaded at compile time.
- If the adapter bytecode is passed to the decoder, it will be loaded dynamically at runtime and used instead the bytecodes in tycho-simulation.
- The adapter bytecode is used in the builder to get capabilities and thus spot prices before returning the state, so just overwriting the adapter in the state is way too cumbersome. We went with this solution since it was the lesser evil, even though we know it leaks VM-specific info to non-vm protocols (which was already being done anyway with the balances).

* feat: Take a struct of vm_attributes instead of just adapter path

So that we don't need to change the interface in the future

* chore: remove comment - we are no longer blocked

This is fixed with the latest change to pass adapter contract to decoder

* feat: Use DecoderContext instead of VMAttributes

- More easily extendable
- Doesn't break the existing decoder interface

---------

Co-authored-by: TAMARA LIPOWSKI <data.lipowski@extaccount.com>
2025-09-08 14:34:27 -04:00

32 lines
971 B
TOML

[package]
name = "protocol-testing"
version = "0.1.0"
edition = "2021"
[dependencies]
glob = "0.3.0"
miette = { version = "7.6.0", features = ["fancy"] }
# Logging & Tracing
tracing = "0.1.37"
# Tycho dependencies
tycho-common = "0.82.0"
tycho-client = "0.82.0"
tycho-simulation = { git = "https://github.com/propeller-heads/tycho-simulation.git", tag = "0.156.0", features = ["evm"] }
## TODO: for local development
#tycho-simulation = { path = "../../tycho-simulation" }
# EVM dependencies
alloy = { version = "1.0.27", features = ["arbitrary", "json", "dyn-abi", "sol-types", "contract", "provider-http"] }
tokio = { version = "1", features = ["full"] }
serde_json = "1.0.140"
clap = "4.5.31"
figment = { version = "0.10.19", features = ["yaml"] }
serde = { version = "1.0.218", features = ["derive"] }
hex = "0.4.3"
tracing-subscriber = "0.3.19"
postgres = "0.19.10"
serde_yaml = "0.9.34"
dotenv = "0.15.0"
async-trait = "0.1.87"
colored = "3.0.0"
similar = "2.7.0"