Skip to content

Commit 470c773

Browse files
committed
fix: test issues
1 parent 0328fa9 commit 470c773

15 files changed

+862
-437
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-test test_printConfirmations --evm-version cancun -vvv
125125

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

script/forge-scripts/Abstract.Deploy.Single.s.sol

Lines changed: 147 additions & 145 deletions
Large diffs are not rendered by default.

script/forge-scripts/misc/Abstract.Configure.FixPostPreBera.s.sol

Lines changed: 0 additions & 69 deletions
This file was deleted.

script/forge-scripts/misc/Abstract.Configure.NewDVN.s.sol

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,6 @@ abstract contract AbstractConfigureNewDVN is EnvironmentUtils {
4848
0xabC9b1819cc4D9846550F928B985993cF6240439
4949
];
5050

51-
address[] public LzDVNs = [
52-
0x589dEDbD617e0CBcB916A9223F4d1300c294236b,
53-
0xfD6865c841c2d64565562fCc7e05e619A30615f0,
54-
0x962F502A63F5FBeB44DC9ab932122648E8352959,
55-
0x23DE2FE932d9043291f870324B74F820e11dc81A,
56-
0x2f55C492897526677C5B68fb199ea31E2c126416,
57-
0x6A02D83e8d433304bba74EF1c427913958187142,
58-
0x9e059a54699a285714207b43B055483E78FAac25,
59-
0xE60A3959Ca23a92BF5aAf992EF837cA7F828628a,
60-
0x129Ee430Cb2Ff2708CCADDBDb408a88Fe4FFd480,
61-
0xc097ab8CD7b053326DFe9fB3E3a31a0CCe3B526f
62-
];
63-
6451
function _configureSendAndReceiveDVN(
6552
uint256 env,
6653
uint256 i,

script/forge-scripts/misc/Abstract.Configure.PreBeraLaunch.s.sol

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,7 @@ struct UpdateVars {
2727
address sendLib;
2828
}
2929

30-
struct UlnConfig {
31-
uint64 confirmations;
32-
// we store the length of required DVNs and optional DVNs instead of using DVN.length directly to save gas
33-
uint8 requiredDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)
34-
uint8 optionalDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)
35-
uint8 optionalDVNThreshold; // (0, optionalDVNCount]
36-
address[] requiredDVNs; // no duplicates. sorted an an ascending order. allowed overlap with optionalDVNs
37-
address[] optionalDVNs; // no duplicates. sorted an an ascending order. allowed overlap with requiredDVNs
38-
}
39-
4030
abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
41-
address[] public SuperformDVNs = [
42-
0x7518f30bd5867b5fA86702556245Dead173afE46,
43-
0xF4c489AfD83625F510947e63ff8F90dfEE0aE46C,
44-
0x8fb0B7D74B557e4b45EF89648BAc197EAb2E4325,
45-
0x1E4CE74ccf5498B19900649D9196e64BAb592451,
46-
0x5496d03d9065B08e5677E1c5D1107110Bb05d445,
47-
0xb0B2EF168F52F6d1e42f461e11117295eF992daf,
48-
0xEb62f578497Bdc351dD650853a751135212fAF49,
49-
0x2EdfE0220A74d9609c79711a65E3A2F2A85Dc83b,
50-
0x7A205ED4e3d7f9d0777594501705D8CD405c3B05,
51-
0x0E95cf21aD9376A26997c97f326C5A0a267bB8FF
52-
];
53-
54-
address[] public LzDVNs = [
55-
0x589dEDbD617e0CBcB916A9223F4d1300c294236b,
56-
0xfD6865c841c2d64565562fCc7e05e619A30615f0,
57-
0x962F502A63F5FBeB44DC9ab932122648E8352959,
58-
0x23DE2FE932d9043291f870324B74F820e11dc81A,
59-
0x2f55C492897526677C5B68fb199ea31E2c126416,
60-
0x6A02D83e8d433304bba74EF1c427913958187142,
61-
0x9e059a54699a285714207b43B055483E78FAac25,
62-
0xE60A3959Ca23a92BF5aAf992EF837cA7F828628a,
63-
0x129Ee430Cb2Ff2708CCADDBDb408a88Fe4FFd480,
64-
0xc097ab8CD7b053326DFe9fB3E3a31a0CCe3B526f
65-
];
66-
6731
function _setBlastDelegate(
6832
uint256 env,
6933
uint256 srcChainIndex,
@@ -112,6 +76,11 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
11276
SuperRegistry(_readContractsV1(env, chainNames[srcChainIndex], vars.chainId, "SuperRegistry"));
11377
assert(address(vars.superRegistryC) != address(0));
11478

79+
txn = abi.encodeWithSelector(
80+
vars.superRegistryC.setAddress.selector, rewardsAdminRole, REWARDS_ADMIN, vars.chainId
81+
);
82+
addToBatch(address(vars.superRegistryC), 0, txn);
83+
11584
bytes memory txn;
11685

11786
console.log("Setting config");
@@ -134,6 +103,9 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
134103

135104
ulnConfig.requiredDVNs = requiredDVNs;
136105

106+
/// @dev default to 0 to use lz v2 defaults
107+
ulnConfig.confirmations = 0;
108+
137109
address[] memory rescuerAddress = new address[](2);
138110
bytes32[] memory ids = new bytes32[](2);
139111
uint64[] memory targetChains = new uint64[](2);
@@ -147,12 +119,7 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
147119
vars.dstTrueIndex = _getTrueIndex(finalDeployedChains[j]);
148120

149121
vars.setConfigParams = new SetConfigParam[](1);
150-
ulnConfig.confirmations = CONFIRMATIONS[vars.chainId][finalDeployedChains[j]];
151-
console.log("chainId", vars.chainId);
152-
console.log("finalDeployedChains[j]", finalDeployedChains[j]);
153-
console.log("confirmations", ulnConfig.confirmations);
154-
assert(ulnConfig.confirmations != 0);
155-
console.log("----");
122+
156123
vars.config = abi.encode(ulnConfig);
157124

158125
vars.setConfigParams[0] = SetConfigParam(uint32(lz_chainIds[vars.dstTrueIndex]), uint32(2), vars.config);
@@ -173,6 +140,7 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
173140

174141
// disable Axelar's other chain info on LINEA and BLAST
175142
if (vars.chainId == LINEA || vars.chainId == BLAST) {
143+
/*
176144
if (finalDeployedChains[j] == LINEA || finalDeployedChains[j] == BLAST) {
177145
txn = abi.encodeWithSelector(
178146
AxelarImplementation.setChainId.selector,
@@ -183,10 +151,11 @@ abstract contract AbstractPreBeraLaunch is EnvironmentUtils {
183151
addToBatch(vars.axl, 0, txn);
184152
}
185153
txn = abi.encodeWithSelector(
186-
AxelarImplementation.setReceiver.selector, axelar_chainIds[vars.dstTrueIndex], address(0xDEAD)
154+
AxelarImplementation.setReceiver.selector, axelar_chainIds[vars.dstTrueIndex], address(0xDEAD)
187155
);
188156
189157
addToBatch(vars.axl, 0, txn);
158+
*/
190159
} else {
191160
for (uint256 i; i < rescuerAddress.length; i++) {
192161
ids[i] = keccak256("CORE_STATE_REGISTRY_RESCUER_ROLE");

script/forge-scripts/misc/DecodeULNConfig.sol

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,12 @@ import "../EnvironmentUtils.s.sol";
55
import "src/vendor/layerzero/v2/ILayerZeroEndpointV2.sol";
66

77
contract DecodeULNConfig is EnvironmentUtils {
8-
address[] public SuperformDVNs = [
9-
0x7518f30bd5867b5fA86702556245Dead173afE46,
10-
0xF4c489AfD83625F510947e63ff8F90dfEE0aE46C,
11-
0x8fb0B7D74B557e4b45EF89648BAc197EAb2E4325,
12-
0x1E4CE74ccf5498B19900649D9196e64BAb592451,
13-
0x5496d03d9065B08e5677E1c5D1107110Bb05d445,
14-
0xb0B2EF168F52F6d1e42f461e11117295eF992daf,
15-
0xEb62f578497Bdc351dD650853a751135212fAF49,
16-
0x2EdfE0220A74d9609c79711a65E3A2F2A85Dc83b,
17-
0x7A205ED4e3d7f9d0777594501705D8CD405c3B05,
18-
0x0E95cf21aD9376A26997c97f326C5A0a267bB8FF
19-
];
20-
21-
address[] public LzDVNs = [
22-
0x589dEDbD617e0CBcB916A9223F4d1300c294236b,
23-
0xfD6865c841c2d64565562fCc7e05e619A30615f0,
24-
0x962F502A63F5FBeB44DC9ab932122648E8352959,
25-
0x23DE2FE932d9043291f870324B74F820e11dc81A,
26-
0x2f55C492897526677C5B68fb199ea31E2c126416,
27-
0x6A02D83e8d433304bba74EF1c427913958187142,
28-
0x9e059a54699a285714207b43B055483E78FAac25,
29-
0xE60A3959Ca23a92BF5aAf992EF837cA7F828628a,
30-
0x129Ee430Cb2Ff2708CCADDBDb408a88Fe4FFd480,
31-
0xc097ab8CD7b053326DFe9fB3E3a31a0CCe3B526f
32-
];
33-
34-
struct UlnConfig {
35-
uint64 confirmations;
36-
// we store the length of required DVNs and optional DVNs instead of using DVN.length directly to save gas
37-
uint8 requiredDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)
38-
uint8 optionalDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)
39-
uint8 optionalDVNThreshold; // (0, optionalDVNCount]
40-
address[] requiredDVNs; // no duplicates. sorted an an ascending order. allowed overlap with optionalDVNs
41-
address[] optionalDVNs; // no duplicates. sorted an an ascending order. allowed overlap with requiredDVNs
42-
}
43-
448
function decodeULNConfig(uint64 chainid, uint64 dstChainId, bytes memory config) public {
459
_setEnvironment(0, false);
4610
_preDeploymentSetup();
4711

4812
UlnConfig memory ulnConfig = abi.decode(config, (UlnConfig));
4913

50-
assert(CONFIRMATIONS[chainid][dstChainId] == ulnConfig.confirmations);
51-
5214
address[] memory requiredDVNsToAssert = new address[](2);
5315
requiredDVNsToAssert[0] = SuperformDVNs[_getTrueIndex(chainid)];
5416
requiredDVNsToAssert[1] = LzDVNs[_getTrueIndex(chainid)];
@@ -59,7 +21,7 @@ contract DecodeULNConfig is EnvironmentUtils {
5921

6022
assert(requiredDVNsToAssert[0] == ulnConfig.requiredDVNs[0]);
6123
assert(requiredDVNsToAssert[1] == ulnConfig.requiredDVNs[1]);
62-
console.log("asserted, SRC, DST, Confirmations: ", chainid, dstChainId, ulnConfig.confirmations);
24+
console.log("asserted, SRC, DST: ", chainid, dstChainId);
6325
}
6426

6527
function _getTrueIndex(uint256 chainId) public view returns (uint256 index) {

script/output/1/Ethereum-latest.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
2+
"AsyncStateRegistry": "0x217D7ED4c370e4f81976A58dc04f5249c59Cd044",
23
"AxelarImplementation": "0x679Cf01eaF7b48aF3Eb13D8D5dd8E8005675B75D",
34
"BroadcastRegistry": "0xCEc20ddF2f26a7f2e213B65bBDc3Dba5a94905dB",
45
"CoreStateRegistry": "0xda4Bc7aD4bfe737f1bAB14E96F345db40A71Ec3D",
56
"DeBridgeForwarderValidator": "0x33A77A6ac571034579690C2B14dF11E3e803A3AC",
67
"DeBridgeValidator": "0x4d6bd7F58B111368F7cAa900E25a3Fc345c145e4",
7-
"DstSwapper": "0x0f0f6e8F7Df71f40F76a6085e68cbADfC3693b3c",
8+
"DstSwapper": "0x90206D750dd8FEBbDdef32ca3eD578a278b133D9",
89
"ERC4626Form": "0xBC696200257Aa524DC33daC962609b1cc5829e7f",
910
"ERC5115Form": "0xE7c419E8697863945498799445EedFb353D3aB7A",
1011
"ERC5115To4626WrapperFactory": "0xC3d2303C2D7BD590786b2a161d16756459814A4F",
12+
"ERC7540Form": "0x186504843d4F15A5e98E654484F5BC8EE1a9Cbd8",
1113
"EmergencyQueue": "0x97757B4Fbe27844491cda3B766B2Af2C5FC3CdE5",
1214
"HyperlaneImplementation": "0xA32C38a1F734D40d4293688f2B401A99eE34211c",
1315
"LayerzeroImplementation": "0x05D2543d0b6b50e59f6eB548660289502f6095BE",
1416
"LayerzeroV1Implementation": "0x44F11E68B595cb8f6789700BcF8814909093f553",
1517
"LiFiValidator": "0xF279499555c1F70A1e4412b652c376C881Ad0B89",
1618
"OneInchValidator": "0xf4F2b2d0036C5d9be3ddf86fa188B60C73170280",
1719
"PayMaster": "0xcBB80F21cE80877EA652BceF97821D7883A219e9",
18-
"PayloadHelper": "0x89e7F61E97fd5E30B58640ea48FE9109F5434aA2",
20+
"PayloadHelper": "0x9Ff35E68409b615110DB0864bd632E9F9770C182",
1921
"PaymentHelper": "0x5754BdbD9a19037961aa16d53aB6a97fFeC7c9d6",
2022
"RewardsDistributor": "0xBee4aa07Dee132B76d195Bb00eeB7F7B360d2afd",
2123
"SocketOneInchValidator": "0xB0F404e09F4D9660970bE7780Bb453ba4E161F96",
@@ -25,6 +27,8 @@
2527
"SuperRegistry": "0xD678fDdf21eA7b6722115cb9edBDDC8CF2BFb7d7",
2628
"SuperformFactory": "0xC8E70Ef21FaB64B321E8Aea0Ed1fda4eC481Ea24",
2729
"SuperformRouter": "0x229C2Cd1C67c1b7ab2D6A07718DC622b6EC3d408",
30+
"SuperformRouterPlus": "0x0000000000000000000000000000000000000000",
31+
"SuperformRouterPlusAsync": "0x0000000000000000000000000000000000000000",
2832
"VaultClaimer": "0x36B20e607eDC57da1bcd0475831150E475F58d70",
2933
"WormholeARImplementation": "0x7E76F8602194811eA4E1d36d570b5c3c2C6dd3c2",
3034
"WormholeSRImplementation": "0x802e93000D4F89A5B3c1D30b0D426bB7bCe3084C"

script/output/10/Optimism-latest.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
2-
"AsyncStateRegistry": "0x0000000000000000000000000000000000000000",
3-
"AxelarImplementation": "0x0000000000000000000000000000000000000000",
4-
"BroadcastRegistry": "0x0000000000000000000000000000000000000000",
5-
"CoreStateRegistry": "0x0000000000000000000000000000000000000000",
6-
"DeBridgeForwarderValidator": "0x0000000000000000000000000000000000000000",
7-
"DeBridgeValidator": "0x0000000000000000000000000000000000000000",
8-
"DstSwapper": "0x0000000000000000000000000000000000000000",
9-
"ERC4626Form": "0x0000000000000000000000000000000000000000",
10-
"ERC5115Form": "0x0000000000000000000000000000000000000000",
11-
"ERC5115To4626WrapperFactory": "0x0000000000000000000000000000000000000000",
12-
"ERC7540Form": "0xE2005E8A9b8A21d6dF752db866fA78a574057052",
13-
"EmergencyQueue": "0x0000000000000000000000000000000000000000",
14-
"HyperlaneImplementation": "0x0000000000000000000000000000000000000000",
15-
"LayerzeroImplementation": "0x0000000000000000000000000000000000000000",
16-
"LayerzeroV1Implementation": "0x0000000000000000000000000000000000000000",
17-
"LiFiValidator": "0x0000000000000000000000000000000000000000",
18-
"OneInchValidator": "0x0000000000000000000000000000000000000000",
19-
"PayMaster": "0x0000000000000000000000000000000000000000",
20-
"PayloadHelper": "0x0000000000000000000000000000000000000000",
21-
"PaymentHelper": "0x0000000000000000000000000000000000000000",
22-
"RewardsDistributor": "0x0000000000000000000000000000000000000000",
23-
"SocketOneInchValidator": "0x0000000000000000000000000000000000000000",
2+
"AsyncStateRegistry": "0x217D7ED4c370e4f81976A58dc04f5249c59Cd044",
3+
"AxelarImplementation": "0x679Cf01eaF7b48aF3Eb13D8D5dd8E8005675B75D",
4+
"BroadcastRegistry": "0xCEc20ddF2f26a7f2e213B65bBDc3Dba5a94905dB",
5+
"CoreStateRegistry": "0xda4Bc7aD4bfe737f1bAB14E96F345db40A71Ec3D",
6+
"DeBridgeForwarderValidator": "0x33A77A6ac571034579690C2B14dF11E3e803A3AC",
7+
"DeBridgeValidator": "0x4d6bd7F58B111368F7cAa900E25a3Fc345c145e4",
8+
"DstSwapper": "0x90206D750dd8FEBbDdef32ca3eD578a278b133D9",
9+
"ERC4626Form": "0xBC696200257Aa524DC33daC962609b1cc5829e7f",
10+
"ERC5115Form": "0xE7c419E8697863945498799445EedFb353D3aB7A",
11+
"ERC5115To4626WrapperFactory": "0xC3d2303C2D7BD590786b2a161d16756459814A4F",
12+
"ERC7540Form": "0x186504843d4F15A5e98E654484F5BC8EE1a9Cbd8",
13+
"EmergencyQueue": "0x97757B4Fbe27844491cda3B766B2Af2C5FC3CdE5",
14+
"HyperlaneImplementation": "0xA32C38a1F734D40d4293688f2B401A99eE34211c",
15+
"LayerzeroImplementation": "0x05D2543d0b6b50e59f6eB548660289502f6095BE",
16+
"LayerzeroV1Implementation": "0x44F11E68B595cb8f6789700BcF8814909093f553",
17+
"LiFiValidator": "0xF279499555c1F70A1e4412b652c376C881Ad0B89",
18+
"OneInchValidator": "0xf4F2b2d0036C5d9be3ddf86fa188B60C73170280",
19+
"PayMaster": "0xcBB80F21cE80877EA652BceF97821D7883A219e9",
20+
"PayloadHelper": "0x9Ff35E68409b615110DB0864bd632E9F9770C182",
21+
"PaymentHelper": "0x5754BdbD9a19037961aa16d53aB6a97fFeC7c9d6",
22+
"RewardsDistributor": "0xBee4aa07Dee132B76d195Bb00eeB7F7B360d2afd",
23+
"SocketOneInchValidator": "0xB0F404e09F4D9660970bE7780Bb453ba4E161F96",
2424
"SocketValidator": "0x0000000000000000000000000000000000000000",
25-
"SuperPositions": "0x0000000000000000000000000000000000000000",
26-
"SuperRBAC": "0x0000000000000000000000000000000000000000",
27-
"SuperRegistry": "0x0000000000000000000000000000000000000000",
28-
"SuperformFactory": "0x0000000000000000000000000000000000000000",
29-
"SuperformRouter": "0x0000000000000000000000000000000000000000",
25+
"SuperPositions": "0x24Bc1C19781a1Bbf5A37b0E1A5F79aac75AF6467",
26+
"SuperRBAC": "0xAEb63A3199d2CB3B2812BBD1dc6Ef62f12182E5d",
27+
"SuperRegistry": "0xD678fDdf21eA7b6722115cb9edBDDC8CF2BFb7d7",
28+
"SuperformFactory": "0xC8E70Ef21FaB64B321E8Aea0Ed1fda4eC481Ea24",
29+
"SuperformRouter": "0x229C2Cd1C67c1b7ab2D6A07718DC622b6EC3d408",
3030
"SuperformRouterPlus": "0x0000000000000000000000000000000000000000",
3131
"SuperformRouterPlusAsync": "0x0000000000000000000000000000000000000000",
32-
"VaultClaimer": "0x0000000000000000000000000000000000000000",
33-
"WormholeARImplementation": "0x0000000000000000000000000000000000000000",
34-
"WormholeSRImplementation": "0x0000000000000000000000000000000000000000"
32+
"VaultClaimer": "0x36B20e607eDC57da1bcd0475831150E475F58d70",
33+
"WormholeARImplementation": "0x7E76F8602194811eA4E1d36d570b5c3c2C6dd3c2",
34+
"WormholeSRImplementation": "0x802e93000D4F89A5B3c1D30b0D426bB7bCe3084C"
3535
}

0 commit comments

Comments
 (0)