- The util function was previously expecting a value between 0 and 100, which we felt was a weird UI.
- In integration test - make sure we spent all input tokens
- Use Alice's PK to match our router test, set her as the receiver too
- Component id should be a usv2 pool
- Use our router test's router address as the test's router address
- Use our test's contract (address(this)) as the sender
Because of the renaming, git couldn't identify the new files and handle the conflicts gracefully.
Copied implementation for ExecutorStrategyEncoder from main
Rollbacked on decision to encode the executor address and selector inside the SwapEncoders. This is only necessary for certain strategies. So it should be done at the strategy level
--- don't change below this line ---
ENG-4081 Took 35 minutes
Don't make selector() a member of the StrategyEncoder trait. It is needed only for certain strategies. The strategy should manage it itself.
--- don't change below this line ---
ENG-4081 Took 17 minutes
This was confusing me when I had all of them open at the same time. Better to be extra explicit
--- don't change below this line ---
ENG-4081 Took 2 minutes
Pass the signer's private key as a string around and only create a PrivateKeySigner inside Permit2 (where it's needed)
Use tycho-core Chain instead of Alloy ChainID. Create a temp method to convert between them
Create a EVMSwapEncoder that implements the executor_selector (that is evm specific)
--- don't change below this line ---
ENG-4081 Took 1 hour 7 minutes
The strategy works as follows:
- Manage approvals needed
- Compute min amount (if check amount is any):
- if slippage is defined, apply slippage on the expected amount and take the min value between that and the check amount
- if not, it's just the check amount
- Iterate through the swaps
- call the corresponding swap encoder to encode the swap
- add swap header (tokens indexes and split)
- ple encode the swaps
- Add extra inputs (amounts, token addresses, min amount, (un)wrap, number of tokens and receiver)
Misc:
- Move executor address and selector encoding inside the SwapEncoder
- Add default executor_selector to SwapEncoder
- Pass router address inside the SplitSwapStrategyEncoder
- Move Permit2 inside the SplitSwapStrategyEncoder. It is a responsibility and a specificity of the strategy to need permit2 approvals
--- don't change below this line ---
ENG-4081 Took 1 hour 21 minutes
When will this not be the router address that we use for approvals? It will always be the router address. address_for_approvals sounds to me very vague (which approvals?).
No more SingleSwapStrategyEncoder or SequentialStrategyEncoder
No more batch routing (so no need for batch permits as well). If multiple solutions are found, return multiple Transactions
--- don't change below this line ---
ENG-4076 <#DTT#>
- Move all evm code inside evm directory
- StrategyEncoder:
- Kept StrategyEncoder trait but created a new one: EVMStrategyEncoder to implement encode_protocol_header (that is evm specific).
- All StrategyEncoders implement both traits now
- Renamed DefaultStrategySelector -> EVMStrategySelector
- RouterEncoder:
- Created a RouterEncoder trait and a EVMRouterEncoder that implements it
- Moved utils inside evm directory as well
- Renamed config.json -> executor_addresses.json and moved it to a higher config directory
- Make alloy optional and dependent on the evm feature gate
--- don't change below this line ---
ENG-4075 <#DTT#>