feat: Set v2/v3 executor addresses on ethereum
- Also fix router address env name in readme
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
{
|
{
|
||||||
"ethereum": {
|
"ethereum": {
|
||||||
"uniswap_v2": "0xf6c5be66FFf9DC69962d73da0A617a827c382329",
|
"uniswap_v2": "0xf6c5be66FFf9DC69962d73da0A617a827c382329",
|
||||||
|
"sushiswap_v2": "0x8ABd4075cF54E0A9C52D18e6951b969AF3249cF9",
|
||||||
|
"pancakeswap_v2": "0x9fC9e63cCf5F773A8bC79DcfA38c581B0DEa1d11",
|
||||||
"uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0",
|
"uniswap_v3": "0xdD8559c917393FC8DD2b4dD289c52Ff445fDE1B0",
|
||||||
|
"pancakeswap_v3": "0x455b57440465139482E9E0ED9DC308d7BA6A8515",
|
||||||
"uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70",
|
"uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70",
|
||||||
"vm:balancer_v2": "0x00BE8EfAE40219Ff76287b0F9b9e497942f5BC91"
|
"vm:balancer_v2": "0x00BE8EfAE40219Ff76287b0F9b9e497942f5BC91"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ For each of the following, you must select one of `tenderly_ethereum`, `tenderly
|
|||||||
|
|
||||||
1. Deploy router: `npx hardhat run scripts/deploy-router.js --network NETWORK`
|
1. Deploy router: `npx hardhat run scripts/deploy-router.js --network NETWORK`
|
||||||
2. Define the accounts to grant roles to in `scripts/roles.json`
|
2. Define the accounts to grant roles to in `scripts/roles.json`
|
||||||
3. Export the router address to the environment variable `export ROUTER=<router-address>`
|
3. Export the router address to the environment variable `export ROUTER_ADDRESS=<router-address>`
|
||||||
4. Grant roles: `npx hardhat run scripts/set-roles.js --network NETWORK`
|
4. Grant roles: `npx hardhat run scripts/set-roles.js --network NETWORK`
|
||||||
5. Set executors: `npx hardhat run scripts/set-executors.js --network NETWORK`. Make sure you change the
|
5. Set executors: `npx hardhat run scripts/set-executors.js --network NETWORK`. Make sure you change the
|
||||||
DEPLOY_WALLET to the executor deployer wallet. If you need to deploy executors, follow the instructions below.
|
DEPLOY_WALLET to the executor deployer wallet. If you need to deploy executors, follow the instructions below.
|
||||||
|
|||||||
@@ -23,8 +23,11 @@ impl SwapEncoderBuilder {
|
|||||||
pub fn build(self) -> Result<Box<dyn SwapEncoder>, EncodingError> {
|
pub fn build(self) -> Result<Box<dyn SwapEncoder>, EncodingError> {
|
||||||
match self.protocol_system.as_str() {
|
match self.protocol_system.as_str() {
|
||||||
"uniswap_v2" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
"uniswap_v2" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
||||||
|
"sushiswap_v2" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
||||||
|
"pancakeswap_v2" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
||||||
"vm:balancer_v2" => Ok(Box::new(BalancerV2SwapEncoder::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))),
|
"uniswap_v3" => Ok(Box::new(UniswapV3SwapEncoder::new(self.executor_address))),
|
||||||
|
"pancakeswap_v3" => Ok(Box::new(UniswapV2SwapEncoder::new(self.executor_address))),
|
||||||
"uniswap_v4" => Ok(Box::new(UniswapV4SwapEncoder::new(self.executor_address))),
|
"uniswap_v4" => Ok(Box::new(UniswapV4SwapEncoder::new(self.executor_address))),
|
||||||
_ => Err(EncodingError::FatalError(format!(
|
_ => Err(EncodingError::FatalError(format!(
|
||||||
"Unknown protocol system: {}",
|
"Unknown protocol system: {}",
|
||||||
|
|||||||
Reference in New Issue
Block a user