feat: Tycho encoder validation

Validates:
- Proper sequence of input, output, and first/last swap tokens for wrap/unwrap cases
- All solutions contain at least one swap
- Only exact in solutions are inputted (since we don't yet support exact out)
This commit is contained in:
TAMARA LIPOWSKI
2025-01-31 17:21:18 -05:00
parent 9d32291c97
commit 4bc615913e
4 changed files with 289 additions and 14 deletions

View File

@@ -0,0 +1,10 @@
use alloy_primitives::hex;
use lazy_static::lazy_static;
use tycho_core::Bytes;
lazy_static! {
pub static ref NATIVE_ADDRESS: Bytes =
Bytes::from(hex!("0000000000000000000000000000000000000000").to_vec());
pub static ref WETH_ADDRESS: Bytes =
Bytes::from(hex!("c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2").to_vec());
}