feat: Add PancakeSwapV3 support to encoding
- Add deployed executor address to json - Build proper encoder for pancake v3 - Increase gas limit when setting executors (costs more since we set one more) - Fix json filename in scripts/README.md
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"sushiswap_v2": "0x8ABd4075cF54E0A9C52D18e6951b969AF3249cF9",
|
||||
"pancakeswap_v2": "0x9fC9e63cCf5F773A8bC79DcfA38c581B0DEa1d11",
|
||||
"uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0",
|
||||
"pancakeswap_v3": "0x4929B619A8F0D9c06ed0FfD497636580D823F65d",
|
||||
"uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70",
|
||||
"vm:balancer_v2": "0x00BE8EfAE40219Ff76287b0F9b9e497942f5BC91"
|
||||
},
|
||||
|
||||
@@ -47,4 +47,4 @@ For each of the following, you must select one of `tenderly_ethereum`, `tenderly
|
||||
|
||||
1. In `scripts/deploy-executors.js` define the executors to be deployed
|
||||
2. Deploy executors: `npx hardhat run scripts/deploy-executors.js --network NETWORK`
|
||||
3. Fill in the executor addresses in `config/executors.json`
|
||||
3. Fill in the executor addresses in `config/executor_addresses.json`
|
||||
|
||||
@@ -51,7 +51,7 @@ async function main() {
|
||||
// Set executors
|
||||
const executorAddresses = executorsToSet.map(executor => executor.executor);
|
||||
const tx = await router.setExecutors(executorAddresses, {
|
||||
gasLimit: 200000 // should be around 50k per executor
|
||||
gasLimit: 300000 // should be around 50k per executor
|
||||
});
|
||||
await tx.wait(); // Wait for the transaction to be mined
|
||||
console.log(`Executors set at transaction: ${tx.hash}`);
|
||||
|
||||
@@ -27,6 +27,7 @@ impl SwapEncoderBuilder {
|
||||
"pancakeswap_v2" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
||||
"vm:balancer_v2" => Ok(Box::new(BalancerV2SwapEncoder::new(self.executor_address))),
|
||||
"uniswap_v3" => Ok(Box::new(UniswapV3SwapEncoder::new(self.executor_address))),
|
||||
"pancakeswap_v3" => Ok(Box::new(UniswapV3SwapEncoder::new(self.executor_address))),
|
||||
"uniswap_v4" => Ok(Box::new(UniswapV4SwapEncoder::new(self.executor_address))),
|
||||
_ => Err(EncodingError::FatalError(format!(
|
||||
"Unknown protocol system: {}",
|
||||
|
||||
Reference in New Issue
Block a user