* 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
* 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>