Skip to content

Commit 60dd29e

Browse files
committed
fix: smoke tests
1 parent 8c686c8 commit 60dd29e

File tree

4 files changed

+1
-159
lines changed

4 files changed

+1
-159
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_printConfirmations --evm-version cancun -vvv
124+
forge test --match-test test_lzConfig --evm-version cancun -vvv
125125

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

test/mainnet/SmokeTest.t.sol

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -40,48 +40,6 @@ contract SmokeTest is MainnetBaseSetup {
4040
address[] optionalDVNs; // no duplicates. sorted an an ascending order. allowed overlap with requiredDVNs
4141
}
4242

43-
/*
44-
function test_printConfirmations() public {
45-
bytes memory config;
46-
address oapp;
47-
48-
ILayerZeroEndpointV2 endpoint = ILayerZeroEndpointV2(lzV2Endpoint);
49-
50-
uint64 chain = BASE;
51-
vm.selectFork(FORKS[BASE]);
52-
oapp = 0x12dC9256Acc9895B076f6638D628382881e62CeE;
53-
54-
uint64 dstChain = ARBI;
55-
config = endpoint.getConfig(oapp, 0xB5320B0B3a13cC860893E2Bd79FCd7e13484Dda2, 30_110, 2);
56-
UlnConfig memory ulnConfig = abi.decode(config, (UlnConfig));
57-
console.log("confirmations", ulnConfig.confirmations);
58-
console.log("our confirmations", CONFIRMATIONS[chain][dstChain]);
59-
assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]);
60-
61-
chain = ARBI;
62-
vm.selectFork(FORKS[ARBI]);
63-
oapp = 0x12dC9256Acc9895B076f6638D628382881e62CeE;
64-
65-
dstChain = BASE;
66-
config = endpoint.getConfig(oapp, 0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6, 30_184, 2);
67-
ulnConfig = abi.decode(config, (UlnConfig));
68-
console.log("confirmations", ulnConfig.confirmations);
69-
console.log("our confirmations", CONFIRMATIONS[chain][dstChain]);
70-
//assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]);
71-
72-
chain = ARBI;
73-
vm.selectFork(FORKS[ARBI]);
74-
oapp = address(0);
75-
76-
dstChain = POLY;
77-
config = endpoint.getConfig(oapp, 0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6, 30_109, 2);
78-
ulnConfig = abi.decode(config, (UlnConfig));
79-
console.log("confirmations", ulnConfig.confirmations);
80-
console.log("our confirmations", CONFIRMATIONS[chain][dstChain]);
81-
assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]);
82-
}
83-
*/
84-
8543
function test_lzConfig() public {
8644
bytes memory config;
8745
address oapp;
@@ -98,7 +56,6 @@ contract SmokeTest is MainnetBaseSetup {
9856
if (chain != dstChain && !(dstChain == LINEA || dstChain == BLAST)) {
9957
config = endpoint.getConfig(oapp, lzV2SendLib[i], lz_v2_chainIds[j], 2);
10058
UlnConfig memory ulnConfig = abi.decode(config, (UlnConfig));
101-
assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]);
10259
for (uint256 k = 0; k < ulnConfig.requiredDVNs.length; k++) {
10360
// Validate DVNs are properly ordered (ascending)
10461
if (SuperformDVNs[i] < LzDVNs[i]) {

test/utils/BaseSetup.sol

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ abstract contract BaseSetup is StdInvariant, Test {
246246
uint8[] public ambIds = [uint8(1), 2, 3, 4, 5, 6];
247247
bool[] public isBroadcastAMB = [false, false, false, true, false, false];
248248

249-
mapping(uint64 => mapping(uint64 => uint64)) public CONFIRMATIONS;
250-
251249
/*//////////////////////////////////////////////////////////////
252250
AMB VARIABLES
253251
//////////////////////////////////////////////////////////////*/
@@ -2389,118 +2387,6 @@ abstract contract BaseSetup is StdInvariant, Test {
23892387
0x5979D7b546E38E414F7E9822514be443A4800529;
23902388
erc5115ChosenAssets[42_161][0x80c12D5b6Cc494632Bf11b03F09436c8B61Cc5Df].assetOut =
23912389
0x5979D7b546E38E414F7E9822514be443A4800529;
2392-
2393-
mapping(uint64 => mapping(uint64 => uint64)) storage confirmations = CONFIRMATIONS;
2394-
2395-
/// ETH
2396-
confirmations[ETH][BSC] = 20;
2397-
confirmations[ETH][AVAX] = 12;
2398-
confirmations[ETH][POLY] = 512;
2399-
confirmations[ETH][OP] = 20;
2400-
confirmations[ETH][ARBI] = 20;
2401-
confirmations[ETH][BASE] = 10;
2402-
confirmations[ETH][FANTOM] = 5;
2403-
confirmations[ETH][LINEA] = 20;
2404-
confirmations[ETH][BLAST] = 20;
2405-
2406-
/// BSC
2407-
confirmations[BSC][ETH] = 20;
2408-
confirmations[BSC][AVAX] = 20;
2409-
confirmations[BSC][POLY] = 20;
2410-
confirmations[BSC][OP] = 20;
2411-
confirmations[BSC][ARBI] = 20;
2412-
confirmations[BSC][BASE] = 20;
2413-
confirmations[BSC][FANTOM] = 20;
2414-
confirmations[BSC][LINEA] = 20;
2415-
confirmations[BSC][BLAST] = 20;
2416-
2417-
/// AVAX
2418-
confirmations[AVAX][ETH] = 12;
2419-
confirmations[AVAX][BSC] = 12;
2420-
confirmations[AVAX][POLY] = 12;
2421-
confirmations[AVAX][OP] = 12;
2422-
confirmations[AVAX][ARBI] = 12;
2423-
confirmations[AVAX][BASE] = 12;
2424-
confirmations[AVAX][FANTOM] = 12;
2425-
confirmations[AVAX][LINEA] = 12;
2426-
confirmations[AVAX][BLAST] = 12;
2427-
2428-
/// POLYGON
2429-
confirmations[POLY][AVAX] = 512;
2430-
confirmations[POLY][BSC] = 512;
2431-
confirmations[POLY][ETH] = 512;
2432-
confirmations[POLY][OP] = 512;
2433-
confirmations[POLY][ARBI] = 512;
2434-
confirmations[POLY][BASE] = 512;
2435-
confirmations[POLY][FANTOM] = 512;
2436-
confirmations[POLY][LINEA] = 512;
2437-
confirmations[POLY][BLAST] = 512;
2438-
2439-
/// OPTIMISM
2440-
confirmations[OP][POLY] = 20;
2441-
confirmations[OP][AVAX] = 20;
2442-
confirmations[OP][BSC] = 20;
2443-
confirmations[OP][ETH] = 20;
2444-
confirmations[OP][ARBI] = 20;
2445-
confirmations[OP][BASE] = 20;
2446-
confirmations[OP][FANTOM] = 20;
2447-
confirmations[OP][LINEA] = 20;
2448-
confirmations[OP][BLAST] = 20;
2449-
2450-
/// ARBITRUM
2451-
confirmations[ARBI][OP] = 20;
2452-
confirmations[ARBI][POLY] = 20;
2453-
confirmations[ARBI][AVAX] = 20;
2454-
confirmations[ARBI][BSC] = 20;
2455-
confirmations[ARBI][ETH] = 20;
2456-
confirmations[ARBI][BASE] = 20;
2457-
confirmations[ARBI][FANTOM] = 20;
2458-
confirmations[ARBI][LINEA] = 20;
2459-
confirmations[ARBI][BLAST] = 20;
2460-
2461-
/// BASE
2462-
confirmations[BASE][OP] = 10;
2463-
confirmations[BASE][POLY] = 10;
2464-
confirmations[BASE][AVAX] = 10;
2465-
confirmations[BASE][BSC] = 10;
2466-
confirmations[BASE][ETH] = 10;
2467-
confirmations[BASE][ARBI] = 10;
2468-
confirmations[BASE][FANTOM] = 10;
2469-
confirmations[BASE][LINEA] = 10;
2470-
confirmations[BASE][BLAST] = 10;
2471-
2472-
/// FANTOM
2473-
confirmations[FANTOM][OP] = 5;
2474-
confirmations[FANTOM][POLY] = 5;
2475-
confirmations[FANTOM][AVAX] = 5;
2476-
confirmations[FANTOM][BSC] = 5;
2477-
confirmations[FANTOM][ETH] = 5;
2478-
confirmations[FANTOM][BASE] = 5;
2479-
confirmations[FANTOM][ARBI] = 5;
2480-
confirmations[FANTOM][LINEA] = 5;
2481-
confirmations[FANTOM][BLAST] = 5;
2482-
2483-
/// LINEA
2484-
confirmations[LINEA][OP] = 10;
2485-
confirmations[LINEA][POLY] = 10;
2486-
confirmations[LINEA][AVAX] = 10;
2487-
confirmations[LINEA][BSC] = 10;
2488-
confirmations[LINEA][ETH] = 10;
2489-
confirmations[LINEA][BASE] = 10;
2490-
confirmations[LINEA][ARBI] = 10;
2491-
confirmations[LINEA][FANTOM] = 10;
2492-
confirmations[LINEA][BLAST] = 10;
2493-
2494-
/// BLAST
2495-
confirmations[BLAST][LINEA] = 15;
2496-
confirmations[BLAST][OP] = 15;
2497-
confirmations[BLAST][POLY] = 15;
2498-
confirmations[BLAST][AVAX] = 15;
2499-
confirmations[BLAST][BSC] = 15;
2500-
confirmations[BLAST][ETH] = 15;
2501-
confirmations[BLAST][BASE] = 15;
2502-
confirmations[BLAST][ARBI] = 15;
2503-
confirmations[BLAST][FANTOM] = 15;
25042390
}
25052391

25062392
function _fundNativeTokens() internal {

test/utils/MainnetBaseSetup.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ abstract contract MainnetBaseSetup is BaseSetup {
128128
break;
129129
}
130130
}
131-
console.log(trueIndex);
132131
_grabAddresses(j, trueIndex, Cycle.Prod, TARGET_DEPLOYMENT_CHAINS);
133132
}
134133
}

0 commit comments

Comments
 (0)