feat: Remove router_address from Solution, set default
- The router address can be set when creating the SplitSwapStrategy, which now takes an Option<Bytes> as input during initialization (another breaking interface change) - This change allows us to change our router address in the future with minimal effect on the users. Users should only pass the router address in the split swap initialization if they intend to use their own router for execution. - This change also means that the router address does not need to be passed with the solution, even when using the executor strategy (which was pointless). - I thought of having a router_address() method to set this in the encoder builder - but it seemed too messy, since we don't need the router address for execution for example. We would then potentially unnecessarily load and set the default router address when not needed. It is also not even used at the highest level EVMTychoEncoder, so it makes more sense for it to be directly associated with the swap strategy instead. - Users will now not be able to encode for different routers without re-initializing the strategy. We assumed this use case to be very rare and not worth supporting.
This commit is contained in:
4
config/router_addresses.json
Normal file
4
config/router_addresses.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"ethereum": "0x6512E8f80Ab24e6dD6eB042897898516c3175375",
|
||||
"base": "0xC2C23b0199525DE070D126860133dc3badaD2EEb"
|
||||
}
|
||||
Reference in New Issue
Block a user