Skip to content

Commit

Permalink
feat: deploy router plus & restore payload helper + remove logging fr…
Browse files Browse the repository at this point in the history
…om DstSwapper (#660)
  • Loading branch information
0xTimepunk authored Dec 3, 2024
1 parent ae9af3a commit 71dd291
Show file tree
Hide file tree
Showing 21 changed files with 1,227 additions and 131 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ build-sizes: ## Builds the project and shows sizes

.PHONY: test-vvv
test-vvv: ## Runs tests with verbose output
forge test --match-test test_lzConfig --evm-version cancun -vvv
forge test --match-contract PayloadHelperSingleTest --evm-version cancun

.PHONY: ftest
ftest: ## Runs tests with cancun evm version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ERC5115Form": "0x6aA92De361938B0A062E74e068a2028778F17852",
"OneInchValidator": "0x16e9f8549c2b6a026dc2706d746beA76CeFF4098",
"ERC5115To4626WrapperFactory": "0x0df3d7D6daE058667e49C6b85F7b92458Ab06836",
"SuperformRouterPlus": "0x5223a22BB4EecE74ac4f258cf0a4977eaEB0166A",
"SuperformRouterPlusAsync": "0x4A4a0042e485CBE61ac4BC495Fab5Ca516040e18"
"SuperformRouterPlus": "0x19425A9c151D4F5F28244ae07eB6cF7b14718baF",
"SuperformRouterPlusAsync": "0x45b482E122502298f42c438110732941A3955f06"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"VaultClaimer": "0xf1930eD240cF9c4F1840aDB689E5d231687922C5",
"WormholeARImplementation": "0x0000000000000000000000000000000000000000",
"WormholeSRImplementation": "0x0000000000000000000000000000000000000000",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"VaultClaimer": "0xf1930eD240cF9c4F1840aDB689E5d231687922C5",
"WormholeARImplementation": "0x71ec658F19AcF74D258c55A025ADC534c34EcaDA",
"WormholeSRImplementation": "0x44b451Ca87267a62A0C853ECFbaaC1C3E528a82C",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
}
12 changes: 0 additions & 12 deletions script/forge-scripts/misc/Abstract.Deploy.RouterPlus.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ abstract contract AbstractDeployRouterPlus is EnvironmentUtils {
keccak256("SUPERFORM_ROUTER_PLUS_ASYNC"), superformRouterPlusAsync, vars.chainId
);

/// @dev below part is already done
/*
SuperRegistry(superRegistry).setAddress(
keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), ROUTER_PLUS_PROCESSOR, vars.chainId
);
vars.superRBACC = SuperRBAC(payable(_readContractsV1(env, chainNames[trueIndex], vars.chainId, "SuperRBAC")));
vars.superRBACC.setRoleAdmin(keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), vars.superRBACC.PROTOCOL_ADMIN_ROLE());
vars.superRBACC.grantRole(keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), ROUTER_PLUS_PROCESSOR);
*/

vm.stopBroadcast();

/// @dev we use normal export contract to not override v1 contracts
Expand Down
36 changes: 7 additions & 29 deletions script/utils/misc/run_script_mainnet_staging_routerplus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,24 @@ export BLAST_RPC_URL=$(op read op://5ylebqljbh3x6zomdxi3qd7tsa/BLAST_RPC_URL/cre

# Run the script
echo Deploying Router Plus and Router Plus Async: ...
<<c
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 0 0 --rpc-url $BSC_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 1 0 --rpc-url $ARBITRUM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 2 0 --rpc-url $OPTIMISM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 3 0 --rpc-url $BASE_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 4 0 --rpc-url $FANTOM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 5 0 --rpc-url $LINEA_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
c
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 6 0 --rpc-url $BLAST_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait
<<c
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 0 0 --rpc-url $BSC_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 0 0 --rpc-url $BSC_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 1 0 --rpc-url $ARBITRUM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 1 0 --rpc-url $ARBITRUM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 2 0 --rpc-url $OPTIMISM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 2 0 --rpc-url $OPTIMISM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 3 0 --rpc-url $BASE_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 3 0 --rpc-url $BASE_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 4 0 --rpc-url $FANTOM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 4 0 --rpc-url $FANTOM_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 5 0 --rpc-url $LINEA_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 5 0 --rpc-url $LINEA_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy --with-gas-price 600000000
wait

FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "configureRouterPlusProcessor(uint256,uint256,uint256)" 1 6 0 --rpc-url $BLAST_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92
FOUNDRY_PROFILE=production forge script script/forge-scripts/misc/Mainnet.Deploy.SuperformRouterPlus.s.sol:MainnetDeployRouterPlus --sig "deployRouterPlus(uint256,uint256,uint256)" 1 6 0 --rpc-url $BLAST_RPC_URL --slow --broadcast --account default --sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 --legacy
wait
c
8 changes: 4 additions & 4 deletions script/utils/verify_contracts_staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ contract_addresses=(
# 0x0000000000000000000000000000000000000000
# 0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3
# 0xF442FC47c5e8b6CA772a9b7345d9E6A663375258
0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d
0x47aa92F7bb7c018046079BDaA94E5618cbCe151f
0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249
0xbc1300e95393cF481b7c2d29d85B54689ef04fc8
# 0xcB11480022E5B6D76661441C8eD025d756B5D1Ed
# 0xE2005E8A9b8A21d6dF752db866fA78a574057052
# Add more addresses here if needed
Expand Down Expand Up @@ -207,8 +207,8 @@ contract_addresses_fantom=(
# 0x16e9f8549c2b6a026dc2706d746beA76CeFF4098
# 0x0df3d7D6daE058667e49C6b85F7b92458Ab06836
# 0x4c605a697c22254547289092337911078b56d5dc
0x5223a22BB4EecE74ac4f258cf0a4977eaEB0166A
0x4A4a0042e485CBE61ac4BC495Fab5Ca516040e18
0x19425A9c151D4F5F28244ae07eB6cF7b14718baF
0x45b482E122502298f42c438110732941A3955f06
# 0x89dDD49AEa0B3278f51Ec96a6b70bAA19fC73854
# 0x918cEF6ae14316Be0669270BFE3DD7Fbb4fd2aCa
# Add more addresses here if needed
Expand Down
Loading

0 comments on commit 71dd291

Please sign in to comment.