chore: Move ple_encode to EVMStrategyEncoder

--- don't change below this line ---
ENG-4081 Took 3 minutes
This commit is contained in:
Diana Carvalho
2025-01-30 19:47:36 +00:00
parent 575c5bea5e
commit 01d101acb5
2 changed files with 13 additions and 17 deletions

View File

@@ -1,5 +1,4 @@
use alloy_primitives::{aliases::U24, Address, Keccak256, U256};
use alloy_sol_types::SolValue;
use num_bigint::BigUint;
use tycho_core::Bytes;
@@ -23,18 +22,6 @@ pub fn biguint_to_u256(value: &BigUint) -> U256 {
U256::from_be_slice(&bytes)
}
#[allow(dead_code)]
pub fn ple_encode(action_data_array: Vec<Vec<u8>>) -> Vec<u8> {
let mut encoded_action_data: Vec<u8> = Vec::new();
for action_data in action_data_array {
let args = (encoded_action_data, action_data.len() as u16, action_data);
encoded_action_data = args.abi_encode_packed();
}
encoded_action_data
}
#[allow(dead_code)]
pub fn encode_input(selector: &str, mut encoded_args: Vec<u8>) -> Vec<u8> {
let mut hasher = Keccak256::new();