Skip to content

Commit 71dd291

Browse files
authored
feat: deploy router plus & restore payload helper + remove logging from DstSwapper (#660)
1 parent ae9af3a commit 71dd291

21 files changed

+1227
-131
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ build-sizes: ## Builds the project and shows sizes
121121

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

126126
.PHONY: ftest
127127
ftest: ## Runs tests with cancun evm version

script/deployments/v1_staging_deployment/10/Optimism-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
3131
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
3232
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/deployments/v1_staging_deployment/250/Fantom-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"ERC5115Form": "0x6aA92De361938B0A062E74e068a2028778F17852",
3131
"OneInchValidator": "0x16e9f8549c2b6a026dc2706d746beA76CeFF4098",
3232
"ERC5115To4626WrapperFactory": "0x0df3d7D6daE058667e49C6b85F7b92458Ab06836",
33-
"SuperformRouterPlus": "0x5223a22BB4EecE74ac4f258cf0a4977eaEB0166A",
34-
"SuperformRouterPlusAsync": "0x4A4a0042e485CBE61ac4BC495Fab5Ca516040e18"
33+
"SuperformRouterPlus": "0x19425A9c151D4F5F28244ae07eB6cF7b14718baF",
34+
"SuperformRouterPlusAsync": "0x45b482E122502298f42c438110732941A3955f06"
3535
}

script/deployments/v1_staging_deployment/42161/Arbitrum-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
3131
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
3232
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/deployments/v1_staging_deployment/56/Binance-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
3131
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
3232
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/deployments/v1_staging_deployment/59144/Linea-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"VaultClaimer": "0xf1930eD240cF9c4F1840aDB689E5d231687922C5",
3131
"WormholeARImplementation": "0x0000000000000000000000000000000000000000",
3232
"WormholeSRImplementation": "0x0000000000000000000000000000000000000000",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/deployments/v1_staging_deployment/81457/Blast-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"VaultClaimer": "0xf1930eD240cF9c4F1840aDB689E5d231687922C5",
3131
"WormholeARImplementation": "0x71ec658F19AcF74D258c55A025ADC534c34EcaDA",
3232
"WormholeSRImplementation": "0x44b451Ca87267a62A0C853ECFbaaC1C3E528a82C",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/deployments/v1_staging_deployment/8453/Base-latest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
"ERC5115Form": "0x93f5fD75460aC5F0686eBfE22e556F1129F504B0",
3131
"OneInchValidator": "0x480140a26c3eb10F0F17e56495CE588320f45Cfe",
3232
"ERC5115To4626WrapperFactory": "0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3",
33-
"SuperformRouterPlus": "0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d",
34-
"SuperformRouterPlusAsync": "0x47aa92F7bb7c018046079BDaA94E5618cbCe151f"
33+
"SuperformRouterPlus": "0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249",
34+
"SuperformRouterPlusAsync": "0xbc1300e95393cF481b7c2d29d85B54689ef04fc8"
3535
}

script/forge-scripts/misc/Abstract.Deploy.RouterPlus.s.sol

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ abstract contract AbstractDeployRouterPlus is EnvironmentUtils {
5656
keccak256("SUPERFORM_ROUTER_PLUS_ASYNC"), superformRouterPlusAsync, vars.chainId
5757
);
5858

59-
/// @dev below part is already done
60-
/*
61-
SuperRegistry(superRegistry).setAddress(
62-
keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), ROUTER_PLUS_PROCESSOR, vars.chainId
63-
);
64-
65-
vars.superRBACC = SuperRBAC(payable(_readContractsV1(env, chainNames[trueIndex], vars.chainId, "SuperRBAC")));
66-
67-
vars.superRBACC.setRoleAdmin(keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), vars.superRBACC.PROTOCOL_ADMIN_ROLE());
68-
vars.superRBACC.grantRole(keccak256("ROUTER_PLUS_PROCESSOR_ROLE"), ROUTER_PLUS_PROCESSOR);
69-
*/
70-
7159
vm.stopBroadcast();
7260

7361
/// @dev we use normal export contract to not override v1 contracts

script/utils/misc/run_script_mainnet_staging_routerplus.sh

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,24 @@ export BLAST_RPC_URL=$(op read op://5ylebqljbh3x6zomdxi3qd7tsa/BLAST_RPC_URL/cre
1414

1515
# Run the script
1616
echo Deploying Router Plus and Router Plus Async: ...
17-
<<c
18-
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
19-
wait
20-
21-
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
22-
wait
2317

24-
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
25-
wait
26-
27-
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
28-
wait
29-
30-
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
31-
wait
32-
33-
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
34-
wait
35-
c
36-
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
37-
wait
38-
<<c
39-
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
18+
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
4019
wait
4120

42-
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
21+
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
4322
wait
4423

45-
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
24+
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
4625
wait
4726

48-
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
27+
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
4928
wait
5029

51-
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
30+
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
5231
wait
5332

54-
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
33+
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
5534
wait
5635

57-
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
36+
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
5837
wait
59-
c

script/utils/verify_contracts_staging.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ contract_addresses=(
170170
# 0x0000000000000000000000000000000000000000
171171
# 0x14Bc2728DaE89FE7c828833a186DdC5E9AE439C3
172172
# 0xF442FC47c5e8b6CA772a9b7345d9E6A663375258
173-
0x82D3EF5e1005559fc6D577a730Bb201De1F7Cc6d
174-
0x47aa92F7bb7c018046079BDaA94E5618cbCe151f
173+
0xA4bf3ab533Bd9dd0cC8C71D273B748E968065249
174+
0xbc1300e95393cF481b7c2d29d85B54689ef04fc8
175175
# 0xcB11480022E5B6D76661441C8eD025d756B5D1Ed
176176
# 0xE2005E8A9b8A21d6dF752db866fA78a574057052
177177
# Add more addresses here if needed
@@ -207,8 +207,8 @@ contract_addresses_fantom=(
207207
# 0x16e9f8549c2b6a026dc2706d746beA76CeFF4098
208208
# 0x0df3d7D6daE058667e49C6b85F7b92458Ab06836
209209
# 0x4c605a697c22254547289092337911078b56d5dc
210-
0x5223a22BB4EecE74ac4f258cf0a4977eaEB0166A
211-
0x4A4a0042e485CBE61ac4BC495Fab5Ca516040e18
210+
0x19425A9c151D4F5F28244ae07eB6cF7b14718baF
211+
0x45b482E122502298f42c438110732941A3955f06
212212
# 0x89dDD49AEa0B3278f51Ec96a6b70bAA19fC73854
213213
# 0x918cEF6ae14316Be0669270BFE3DD7Fbb4fd2aCa
214214
# Add more addresses here if needed

0 commit comments

Comments
 (0)