From 5fa97d08e593e5c7c6480c66e86305fef30e9747 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 30 May 2025 11:55:44 +0100 Subject: [PATCH 01/14] feat: Upgrade alloy to "1.0.6" Took 18 minutes --- Cargo.lock | 1298 +++++++++-------- Cargo.toml | 10 +- src/bin/tycho-encode.rs | 2 +- src/encoding/evm/approvals/permit2.rs | 29 +- .../approvals/protocol_approvals_manager.rs | 15 +- src/encoding/evm/encoder_builders.rs | 3 +- src/encoding/evm/encoding_utils.rs | 5 +- src/encoding/evm/group_swaps.rs | 2 +- .../evm/strategy_encoder/strategy_encoders.rs | 5 +- .../transfer_optimizations.rs | 2 +- .../evm/swap_encoder/swap_encoders.rs | 6 +- src/encoding/evm/tycho_encoders.rs | 9 +- src/encoding/evm/utils.rs | 24 +- 13 files changed, 753 insertions(+), 657 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 510d5f2..29fbe1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,38 +4,19 @@ version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom 0.2.16", - "once_cell", - "version_check", - "zerocopy 0.7.35", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -53,15 +34,17 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcc41e8a11a4975b18ec6afba2cc48d591fa63336a4c526dacb50479a8d6b35" +checksum = "0093d23bf026b580c1f66ed3a053d8209c104a446c5264d3ad99587f6edef24e" dependencies = [ "alloy-consensus", + "alloy-contract", "alloy-core", "alloy-eips", "alloy-genesis", "alloy-network", + "alloy-node-bindings", "alloy-provider", "alloy-rpc-client", "alloy-rpc-types", @@ -77,9 +60,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.69" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e2652684758b0d9b389d248b209ed9fd9989ef489a550265fe4bb8454fe7eb" +checksum = "517e5acbd38b6d4c59da380e8bbadc6d365bf001903ce46cf5521c53c647e07b" dependencies = [ "alloy-primitives", "num_enum", @@ -88,9 +71,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" +checksum = "ad451f9a70c341d951bca4e811d74dbe1e193897acd17e9dbac1353698cc430b" dependencies = [ "alloy-eips", "alloy-primitives", @@ -99,15 +82,22 @@ dependencies = [ "alloy-trie", "auto_impl", "c-kzg", - "derive_more 1.0.0", + "derive_more", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1", "serde", + "serde_with", + "thiserror 2.0.12", ] [[package]] name = "alloy-consensus-any" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" +checksum = "142daffb15d5be1a2b20d2cd540edbcef03037b55d4ff69dc06beb4d06286dba" dependencies = [ "alloy-consensus", "alloy-eips", @@ -118,10 +108,31 @@ dependencies = [ ] [[package]] -name = "alloy-core" -version = "0.8.25" +name = "alloy-contract" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8bcce99ad10fe02640cfaec1c6bc809b837c783c1d52906aa5af66e2a196f6" +checksum = "ebf25443920ecb9728cb087fe4dc04a0b290bd6ac85638c58fe94aba70f1a44e" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-core" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c5a28f166629752f2e7246b813cdea3243cca59aab2d4264b1fd68392c10eb" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -132,16 +143,15 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8e762aefd39a397ff485bc86df673465c4ad3ec8819cc60833a8a3ba5cdc87" +checksum = "18cc14d832bc3331ca22a1c7819de1ede99f58f61a7d123952af7dde8de124a6" dependencies = [ "alloy-json-abi", "alloy-primitives", "alloy-sol-type-parser", "alloy-sol-types", - "const-hex", - "derive_more 2.0.1", + "derive_more", "itoa", "serde", "serde_json", @@ -149,10 +159,23 @@ dependencies = [ ] [[package]] -name = "alloy-eip2930" -version = "0.1.0" +name = "alloy-eip2124" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b82752a889170df67bbb36d42ca63c531eb16274f0d7299ae2a680facba17bd" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -161,9 +184,9 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b15b13d38b366d01e818fe8e710d4d702ef7499eacd44926a06171dd9585d0c" +checksum = "9d4769c6ffddca380b0070d71c8b7f30bed375543fe76bb2f74ec0acf4b7cd16" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -173,27 +196,29 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" +checksum = "3056872f6da48046913e76edb5ddced272861f6032f09461aea1a2497be5ae5d" dependencies = [ + "alloy-eip2124", "alloy-eip2930", "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", + "auto_impl", "c-kzg", - "derive_more 1.0.0", - "once_cell", + "derive_more", + "either", "serde", "sha2", ] [[package]] name = "alloy-genesis" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" +checksum = "c98fb40f07997529235cc474de814cd7bd9de561e101716289095696c0e4639d" dependencies = [ "alloy-eips", "alloy-primitives", @@ -203,10 +228,23 @@ dependencies = [ ] [[package]] -name = "alloy-json-abi" -version = "0.8.25" +name = "alloy-hardforks" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6beff64ad0aa6ad1019a3db26fef565aefeb011736150ab73ed3366c3cfd1b" +checksum = "fbff8445282ec080c2673692062bd4930d7a0d6bda257caf138cfc650c503000" +dependencies = [ + "alloy-chains", + "alloy-eip2124", + "alloy-primitives", + "auto_impl", + "dyn-clone", +] + +[[package]] +name = "alloy-json-abi" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ccaa79753d7bf15f06399ea76922afbfaf8d18bebed9e8fc452984b4a90dcc9" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -216,9 +254,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2008bedb8159a255b46b7c8614516eda06679ea82f620913679afbd8031fea72" +checksum = "dc08b31ebf9273839bd9a01f9333cbb7a3abb4e820c312ade349dd18bdc79581" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -230,9 +268,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" +checksum = "ed117b08f0cc190312bf0c38c34cf4f0dabfb4ea8f330071c587cd7160a88cb2" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -247,6 +285,7 @@ dependencies = [ "alloy-sol-types", "async-trait", "auto_impl", + "derive_more", "futures-utils-wasm", "serde", "serde_json", @@ -255,9 +294,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" +checksum = "c7162ff7be8649c0c391f4e248d1273e85c62076703a1f3ec7daf76b283d886d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -267,25 +306,46 @@ dependencies = [ ] [[package]] -name = "alloy-primitives" -version = "0.8.25" +name = "alloy-node-bindings" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c77490fe91a0ce933a1f219029521f20fc28c2c0ca95d53fa4da9c00b8d9d4e" +checksum = "eec6d2e7743d2bcb3e7dfc9cb7a7322bc0f808fddd48f4aab5d974260f2ae0cf" +dependencies = [ + "alloy-genesis", + "alloy-hardforks", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "alloy-signer-local", + "k256", + "rand 0.8.5", + "serde_json", + "tempfile", + "thiserror 2.0.12", + "tracing", + "url", +] + +[[package]] +name = "alloy-primitives" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c35fc4b03ace65001676358ffbbaefe2a2b27ee50fe777c345082c7c888be8" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", - "derive_more 2.0.1", + "derive_more", "foldhash", - "hashbrown 0.15.2", + "hashbrown 0.15.3", "indexmap 2.9.0", "itoa", "k256", "keccak-asm", "paste", "proptest", - "rand 0.8.5", + "rand 0.9.1", "ruint", "rustc-hash", "serde", @@ -295,9 +355,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" +checksum = "d84eba1fd8b6fe8b02f2acd5dd7033d0f179e304bd722d11e817db570d1fa6c4" dependencies = [ "alloy-chains", "alloy-consensus", @@ -305,22 +365,26 @@ dependencies = [ "alloy-json-rpc", "alloy-network", "alloy-network-primitives", + "alloy-node-bindings", "alloy-primitives", "alloy-rpc-client", + "alloy-rpc-types-anvil", "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", "alloy-transport", "alloy-transport-http", "async-stream", "async-trait", "auto_impl", "dashmap", + "either", "futures", "futures-utils-wasm", "lru", "parking_lot", "pin-project 1.1.10", "reqwest", - "schnellru", "serde", "serde_json", "thiserror 2.0.12", @@ -332,9 +396,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6c1d995bff8d011f7cd6c81820d51825e6e06d6db73914c1630ecf544d83d6" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -343,25 +407,26 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "alloy-rpc-client" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" +checksum = "518a699422a3eab800f3dac2130d8f2edba8e4fff267b27a9c7dc6a2b0d313ee" dependencies = [ "alloy-json-rpc", "alloy-primitives", "alloy-transport", "alloy-transport-http", + "async-stream", "futures", "pin-project 1.1.10", "reqwest", @@ -369,17 +434,30 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.2", + "tower", "tracing", + "tracing-futures", "url", "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" +checksum = "c000cab4ec26a4b3e29d144e999e1c539c2fa0abed871bf90311eb3466187ca8" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8abecc34549a208b5f91bc7f02df3205c36e2aa6586f1d9375c3382da1066b3b" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -389,9 +467,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" +checksum = "508b2fbe66d952089aa694e53802327798806498cd29ff88c75135770ecaabfc" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -400,9 +478,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" +checksum = "fcaf7dff0fdd756a714d58014f4f8354a1706ebf9fa2cf73431e0aeec3c9431e" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -412,7 +490,7 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.13.0", + "itertools 0.14.0", "serde", "serde_json", "thiserror 2.0.12", @@ -420,9 +498,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae0465c71d4dced7525f408d84873aeebb71faf807d22d74c4a426430ccd9b55" +checksum = "730e8f2edf2fc224cabd1c25d090e1655fa6137b2e409f92e5eec735903f1507" dependencies = [ "alloy-primitives", "serde", @@ -431,15 +509,16 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfa395ad5cc952c82358d31e4c68b27bf4a89a5456d9b27e226e77dac50e4ff" +checksum = "6b0d2428445ec13edc711909e023d7779618504c4800be055a5b940025dbafe3" dependencies = [ "alloy-dyn-abi", "alloy-primitives", "alloy-sol-types", "async-trait", "auto_impl", + "either", "elliptic-curve", "k256", "thiserror 2.0.12", @@ -447,9 +526,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eb06810c34427d499863817eb506acf57cb9ded9224b374116cae4e22dbd4e9" +checksum = "6be3d371299b62eac5aa459fa58e8d1c761aabdc637573ae258ab744457fcc88" dependencies = [ "alloy-consensus", "alloy-network", @@ -465,9 +544,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d629e63fec8802ad53706d46e8eceeeae2b135c6648d0de41669a523bf17df4a" +checksum = "df298e47bbb7d0a8e06b603046b91062c11ba70d22f8a6c9bab1c1468bd856d0" dependencies = [ "alloy-consensus", "alloy-network", @@ -483,9 +562,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b426789566a19252cb46b757d91543a6f8e70330c72f312b86c5878595d092ef" +checksum = "3b0e049299cc7e131a438a904f89a493bcea45cd92bbed3e50116a28bc27987c" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -503,9 +582,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdc63ce9eda1283fcbaca66ba4a414b841c0e3edbeef9c86a71242fc9e84ccc" +checksum = "e14fe6fedb7fe6e0dfae47fe020684f1d8e063274ef14bca387ddb7a6efa8ec1" dependencies = [ "alloy-consensus", "alloy-network", @@ -519,24 +598,25 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10ae8e9a91d328ae954c22542415303919aabe976fe7a92eb06db1b68fd59f2" +checksum = "8612e0658964d616344f199ab251a49d48113992d81b92dab93ed855faa66383" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ad5da86c127751bc607c174d6c9fe9b85ef0889a9ca0c641735d77d4f98f26" +checksum = "7a384edac7283bc4c010a355fb648082860c04b826bb7a814c45263c8f304c74" dependencies = [ + "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck 0.5.0", @@ -544,32 +624,34 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3d30f0d3f9ba3b7686f3ff1de9ee312647aac705604417a2f40c604f409a9e" +checksum = "0dd588c2d516da7deb421b8c166dc60b7ae31bca5beea29ab6621fcfa53d6ca5" dependencies = [ + "alloy-json-abi", "const-hex", "dunce", "heck 0.5.0", "macro-string", "proc-macro2", "quote", - "syn 2.0.100", + "serde_json", + "syn 2.0.101", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d162f8524adfdfb0e4bd0505c734c985f3e2474eb022af32eef0d52a4f3935c" +checksum = "e86ddeb70792c7ceaad23e57d52250107ebbb86733e52f4a25d8dc1abc931837" dependencies = [ "serde", "winnow", @@ -577,32 +659,34 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43d5e60466a440230c07761aa67671d4719d46f43be8ea6e7ed334d8db4a9ab" +checksum = "584cb97bfc5746cb9dcc4def77da11694b5d6d7339be91b7480a6a68dc129387" dependencies = [ "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", - "const-hex", "serde", ] [[package]] name = "alloy-transport" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" +checksum = "a712bdfeff42401a7dd9518f72f617574c36226a9b5414537fedc34350b73bf9" dependencies = [ "alloy-json-rpc", + "alloy-primitives", "base64", - "futures-util", + "derive_more", + "futures", "futures-utils-wasm", + "parking_lot", "serde", "serde_json", "thiserror 2.0.12", "tokio", - "tower 0.5.2", + "tower", "tracing", "url", "wasmtimer", @@ -610,29 +694,29 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.9.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" +checksum = "7ea5a76d7f2572174a382aedf36875bedf60bcc41116c9f031cf08040703a2dc" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest", "serde_json", - "tower 0.5.2", + "tower", "tracing", "url", ] [[package]] name = "alloy-trie" -version = "0.7.9" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a94854e420f07e962f7807485856cde359ab99ab6413883e15235ad996e8b" +checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" dependencies = [ "alloy-primitives", "alloy-rlp", "arrayvec", - "derive_more 1.0.0", + "derive_more", "nybbles", "serde", "smallvec", @@ -695,12 +779,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "6680de5231bd6ee4c6191b8a1325daa282b415391ec9d3a37bd34f2060dc73fa" dependencies = [ "anstyle", - "once_cell", + "once_cell_polyfill", "windows-sys 0.59.0", ] @@ -875,7 +959,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -886,7 +970,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -903,7 +987,7 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -914,9 +998,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-credential-types" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14" +checksum = "687bc16bc431a8533fe0097c7f0182874767f920989d7260950172ae8e3c4465" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -926,9 +1010,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.6" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad" +checksum = "6c4063282c69991e57faab9e5cb21ae557e59f5b0fb285c196335243df8dc25c" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -942,7 +1026,6 @@ dependencies = [ "fastrand", "http 0.2.12", "http-body 0.4.6", - "once_cell", "percent-encoding", "pin-project-lite", "tracing", @@ -951,9 +1034,9 @@ dependencies = [ [[package]] name = "aws-sdk-kms" -version = "1.65.0" +version = "1.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5325c5e2badf4148e850017cc56cc205888c6e0b52c9e29d3501ec577005230" +checksum = "0eef6a94141a43ee28404bf135828ad9bdd4936bfa2a84ad8dea355c94646a35" dependencies = [ "aws-credential-types", "aws-runtime", @@ -967,16 +1050,15 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", - "once_cell", "regex-lite", "tracing", ] [[package]] name = "aws-sigv4" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db" +checksum = "3734aecf9ff79aa401a6ca099d076535ab465ff76b46440cf567c8e70b65dc13" dependencies = [ "aws-credential-types", "aws-smithy-http", @@ -988,7 +1070,6 @@ dependencies = [ "hmac", "http 0.2.12", "http 1.3.1", - "once_cell", "percent-encoding", "sha2", "time", @@ -1109,9 +1190,9 @@ dependencies = [ [[package]] name = "aws-types" -version = "1.3.6" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125" +checksum = "8a322fec39e4df22777ed3ad8ea868ac2f94cd15e1a55f6ee8d8d6305057689a" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1123,11 +1204,10 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.9" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" dependencies = [ - "async-trait", "axum-core", "bytes", "futures-util", @@ -1143,20 +1223,19 @@ dependencies = [ "rustversion", "serde", "sync_wrapper", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" dependencies = [ - "async-trait", "bytes", - "futures-util", + "futures-core", "http 1.3.1", "http-body 1.0.1", "http-body-util", @@ -1170,17 +1249,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -1226,6 +1305,22 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -1234,9 +1329,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bitvec" @@ -1310,9 +1405,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "1.0.3" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" +checksum = "7318cfa722931cb5fe0838b98d3ce5621e75f6a6408abc21721d80de9223f2e4" dependencies = [ "blst", "cc", @@ -1325,9 +1420,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.19" +version = "1.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" dependencies = [ "shlex", ] @@ -1346,9 +1441,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1361,9 +1456,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" dependencies = [ "clap_builder", "clap_derive", @@ -1371,9 +1466,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" dependencies = [ "anstream", "anstyle", @@ -1390,7 +1485,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -1430,9 +1525,9 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "const-hex" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" dependencies = [ "cfg-if", "cpufeatures", @@ -1479,9 +1574,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -1502,6 +1597,21 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.2" @@ -1545,6 +1655,41 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.101", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.101", +] + [[package]] name = "dashmap" version = "6.1.0" @@ -1577,6 +1722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1590,33 +1736,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl 1.0.0", -] - [[package]] name = "derive_more" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" dependencies = [ - "derive_more-impl 2.0.1", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "derive_more-impl", ] [[package]] @@ -1627,7 +1753,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "unicode-xid", ] @@ -1660,7 +1786,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -1675,6 +1801,12 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" +[[package]] +name = "dyn-clone" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1685,6 +1817,7 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -1694,6 +1827,9 @@ name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -1711,6 +1847,7 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] @@ -1733,9 +1870,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1798,7 +1935,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", - "miniz_oxide 0.8.8", + "miniz_oxide", ] [[package]] @@ -1899,7 +2036,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -1946,9 +2083,9 @@ checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "gcloud-sdk" -version = "0.25.8" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0775bfa745cdf7287ae9765a685a813b91049b6b6d5ca3de20a3d5d16a80d8b2" +checksum = "44163d7c0d0bc470caa43766beda779e584034abd6b681319d8f9be2fc194eba" dependencies = [ "async-trait", "bytes", @@ -1965,7 +2102,7 @@ dependencies = [ "serde_json", "tokio", "tonic", - "tower 0.5.2", + "tower", "tower-layer", "tower-util", "tracing", @@ -1998,9 +2135,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "js-sys", @@ -2012,9 +2149,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -2035,9 +2172,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" dependencies = [ "atomic-waker", "bytes", @@ -2058,12 +2195,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - [[package]] name = "hashbrown" version = "0.14.5" @@ -2072,9 +2203,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ "allocator-api2", "equivalent", @@ -2109,6 +2240,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hidapi-rusb" version = "1.3.3" @@ -2221,11 +2361,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" dependencies = [ - "futures-util", "http 1.3.1", "hyper", "hyper-util", @@ -2268,17 +2407,21 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" dependencies = [ + "base64", "bytes", "futures-channel", + "futures-core", "futures-util", "http 1.3.1", "http-body 1.0.1", "hyper", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", "socket2", "tokio", @@ -2312,21 +2455,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -2335,31 +2479,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -2367,66 +2491,59 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] [[package]] -name = "icu_provider_macros" -version = "1.5.0" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" @@ -2441,9 +2558,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -2466,7 +2583,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2477,6 +2594,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "serde", ] [[package]] @@ -2486,7 +2604,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.15.3", "serde", ] @@ -2505,6 +2623,16 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2520,15 +2648,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -2579,6 +2698,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2", ] @@ -2615,9 +2735,9 @@ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libm" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9627da5196e5d8ed0b0495e61e518847578da83483c37288316d9b2e03a7f72" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libusb1-sys" @@ -2639,15 +2759,15 @@ checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -2661,13 +2781,19 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru" -version = "0.12.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" dependencies = [ - "hashbrown 0.15.2", + "hashbrown 0.15.3", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "macro-string" version = "0.1.4" @@ -2676,14 +2802,14 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" @@ -2716,15 +2842,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.8" @@ -2736,13 +2853,13 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2838,7 +2955,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2856,9 +2973,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -2870,12 +2987,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] -name = "openssl" -version = "0.10.72" +name = "once_cell_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types", "libc", @@ -2892,7 +3015,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2903,9 +3026,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.107" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -2921,9 +3044,9 @@ checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" [[package]] name = "parity-scale-codec" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fde3d0718baf5bc92f577d652001da0f8d54cd03a7974e118d04fc888dc23d" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" dependencies = [ "arrayvec", "bitvec", @@ -2937,21 +3060,21 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.7.4" +version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581c837bb6b9541ce7faa9377c20616e4fb7650f6b0f68bc93c827ee504fb7b3" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -2959,15 +3082,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -3049,7 +3172,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3080,6 +3203,15 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3092,7 +3224,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.24", + "zerocopy", ] [[package]] @@ -3158,7 +3290,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3178,7 +3310,7 @@ checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.9.0", + "bitflags 2.9.1", "lazy_static", "num-traits", "rand 0.8.5", @@ -3210,7 +3342,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3230,9 +3362,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quinn" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" dependencies = [ "bytes", "cfg_aliases", @@ -3250,12 +3382,13 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" +checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" dependencies = [ "bytes", - "getrandom 0.3.2", + "getrandom 0.3.3", + "lru-slab", "rand 0.9.1", "ring", "rustc-hash", @@ -3270,9 +3403,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541d0f57c6ec747a90738a52741d3221f7960e8ac2f0ff4b1a63680e033b4ab5" +checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" dependencies = [ "cfg_aliases", "libc", @@ -3323,6 +3456,7 @@ checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", + "serde", ] [[package]] @@ -3360,7 +3494,8 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", + "serde", ] [[package]] @@ -3374,11 +3509,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -3424,9 +3559,9 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" dependencies = [ "async-compression", "base64", @@ -3452,7 +3587,6 @@ dependencies = [ "quinn", "rustls", "rustls-native-certs", - "rustls-pemfile", "rustls-pki-types", "serde", "serde_json", @@ -3462,14 +3596,14 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tokio-util", - "tower 0.5.2", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "windows-registry", ] [[package]] @@ -3532,15 +3666,15 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.1", - "syn 2.0.100", + "syn 2.0.101", "unicode-ident", ] [[package]] name = "ruint" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a46eb779843b2c4f21fac5773e25d6d5b7c8f0922876c91541790d2ca27eef" +checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", @@ -3617,11 +3751,11 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys", @@ -3630,9 +3764,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.26" +version = "0.23.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" +checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" dependencies = [ "log", "once_cell", @@ -3655,29 +3789,21 @@ dependencies = [ "security-framework 3.2.0", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ "web-time", + "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.1" +version = "0.103.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" +checksum = "e4a72fe2bcf7a6ac6fd7d0b9e5cb68aeb7d4c0a0271730218b3e92d43b4eb435" dependencies = [ "ring", "rustls-pki-types", @@ -3686,9 +3812,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "rusty-fork" @@ -3717,17 +3843,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "schnellru" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" -dependencies = [ - "ahash", - "cfg-if", - "hashbrown 0.13.2", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -3744,10 +3859,32 @@ dependencies = [ "der", "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + [[package]] name = "secret-vault-value" version = "0.3.9" @@ -3767,7 +3904,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -3780,8 +3917,8 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.9.0", - "core-foundation 0.10.0", + "bitflags 2.9.1", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -3838,7 +3975,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -3866,10 +4003,50 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.10.8" +name = "serde_with" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -3953,9 +4130,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4014,7 +4191,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4027,7 +4204,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4049,9 +4226,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -4060,14 +4237,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.25" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4560533fbd6914b94a8fb5cc803ed6801c3455668db3b810702c57612bac9412" +checksum = "1b5d879005cc1b5ba4e18665be9e9501d9da3a9b95f625497c4cb7ee082b532e" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4081,13 +4258,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4098,12 +4275,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", "rustix", "windows-sys 0.59.0", @@ -4135,7 +4312,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4146,7 +4323,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4200,9 +4377,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -4225,9 +4402,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "bytes", @@ -4249,7 +4426,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4299,15 +4476,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap 2.9.0", "toml_datetime", @@ -4316,11 +4493,10 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" dependencies = [ - "async-stream", "async-trait", "axum", "base64", @@ -4336,32 +4512,11 @@ dependencies = [ "pin-project 1.1.10", "prost", "rustls-native-certs", - "rustls-pemfile", "socket2", "tokio", "tokio-rustls", "tokio-stream", - "tower 0.4.13", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project 1.1.10", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", + "tower", "tower-layer", "tower-service", "tracing", @@ -4375,9 +4530,31 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", + "indexmap 2.9.0", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +dependencies = [ + "bitflags 2.9.1", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", "tower-layer", "tower-service", ] @@ -4425,7 +4602,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4437,6 +4614,18 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project 1.1.10", + "tracing", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -4445,9 +4634,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tycho-common" -version = "0.70.4" +version = "0.70.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5237d0e4ab6979a1ca9cdb749a2a97240ca6dc716c0da6f42543960d3141255a" +checksum = "c4da82c4239c76011b8edc19b5d2a2db989c9ff1f74ae6a3dea21486e9b53234" dependencies = [ "anyhow", "async-trait", @@ -4472,8 +4661,6 @@ name = "tycho-execution" version = "0.96.0" dependencies = [ "alloy", - "alloy-primitives", - "alloy-sol-types", "chrono", "clap", "dotenv", @@ -4523,7 +4710,7 @@ checksum = "35f5380909ffc31b4de4f4bdf96b877175a016aa2ca98cee39fcfd8c4d53d952" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4585,12 +4772,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -4624,30 +4805,32 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "uuid" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", + "js-sys", "rand 0.9.1", "serde", "uuid-macro-internal", + "wasm-bindgen", ] [[package]] name = "uuid-macro-internal" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dcd78c4f979627a754f5522cea6e6a25e55139056535fe6e69c506cd64a862" +checksum = "26b682e8c381995ea03130e381928e0e005b7c9eb483c6c8682f50e07b33c2b7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4729,7 +4912,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -4764,7 +4947,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4827,15 +5010,15 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", "windows-link", "windows-result", - "windows-strings 0.4.0", + "windows-strings", ] [[package]] @@ -4846,7 +5029,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4857,7 +5040,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -4866,40 +5049,20 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" -[[package]] -name = "windows-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" -dependencies = [ - "windows-result", - "windows-strings 0.3.1", - "windows-targets 0.53.0", -] - [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] @@ -4910,7 +5073,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4919,7 +5082,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4928,30 +5091,14 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -4960,101 +5107,53 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" -version = "0.7.6" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" dependencies = [ "memchr", ] @@ -5065,20 +5164,14 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "wyz" @@ -5091,9 +5184,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -5103,54 +5196,34 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "synstructure", ] [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive 0.8.24", + "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -5170,7 +5243,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "synstructure", ] @@ -5191,14 +5264,25 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", ] [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" dependencies = [ "yoke", "zerofrom", @@ -5207,11 +5291,11 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] diff --git a/Cargo.toml b/Cargo.toml index 83c6e01..8588c9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,19 +28,17 @@ thiserror = "1.0.69" tokio = { version = "1.38.0", features = ["full"] } chrono = "0.4.39" clap = { version = "4.5.3", features = ["derive"] } - -alloy = { version = "0.9.2", features = ["providers", "rpc-types-eth", "eip712", "signer-local"], optional = true } -alloy-sol-types = { version = "0.8.14", optional = true } -alloy-primitives = { version = "0.8.9", optional = true } -tycho-common = ">0.66.4" once_cell = "1.20.2" +tycho-common = ">0.66.4" + +alloy = { version = "1.0.6", features = ["providers", "rpc-types-eth", "eip712", "signer-local", "node-bindings"], optional = true } [dev-dependencies] rstest = "0.24.0" [features] default = ["evm"] -evm = ["alloy", "alloy-sol-types", "alloy-primitives"] +evm = ["alloy"] fork-tests = [] [profile.bench] diff --git a/src/bin/tycho-encode.rs b/src/bin/tycho-encode.rs index b55c424..161f7ae 100644 --- a/src/bin/tycho-encode.rs +++ b/src/bin/tycho-encode.rs @@ -1,6 +1,6 @@ use std::io::{self, Read}; -use alloy_sol_types::SolValue; +use alloy::sol_types::SolValue; use clap::{Parser, Subcommand}; use tycho_common::{hex_bytes::Bytes, models::Chain}; use tycho_execution::encoding::{ diff --git a/src/encoding/evm/approvals/permit2.rs b/src/encoding/evm/approvals/permit2.rs index 6c58707..598cb9d 100644 --- a/src/encoding/evm/approvals/permit2.rs +++ b/src/encoding/evm/approvals/permit2.rs @@ -1,12 +1,12 @@ use std::{str::FromStr, sync::Arc}; use alloy::{ + core::sol, primitives::{aliases::U48, Address, Bytes as AlloyBytes, TxKind, U160, U256}, - providers::{Provider, RootProvider}, + providers::Provider, rpc::types::{TransactionInput, TransactionRequest}, - transports::BoxTransport, + sol_types::SolValue, }; -use alloy_sol_types::{sol, SolValue}; use chrono::Utc; use num_bigint::BigUint; use tokio::{ @@ -19,7 +19,7 @@ use crate::encoding::{ errors::EncodingError, evm::{ encoding_utils::encode_input, - utils::{biguint_to_u256, bytes_to_address, get_client, get_runtime}, + utils::{biguint_to_u256, bytes_to_address, get_client, get_runtime, EVMProvider}, }, models, }; @@ -29,7 +29,7 @@ use crate::encoding::{ #[derive(Clone)] pub struct Permit2 { address: Address, - client: Arc>, + client: EVMProvider, runtime_handle: Handle, // Store the runtime to prevent it from being dropped before use. // This is required since tycho-execution does not have a pre-existing runtime. @@ -132,16 +132,15 @@ impl Permit2 { let output = block_in_place(|| { self.runtime_handle - .block_on(async { self.client.call(&tx).await }) + .block_on(async { self.client.call(tx).await }) }); match output { Ok(response) => { - let allowance: Allowance = - Allowance::abi_decode(&response, true).map_err(|_| { - EncodingError::FatalError( - "Failed to decode response for permit2 allowance".to_string(), - ) - })?; + let allowance: Allowance = Allowance::abi_decode(&response).map_err(|_| { + EncodingError::FatalError( + "Failed to decode response for permit2 allowance".to_string(), + ) + })?; Ok(allowance) } Err(err) => Err(EncodingError::RecoverableError(format!( @@ -183,8 +182,10 @@ impl Permit2 { mod tests { use std::str::FromStr; - use alloy::signers::local::PrivateKeySigner; - use alloy_primitives::{Uint, B256}; + use alloy::{ + primitives::{Uint, B256}, + signers::local::PrivateKeySigner, + }; use num_bigint::BigUint; use tycho_common::models::Chain as TychoCommonChain; diff --git a/src/encoding/evm/approvals/protocol_approvals_manager.rs b/src/encoding/evm/approvals/protocol_approvals_manager.rs index 8b5769b..292f192 100644 --- a/src/encoding/evm/approvals/protocol_approvals_manager.rs +++ b/src/encoding/evm/approvals/protocol_approvals_manager.rs @@ -1,12 +1,11 @@ use std::sync::Arc; use alloy::{ - providers::{Provider, RootProvider}, + primitives::{Address, Bytes, TxKind, U256}, + providers::Provider, rpc::types::{TransactionInput, TransactionRequest}, - transports::BoxTransport, + sol_types::SolValue, }; -use alloy_primitives::{Address, Bytes, TxKind, U256}; -use alloy_sol_types::SolValue; use tokio::{ runtime::{Handle, Runtime}, task::block_in_place, @@ -16,13 +15,13 @@ use crate::encoding::{ errors::EncodingError, evm::{ encoding_utils::encode_input, - utils::{get_client, get_runtime}, + utils::{get_client, get_runtime, EVMProvider}, }, }; /// A manager for checking if an approval is needed for interacting with a certain spender. pub struct ProtocolApprovalsManager { - client: Arc>, + client: EVMProvider, runtime_handle: Handle, // Store the runtime to prevent it from being dropped before use. // This is required since tycho-execution does not have a pre-existing runtime. @@ -56,11 +55,11 @@ impl ProtocolApprovalsManager { let output = block_in_place(|| { self.runtime_handle - .block_on(async { self.client.call(&tx).await }) + .block_on(async { self.client.call(tx).await }) }); match output { Ok(response) => { - let allowance: U256 = U256::abi_decode(&response, true).map_err(|_| { + let allowance: U256 = U256::abi_decode(&response).map_err(|_| { EncodingError::FatalError("Failed to decode response for allowance".to_string()) })?; diff --git a/src/encoding/evm/encoder_builders.rs b/src/encoding/evm/encoder_builders.rs index dfa7d65..6ad4d24 100644 --- a/src/encoding/evm/encoder_builders.rs +++ b/src/encoding/evm/encoder_builders.rs @@ -1,7 +1,6 @@ use std::{collections::HashMap, str::FromStr}; -use alloy::signers::local::PrivateKeySigner; -use alloy_primitives::B256; +use alloy::{primitives::B256, signers::local::PrivateKeySigner}; use tycho_common::{models::Chain as TychoCommonChain, Bytes}; use crate::encoding::{ diff --git a/src/encoding/evm/encoding_utils.rs b/src/encoding/evm/encoding_utils.rs index 3295280..cee7369 100644 --- a/src/encoding/evm/encoding_utils.rs +++ b/src/encoding/evm/encoding_utils.rs @@ -1,11 +1,10 @@ use std::str::FromStr; use alloy::{ - primitives::U256, + primitives::{Address, Keccak256, U256}, signers::{local::PrivateKeySigner, Signature, SignerSync}, + sol_types::{eip712_domain, SolStruct, SolValue}, }; -use alloy_primitives::{Address, Keccak256}; -use alloy_sol_types::{eip712_domain, SolStruct, SolValue}; use num_bigint::BigUint; use tycho_common::Bytes; diff --git a/src/encoding/evm/group_swaps.rs b/src/encoding/evm/group_swaps.rs index 5ec5fe6..edd7568 100644 --- a/src/encoding/evm/group_swaps.rs +++ b/src/encoding/evm/group_swaps.rs @@ -73,7 +73,7 @@ pub fn group_swaps(swaps: Vec) -> Vec { mod tests { use std::str::FromStr; - use alloy_primitives::hex; + use alloy::primitives::hex; use tycho_common::{models::protocol::ProtocolComponent, Bytes}; use super::*; diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index 9038fca..0d97447 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -1,6 +1,6 @@ use std::{collections::HashSet, str::FromStr}; -use alloy_primitives::{aliases::U24, U8}; +use alloy::primitives::{aliases::U24, U8}; use tycho_common::Bytes; use crate::encoding::{ @@ -510,8 +510,7 @@ impl StrategyEncoder for SplitSwapStrategyEncoder { mod tests { use std::{collections::HashMap, str::FromStr}; - use alloy::hex::encode; - use alloy_primitives::hex; + use alloy::{hex::encode, primitives::hex}; use num_bigint::{BigInt, BigUint}; use tycho_common::{ models::{protocol::ProtocolComponent, Chain as TychoCommonChain}, diff --git a/src/encoding/evm/strategy_encoder/transfer_optimizations.rs b/src/encoding/evm/strategy_encoder/transfer_optimizations.rs index eb3a115..6c925b5 100644 --- a/src/encoding/evm/strategy_encoder/transfer_optimizations.rs +++ b/src/encoding/evm/strategy_encoder/transfer_optimizations.rs @@ -111,7 +111,7 @@ impl TransferOptimization { #[cfg(test)] mod tests { - use alloy_primitives::hex; + use alloy::primitives::hex; use rstest::rstest; use tycho_common::models::protocol::ProtocolComponent; diff --git a/src/encoding/evm/swap_encoder/swap_encoders.rs b/src/encoding/evm/swap_encoder/swap_encoders.rs index 11cd019..94e2c8f 100644 --- a/src/encoding/evm/swap_encoder/swap_encoders.rs +++ b/src/encoding/evm/swap_encoder/swap_encoders.rs @@ -1,7 +1,9 @@ use std::{collections::HashMap, str::FromStr}; -use alloy_primitives::{Address, Bytes as AlloyBytes, U8}; -use alloy_sol_types::SolValue; +use alloy::{ + primitives::{Address, Bytes as AlloyBytes, U8}, + sol_types::SolValue, +}; use serde_json::from_str; use tycho_common::Bytes; diff --git a/src/encoding/evm/tycho_encoders.rs b/src/encoding/evm/tycho_encoders.rs index 14f76bd..ab492ae 100644 --- a/src/encoding/evm/tycho_encoders.rs +++ b/src/encoding/evm/tycho_encoders.rs @@ -1221,9 +1221,12 @@ mod tests { mod integration { use std::{collections::HashMap, str::FromStr}; - use alloy::{hex::encode, signers::local::PrivateKeySigner}; - use alloy_primitives::{hex, Address, B256, U256}; - use alloy_sol_types::SolValue; + use alloy::{ + hex::encode, + primitives::{hex, Address, B256, U256}, + signers::local::PrivateKeySigner, + sol_types::SolValue, + }; use num_bigint::{BigInt, BigUint}; use tycho_common::{models::protocol::ProtocolComponent, Bytes}; diff --git a/src/encoding/evm/utils.rs b/src/encoding/evm/utils.rs index df61ef4..0a17c92 100644 --- a/src/encoding/evm/utils.rs +++ b/src/encoding/evm/utils.rs @@ -6,11 +6,13 @@ use std::{ }; use alloy::{ - providers::{ProviderBuilder, RootProvider}, - transports::BoxTransport, + primitives::{aliases::U24, Address, U256, U8}, + providers::{ + fillers::{BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller}, + ProviderBuilder, RootProvider, + }, + sol_types::SolValue, }; -use alloy_primitives::{aliases::U24, Address, U256, U8}; -use alloy_sol_types::SolValue; use num_bigint::BigUint; use once_cell::sync::Lazy; use tokio::runtime::{Handle, Runtime}; @@ -88,13 +90,23 @@ pub fn get_runtime() -> Result<(Handle, Option>), EncodingError> { } } +pub type EVMProvider = Arc< + FillProvider< + JoinFill< + alloy::providers::Identity, + JoinFill>>, + >, + RootProvider, + >, +>; + /// Gets the client used for interacting with the EVM-compatible network. -pub async fn get_client() -> Result>, EncodingError> { +pub async fn get_client() -> Result { dotenv::dotenv().ok(); let eth_rpc_url = env::var("RPC_URL") .map_err(|_| EncodingError::FatalError("Missing RPC_URL in environment".to_string()))?; let client = ProviderBuilder::new() - .on_builtin(ð_rpc_url) + .connect(ð_rpc_url) .await .map_err(|_| EncodingError::FatalError("Failed to build provider".to_string()))?; Ok(Arc::new(client)) From cb105caecf626c64831b9a21e2cf47f9e717ad28 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 5 Jun 2025 11:12:38 +0000 Subject: [PATCH 02/14] chore(release): 0.97.0 [skip ci] ## [0.97.0](https://github.com/propeller-heads/tycho-execution/compare/0.96.0...0.97.0) (2025-06-05) ### Features * Upgrade alloy to "1.0.6" ([5fa97d0](https://github.com/propeller-heads/tycho-execution/commit/5fa97d08e593e5c7c6480c66e86305fef30e9747)) --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 102bdae..de71885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.97.0](https://github.com/propeller-heads/tycho-execution/compare/0.96.0...0.97.0) (2025-06-05) + + +### Features + +* Upgrade alloy to "1.0.6" ([5fa97d0](https://github.com/propeller-heads/tycho-execution/commit/5fa97d08e593e5c7c6480c66e86305fef30e9747)) + ## [0.96.0](https://github.com/propeller-heads/tycho-execution/compare/0.95.1...0.96.0) (2025-05-27) diff --git a/Cargo.lock b/Cargo.lock index 29fbe1b..e68e6b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4658,7 +4658,7 @@ dependencies = [ [[package]] name = "tycho-execution" -version = "0.96.0" +version = "0.97.0" dependencies = [ "alloy", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8588c9a..932b660 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tycho-execution" -version = "0.96.0" +version = "0.97.0" edition = "2021" description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors." repository = "https://github.com/propeller-heads/tycho-execution" From f34db52f09ccbd85213cb08e65cedac56a2b5cf3 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Wed, 4 Jun 2025 17:18:34 +0100 Subject: [PATCH 03/14] feat: Implement BalancerV3Executor Took 2 hours 32 minutes Took 8 seconds Took 13 minutes --- .gitmodules | 3 + foundry/remappings.txt | 1 + foundry/src/executors/BalancerV3Executor.sol | 142 ++++++++++++++++++ .../test/executors/BalancerV2Executor.t.sol | 2 +- .../test/executors/BalancerV3Executor.t.sol | 100 ++++++++++++ 5 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 foundry/src/executors/BalancerV3Executor.sol create mode 100644 foundry/test/executors/BalancerV3Executor.t.sol diff --git a/.gitmodules b/.gitmodules index d9919b8..f87cde7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "foundry/lib/solady"] path = foundry/lib/solady url = https://github.com/vectorized/solady +[submodule "lib/balancer-v3-monorepo"] + path = lib/balancer-v3-monorepo + url = https://github.com/balancer/balancer-v3-monorepo diff --git a/foundry/remappings.txt b/foundry/remappings.txt index d10f28f..6e43320 100644 --- a/foundry/remappings.txt +++ b/foundry/remappings.txt @@ -4,6 +4,7 @@ @src/=src/ @uniswap-v2/=lib/v2-core/ @balancer-labs/v2-interfaces=lib/balancer-v2-monorepo/pkg/interfaces +@balancer-labs/v3-interfaces=lib/balancer-v3-monorepo/pkg/interfaces @uniswap/v3-updated/=lib/v3-updated/ @uniswap/v3-core/=lib/v3-core/ @uniswap/v4-core/=lib/v4-core/ diff --git a/foundry/src/executors/BalancerV3Executor.sol b/foundry/src/executors/BalancerV3Executor.sol new file mode 100644 index 0000000..8083ca5 --- /dev/null +++ b/foundry/src/executors/BalancerV3Executor.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.26; + +import "@interfaces/IExecutor.sol"; +import { + IERC20, + SafeERC20 +} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IVault} from "@balancer-labs/v3-interfaces/contracts/vault/IVault.sol"; +import { + SwapKind, + VaultSwapParams +} from "@balancer-labs/v3-interfaces/contracts/vault/VaultTypes.sol"; +import {RestrictTransferFrom} from "../RestrictTransferFrom.sol"; + +error BalancerV3Executor__InvalidDataLength(); +error BalancerV3Executor__SenderIsNotVault(address sender); + +contract BalancerV3Executor is IExecutor, RestrictTransferFrom { + using SafeERC20 for IERC20; + + IVault private constant VAULT = + IVault(0xbA1333333333a1BA1108E8412f11850A5C319bA9); + + /** + * @notice Data for the swap hook. + * @param pool Address of the liquidity pool + * @param tokenIn Token to be swapped from + * @param tokenOut Token to be swapped to + * @param amountGiven Amount given based on kind of the swap + * @param transferType Type of transfer to be used for the token in + * @param receiver Address to receive the output token + */ + struct SwapHookParams { + address pool; + IERC20 tokenIn; + IERC20 tokenOut; + uint256 amountGiven; + TransferType transferType; + address receiver; + } + + constructor(address _permit2) RestrictTransferFrom(_permit2) {} + + modifier onlyVault() { + if (msg.sender != address(VAULT)) { + revert BalancerV3Executor__SenderIsNotVault(msg.sender); + } + _; + } + + // slither-disable-next-line locked-ether + function swap(uint256 givenAmount, bytes calldata data) + external + payable + returns (uint256 calculatedAmount) + { + ( + IERC20 tokenIn, + IERC20 tokenOut, + address poolId, + TransferType transferType, + address receiver + ) = _decodeData(data); + + calculatedAmount = abi.decode( + VAULT.unlock( + abi.encodeCall( + BalancerV3Executor.swapHook, + SwapHookParams({ + pool: poolId, + tokenIn: tokenIn, + tokenOut: tokenOut, + amountGiven: givenAmount, + transferType: transferType, + receiver: receiver + }) + ) + ), + (uint256) + ); + } + + /** + * @notice Hook to be called by the Balancer Vault. + * @param params Parameters for the swap hook. + * @return amountCalculated The amount calculated after the swap. + */ + function swapHook(SwapHookParams calldata params) + external + onlyVault + returns (uint256 amountCalculated) + { + uint256 amountIn; + uint256 amountOut; + (amountCalculated, amountIn, amountOut) = VAULT.swap( + VaultSwapParams({ + kind: SwapKind.EXACT_IN, + pool: params.pool, + tokenIn: params.tokenIn, + tokenOut: params.tokenOut, + amountGivenRaw: params.amountGiven, + limitRaw: 0, + userData: "" + }) + ); + + _transfer( + address(VAULT), + params.transferType, + address(params.tokenIn), + amountIn + ); + // slither-disable-next-line unused-return + VAULT.settle(params.tokenIn, amountIn); + VAULT.sendTo(params.tokenOut, params.receiver, amountOut); + + return amountCalculated; + } + + function _decodeData(bytes calldata data) + internal + pure + returns ( + IERC20 tokenIn, + IERC20 tokenOut, + address poolId, + TransferType transferType, + address receiver + ) + { + if (data.length != 81) { + revert BalancerV3Executor__InvalidDataLength(); + } + + tokenIn = IERC20(address(bytes20(data[0:20]))); + tokenOut = IERC20(address(bytes20(data[20:40]))); + poolId = address(bytes20(data[40:60])); + transferType = TransferType(uint8(data[60])); + receiver = address(bytes20(data[61:81])); + } +} diff --git a/foundry/test/executors/BalancerV2Executor.t.sol b/foundry/test/executors/BalancerV2Executor.t.sol index 6b099f3..6c832d6 100644 --- a/foundry/test/executors/BalancerV2Executor.t.sol +++ b/foundry/test/executors/BalancerV2Executor.t.sol @@ -84,7 +84,7 @@ contract BalancerV2ExecutorTest is Constants, TestUtils { WETH_BAL_POOL_ID, BOB, true, - RestrictTransferFrom.TransferType.Transfer + RestrictTransferFrom.TransferType.None ); deal(WETH_ADDR, address(balancerV2Exposed), amountIn); diff --git a/foundry/test/executors/BalancerV3Executor.t.sol b/foundry/test/executors/BalancerV3Executor.t.sol new file mode 100644 index 0000000..0114863 --- /dev/null +++ b/foundry/test/executors/BalancerV3Executor.t.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.26; + +import "../../src/executors/BalancerV3Executor.sol"; +import "../TestUtils.sol"; +import "@src/executors/BalancerV3Executor.sol"; +import {Constants} from "../Constants.sol"; + +contract BalancerV3ExecutorExposed is BalancerV3Executor { + constructor(address _permit2) BalancerV3Executor(_permit2) {} + + function decodeParams(bytes calldata data) + external + pure + returns ( + IERC20 tokenIn, + IERC20 tokenOut, + address poolId, + TransferType transferType, + address receiver + ) + { + return _decodeData(data); + } +} + +contract BalancerV3ExecutorTest is Constants, TestUtils { + using SafeERC20 for IERC20; + + BalancerV3ExecutorExposed balancerV3Exposed; + address WETH_osETH_pool = + address(0x57c23c58B1D8C3292c15BEcF07c62C5c52457A42); + address osETH_ADDR = address(0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38); + address waEthWETH_ADDR = address(0x0bfc9d54Fc184518A81162F8fB99c2eACa081202); + + function setUp() public { + uint256 forkBlock = 22625131; + vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock); + balancerV3Exposed = new BalancerV3ExecutorExposed(PERMIT2_ADDRESS); + } + + function testDecodeParams() public view { + bytes memory params = abi.encodePacked( + osETH_ADDR, + waEthWETH_ADDR, + WETH_osETH_pool, + RestrictTransferFrom.TransferType.None, + BOB + ); + + ( + IERC20 tokenIn, + IERC20 tokenOut, + address poolId, + RestrictTransferFrom.TransferType transferType, + address receiver + ) = balancerV3Exposed.decodeParams(params); + + assertEq(address(tokenIn), osETH_ADDR); + assertEq(address(tokenOut), waEthWETH_ADDR); + assertEq(poolId, WETH_osETH_pool); + assertEq( + uint8(transferType), uint8(RestrictTransferFrom.TransferType.None) + ); + assertEq(receiver, BOB); + } + + function testDecodeParamsInvalidDataLength() public { + bytes memory invalidParams = abi.encodePacked( + osETH_ADDR, + waEthWETH_ADDR, + WETH_osETH_pool, + RestrictTransferFrom.TransferType.None + ); + + vm.expectRevert(BalancerV3Executor__InvalidDataLength.selector); + balancerV3Exposed.decodeParams(invalidParams); + } + + function testSwap() public { + uint256 amountIn = 10 ** 18; + bytes memory protocolData = abi.encodePacked( + osETH_ADDR, + waEthWETH_ADDR, + WETH_osETH_pool, + RestrictTransferFrom.TransferType.Transfer, + BOB + ); + + deal(osETH_ADDR, address(balancerV3Exposed), amountIn); + + uint256 balanceBefore = IERC20(waEthWETH_ADDR).balanceOf(BOB); + + uint256 amountOut = balancerV3Exposed.swap(amountIn, protocolData); + + uint256 balanceAfter = IERC20(waEthWETH_ADDR).balanceOf(BOB); + assertGt(balanceAfter, balanceBefore); + assertEq(balanceAfter - balanceBefore, amountOut); + } +} From f173f9bed7e942102baba48e89b262206b7260fd Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Wed, 4 Jun 2025 17:55:19 +0100 Subject: [PATCH 04/14] feat: Add balancer-v3-monorepo lib Took 6 minutes --- .gitmodules | 4 ++-- foundry/lib/balancer-v3-monorepo | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 160000 foundry/lib/balancer-v3-monorepo diff --git a/.gitmodules b/.gitmodules index f87cde7..025aab1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,6 +22,6 @@ [submodule "foundry/lib/solady"] path = foundry/lib/solady url = https://github.com/vectorized/solady -[submodule "lib/balancer-v3-monorepo"] - path = lib/balancer-v3-monorepo +[submodule "foundry/lib/balancer-v3-monorepo"] + path = foundry/lib/balancer-v3-monorepo url = https://github.com/balancer/balancer-v3-monorepo diff --git a/foundry/lib/balancer-v3-monorepo b/foundry/lib/balancer-v3-monorepo new file mode 160000 index 0000000..84cfb0d --- /dev/null +++ b/foundry/lib/balancer-v3-monorepo @@ -0,0 +1 @@ +Subproject commit 84cfb0d9d0bd024f92c7a95c64ab7ab8b4c12f4b From 806ce4e62cfb80c16e222358a9a04b6dd5ff5bc1 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Thu, 5 Jun 2025 09:58:31 +0100 Subject: [PATCH 05/14] feat: Make BalancerV3Executor inherit from ICallback Took 37 minutes --- foundry/src/executors/BalancerV3Executor.sol | 114 ++++++------------ .../test/executors/BalancerV3Executor.t.sol | 4 + 2 files changed, 44 insertions(+), 74 deletions(-) diff --git a/foundry/src/executors/BalancerV3Executor.sol b/foundry/src/executors/BalancerV3Executor.sol index 8083ca5..3c09c46 100644 --- a/foundry/src/executors/BalancerV3Executor.sol +++ b/foundry/src/executors/BalancerV3Executor.sol @@ -12,50 +12,47 @@ import { VaultSwapParams } from "@balancer-labs/v3-interfaces/contracts/vault/VaultTypes.sol"; import {RestrictTransferFrom} from "../RestrictTransferFrom.sol"; +import {ICallback} from "../../interfaces/ICallback.sol"; error BalancerV3Executor__InvalidDataLength(); error BalancerV3Executor__SenderIsNotVault(address sender); -contract BalancerV3Executor is IExecutor, RestrictTransferFrom { +contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { using SafeERC20 for IERC20; IVault private constant VAULT = IVault(0xbA1333333333a1BA1108E8412f11850A5C319bA9); - /** - * @notice Data for the swap hook. - * @param pool Address of the liquidity pool - * @param tokenIn Token to be swapped from - * @param tokenOut Token to be swapped to - * @param amountGiven Amount given based on kind of the swap - * @param transferType Type of transfer to be used for the token in - * @param receiver Address to receive the output token - */ - struct SwapHookParams { - address pool; - IERC20 tokenIn; - IERC20 tokenOut; - uint256 amountGiven; - TransferType transferType; - address receiver; - } - constructor(address _permit2) RestrictTransferFrom(_permit2) {} - modifier onlyVault() { - if (msg.sender != address(VAULT)) { - revert BalancerV3Executor__SenderIsNotVault(msg.sender); - } - _; - } - // slither-disable-next-line locked-ether function swap(uint256 givenAmount, bytes calldata data) external payable returns (uint256 calculatedAmount) { + bytes memory result = VAULT.unlock( + abi.encodeCall( + BalancerV3Executor.handleCallback, + abi.encodePacked(givenAmount, data) + ) + ); + calculatedAmount = abi.decode(abi.decode(result, (bytes)), (uint256)); + } + + function verifyCallback(bytes calldata /*data*/ ) public view { + if (msg.sender != address(VAULT)) { + revert BalancerV3Executor__SenderIsNotVault(msg.sender); + } + } + + function handleCallback(bytes calldata data) + external + returns (bytes memory result) + { + verifyCallback(data); ( + uint256 amountGiven, IERC20 tokenIn, IERC20 tokenOut, address poolId, @@ -63,65 +60,33 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom { address receiver ) = _decodeData(data); - calculatedAmount = abi.decode( - VAULT.unlock( - abi.encodeCall( - BalancerV3Executor.swapHook, - SwapHookParams({ - pool: poolId, - tokenIn: tokenIn, - tokenOut: tokenOut, - amountGiven: givenAmount, - transferType: transferType, - receiver: receiver - }) - ) - ), - (uint256) - ); - } - - /** - * @notice Hook to be called by the Balancer Vault. - * @param params Parameters for the swap hook. - * @return amountCalculated The amount calculated after the swap. - */ - function swapHook(SwapHookParams calldata params) - external - onlyVault - returns (uint256 amountCalculated) - { + uint256 amountCalculated; uint256 amountIn; uint256 amountOut; (amountCalculated, amountIn, amountOut) = VAULT.swap( VaultSwapParams({ kind: SwapKind.EXACT_IN, - pool: params.pool, - tokenIn: params.tokenIn, - tokenOut: params.tokenOut, - amountGivenRaw: params.amountGiven, + pool: poolId, + tokenIn: tokenIn, + tokenOut: tokenOut, + amountGivenRaw: amountGiven, limitRaw: 0, userData: "" }) ); - _transfer( - address(VAULT), - params.transferType, - address(params.tokenIn), - amountIn - ); + _transfer(address(VAULT), transferType, address(tokenIn), amountIn); // slither-disable-next-line unused-return - VAULT.settle(params.tokenIn, amountIn); - VAULT.sendTo(params.tokenOut, params.receiver, amountOut); - - return amountCalculated; + VAULT.settle(tokenIn, amountIn); + VAULT.sendTo(tokenOut, receiver, amountOut); + return abi.encode(amountCalculated); } function _decodeData(bytes calldata data) internal pure returns ( + uint256 amountGiven, IERC20 tokenIn, IERC20 tokenOut, address poolId, @@ -129,14 +94,15 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom { address receiver ) { - if (data.length != 81) { + if (data.length != 113) { revert BalancerV3Executor__InvalidDataLength(); } - tokenIn = IERC20(address(bytes20(data[0:20]))); - tokenOut = IERC20(address(bytes20(data[20:40]))); - poolId = address(bytes20(data[40:60])); - transferType = TransferType(uint8(data[60])); - receiver = address(bytes20(data[61:81])); + amountGiven = uint256(bytes32(data[0:32])); + tokenIn = IERC20(address(bytes20(data[32:52]))); + tokenOut = IERC20(address(bytes20(data[52:72]))); + poolId = address(bytes20(data[72:92])); + transferType = TransferType(uint8(data[92])); + receiver = address(bytes20(data[93:113])); } } diff --git a/foundry/test/executors/BalancerV3Executor.t.sol b/foundry/test/executors/BalancerV3Executor.t.sol index 0114863..51b2e74 100644 --- a/foundry/test/executors/BalancerV3Executor.t.sol +++ b/foundry/test/executors/BalancerV3Executor.t.sol @@ -13,6 +13,7 @@ contract BalancerV3ExecutorExposed is BalancerV3Executor { external pure returns ( + uint256 amountGiven, IERC20 tokenIn, IERC20 tokenOut, address poolId, @@ -41,6 +42,7 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { function testDecodeParams() public view { bytes memory params = abi.encodePacked( + uint256(1 ether), osETH_ADDR, waEthWETH_ADDR, WETH_osETH_pool, @@ -49,6 +51,7 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { ); ( + uint256 amountGiven, IERC20 tokenIn, IERC20 tokenOut, address poolId, @@ -56,6 +59,7 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { address receiver ) = balancerV3Exposed.decodeParams(params); + assertEq(amountGiven, 1 ether); assertEq(address(tokenIn), osETH_ADDR); assertEq(address(tokenOut), waEthWETH_ADDR); assertEq(poolId, WETH_osETH_pool); From 902c4cd4d21c006a91245e9438f103f9c87c6fec Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 5 Jun 2025 14:19:52 +0000 Subject: [PATCH 06/14] chore(release): 0.98.0 [skip ci] ## [0.98.0](https://github.com/propeller-heads/tycho-execution/compare/0.97.0...0.98.0) (2025-06-05) ### Features * Add balancer-v3-monorepo lib ([f173f9b](https://github.com/propeller-heads/tycho-execution/commit/f173f9bed7e942102baba48e89b262206b7260fd)) * Implement BalancerV3Executor ([f34db52](https://github.com/propeller-heads/tycho-execution/commit/f34db52f09ccbd85213cb08e65cedac56a2b5cf3)) * Make BalancerV3Executor inherit from ICallback ([806ce4e](https://github.com/propeller-heads/tycho-execution/commit/806ce4e62cfb80c16e222358a9a04b6dd5ff5bc1)) --- CHANGELOG.md | 9 +++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de71885..23be554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [0.98.0](https://github.com/propeller-heads/tycho-execution/compare/0.97.0...0.98.0) (2025-06-05) + + +### Features + +* Add balancer-v3-monorepo lib ([f173f9b](https://github.com/propeller-heads/tycho-execution/commit/f173f9bed7e942102baba48e89b262206b7260fd)) +* Implement BalancerV3Executor ([f34db52](https://github.com/propeller-heads/tycho-execution/commit/f34db52f09ccbd85213cb08e65cedac56a2b5cf3)) +* Make BalancerV3Executor inherit from ICallback ([806ce4e](https://github.com/propeller-heads/tycho-execution/commit/806ce4e62cfb80c16e222358a9a04b6dd5ff5bc1)) + ## [0.97.0](https://github.com/propeller-heads/tycho-execution/compare/0.96.0...0.97.0) (2025-06-05) diff --git a/Cargo.lock b/Cargo.lock index e68e6b5..5580d59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4658,7 +4658,7 @@ dependencies = [ [[package]] name = "tycho-execution" -version = "0.97.0" +version = "0.98.0" dependencies = [ "alloy", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 932b660..276aadd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tycho-execution" -version = "0.97.0" +version = "0.98.0" edition = "2021" description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors." repository = "https://github.com/propeller-heads/tycho-execution" From eec50f88222adb89154f127a98fd8da380025381 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Thu, 5 Jun 2025 15:47:40 +0100 Subject: [PATCH 07/14] feat: Extend Swap to hold user_data: Option Took 25 minutes --- examples/encoding-example/main.rs | 5 ++ src/encoding/evm/group_swaps.rs | 11 +++ .../evm/strategy_encoder/strategy_encoders.rs | 12 +++- .../strategy_encoder/strategy_validators.rs | 21 ++++++ .../transfer_optimizations.rs | 2 + .../evm/swap_encoder/swap_encoders.rs | 15 ++++ src/encoding/evm/tycho_encoders.rs | 69 ++++++++++++++++++- src/encoding/models.rs | 11 ++- 8 files changed, 142 insertions(+), 4 deletions(-) diff --git a/examples/encoding-example/main.rs b/examples/encoding-example/main.rs index ff10123..1eb1f44 100644 --- a/examples/encoding-example/main.rs +++ b/examples/encoding-example/main.rs @@ -42,6 +42,7 @@ fn main() { // Split defines the fraction of the amount to be swapped. A value of 0 indicates 100% of // the amount or the total remaining balance. split: 0f64, + user_data: None, }; // Then we create a solution object with the previous swap @@ -94,6 +95,7 @@ fn main() { token_in: weth.clone(), token_out: dai.clone(), split: 0.5f64, + user_data: None, }; let swap_weth_wbtc = Swap { component: ProtocolComponent { @@ -106,6 +108,7 @@ fn main() { // This represents the remaining 50%, but to avoid any rounding errors we set this to // 0 to signify "the remainder of the WETH value". It should still be very close to 50% split: 0f64, + user_data: None, }; let swap_dai_usdc = Swap { component: ProtocolComponent { @@ -116,6 +119,7 @@ fn main() { token_in: dai.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -126,6 +130,7 @@ fn main() { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let mut complex_solution = solution.clone(); complex_solution.swaps = vec![swap_weth_dai, swap_weth_wbtc, swap_dai_usdc, swap_wbtc_usdc]; diff --git a/src/encoding/evm/group_swaps.rs b/src/encoding/evm/group_swaps.rs index edd7568..4ba6760 100644 --- a/src/encoding/evm/group_swaps.rs +++ b/src/encoding/evm/group_swaps.rs @@ -105,6 +105,7 @@ mod tests { // This represents the remaining 50%, but to avoid any rounding errors we set this to // 0 to signify "the remainder of the WETH value". It should still be very close to 50% split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -114,6 +115,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let swap_usdc_dai = Swap { component: ProtocolComponent { @@ -123,6 +125,7 @@ mod tests { token_in: usdc.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let grouped_swaps = group_swaps(vec![ swap_weth_wbtc.clone(), @@ -174,6 +177,7 @@ mod tests { token_in: wbtc.clone(), token_out: weth.clone(), split: 0f64, + user_data: None, }; let swap_weth_usdc = Swap { component: ProtocolComponent { @@ -183,6 +187,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.5f64, + user_data: None, }; let swap_weth_dai = Swap { component: ProtocolComponent { @@ -194,6 +199,7 @@ mod tests { // This represents the remaining 50%, but to avoid any rounding errors we set this to // 0 to signify "the remainder of the WETH value". It should still be very close to 50% split: 0f64, + user_data: None, }; let swap_dai_usdc = Swap { component: ProtocolComponent { @@ -203,6 +209,7 @@ mod tests { token_in: dai.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let grouped_swaps = group_swaps(vec![ swap_wbtc_weth.clone(), @@ -261,6 +268,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0.5f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -270,6 +278,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let swap_weth_dai = Swap { component: ProtocolComponent { @@ -281,6 +290,7 @@ mod tests { // This represents the remaining 50%, but to avoid any rounding errors we set this to // 0 to signify "the remainder of the WETH value". It should still be very close to 50% split: 0f64, + user_data: None, }; let swap_dai_usdc = Swap { component: ProtocolComponent { @@ -290,6 +300,7 @@ mod tests { token_in: dai.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let grouped_swaps = group_swaps(vec![ diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index 0d97447..20ccd59 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -558,6 +558,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let swap_encoder_registry = get_swap_encoder_registry(); let encoder = SingleSwapStrategyEncoder::new( @@ -618,6 +619,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let swap_encoder_registry = get_swap_encoder_registry(); let encoder = SingleSwapStrategyEncoder::new( @@ -688,6 +690,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -698,6 +701,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let swap_encoder_registry = get_swap_encoder_registry(); let encoder = SequentialSwapStrategyEncoder::new( @@ -789,6 +793,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0.6f64, // 60% of input + user_data: None, }; // USDC -> WETH (Pool 2) - 40% of input (remaining) @@ -809,7 +814,8 @@ mod tests { }, token_in: usdc.clone(), token_out: weth.clone(), - split: 0f64, // Remaining 40% + split: 0f64, + user_data: None, // Remaining 40% }; // WETH -> USDC (Pool 2) @@ -831,6 +837,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.0f64, + user_data: None, }; let swap_encoder_registry = get_swap_encoder_registry(); @@ -938,6 +945,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0.0f64, + user_data: None, }; let swap_weth_usdc_v3_pool1 = Swap { @@ -958,6 +966,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.6f64, + user_data: None, }; let swap_weth_usdc_v3_pool2 = Swap { @@ -978,6 +987,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.0f64, + user_data: None, }; let swap_encoder_registry = get_swap_encoder_registry(); diff --git a/src/encoding/evm/strategy_encoder/strategy_validators.rs b/src/encoding/evm/strategy_encoder/strategy_validators.rs index b34256e..6350add 100644 --- a/src/encoding/evm/strategy_encoder/strategy_validators.rs +++ b/src/encoding/evm/strategy_encoder/strategy_validators.rs @@ -214,6 +214,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }]; let result = validator.validate_swap_path(&swaps, &weth, &dai, &None, ð, &weth); assert_eq!(result, Ok(())); @@ -236,6 +237,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -246,6 +248,7 @@ mod tests { token_in: dai.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }, ]; let result = validator.validate_swap_path(&swaps, &weth, &usdc, &None, ð, &weth); @@ -271,6 +274,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5, + user_data: None, }, // This swap is disconnected from the WETH->DAI path Swap { @@ -282,6 +286,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0.0, + user_data: None, }, ]; let result = @@ -309,6 +314,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -319,6 +325,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }, ]; @@ -344,6 +351,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 1.0, + user_data: None, }]; let result = validator.validate_swap_path(&unreachable_swaps, &weth, &usdc, &None, ð, &weth); @@ -382,6 +390,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }]; let result = validator.validate_split_percentages(&swaps); assert_eq!(result, Ok(())); @@ -404,6 +413,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5, + user_data: None, }, Swap { component: ProtocolComponent { @@ -414,6 +424,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.3, + user_data: None, }, Swap { component: ProtocolComponent { @@ -424,6 +435,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.0, // Remainder (20%) + user_data: None, }, ]; assert!(validator @@ -447,6 +459,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.7, + user_data: None, }, Swap { component: ProtocolComponent { @@ -457,6 +470,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.3, + user_data: None, }, ]; assert!(matches!( @@ -481,6 +495,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.0, + user_data: None, }, Swap { component: ProtocolComponent { @@ -491,6 +506,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5, + user_data: None, }, ]; assert!(matches!( @@ -515,6 +531,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.6, + user_data: None, }, Swap { component: ProtocolComponent { @@ -525,6 +542,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5, + user_data: None, }, Swap { component: ProtocolComponent { @@ -535,6 +553,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.0, + user_data: None, }, ]; assert!(matches!( @@ -559,6 +578,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }]; let result = validator.validate_swap_path( @@ -588,6 +608,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0f64, + user_data: None, }]; let result = validator.validate_swap_path( diff --git a/src/encoding/evm/strategy_encoder/transfer_optimizations.rs b/src/encoding/evm/strategy_encoder/transfer_optimizations.rs index 6c925b5..d0c6529 100644 --- a/src/encoding/evm/strategy_encoder/transfer_optimizations.rs +++ b/src/encoding/evm/strategy_encoder/transfer_optimizations.rs @@ -178,6 +178,7 @@ mod tests { token_in: swap_token_in.clone(), token_out: dai(), split: 0f64, + user_data: None, }]; let swap = SwapGroup { protocol_system: protocol, @@ -243,6 +244,7 @@ mod tests { token_in: usdc(), token_out: dai(), split: 0f64, + user_data: None, }], }) }; diff --git a/src/encoding/evm/swap_encoder/swap_encoders.rs b/src/encoding/evm/swap_encoder/swap_encoders.rs index 94e2c8f..7d9dff4 100644 --- a/src/encoding/evm/swap_encoder/swap_encoders.rs +++ b/src/encoding/evm/swap_encoder/swap_encoders.rs @@ -601,6 +601,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { receiver: Bytes::from("0x1D96F2f6BeF1202E4Ce1Ff6Dad0c2CB002861d3e"), // BOB @@ -660,6 +661,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { receiver: Bytes::from("0x0000000000000000000000000000000000000001"), @@ -721,6 +723,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver was generated with `makeAddr("bob") using forge` @@ -793,6 +796,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver is ALICE to match the solidity tests @@ -865,6 +869,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { @@ -961,6 +966,7 @@ mod tests { token_in: usde_address.clone(), token_out: usdt_address.clone(), split: 0f64, + user_data: None, }; let second_swap = Swap { @@ -968,6 +974,7 @@ mod tests { token_in: usdt_address, token_out: wbtc_address.clone(), split: 0f64, + user_data: None, }; let encoder = UniswapV4SwapEncoder::new( @@ -1044,6 +1051,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { @@ -1116,6 +1124,7 @@ mod tests { token_in: group_token_in.clone(), token_out: intermediary_token.clone(), split: 0f64, + user_data: None, }; let second_swap = Swap { @@ -1131,6 +1140,7 @@ mod tests { token_in: intermediary_token.clone(), token_out: group_token_out.clone(), split: 0f64, + user_data: None, }; let first_encoded_swap = encoder @@ -1250,6 +1260,7 @@ mod tests { token_in: Bytes::from(token_in), token_out: Bytes::from(token_out), split: 0f64, + user_data: None, }; let encoder = CurveSwapEncoder::new( String::default(), @@ -1293,6 +1304,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver was generated with `makeAddr("bob") using forge` @@ -1364,6 +1376,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver was generated with `makeAddr("bob") using forge` @@ -1436,6 +1449,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver was generated with `makeAddr("bob") using forge` @@ -1507,6 +1521,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoding_context = EncodingContext { // The receiver was generated with `makeAddr("bob") using forge` diff --git a/src/encoding/evm/tycho_encoders.rs b/src/encoding/evm/tycho_encoders.rs index ab492ae..805bcc4 100644 --- a/src/encoding/evm/tycho_encoders.rs +++ b/src/encoding/evm/tycho_encoders.rs @@ -435,6 +435,7 @@ mod tests { token_in: usdc().clone(), token_out: eth().clone(), split: 0f64, + user_data: None, } } @@ -455,6 +456,7 @@ mod tests { token_in: eth().clone(), token_out: pepe().clone(), split: 0f64, + user_data: None, } } @@ -502,6 +504,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -566,6 +569,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }; let swap_dai_usdc = Swap { @@ -577,6 +581,7 @@ mod tests { token_in: dai(), token_out: usdc(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -630,6 +635,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -658,6 +664,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -691,6 +698,7 @@ mod tests { token_in: eth(), token_out: dai(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -744,6 +752,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -771,6 +780,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -805,6 +815,7 @@ mod tests { token_in: dai(), token_out: eth(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -844,6 +855,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0.5f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -854,6 +866,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -864,6 +877,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }, ]; @@ -896,6 +910,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -906,6 +921,7 @@ mod tests { token_in: weth(), token_out: usdc(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -916,6 +932,7 @@ mod tests { token_in: usdc(), token_out: dai(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -926,6 +943,7 @@ mod tests { token_in: dai(), token_out: wbtc(), split: 0f64, + user_data: None, }, ]; @@ -965,6 +983,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -975,6 +994,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0.5f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -985,6 +1005,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }, ]; @@ -1017,6 +1038,7 @@ mod tests { token_in: weth(), token_out: dai(), split: 0f64, + user_data: None, }, Swap { component: ProtocolComponent { @@ -1027,6 +1049,7 @@ mod tests { token_in: dai(), token_out: weth(), split: 0f64, + user_data: None, }, ]; @@ -1080,6 +1103,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -1139,6 +1163,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let solution = Solution { @@ -1262,6 +1287,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -1352,6 +1378,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -1436,6 +1463,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::None); @@ -1517,6 +1545,7 @@ mod tests { token_in: weth(), token_out: dai.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -1572,6 +1601,7 @@ mod tests { token_in: dai.clone(), token_out: weth(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -1637,6 +1667,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -1647,6 +1678,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -1705,6 +1737,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -1715,6 +1748,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -1817,6 +1851,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0f64, + user_data: None, }; // WETH -> USDC (Pool 2) @@ -1838,6 +1873,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -1954,6 +1990,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -1964,6 +2001,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -2035,6 +2073,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -2053,6 +2092,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -2123,6 +2163,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdt = Swap { @@ -2151,6 +2192,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdt.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -2215,6 +2257,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { @@ -2226,6 +2269,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -2293,6 +2337,7 @@ mod tests { token_in: dai.clone(), token_out: weth.clone(), split: 0f64, + user_data: None, }; let balancer_swap_weth_wbtc = Swap { @@ -2306,6 +2351,7 @@ mod tests { token_in: weth.clone(), token_out: wbtc.clone(), split: 0f64, + user_data: None, }; let curve_swap_wbtc_usdt = Swap { @@ -2334,6 +2380,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdt.clone(), split: 0f64, + user_data: None, }; // Ekubo @@ -2355,6 +2402,7 @@ mod tests { token_in: usdt.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; // USV4 @@ -2379,6 +2427,7 @@ mod tests { token_in: usdc.clone(), token_out: eth.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -2455,6 +2504,7 @@ mod tests { token_in: weth.clone(), token_out: dai.clone(), split: 0.5f64, + user_data: None, }; let swap_weth_wbtc = Swap { component: ProtocolComponent { @@ -2468,6 +2518,7 @@ mod tests { // this to 0 to signify "the remainder of the WETH value". // It should still be very close to 50% split: 0f64, + user_data: None, }; let swap_dai_usdc = Swap { component: ProtocolComponent { @@ -2478,6 +2529,7 @@ mod tests { token_in: dai.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let swap_wbtc_usdc = Swap { component: ProtocolComponent { @@ -2488,6 +2540,7 @@ mod tests { token_in: wbtc.clone(), token_out: usdc.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -2556,6 +2609,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0.6f64, // 60% of input + user_data: None, }; // USDC -> WETH (Pool 2) - 40% of input (remaining) @@ -2576,7 +2630,8 @@ mod tests { }, token_in: usdc.clone(), token_out: weth.clone(), - split: 0f64, // Remaining 40% + split: 0f64, + user_data: None, // Remaining 40% }; // WETH -> USDC (Pool 2) @@ -2598,6 +2653,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -2720,6 +2776,7 @@ mod tests { token_in: usdc.clone(), token_out: weth.clone(), split: 0.0f64, + user_data: None, }; let swap_weth_usdc_v3_pool1 = Swap { @@ -2740,6 +2797,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.6f64, + user_data: None, }; let swap_weth_usdc_v3_pool2 = Swap { @@ -2760,6 +2818,7 @@ mod tests { token_in: weth.clone(), token_out: usdc.clone(), split: 0.0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -2893,6 +2952,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -2948,6 +3008,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -3016,6 +3077,7 @@ mod tests { token_in: eth.clone(), token_out: pepe.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -3086,6 +3148,7 @@ mod tests { token_in: usdc.clone(), token_out: eth.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -3164,6 +3227,7 @@ mod tests { token_in: usdc.clone(), token_out: eth.clone(), split: 0f64, + user_data: None, }; let swap_eth_pepe = Swap { @@ -3177,6 +3241,7 @@ mod tests { token_in: eth.clone(), token_out: pepe.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2); @@ -3285,6 +3350,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); @@ -3355,6 +3421,7 @@ mod tests { token_in: token_in.clone(), token_out: token_out.clone(), split: 0f64, + user_data: None, }; let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); diff --git a/src/encoding/models.rs b/src/encoding/models.rs index b8e03f4..060e828 100644 --- a/src/encoding/models.rs +++ b/src/encoding/models.rs @@ -86,6 +86,8 @@ pub struct Swap { /// Decimal of the amount to be swapped in this operation (for example, 0.5 means 50%) #[serde(default)] pub split: f64, + /// Optional user data to be passed to encoding. + pub user_data: Option, } impl Swap { @@ -94,8 +96,9 @@ impl Swap { token_in: Bytes, token_out: Bytes, split: f64, + user_data: Option, ) -> Self { - Self { component: component.into(), token_in, token_out, split } + Self { component: component.into(), token_in, token_out, split, user_data } } } @@ -295,10 +298,14 @@ mod tests { id: "i-am-an-id".to_string(), protocol_system: "uniswap_v2".to_string(), }; - let swap = Swap::new(component, Bytes::from("0x12"), Bytes::from("34"), 0.5); + let user_data = Some(Bytes::from("0x1234")); + let swap = + Swap::new(component, Bytes::from("0x12"), Bytes::from("34"), 0.5, user_data.clone()); assert_eq!(swap.token_in, Bytes::from("0x12")); assert_eq!(swap.token_out, Bytes::from("0x34")); assert_eq!(swap.component.protocol_system, "uniswap_v2"); assert_eq!(swap.component.id, "i-am-an-id"); + assert_eq!(swap.split, 0.5); + assert_eq!(swap.user_data, user_data); } } From 6ada7f2a51b1059f64980d9a95810d191bbaefe0 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 5 Jun 2025 14:55:23 +0000 Subject: [PATCH 08/14] chore(release): 0.99.0 [skip ci] ## [0.99.0](https://github.com/propeller-heads/tycho-execution/compare/0.98.0...0.99.0) (2025-06-05) ### Features * Extend Swap to hold user_data: Option ([eec50f8](https://github.com/propeller-heads/tycho-execution/commit/eec50f88222adb89154f127a98fd8da380025381)) --- CHANGELOG.md | 7 +++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23be554..a4d705f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.99.0](https://github.com/propeller-heads/tycho-execution/compare/0.98.0...0.99.0) (2025-06-05) + + +### Features + +* Extend Swap to hold user_data: Option ([eec50f8](https://github.com/propeller-heads/tycho-execution/commit/eec50f88222adb89154f127a98fd8da380025381)) + ## [0.98.0](https://github.com/propeller-heads/tycho-execution/compare/0.97.0...0.98.0) (2025-06-05) diff --git a/Cargo.lock b/Cargo.lock index 5580d59..4035068 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4658,7 +4658,7 @@ dependencies = [ [[package]] name = "tycho-execution" -version = "0.98.0" +version = "0.99.0" dependencies = [ "alloy", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 276aadd..138564f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tycho-execution" -version = "0.98.0" +version = "0.99.0" edition = "2021" description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors." repository = "https://github.com/propeller-heads/tycho-execution" From 06ce28c8fd580a981192941000c473841c79d8f7 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Thu, 5 Jun 2025 17:11:41 +0100 Subject: [PATCH 09/14] feat: Add BalancerV3Encoder Took 1 hour 7 minutes Took 2 minutes --- config/executor_addresses.json | 3 +- config/test_executor_addresses.json | 3 +- src/encoding/evm/swap_encoder/builder.rs | 9 +- .../evm/swap_encoder/swap_encoders.rs | 211 +++++++++++++----- src/encoding/evm/tycho_encoders.rs | 56 +++++ 5 files changed, 225 insertions(+), 57 deletions(-) diff --git a/config/executor_addresses.json b/config/executor_addresses.json index fd174f1..fed287c 100644 --- a/config/executor_addresses.json +++ b/config/executor_addresses.json @@ -9,7 +9,8 @@ "vm:balancer_v2": "0xB5b8dc3F0a1Be99685a0DEd015Af93bFBB55C411", "ekubo_v2": "0xcCF8e1E39e9ddfa88282fA6a7B31eBFB41a1ED7B", "vm:curve": "0x879F3008D96EBea0fc584aD684c7Df31777F3165", - "vm:maverick_v2": "0xF35e3F5F205769B41508A18787b62A21bC80200B" + "vm:maverick_v2": "0xF35e3F5F205769B41508A18787b62A21bC80200B", + "vm:balancer_v3": "0x0000000000000000000000000000000000000000" }, "base": { "uniswap_v2": "0xF744EBfaA580cF3fFc25aD046E92BD8B770a0700", diff --git a/config/test_executor_addresses.json b/config/test_executor_addresses.json index d04630d..130a686 100644 --- a/config/test_executor_addresses.json +++ b/config/test_executor_addresses.json @@ -9,6 +9,7 @@ "vm:balancer_v2": "0xc7183455a4C133Ae270771860664b6B7ec320bB1", "ekubo_v2": "0xa0Cb889707d426A7A386870A03bc70d1b0697598", "vm:curve": "0x1d1499e622D69689cdf9004d05Ec547d650Ff211", - "vm:maverick_v2": "0xA4AD4f68d0b91CFD19687c881e50f3A00242828c" + "vm:maverick_v2": "0xA4AD4f68d0b91CFD19687c881e50f3A00242828c", + "vm:balancer_v3": "0x03A6a84cD762D9707A21605b548aaaB891562aAb" } } diff --git a/src/encoding/evm/swap_encoder/builder.rs b/src/encoding/evm/swap_encoder/builder.rs index 9b4967c..165758f 100644 --- a/src/encoding/evm/swap_encoder/builder.rs +++ b/src/encoding/evm/swap_encoder/builder.rs @@ -3,8 +3,8 @@ use std::collections::HashMap; use crate::encoding::{ errors::EncodingError, evm::swap_encoder::swap_encoders::{ - BalancerV2SwapEncoder, CurveSwapEncoder, EkuboSwapEncoder, MaverickV2SwapEncoder, - UniswapV2SwapEncoder, UniswapV3SwapEncoder, UniswapV4SwapEncoder, + BalancerV2SwapEncoder, BalancerV3SwapEncoder, CurveSwapEncoder, EkuboSwapEncoder, + MaverickV2SwapEncoder, UniswapV2SwapEncoder, UniswapV3SwapEncoder, UniswapV4SwapEncoder, }, models::Chain, swap_encoder::SwapEncoder, @@ -81,6 +81,11 @@ impl SwapEncoderBuilder { self.chain, self.config, )?)), + "vm:balancer_v3" => Ok(Box::new(BalancerV3SwapEncoder::new( + self.executor_address, + self.chain, + self.config, + )?)), _ => Err(EncodingError::FatalError(format!( "Unknown protocol system: {}", self.protocol_system diff --git a/src/encoding/evm/swap_encoder/swap_encoders.rs b/src/encoding/evm/swap_encoder/swap_encoders.rs index 7d9dff4..fe15224 100644 --- a/src/encoding/evm/swap_encoder/swap_encoders.rs +++ b/src/encoding/evm/swap_encoder/swap_encoders.rs @@ -232,12 +232,12 @@ impl SwapEncoder for BalancerV2SwapEncoder { config: Option>, ) -> Result { let config = config.ok_or(EncodingError::FatalError( - "Missing balancer specific addresses in config".to_string(), + "Missing balancer v2 specific addresses in config".to_string(), ))?; let vault_address = config .get("vault_address") .ok_or(EncodingError::FatalError( - "Missing balancer vault address in config".to_string(), + "Missing balancer v2 vault address in config".to_string(), ))? .to_string(); Ok(Self { executor_address, vault_address }) @@ -571,6 +571,51 @@ impl SwapEncoder for MaverickV2SwapEncoder { } } +/// Encodes a swap on a Balancer V3 pool through the given executor address. +/// +/// # Fields +/// * `executor_address` - The address of the executor contract that will perform the swap. +#[derive(Clone)] +pub struct BalancerV3SwapEncoder { + executor_address: String, +} + +impl SwapEncoder for BalancerV3SwapEncoder { + fn new( + executor_address: String, + _chain: Chain, + _config: Option>, + ) -> Result { + Ok(Self { executor_address }) + } + + fn encode_swap( + &self, + swap: Swap, + encoding_context: EncodingContext, + ) -> Result, EncodingError> { + let pool = Address::from_str(&swap.component.id).map_err(|_| { + EncodingError::FatalError("Invalid pool address for Balancer v3".to_string()) + })?; + + let args = ( + bytes_to_address(&swap.token_in)?, + bytes_to_address(&swap.token_out)?, + pool, + (encoding_context.transfer_type as u8).to_be_bytes(), + bytes_to_address(&encoding_context.receiver)?, + ); + Ok(args.abi_encode_packed()) + } + + fn executor_address(&self) -> &str { + &self.executor_address + } + fn clone_box(&self) -> Box { + Box::new(self.clone()) + } +} + #[cfg(test)] mod tests { use std::collections::HashMap; @@ -705,7 +750,6 @@ mod tests { mod balancer_v2 { use super::*; - use crate::encoding::evm::utils::write_calldata_to_file; #[test] fn test_encode_balancer_v2() { @@ -1506,59 +1550,120 @@ mod tests { } } - #[test] - fn test_encode_maverick_v2() { - // GHO -> (maverick) -> USDC - let maverick_pool = ProtocolComponent { - id: String::from("0x14Cf6D2Fe3E1B326114b07d22A6F6bb59e346c67"), - protocol_system: String::from("vm:maverick_v2"), - ..Default::default() - }; - let token_in = Bytes::from("0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f"); - let token_out = Bytes::from("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"); - let swap = Swap { - component: maverick_pool, - token_in: token_in.clone(), - token_out: token_out.clone(), - split: 0f64, - user_data: None, - }; - let encoding_context = EncodingContext { - // The receiver was generated with `makeAddr("bob") using forge` - receiver: Bytes::from("0x1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e"), - exact_out: false, - router_address: Some(Bytes::default()), - group_token_in: token_in.clone(), - group_token_out: token_out.clone(), - transfer_type: TransferType::Transfer, - }; - let encoder = MaverickV2SwapEncoder::new( - String::from("0x543778987b293C7E8Cf0722BB2e935ba6f4068D4"), - TychoCoreChain::Ethereum.into(), - None, - ) - .unwrap(); + mod balancer_v3 { + use super::*; - let encoded_swap = encoder - .encode_swap(swap, encoding_context) + #[test] + fn test_encode_balancer_v3() { + let balancer_pool = ProtocolComponent { + id: String::from("0x85b2b559bc2d21104c4defdd6efca8a20343361d"), + protocol_system: String::from("vm:balancer_v3"), + ..Default::default() + }; + let token_in = Bytes::from("0x7bc3485026ac48b6cf9baf0a377477fff5703af8"); + let token_out = Bytes::from("0xc71ea051a5f82c67adcf634c36ffe6334793d24c"); + let swap = Swap { + component: balancer_pool, + token_in: token_in.clone(), + token_out: token_out.clone(), + split: 0f64, + user_data: None, + }; + let encoding_context = EncodingContext { + // The receiver was generated with `makeAddr("bob") using forge` + receiver: Bytes::from("0x1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e"), + exact_out: false, + router_address: Some(Bytes::zero(20)), + group_token_in: token_in.clone(), + group_token_out: token_out.clone(), + transfer_type: TransferType::Transfer, + }; + let encoder = BalancerV3SwapEncoder::new( + String::from("0x543778987b293C7E8Cf0722BB2e935ba6f4068D4"), + TychoCoreChain::Ethereum.into(), + None, + ) .unwrap(); - let hex_swap = encode(&encoded_swap); + let encoded_swap = encoder + .encode_swap(swap, encoding_context) + .unwrap(); + let hex_swap = encode(&encoded_swap); - assert_eq!( - hex_swap, - String::from(concat!( - // token in - "40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f", - // pool - "14Cf6D2Fe3E1B326114b07d22A6F6bb59e346c67", - // receiver - "1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e", - // transfer true - "01", - )) - .to_lowercase() - ); + assert_eq!( + hex_swap, + String::from(concat!( + // token in + "7bc3485026ac48b6cf9baf0a377477fff5703af8", + // token out + "c71ea051a5f82c67adcf634c36ffe6334793d24c", + // pool id + "85b2b559bc2d21104c4defdd6efca8a20343361d", + // transfer type None + "01", + // receiver + "1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e", + )) + ); + write_calldata_to_file("test_encode_balancer_v3", hex_swap.as_str()); + } + } - write_calldata_to_file("test_encode_maverick_v2", hex_swap.as_str()); + mod maverick_v2 { + use super::*; + #[test] + fn test_encode_maverick_v2() { + // GHO -> (maverick) -> USDC + let maverick_pool = ProtocolComponent { + id: String::from("0x14Cf6D2Fe3E1B326114b07d22A6F6bb59e346c67"), + protocol_system: String::from("vm:maverick_v2"), + ..Default::default() + }; + let token_in = Bytes::from("0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f"); + let token_out = Bytes::from("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"); + let swap = Swap { + component: maverick_pool, + token_in: token_in.clone(), + token_out: token_out.clone(), + split: 0f64, + user_data: None, + }; + let encoding_context = EncodingContext { + // The receiver was generated with `makeAddr("bob") using forge` + receiver: Bytes::from("0x1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e"), + exact_out: false, + router_address: Some(Bytes::default()), + group_token_in: token_in.clone(), + group_token_out: token_out.clone(), + transfer_type: TransferType::Transfer, + }; + let encoder = MaverickV2SwapEncoder::new( + String::from("0x543778987b293C7E8Cf0722BB2e935ba6f4068D4"), + TychoCoreChain::Ethereum.into(), + None, + ) + .unwrap(); + + let encoded_swap = encoder + .encode_swap(swap, encoding_context) + .unwrap(); + let hex_swap = encode(&encoded_swap); + + assert_eq!( + hex_swap, + String::from(concat!( + // token in + "40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f", + // pool + "14Cf6D2Fe3E1B326114b07d22A6F6bb59e346c67", + // receiver + "1d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e", + // transfer true + "01", + )) + .to_lowercase() + ); + + write_calldata_to_file("test_encode_maverick_v2", hex_swap.as_str()); + } } } diff --git a/src/encoding/evm/tycho_encoders.rs b/src/encoding/evm/tycho_encoders.rs index 805bcc4..3f5b766 100644 --- a/src/encoding/evm/tycho_encoders.rs +++ b/src/encoding/evm/tycho_encoders.rs @@ -3462,6 +3462,62 @@ mod tests { hex_calldata.as_str(), ); } + + #[test] + fn test_single_encoding_strategy_balancer_v3() { + // steakUSDTlite -> (balancer v3) -> steakUSDR + let balancer_pool = ProtocolComponent { + id: String::from("0xf028ac624074d6793c36dc8a06ecec0f5a39a718"), + protocol_system: String::from("vm:balancer_v3"), + ..Default::default() + }; + let token_in = Bytes::from("0x097ffedb80d4b2ca6105a07a4d90eb739c45a666"); + let token_out = Bytes::from("0x30881baa943777f92dc934d53d3bfdf33382cab3"); + let swap = Swap { + component: balancer_pool, + token_in: token_in.clone(), + token_out: token_out.clone(), + split: 0f64, + user_data: None, + }; + + let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); + + let solution = Solution { + exact_out: false, + given_token: token_in, + given_amount: BigUint::from_str("1_000000000000000000").unwrap(), + checked_token: token_out, + checked_amount: BigUint::from_str("1000").unwrap(), + // Alice + sender: Bytes::from_str("0xcd09f75E2BF2A4d11F3AB23f1389FcC1621c0cc2").unwrap(), + receiver: Bytes::from_str("0xcd09f75E2BF2A4d11F3AB23f1389FcC1621c0cc2") + .unwrap(), + swaps: vec![swap], + ..Default::default() + }; + + let encoded_solution = encoder + .encode_solutions(vec![solution.clone()]) + .unwrap()[0] + .clone(); + + let calldata = encode_tycho_router_call( + eth_chain().id, + encoded_solution, + &solution, + UserTransferType::TransferFrom, + eth(), + None, + ) + .unwrap() + .data; + let hex_calldata = encode(&calldata); + write_calldata_to_file( + "test_single_encoding_strategy_balancer_v3", + hex_calldata.as_str(), + ); + } } } } From 269e328b5f9897714cfe533bf7b98444248cd62a Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Thu, 5 Jun 2025 17:12:58 +0100 Subject: [PATCH 10/14] feat: Add integration tests for balancer v3 Refactor BalancerV3Executor to have an inner _swapCallback method with the real swapping logic. Then we have two external methods: - handleCallback: called by the router. Here we need to remove the first 68 bytes (4 selector + 32 dataOffset + 32 dataLength) - swapCallback: called by the Vault directly if we are swapping against the executor directly (no router involved) Took 1 minute --- foundry/src/executors/BalancerV3Executor.sol | 26 ++++++++++++++++--- .../test/TychoRouterProtocolIntegration.t.sol | 23 ++++++++++++++-- foundry/test/TychoRouterTestSetup.sol | 7 ++++- foundry/test/assets/calldata.txt | 26 ++++++++++--------- .../test/executors/BalancerV3Executor.t.sol | 19 ++++++++++++++ 5 files changed, 82 insertions(+), 19 deletions(-) diff --git a/foundry/src/executors/BalancerV3Executor.sol b/foundry/src/executors/BalancerV3Executor.sol index 3c09c46..da79327 100644 --- a/foundry/src/executors/BalancerV3Executor.sol +++ b/foundry/src/executors/BalancerV3Executor.sol @@ -33,7 +33,7 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { { bytes memory result = VAULT.unlock( abi.encodeCall( - BalancerV3Executor.handleCallback, + BalancerV3Executor.swapCallback, abi.encodePacked(givenAmount, data) ) ); @@ -46,8 +46,8 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { } } - function handleCallback(bytes calldata data) - external + function _swapCallback(bytes calldata data) + internal returns (bytes memory result) { verifyCallback(data); @@ -82,6 +82,24 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { return abi.encode(amountCalculated); } + function handleCallback(bytes calldata data) + external + returns (bytes memory result) + { + verifyCallback(data); + result = _swapCallback(data[68:]); + // Our general callback logic returns a not ABI encoded result. + // However, the Vault expects the result to be ABI encoded. That is why we need to encode it here again. + return abi.encode(result); + } + + function swapCallback(bytes calldata data) + external + returns (bytes memory result) + { + return _swapCallback(data); + } + function _decodeData(bytes calldata data) internal pure @@ -94,7 +112,7 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { address receiver ) { - if (data.length != 113) { + if (data.length < 113) { revert BalancerV3Executor__InvalidDataLength(); } diff --git a/foundry/test/TychoRouterProtocolIntegration.t.sol b/foundry/test/TychoRouterProtocolIntegration.t.sol index 7157310..58b99d4 100644 --- a/foundry/test/TychoRouterProtocolIntegration.t.sol +++ b/foundry/test/TychoRouterProtocolIntegration.t.sol @@ -198,8 +198,6 @@ contract TychoRouterTestProtocolIntegration is TychoRouterTestSetup { } function testSingleMaverickIntegration() public { - vm.stopPrank(); - deal(GHO_ADDR, ALICE, 1 ether); uint256 balanceBefore = IERC20(USDC_ADDR).balanceOf(ALICE); @@ -295,4 +293,25 @@ contract TychoRouterTestProtocolIntegration is TychoRouterTestSetup { vm.stopPrank(); } + + function testSingleBalancerV3Integration() public { + address steakUSDTlite = + address(0x097FFEDb80d4b2Ca6105a07a4D90eB739C45A666); + address steakUSDR = address(0x30881Baa943777f92DC934d53D3bFdF33382cab3); + deal(steakUSDTlite, ALICE, 1 ether); + uint256 balanceBefore = IERC20(steakUSDTlite).balanceOf(ALICE); + + vm.startPrank(ALICE); + IERC20(steakUSDTlite).approve(tychoRouterAddr, type(uint256).max); + + bytes memory callData = + loadCallDataFromFile("test_single_encoding_strategy_balancer_v3"); + (bool success,) = tychoRouterAddr.call(callData); + + uint256 balanceAfter = IERC20(steakUSDR).balanceOf(ALICE); + + assertTrue(success, "Call Failed"); + assertGe(balanceAfter - balanceBefore, 999725); + assertEq(IERC20(steakUSDR).balanceOf(tychoRouterAddr), 0); + } } diff --git a/foundry/test/TychoRouterTestSetup.sol b/foundry/test/TychoRouterTestSetup.sol index d8747e4..c8458a2 100644 --- a/foundry/test/TychoRouterTestSetup.sol +++ b/foundry/test/TychoRouterTestSetup.sol @@ -16,6 +16,7 @@ import {WETH} from "../lib/permit2/lib/solmate/src/tokens/WETH.sol"; import {Permit2TestHelper} from "./Permit2TestHelper.sol"; import "./TestUtils.sol"; import {MaverickV2Executor} from "../src/executors/MaverickV2Executor.sol"; +import {BalancerV3Executor} from "../src/executors/BalancerV3Executor.sol"; contract TychoRouterExposed is TychoRouter { constructor(address _permit2, address weth) TychoRouter(_permit2, weth) {} @@ -66,6 +67,7 @@ contract TychoRouterTestSetup is Constants, Permit2TestHelper, TestUtils { EkuboExecutor public ekuboExecutor; CurveExecutor public curveExecutor; MaverickV2Executor public maverickv2Executor; + BalancerV3Executor public balancerV3Executor; MockERC20[] tokens; function setUp() public { @@ -125,8 +127,9 @@ contract TychoRouterTestSetup is Constants, Permit2TestHelper, TestUtils { curveExecutor = new CurveExecutor(ETH_ADDR_FOR_CURVE, PERMIT2_ADDRESS); maverickv2Executor = new MaverickV2Executor(MAVERICK_V2_FACTORY, PERMIT2_ADDRESS); + balancerV3Executor = new BalancerV3Executor(PERMIT2_ADDRESS); - address[] memory executors = new address[](8); + address[] memory executors = new address[](9); executors[0] = address(usv2Executor); executors[1] = address(usv3Executor); executors[2] = address(pancakev3Executor); @@ -135,6 +138,8 @@ contract TychoRouterTestSetup is Constants, Permit2TestHelper, TestUtils { executors[5] = address(ekuboExecutor); executors[6] = address(curveExecutor); executors[7] = address(maverickv2Executor); + executors[8] = address(balancerV3Executor); + return executors; } diff --git a/foundry/test/assets/calldata.txt b/foundry/test/assets/calldata.txt index 539328a..b7a9efe 100644 --- a/foundry/test/assets/calldata.txt +++ b/foundry/test/assets/calldata.txt @@ -3,23 +3,23 @@ test_single_encoding_strategy_ekubo:5c4b639c000000000000000000000000000000000000 test_uniswap_v3_uniswap_v3:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed000000692e234dae75c793f67a35089c9d99245e1c58470b2260fac5e5542a773aa44fbcfedf7c193bc2c599a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc299ac8ca7087fa4a2a1fb6357269965a2014abc35010100000000000000000000 test_balancer_v2_uniswap_v2:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000c80072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e004375dff511095cc5a197a54140a24efef3a416010000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 test_sequential_swap_strategy_encoder_no_permit2:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 -test_single_encoding_strategy_usv4_grouped_swap:30ace1b1000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000005064ff624d54346285543f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000416a1ae07bda4ca6c8503f2233052eea5a5dfb8c7755dfb108797fef2bacdddaa266ffba24db3614fb8a933c0bcceda3aecffa6db0781ecb436e6bbda5eea459621b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086f62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb486982508145454ce325ddbe47a25d4ec3d23119330000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c6982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000000000000000 -test_single_encoding_strategy_usv4_eth_out:30ace1b100000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f81490b4f29aade00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000b2d05e0000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000416f3729ae9d9802c1e9c996adac1ecd83bba3bbd9526e9d6b78b700624a5143e23a23bdfb10ba1dda78f51a819a9cd9fa247484c288c5102a384a0c86ad389d431b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c0000000000000000000000000000000000000000 -test_sequential_swap_strategy_encoder:51bcc7b60000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d86a1edea6862ef9c8df971417410c87f6cf21d40542760db70fdd800b82f7c9722702f735433a898b8cc208b131cd865589d11f5028da2b9866667e0d38bfd51b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 +test_single_encoding_strategy_usv4_grouped_swap:30ace1b1000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000005064ff624d54346285543f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000412f6c0e04e8e051f66af676ae2635405bf8b5148a3266f9b84b5faa9e777dfb23140bf89c7d15dcfd7dc909cc75bb2f8246c8394b1e57da085950e8e518e072b01c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086f62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb486982508145454ce325ddbe47a25d4ec3d23119330000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c6982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000000000000000 +test_single_encoding_strategy_usv4_eth_out:30ace1b100000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f81490b4f29aade00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041789189b52cad14de16609a7b3fc94f5147c615ce10ab049912ba6c09dc59c51741ebcd9d7b778b44e2e855084f1abc02e114e6d2f50bca048a0da3d42ca415691b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c0000000000000000000000000000000000000000 +test_sequential_swap_strategy_encoder:51bcc7b60000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 test_single_swap_strategy_encoder_no_permit2:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000058e7926ee858a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 test_single_swap_strategy_encoder_no_transfer_in:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000058e7926ee858a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 -test_single_encoding_strategy_usv4_eth_in:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000007e0a55d4322a6e93c2379c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000412b2ccc98803d3057de86d25f9dda53a5e41c5200ff6355b7627e6ce570adfe555a5fed532f95ca6c0a189594a7eef964398c5dbbddf2931b111c3888ec57301e1b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc26982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000 -test_sequential_strategy_cyclic_swap:51bcc7b60000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ec8f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004133e8a83bf0ab458c292bf06e076844c9a2b2fbfbd2fbf1e9b13dd7c79a594597378fd61fe3b24def396d55636a50eb5c847367b1c1108e99c4f31172af84d6481c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f5640010000692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000000000 +test_single_encoding_strategy_usv4_eth_in:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000007e0a55d4322a6e93c2379c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000411bf7b79c822f5f404145024a647ecd76e0fde3243751f092a80fc01ed322694413c889968802c6ccc2cc0fd912070d7aff913a517e30f532bdc53767ac340e901c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc26982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000 +test_sequential_strategy_cyclic_swap:51bcc7b60000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ec8f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f5640010000692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000000000 test_single_encoding_strategy_curve_st_eth:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000691d1499e622d69689cdf9004d05ec547d650ff211eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeae7ab96520de3a18e5e111b5eaab095312d7fe84dc24316b9ae028f1497c275eb9192a3ea0f670220100010002cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000 -test_single_swap_strategy_encoder:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000006d70b85442ed96492800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d86a1edea6862ef9c8df971417410c87f6cf21d40542760db70fdd800b82f7c9722702f735433a898b8cc208b131cd865589d11f5028da2b9866667e0d38bfd51b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 +test_single_swap_strategy_encoder:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000006d70b85442ed96492800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 test_single_encoding_strategy_curve:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000055c08ca52497e2f1534b59e2917bf524d4765257000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000691d1499e622d69689cdf9004d05ec547d650ff21155c08ca52497e2f1534b59e2917bf524d4765257c02aaa39b223fe8d0a0e5c4f27ead9083c756cc277146b0a1d08b6844376df6d9da99ba7f1b19e710201000100cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000 -test_single_swap_strategy_encoder_unwrap:30ace1b10000000000000000000000000000000000000000000000a2a15d09519be000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000a2a15d09519be0000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000410bc65c37597bc37547d90657196ff352b0d9d80df5435b74efb5fda78c203a047fdc53c8f77c800db59ddda08e3479e64cb706cc7296d4f68cb0ab46f03e8ff91b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000000000000000000000000000000 -test_single_swap_strategy_encoder_wrap:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000059fb7d3830e6fc064b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000412b2ccc98803d3057de86d25f9dda53a5e41c5200ff6355b7627e6ce570adfe555a5fed532f95ca6c0a189594a7eef964398c5dbbddf2931b111c3888ec57301e1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 -test_split_output_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005e703f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004133e8a83bf0ab458c292bf06e076844c9a2b2fbfbd2fbf1e9b13dd7c79a594597378fd61fe3b24def396d55636a50eb5c847367b1c1108e99c4f31172af84d6481c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48b4e16d0168e52d35cacd2c6185b44281ec28c9dc3ede3eca2a72b3aecc820e955b36f38437d013950100006e01009999992e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc288e6a0c2ddd26feeb64f039a2c41296fcb3f56400001006e01000000002e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000 -test_split_input_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ef619b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f300000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004133e8a83bf0ab458c292bf06e076844c9a2b2fbfbd2fbf1e9b13dd7c79a594597378fd61fe3b24def396d55636a50eb5c847367b1c1108e99c4f31172af84d6481c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139006e00019999992e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f56400100006e00010000002e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb83ede3eca2a72b3aecc820e955b36f38437d013958ad599c3a0ff1de082011efddc58f1908eb6e6d80100005701000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2b4e16d0168e52d35cacd2c6185b44281ec28c9dccd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000100000000000000 -test_split_swap_strategy_encoder:7c5538460000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000685c1eeb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f3000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041d86a1edea6862ef9c8df971417410c87f6cf21d40542760db70fdd800b82f7c9722702f735433a898b8cc208b131cd865589d11f5028da2b9866667e0d38bfd51b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164005700028000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d013950000005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d9403ede3eca2a72b3aecc820e955b36f38437d013950000005702030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fae461ca67b15dc8dc81ce7615e0320da1a9ab8d5cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20101005701030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2010100000000000000000000000000000000000000000000000000000000 +test_single_swap_strategy_encoder_unwrap:30ace1b10000000000000000000000000000000000000000000000a2a15d09519be000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000a2a15d09519be00000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000413796132ffd63cf75eebcd5dcf7feeab5699d611b740bc8b6017cf94e22d1d8bd2d7cc2478f2a89e53b985a7216a1615229f2ad6454c52770589cfa8cc5d4b6281b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000000000000000000000000000000 +test_single_swap_strategy_encoder_wrap:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000059fb7d3830e6fc064b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000411bf7b79c822f5f404145024a647ecd76e0fde3243751f092a80fc01ed322694413c889968802c6ccc2cc0fd912070d7aff913a517e30f532bdc53767ac340e901c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 +test_split_output_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005e703f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48b4e16d0168e52d35cacd2c6185b44281ec28c9dc3ede3eca2a72b3aecc820e955b36f38437d013950100006e01009999992e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc288e6a0c2ddd26feeb64f039a2c41296fcb3f56400001006e01000000002e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000 +test_split_input_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ef619b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139006e00019999992e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f56400100006e00010000002e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb83ede3eca2a72b3aecc820e955b36f38437d013958ad599c3a0ff1de082011efddc58f1908eb6e6d80100005701000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2b4e16d0168e52d35cacd2c6185b44281ec28c9dccd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000100000000000000 +test_split_swap_strategy_encoder:7c5538460000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164005700028000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d013950000005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d9403ede3eca2a72b3aecc820e955b36f38437d013950000005702030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fae461ca67b15dc8dc81ce7615e0320da1a9ab8d5cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20101005701030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2010100000000000000000000000000000000000000000000000000000000 test_uniswap_v3_curve:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed000000691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae460301000102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000 -test_multi_protocol:51bcc7b600000000000000000000000000000000000000000000005150ae84a8cdf000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2958f36da71a9200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000005150ae84a8cdf0000000000000000000000000000000000000000000000000000000000000685c1eec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d0139500000000000000000000000000000000000000000000000000000000683498f400000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041aa54dffe78286acee8d7bc6c0adf055c63efb57333eaf9684f8d5dac70a81c342970954434cfaf8c5beeeccb4ab9ed1c2dd8ae2e3031fb689b42e938d5c7841a1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021400525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e3ede3eca2a72b3aecc820e955b36f38437d01395010200691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae4603010001023ede3eca2a72b3aecc820e955b36f38437d013950071a0cb889707d426a7a386870a03bc70d1b0697598013ede3eca2a72b3aecc820e955b36f38437d01395dac17f958d2ee523a2206206994597c13d831ec7a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001a36e2eb1c43200000032006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c000000000000000000000000 +test_multi_protocol:51bcc7b600000000000000000000000000000000000000000000005150ae84a8cdf000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2958f36da71a9200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000005150ae84a8cdf00000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d02832c283119db438db7727707d112e7322db988623a063330adef6275aa284185dc73f2daec2a9b20b752f3a3355c9915ceac05fef5fddd65ba835bc3ed1991c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021400525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e3ede3eca2a72b3aecc820e955b36f38437d01395010200691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae4603010001023ede3eca2a72b3aecc820e955b36f38437d013950071a0cb889707d426a7a386870a03bc70d1b0697598013ede3eca2a72b3aecc820e955b36f38437d01395dac17f958d2ee523a2206206994597c13d831ec7a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001a36e2eb1c43200000032006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c000000000000000000000000 test_encode_balancer_v2:c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2ba100000625a3754423978a60c9317c58a424e3d5c6ee304399dbdb9c8ef030ab642b10820db8f560002000000000000000000141d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e0102 test_ekubo_encode_swap_multi:01ca4f73fe97d0b987a0d12b39bbd562c779bab6f60000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4851d02a5948496a67827242eabc5725531342527c000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000001a36e2eb1c43200000032 test_encode_uniswap_v4_sequential_swap:4c9edd5852cd905f086c759e8383e09bff1e68b32260fac5e5542a773aa44fbcfedf7c193bc2c5990101cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2dac17f958d2ee523a2206206994597c13d831ec70000640000012260fac5e5542a773aa44fbcfedf7c193bc2c599000bb800003c @@ -27,3 +27,5 @@ test_encode_uniswap_v4_simple_swap:4c9edd5852cd905f086c759e8383e09bff1e68b3dac17 test_single_encoding_strategy_maverick:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000040d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000051a4ad4f68d0b91cfd19687c881e50f3a00242828c40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f14cf6d2fe3e1b326114b07d22a6f6bb59e346c67cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 test_encode_maverick_v2:40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f14cf6d2fe3e1b326114b07d22a6f6bb59e346c671d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e01 test_encode_uniswap_v2:c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb111d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e0001 +test_encode_balancer_v3:7bc3485026ac48b6cf9baf0a377477fff5703af8c71ea051a5f82c67adcf634c36ffe6334793d24c85b2b559bc2d21104c4defdd6efca8a20343361d011d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e +test_single_encoding_strategy_balancer_v3:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000097ffedb80d4b2ca6105a07a4d90eb739c45a66600000000000000000000000030881baa943777f92dc934d53d3bfdf33382cab300000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000006503a6a84cd762d9707a21605b548aaab891562aab097ffedb80d4b2ca6105a07a4d90eb739c45a66630881baa943777f92dc934d53d3bfdf33382cab3f028ac624074d6793c36dc8a06ecec0f5a39a71800cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000000000000000000000000000000000 diff --git a/foundry/test/executors/BalancerV3Executor.t.sol b/foundry/test/executors/BalancerV3Executor.t.sol index 51b2e74..b7ad1e9 100644 --- a/foundry/test/executors/BalancerV3Executor.t.sol +++ b/foundry/test/executors/BalancerV3Executor.t.sol @@ -101,4 +101,23 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { assertGt(balanceAfter, balanceBefore); assertEq(balanceAfter - balanceBefore, amountOut); } + + function testSwapIntegration() public { + bytes memory protocolData = + loadCallDataFromFile("test_encode_balancer_v3"); + + uint256 amountIn = 10 ** 18; + address waEthUSDT_ADDR = + address(0x7Bc3485026Ac48b6cf9BaF0A377477Fff5703Af8); + address aaveGHO_ADDR = + address(0xC71Ea051a5F82c67ADcF634c36FFE6334793D24C); + deal(waEthUSDT_ADDR, address(balancerV3Exposed), amountIn); + uint256 balanceBefore = IERC20(aaveGHO_ADDR).balanceOf(BOB); + + uint256 amountOut = balancerV3Exposed.swap(amountIn, protocolData); + + uint256 balanceAfter = IERC20(aaveGHO_ADDR).balanceOf(BOB); + assertGt(balanceAfter, balanceBefore); + assertEq(balanceAfter - balanceBefore, amountOut); + } } From c03df8aa1eae137f1ac4bb8f28c6cb96fdd86246 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 6 Jun 2025 10:31:37 +0100 Subject: [PATCH 11/14] feat: Add balancer v3 to transfer optimization constants Also added a getForkBlock() on TychoRouterTestSetup. Moved the router balancer test inside the Balancer file and created a TychoRouterForBalancerV3Test to wrap it Took 1 hour 10 minutes Took 21 seconds --- .../test/TychoRouterProtocolIntegration.t.sol | 21 ----- foundry/test/TychoRouterTestSetup.sol | 6 +- foundry/test/assets/calldata.txt | 28 ++++--- .../test/executors/BalancerV3Executor.t.sol | 56 ++++++++++++- src/encoding/evm/constants.rs | 2 + src/encoding/evm/tycho_encoders.rs | 79 +++++++++++++++++++ 6 files changed, 154 insertions(+), 38 deletions(-) diff --git a/foundry/test/TychoRouterProtocolIntegration.t.sol b/foundry/test/TychoRouterProtocolIntegration.t.sol index 58b99d4..2e481c5 100644 --- a/foundry/test/TychoRouterProtocolIntegration.t.sol +++ b/foundry/test/TychoRouterProtocolIntegration.t.sol @@ -293,25 +293,4 @@ contract TychoRouterTestProtocolIntegration is TychoRouterTestSetup { vm.stopPrank(); } - - function testSingleBalancerV3Integration() public { - address steakUSDTlite = - address(0x097FFEDb80d4b2Ca6105a07a4D90eB739C45A666); - address steakUSDR = address(0x30881Baa943777f92DC934d53D3bFdF33382cab3); - deal(steakUSDTlite, ALICE, 1 ether); - uint256 balanceBefore = IERC20(steakUSDTlite).balanceOf(ALICE); - - vm.startPrank(ALICE); - IERC20(steakUSDTlite).approve(tychoRouterAddr, type(uint256).max); - - bytes memory callData = - loadCallDataFromFile("test_single_encoding_strategy_balancer_v3"); - (bool success,) = tychoRouterAddr.call(callData); - - uint256 balanceAfter = IERC20(steakUSDR).balanceOf(ALICE); - - assertTrue(success, "Call Failed"); - assertGe(balanceAfter - balanceBefore, 999725); - assertEq(IERC20(steakUSDR).balanceOf(tychoRouterAddr), 0); - } } diff --git a/foundry/test/TychoRouterTestSetup.sol b/foundry/test/TychoRouterTestSetup.sol index c8458a2..925fafa 100644 --- a/foundry/test/TychoRouterTestSetup.sol +++ b/foundry/test/TychoRouterTestSetup.sol @@ -70,8 +70,12 @@ contract TychoRouterTestSetup is Constants, Permit2TestHelper, TestUtils { BalancerV3Executor public balancerV3Executor; MockERC20[] tokens; + function getForkBlock() public view virtual returns (uint256) { + return 22082754; + } + function setUp() public { - uint256 forkBlock = 22082754; + uint256 forkBlock = getForkBlock(); vm.createSelectFork(vm.rpcUrl("mainnet"), forkBlock); vm.startPrank(ADMIN); diff --git a/foundry/test/assets/calldata.txt b/foundry/test/assets/calldata.txt index b7a9efe..ca1422a 100644 --- a/foundry/test/assets/calldata.txt +++ b/foundry/test/assets/calldata.txt @@ -3,23 +3,25 @@ test_single_encoding_strategy_ekubo:5c4b639c000000000000000000000000000000000000 test_uniswap_v3_uniswap_v3:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed000000692e234dae75c793f67a35089c9d99245e1c58470b2260fac5e5542a773aa44fbcfedf7c193bc2c599a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc299ac8ca7087fa4a2a1fb6357269965a2014abc35010100000000000000000000 test_balancer_v2_uniswap_v2:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000c80072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e004375dff511095cc5a197a54140a24efef3a416010000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 test_sequential_swap_strategy_encoder_no_permit2:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 -test_single_encoding_strategy_usv4_grouped_swap:30ace1b1000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000005064ff624d54346285543f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000412f6c0e04e8e051f66af676ae2635405bf8b5148a3266f9b84b5faa9e777dfb23140bf89c7d15dcfd7dc909cc75bb2f8246c8394b1e57da085950e8e518e072b01c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086f62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb486982508145454ce325ddbe47a25d4ec3d23119330000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c6982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000000000000000 -test_single_encoding_strategy_usv4_eth_out:30ace1b100000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f81490b4f29aade00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041789189b52cad14de16609a7b3fc94f5147c615ce10ab049912ba6c09dc59c51741ebcd9d7b778b44e2e855084f1abc02e114e6d2f50bca048a0da3d42ca415691b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c0000000000000000000000000000000000000000 -test_sequential_swap_strategy_encoder:51bcc7b60000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 +test_single_encoding_strategy_usv4_grouped_swap:30ace1b1000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000005064ff624d54346285543f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000003b9aca0000000000000000000000000000000000000000000000000000000000686a405400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5c00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041e497fb5e24723b35cf1da883013e8e640fb0414c44ac4fb8ad8a69e307b4805167f6036b336255424472df199e5669771b850aad946be487d98736c657a986a01c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086f62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb486982508145454ce325ddbe47a25d4ec3d23119330000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c6982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000000000000000 +test_single_encoding_strategy_usv4_eth_out:30ace1b100000000000000000000000000000000000000000000000000000000b2d05e00000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f81490b4f29aade00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000b2d05e0000000000000000000000000000000000000000000000000000000000686a405400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5c00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041986db71b95d40af4bcbbb7ddf2e4d866d088152df332e39c2b1051d18c58505316f3786fc6c4cfc93249050c4a3cec37df095483225592f8ce7b27c7b43b7f431b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c0000000000000000000000000000000000000000 +test_sequential_swap_strategy_encoder:51bcc7b60000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041328f1b72977c3d7dc15d43d58b8f6aa239c324010606ea31df41c7a526b7fed62a46fd97fe46d6da9652908684a0d63b3a2759a3076d6cfe8df35f4df5d0476a1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a800525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d940004375dff511095cc5a197a54140a24efef3a416000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20102000000000000000000000000000000000000000000000000 test_single_swap_strategy_encoder_no_permit2:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000058e7926ee858a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 test_single_swap_strategy_encoder_no_transfer_in:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000058e7926ee858a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 -test_single_encoding_strategy_usv4_eth_in:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000007e0a55d4322a6e93c2379c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000411bf7b79c822f5f404145024a647ecd76e0fde3243751f092a80fc01ed322694413c889968802c6ccc2cc0fd912070d7aff913a517e30f532bdc53767ac340e901c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc26982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000 -test_sequential_strategy_cyclic_swap:51bcc7b60000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ec8f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f5640010000692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000000000 +test_single_encoding_strategy_usv4_eth_in:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330000000000000000000000000000000000000000007e0a55d4322a6e93c2379c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000686a405400000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5c00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004192a6c559fa614c7d9a7249d7638bcabea4c78defc083b12464a4e3a6216ef04b32c7cae804e833e0643576141c5cebb71981e224c2152fb7cb4b1d9c50e04ed71b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006cf62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000006982508145454ce325ddbe47a25d4ec3d23119330102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc26982508145454ce325ddbe47a25d4ec3d23119330061a80001f40000000000000000000000000000000000000000 +test_sequential_strategy_cyclic_swap:51bcc7b60000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ec8f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041f3c69f1600d565283b2376f597d795451ecbe0fc19a4cc54bc8b8706a74f24db2434c920084579c4ff7a0220f90f9dd2d1995e1739c2fd68eb6a898224a9eb721c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f5640010000692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000000000 test_single_encoding_strategy_curve_st_eth:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000691d1499e622d69689cdf9004d05ec547d650ff211eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeae7ab96520de3a18e5e111b5eaab095312d7fe84dc24316b9ae028f1497c275eb9192a3ea0f670220100010002cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000 -test_single_swap_strategy_encoder:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000006d70b85442ed96492800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 +test_single +test_encode_uniswap_v4_sequential_swap:4c9edd5852cd905f086c759e8383e09bff1e68b32260fac5e5542a773aa44fbcfedf7c193bc2c5990101cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2dac17f958d2ee523a2206206994597c13d831ec70000640000012260fac5e5542a773aa44fbcfedf7c193bc2c599000bb800003c +6d70b85442ed96492800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 test_single_encoding_strategy_curve:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000055c08ca52497e2f1534b59e2917bf524d4765257000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000691d1499e622d69689cdf9004d05ec547d650ff21155c08ca52497e2f1534b59e2917bf524d4765257c02aaa39b223fe8d0a0e5c4f27ead9083c756cc277146b0a1d08b6844376df6d9da99ba7f1b19e710201000100cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000 -test_single_swap_strategy_encoder_unwrap:30ace1b10000000000000000000000000000000000000000000000a2a15d09519be000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000a2a15d09519be00000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000413796132ffd63cf75eebcd5dcf7feeab5699d611b740bc8b6017cf94e22d1d8bd2d7cc2478f2a89e53b985a7216a1615229f2ad6454c52770589cfa8cc5d4b6281b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000000000000000000000000000000 -test_single_swap_strategy_encoder_wrap:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000059fb7d3830e6fc064b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000411bf7b79c822f5f404145024a647ecd76e0fde3243751f092a80fc01ed322694413c889968802c6ccc2cc0fd912070d7aff913a517e30f532bdc53767ac340e901c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 -test_split_output_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005e703f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48b4e16d0168e52d35cacd2c6185b44281ec28c9dc3ede3eca2a72b3aecc820e955b36f38437d013950100006e01009999992e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc288e6a0c2ddd26feeb64f039a2c41296fcb3f56400001006e01000000002e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000 -test_split_input_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ef619b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041d809e33d2f81a6a3a7b9f7a582bbbbd83466772b11ef563db423fc483903df982dda84e0c7e4f7bcae66d8f505d2e650bb8dc920fbe52c0d51d683db0c8146321c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139006e00019999992e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f56400100006e00010000002e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb83ede3eca2a72b3aecc820e955b36f38437d013958ad599c3a0ff1de082011efddc58f1908eb6e6d80100005701000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2b4e16d0168e52d35cacd2c6185b44281ec28c9dccd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000100000000000000 -test_split_swap_strategy_encoder:7c5538460000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041752ca399237fc5086ef89d5f6dabecfb4b43c0753ecfb7020a6a86045db423fd3be9565f79b511fe93f55f76f61b1ac8d786b04051110ca6cbe10bbf69901b871c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164005700028000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d013950000005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d9403ede3eca2a72b3aecc820e955b36f38437d013950000005702030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fae461ca67b15dc8dc81ce7615e0320da1a9ab8d5cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20101005701030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2010100000000000000000000000000000000000000000000000000000000 +test_single_swap_strategy_encoder_unwrap:30ace1b10000000000000000000000000000000000000000000000a2a15d09519be000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000a2a15d09519be0000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041254a88ad83ac172ad1e7566ebf02752075226a044f6235aadf1d226fe742f9fd41fb89b789447131d7132c244747d709511aff5b39fb14be7b610d748ee751c61c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000000000000000000000000000000 +test_single_swap_strategy_encoder_wrap:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000059fb7d3830e6fc064b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041917935f4a467322cf1123b481d57d9400f38036bf011df8963f4ab680ab558d9261015e667c3ed9556ee76b4c86fd158eb561eac78658bd0e4622374109481881b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200010000000000000000000000000000 +test_split_output_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005e703f4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041f3c69f1600d565283b2376f597d795451ecbe0fc19a4cc54bc8b8706a74f24db2434c920084579c4ff7a0220f90f9dd2d1995e1739c2fd68eb6a898224a9eb721c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48b4e16d0168e52d35cacd2c6185b44281ec28c9dc3ede3eca2a72b3aecc820e955b36f38437d013950100006e01009999992e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc288e6a0c2ddd26feeb64f039a2c41296fcb3f56400001006e01000000002e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000bb8cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc28ad599c3a0ff1de082011efddc58f1908eb6e6d8000100000000000000 +test_split_input_cyclic_swap:7c5538460000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005ef619b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041f3c69f1600d565283b2376f597d795451ecbe0fc19a4cc54bc8b8706a74f24db2434c920084579c4ff7a0220f90f9dd2d1995e1739c2fd68eb6a898224a9eb721c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000139006e00019999992e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f43ede3eca2a72b3aecc820e955b36f38437d0139588e6a0c2ddd26feeb64f039a2c41296fcb3f56400100006e00010000002e234dae75c793f67a35089c9d99245e1c58470ba0b86991c6218b36c1d19d4a2e9eb0ce3606eb48c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb83ede3eca2a72b3aecc820e955b36f38437d013958ad599c3a0ff1de082011efddc58f1908eb6e6d80100005701000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2b4e16d0168e52d35cacd2c6185b44281ec28c9dccd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000100000000000000 +test_split_swap_strategy_encoder:7c5538460000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000018f61ec000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041328f1b72977c3d7dc15d43d58b8f6aa239c324010606ea31df41c7a526b7fed62a46fd97fe46d6da9652908684a0d63b3a2759a3076d6cfe8df35f4df5d0476a1b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164005700028000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d013950000005700010000005615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2bb2b8038a1640196fbe3e38816f3e67cba72d9403ede3eca2a72b3aecc820e955b36f38437d013950000005702030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fae461ca67b15dc8dc81ce7615e0320da1a9ab8d5cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20101005701030000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f2260fac5e5542a773aa44fbcfedf7c193bc2c599004375dff511095cc5a197a54140a24efef3a416cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2010100000000000000000000000000000000000000000000000000000000 test_uniswap_v3_curve:e21dd0d30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000d600692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed000000691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae460301000102cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000 -test_multi_protocol:51bcc7b600000000000000000000000000000000000000000000005150ae84a8cdf000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2958f36da71a9200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000005150ae84a8cdf00000000000000000000000000000000000000000000000000000000000006869398600000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006841b38e00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041d02832c283119db438db7727707d112e7322db988623a063330adef6275aa284185dc73f2daec2a9b20b752f3a3355c9915ceac05fef5fddd65ba835bc3ed1991c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021400525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e3ede3eca2a72b3aecc820e955b36f38437d01395010200691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae4603010001023ede3eca2a72b3aecc820e955b36f38437d013950071a0cb889707d426a7a386870a03bc70d1b0697598013ede3eca2a72b3aecc820e955b36f38437d01395dac17f958d2ee523a2206206994597c13d831ec7a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001a36e2eb1c43200000032006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c000000000000000000000000 +test_multi_protocol:51bcc7b600000000000000000000000000000000000000000000005150ae84a8cdf000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a2958f36da71a9200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000005150ae84a8cdf0000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041c450ffd17649e61fb8e42524c36b4409cb8cc512fb25d01aa1018fe2c839283b046e1f386e72fc19bb9b4835fe2f7a37adf3f1764b8d38fd4bff72a7dc371c8c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021400525615deb798bb3e4dfa0139dfa1b3d433cc23b72f6b175474e89094c44da98b954eedeac495271d0fa478c2975ab1ea89e8196811f51a7b7ade33eb113ede3eca2a72b3aecc820e955b36f38437d0139501000072c7183455a4c133ae270771860664b6b7ec320bb1c02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599a6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e3ede3eca2a72b3aecc820e955b36f38437d01395010200691d1499e622d69689cdf9004d05ec547d650ff2112260fac5e5542a773aa44fbcfedf7c193bc2c599dac17f958d2ee523a2206206994597c13d831ec7d51a44d3fae010294c616388b506acda1bfaae4603010001023ede3eca2a72b3aecc820e955b36f38437d013950071a0cb889707d426a7a386870a03bc70d1b0697598013ede3eca2a72b3aecc820e955b36f38437d01395dac17f958d2ee523a2206206994597c13d831ec7a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001a36e2eb1c43200000032006cf62849f9a0b5bf2913b396098f7c7019b51a820aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000001cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000bb800003c000000000000000000000000 test_encode_balancer_v2:c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2ba100000625a3754423978a60c9317c58a424e3d5c6ee304399dbdb9c8ef030ab642b10820db8f560002000000000000000000141d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e0102 test_ekubo_encode_swap_multi:01ca4f73fe97d0b987a0d12b39bbd562c779bab6f60000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4851d02a5948496a67827242eabc5725531342527c000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000001a36e2eb1c43200000032 test_encode_uniswap_v4_sequential_swap:4c9edd5852cd905f086c759e8383e09bff1e68b32260fac5e5542a773aa44fbcfedf7c193bc2c5990101cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2dac17f958d2ee523a2206206994597c13d831ec70000640000012260fac5e5542a773aa44fbcfedf7c193bc2c599000bb800003c @@ -29,3 +31,5 @@ test_encode_maverick_v2:40d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f14cf6d2fe3e1b326 test_encode_uniswap_v2:c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb111d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e0001 test_encode_balancer_v3:7bc3485026ac48b6cf9baf0a377477fff5703af8c71ea051a5f82c67adcf634c36ffe6334793d24c85b2b559bc2d21104c4defdd6efca8a20343361d011d96f2f6bef1202e4ce1ff6dad0c2cb002861d3e test_single_encoding_strategy_balancer_v3:5c4b639c0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000097ffedb80d4b2ca6105a07a4d90eb739c45a66600000000000000000000000030881baa943777f92dc934d53d3bfdf33382cab300000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000006503a6a84cd762d9707a21605b548aaab891562aab097ffedb80d4b2ca6105a07a4d90eb739c45a66630881baa943777f92dc934d53d3bfdf33382cab3f028ac624074d6793c36dc8a06ecec0f5a39a71800cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000000000000000000000000000000000 +test_uniswap_v3_balancer_v3:e21dd0d3000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000004a220e6096b25eadb88358cb44068a324825467500000000000000000000000000000000000000000000000000000000018f61ec00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000d200692e234dae75c793f67a35089c9d99245e1c58470bc02aaa39b223fe8d0a0e5c4f27ead9083c756cc22260fac5e5542a773aa44fbcfedf7c193bc2c599000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed0000006503a6a84cd762d9707a21605b548aaab891562aab2260fac5e5542a773aa44fbcfedf7c193bc2c5994a220e6096b25eadb88358cb44068a3248254675571bea0e99e139cd0b6b7d9352ca872dfe0d72dd01cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc20000000000000000000000000000 +test_single_swap_strategy_encoder:30ace1b10000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000006d70b85442ed96492800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc2000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000686a405500000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d01395000000000000000000000000000000000000000000000000000000006842ba5d00000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000041328f1b72977c3d7dc15d43d58b8f6aa239c324010606ea31df41c7a526b7fed62a46fd97fe46d6da9652908684a0d63b3a2759a3076d6cfe8df35f4df5d0476a1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000525615deb798bb3e4dfa0139dfa1b3d433cc23b72fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2a478c2975ab1ea89e8196811f51a7b7ade33eb11cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000 diff --git a/foundry/test/executors/BalancerV3Executor.t.sol b/foundry/test/executors/BalancerV3Executor.t.sol index b7ad1e9..c8ff878 100644 --- a/foundry/test/executors/BalancerV3Executor.t.sol +++ b/foundry/test/executors/BalancerV3Executor.t.sol @@ -1,10 +1,9 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.26; -import "../../src/executors/BalancerV3Executor.sol"; -import "../TestUtils.sol"; -import "@src/executors/BalancerV3Executor.sol"; -import {Constants} from "../Constants.sol"; +import "../TychoRouterTestSetup.sol"; +import {BalancerV3Executor__InvalidDataLength} from + "../../src/executors/BalancerV3Executor.sol"; contract BalancerV3ExecutorExposed is BalancerV3Executor { constructor(address _permit2) BalancerV3Executor(_permit2) {} @@ -121,3 +120,52 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { assertEq(balanceAfter - balanceBefore, amountOut); } } + +contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { + function getForkBlock() public pure override returns (uint256) { + return 22644371; + } + + function testSingleBalancerV3Integration() public { + address steakUSDTlite = + address(0x097FFEDb80d4b2Ca6105a07a4D90eB739C45A666); + address steakUSDR = address(0x30881Baa943777f92DC934d53D3bFdF33382cab3); + deal(steakUSDTlite, ALICE, 1 ether); + uint256 balanceBefore = IERC20(steakUSDTlite).balanceOf(ALICE); + + vm.startPrank(ALICE); + IERC20(steakUSDTlite).approve(tychoRouterAddr, type(uint256).max); + + bytes memory callData = + loadCallDataFromFile("test_single_encoding_strategy_balancer_v3"); + (bool success,) = tychoRouterAddr.call(callData); + + uint256 balanceAfter = IERC20(steakUSDR).balanceOf(ALICE); + + assertTrue(success, "Call Failed"); + assertGe(balanceAfter - balanceBefore, 999725); + assertEq(IERC20(steakUSDR).balanceOf(tychoRouterAddr), 0); + } + + function testUSV3BalancerV3Integration() public { + // It tests if we can optimize the in transfer to balancer v3 (we can not) + // WETH ───(USV3)──> WBTC ───(balancer v3)──> QNT + address QNT_ADDR = address(0x4a220E6096B25EADb88358cb44068A3248254675); + deal(WETH_ADDR, ALICE, 0.01 ether); + uint256 balanceBefore = IERC20(QNT_ADDR).balanceOf(ALICE); + + vm.startPrank(ALICE); + IERC20(WETH_ADDR).approve(tychoRouterAddr, type(uint256).max); + bytes memory callData = + loadCallDataFromFile("test_uniswap_v3_balancer_v3"); + (bool success,) = tychoRouterAddr.call(callData); + + vm.stopPrank(); + + uint256 balanceAfter = IERC20(QNT_ADDR).balanceOf(ALICE); + + assertTrue(success, "Call Failed"); + assertEq(balanceAfter - balanceBefore, 219116541871727003); + assertEq(IERC20(WETH_ADDR).balanceOf(tychoRouterAddr), 0); + } +} diff --git a/src/encoding/evm/constants.rs b/src/encoding/evm/constants.rs index 1a51fdf..c47424e 100644 --- a/src/encoding/evm/constants.rs +++ b/src/encoding/evm/constants.rs @@ -31,6 +31,7 @@ pub static IN_TRANSFER_REQUIRED_PROTOCOLS: LazyLock> = Laz set.insert("uniswap_v4"); set.insert("ekubo_v2"); set.insert("vm:maverick_v2"); + set.insert("vm:balancer_v3"); set }); @@ -46,5 +47,6 @@ pub static CALLBACK_CONSTRAINED_PROTOCOLS: LazyLock> = Laz set.insert("pancakeswap_v3"); set.insert("uniswap_v4"); set.insert("ekubo_v2"); + set.insert("vm:balancer_v3"); set }); diff --git a/src/encoding/evm/tycho_encoders.rs b/src/encoding/evm/tycho_encoders.rs index 3f5b766..f70652c 100644 --- a/src/encoding/evm/tycho_encoders.rs +++ b/src/encoding/evm/tycho_encoders.rs @@ -2472,6 +2472,85 @@ mod tests { let hex_calldata = encode(&calldata); write_calldata_to_file("test_multi_protocol", hex_calldata.as_str()); } + + #[test] + fn test_uniswap_v3_balancer_v3() { + // Note: This test does not assert anything. It is only used to obtain + // integration test data for our router solidity test. + // + // WETH ───(USV3)──> WBTC ───(balancer v3)──> QNT + + let weth = weth(); + let wbtc = + Bytes::from_str("0x2260fac5e5542a773aa44fbcfedf7c193bc2c599").unwrap(); + let qnt = + Bytes::from_str("0x4a220e6096b25eadb88358cb44068a3248254675").unwrap(); + + let swap_weth_wbtc = Swap { + component: ProtocolComponent { + id: "0xCBCdF9626bC03E24f779434178A73a0B4bad62eD".to_string(), + protocol_system: "uniswap_v3".to_string(), + static_attributes: { + let mut attrs = HashMap::new(); + attrs.insert( + "fee".to_string(), + Bytes::from(BigInt::from(3000).to_signed_bytes_be()), + ); + attrs + }, + ..Default::default() + }, + token_in: weth.clone(), + token_out: wbtc.clone(), + split: 0f64, + user_data: None, + }; + let swap_wbtc_qnt = Swap { + component: ProtocolComponent { + id: "0x571bea0e99e139cd0b6b7d9352ca872dfe0d72dd".to_string(), + protocol_system: "vm:balancer_v3".to_string(), + ..Default::default() + }, + token_in: wbtc.clone(), + token_out: qnt.clone(), + split: 0f64, + user_data: None, + }; + let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom); + + let solution = Solution { + exact_out: false, + given_token: weth, + given_amount: BigUint::from_str("1_0000000000000000").unwrap(), + checked_token: qnt, + checked_amount: BigUint::from_str("26173932").unwrap(), + sender: Bytes::from_str("0xcd09f75E2BF2A4d11F3AB23f1389FcC1621c0cc2") + .unwrap(), + receiver: Bytes::from_str("0xcd09f75E2BF2A4d11F3AB23f1389FcC1621c0cc2") + .unwrap(), + swaps: vec![swap_weth_wbtc, swap_wbtc_qnt], + ..Default::default() + }; + + let encoded_solution = encoder + .encode_solutions(vec![solution.clone()]) + .unwrap()[0] + .clone(); + + let calldata = encode_tycho_router_call( + eth_chain().id, + encoded_solution, + &solution, + UserTransferType::TransferFrom, + eth(), + None, + ) + .unwrap() + .data; + + let hex_calldata = encode(&calldata); + write_calldata_to_file("test_uniswap_v3_balancer_v3", hex_calldata.as_str()); + } } } From 941879d5d6657c1a3b5e7f77b2b8a4ab76e2f574 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 6 Jun 2025 17:01:48 +0100 Subject: [PATCH 12/14] fix(BalancerV3Executor): Slice callback data nicely Make a stricter data validation Took 35 minutes --- foundry/src/executors/BalancerV3Executor.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/foundry/src/executors/BalancerV3Executor.sol b/foundry/src/executors/BalancerV3Executor.sol index da79327..19aa12f 100644 --- a/foundry/src/executors/BalancerV3Executor.sol +++ b/foundry/src/executors/BalancerV3Executor.sol @@ -87,8 +87,9 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { returns (bytes memory result) { verifyCallback(data); - result = _swapCallback(data[68:]); - // Our general callback logic returns a not ABI encoded result. + // Remove the first 68 bytes 4 selector + 32 dataOffset + 32 dataLength and extra padding at the end + result = _swapCallback(data[68:181]); + // Our general callback logic returns a not ABI encoded result (see Dispatcher._callHandleCallbackOnExecutor). // However, the Vault expects the result to be ABI encoded. That is why we need to encode it here again. return abi.encode(result); } @@ -112,7 +113,7 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { address receiver ) { - if (data.length < 113) { + if (data.length != 113) { revert BalancerV3Executor__InvalidDataLength(); } From 4f5897700790a0eaeb88a78c909fb3835527acfb Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 6 Jun 2025 17:24:07 +0100 Subject: [PATCH 13/14] fix(BalancerV3Executor): Do data.length check at the beginning of swap Took 16 minutes --- foundry/src/executors/BalancerV3Executor.sol | 7 +++---- foundry/test/executors/BalancerV3Executor.t.sol | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/foundry/src/executors/BalancerV3Executor.sol b/foundry/src/executors/BalancerV3Executor.sol index 19aa12f..82c44ef 100644 --- a/foundry/src/executors/BalancerV3Executor.sol +++ b/foundry/src/executors/BalancerV3Executor.sol @@ -31,6 +31,9 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { payable returns (uint256 calculatedAmount) { + if (data.length != 81) { + revert BalancerV3Executor__InvalidDataLength(); + } bytes memory result = VAULT.unlock( abi.encodeCall( BalancerV3Executor.swapCallback, @@ -113,10 +116,6 @@ contract BalancerV3Executor is IExecutor, RestrictTransferFrom, ICallback { address receiver ) { - if (data.length != 113) { - revert BalancerV3Executor__InvalidDataLength(); - } - amountGiven = uint256(bytes32(data[0:32])); tokenIn = IERC20(address(bytes20(data[32:52]))); tokenOut = IERC20(address(bytes20(data[52:72]))); diff --git a/foundry/test/executors/BalancerV3Executor.t.sol b/foundry/test/executors/BalancerV3Executor.t.sol index c8ff878..3a1a182 100644 --- a/foundry/test/executors/BalancerV3Executor.t.sol +++ b/foundry/test/executors/BalancerV3Executor.t.sol @@ -68,7 +68,7 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { assertEq(receiver, BOB); } - function testDecodeParamsInvalidDataLength() public { + function testSwapInvalidDataLength() public { bytes memory invalidParams = abi.encodePacked( osETH_ADDR, waEthWETH_ADDR, @@ -77,7 +77,7 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { ); vm.expectRevert(BalancerV3Executor__InvalidDataLength.selector); - balancerV3Exposed.decodeParams(invalidParams); + balancerV3Exposed.swap(1 ether, invalidParams); } function testSwap() public { From b4dd4025d492a9e0dedc08353747251bb671cadd Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 6 Jun 2025 16:38:51 +0000 Subject: [PATCH 14/14] chore(release): 0.100.0 [skip ci] ## [0.100.0](https://github.com/propeller-heads/tycho-execution/compare/0.99.0...0.100.0) (2025-06-06) ### Features * Add balancer v3 to transfer optimization constants ([c03df8a](https://github.com/propeller-heads/tycho-execution/commit/c03df8aa1eae137f1ac4bb8f28c6cb96fdd86246)) * Add BalancerV3Encoder ([06ce28c](https://github.com/propeller-heads/tycho-execution/commit/06ce28c8fd580a981192941000c473841c79d8f7)) * Add integration tests for balancer v3 ([269e328](https://github.com/propeller-heads/tycho-execution/commit/269e328b5f9897714cfe533bf7b98444248cd62a)) ### Bug Fixes * **BalancerV3Executor:** Do data.length check at the beginning of swap ([4f58977](https://github.com/propeller-heads/tycho-execution/commit/4f5897700790a0eaeb88a78c909fb3835527acfb)) * **BalancerV3Executor:** Slice callback data nicely ([941879d](https://github.com/propeller-heads/tycho-execution/commit/941879d5d6657c1a3b5e7f77b2b8a4ab76e2f574)) --- CHANGELOG.md | 15 +++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4d705f..dde684a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## [0.100.0](https://github.com/propeller-heads/tycho-execution/compare/0.99.0...0.100.0) (2025-06-06) + + +### Features + +* Add balancer v3 to transfer optimization constants ([c03df8a](https://github.com/propeller-heads/tycho-execution/commit/c03df8aa1eae137f1ac4bb8f28c6cb96fdd86246)) +* Add BalancerV3Encoder ([06ce28c](https://github.com/propeller-heads/tycho-execution/commit/06ce28c8fd580a981192941000c473841c79d8f7)) +* Add integration tests for balancer v3 ([269e328](https://github.com/propeller-heads/tycho-execution/commit/269e328b5f9897714cfe533bf7b98444248cd62a)) + + +### Bug Fixes + +* **BalancerV3Executor:** Do data.length check at the beginning of swap ([4f58977](https://github.com/propeller-heads/tycho-execution/commit/4f5897700790a0eaeb88a78c909fb3835527acfb)) +* **BalancerV3Executor:** Slice callback data nicely ([941879d](https://github.com/propeller-heads/tycho-execution/commit/941879d5d6657c1a3b5e7f77b2b8a4ab76e2f574)) + ## [0.99.0](https://github.com/propeller-heads/tycho-execution/compare/0.98.0...0.99.0) (2025-06-05) diff --git a/Cargo.lock b/Cargo.lock index 4035068..de9c6fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4658,7 +4658,7 @@ dependencies = [ [[package]] name = "tycho-execution" -version = "0.99.0" +version = "0.100.0" dependencies = [ "alloy", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 138564f..7ea8f0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tycho-execution" -version = "0.99.0" +version = "0.100.0" edition = "2021" description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors." repository = "https://github.com/propeller-heads/tycho-execution"