Skip to content

Commit c5c1ec2

Browse files
committed
chore: fix all failing tests
1 parent 07c8cb0 commit c5c1ec2

File tree

4 files changed

+44
-17
lines changed

4 files changed

+44
-17
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ update:; forge update
3535
build :; FOUNDRY_PROFILE=production forge build
3636
build-unoptimized :; FOUNDRY_PROFILE=localdev forge build
3737
build-sizes :; FOUNDRY_PROFILE=production forge build --sizes
38-
test-vvv :; forge test --match-contract SXSVDNormal4626MultiTokenInputLineaNoSlippageAMB23 --evm-version cancun -vvvv
38+
test-vvv :; forge test --match-contract SXSVDNormal4626MultiTokenInputLineaNoSlippageAMB23 --evm-version cancun -vvv
3939
ftest :; forge test --evm-version cancun
4040
test-ci :; forge test --no-match-path "test/invariant/**/*.sol" --evm-version cancun
4141
coverage :; FOUNDRY_PROFILE=coverage forge coverage --no-match-path "test/invariant/**/*.sol" --no-match-contract SmokeTest --evm-version cancun --report lcov

test/fuzz/scenarios/scenarios-deposit-singleXChainSingleVaultDeposit/4626.TokenInput.NoSlippage.Linea.AMB23.t.sol

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,21 @@ contract SXSVDNormal4626MultiTokenInputLineaNoSlippageAMB23 is ProtocolActions {
1010
/*//////////////////////////////////////////////////////////////
1111
!! WARNING !! DEFINE TEST SETTINGS HERE
1212
//////////////////////////////////////////////////////////////*/
13-
AMBs = [2, 3];
13+
AMBs = [5, 6];
1414

1515
CHAIN_0 = LINEA;
1616
DST_CHAINS = [OP];
1717

1818
/// @dev define vaults amounts and slippage for every destination chain and for every action
19-
TARGET_UNDERLYINGS[OP][0] = [1];
20-
19+
TARGET_UNDERLYINGS[OP][0] = [0];
2120
TARGET_VAULTS[OP][0] = [0];
22-
2321
TARGET_FORM_KINDS[OP][0] = [0];
2422

2523
AMOUNTS[OP][0] = [133];
2624

2725
MAX_SLIPPAGE = 1000;
2826

29-
LIQ_BRIDGES[OP][0] = [2];
30-
27+
LIQ_BRIDGES[OP][0] = [1];
3128
RECEIVE_4626[OP][0] = [false];
3229

3330
actions.push(
@@ -39,8 +36,8 @@ contract SXSVDNormal4626MultiTokenInputLineaNoSlippageAMB23 is ProtocolActions {
3936
revertError: "",
4037
revertRole: "",
4138
slippage: 0, // 0% <- if we are testing a pass this must be below each maxSlippage,
42-
dstSwap: true,
43-
externalToken: 1 // 0 = DAI, 1 = USDC, 2 = WETH
39+
dstSwap: false,
40+
externalToken: 0 // 0 = DAI, 1 = USDC, 2 = WETH
4441
})
4542
);
4643
}

test/mainnet/SmokeTest.Staging.t.sol

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,19 @@ contract SmokeTestStaging is MainnetBaseSetup {
497497
paymentHelper = PaymentHelper(getContract(chainId, "PaymentHelper"));
498498

499499
for (uint256 j; j < TARGET_DEPLOYMENT_CHAINS.length; ++j) {
500-
assertEq(
501-
address(paymentHelper.nativeFeedOracle(TARGET_DEPLOYMENT_CHAINS[j])),
502-
PRICE_FEEDS[chainId][TARGET_DEPLOYMENT_CHAINS[j]]
503-
);
500+
/// @dev eoracle is not added in blast & linea
501+
if (
502+
chainId != BLAST
503+
&& (
504+
chainId == LINEA
505+
&& (TARGET_DEPLOYMENT_CHAINS[j] != FANTOM && TARGET_DEPLOYMENT_CHAINS[j] != BSC)
506+
)
507+
) {
508+
assertEq(
509+
address(paymentHelper.nativeFeedOracle(TARGET_DEPLOYMENT_CHAINS[j])),
510+
PRICE_FEEDS[chainId][TARGET_DEPLOYMENT_CHAINS[j]]
511+
);
512+
}
504513

505514
if (chainId != TARGET_DEPLOYMENT_CHAINS[j]) {
506515
assertEq(
@@ -550,8 +559,11 @@ contract SmokeTestStaging is MainnetBaseSetup {
550559
vm.selectFork(FORKS[chainId]);
551560
superFactory = SuperformFactory(getContract(chainId, "SuperformFactory"));
552561

553-
assertEq(superFactory.getFormImplementation(5), getContract(chainId, "ERC5115Form"));
554-
assertEq(superFactory.getFormCount(), chainId == LINEA ? 3 : chainId == BLAST ? 2 : 5);
562+
chainId != BLAST
563+
? assertEq(superFactory.getFormImplementation(5), getContract(chainId, "ERC5115Form"))
564+
: assertEq(superFactory.getFormImplementation(205), getContract(chainId, "ERC5115Form"));
565+
/// @dev in blast there are 6 forms (2 without operator, 2 with wrong state registry and 2 right superforms)
566+
assertEq(superFactory.getFormCount(), chainId == LINEA ? 3 : chainId == BLAST ? 6 : 5);
555567
assertEq(superFactory.getFormStateRegistryId(5), 1);
556568
}
557569
}

test/utils/BaseSetup.sol

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ abstract contract BaseSetup is StdInvariant, Test {
221221
address public constant OP_lzEndpoint = 0x3c2269811836af69497E5F486A85D7316753cf62;
222222
address public constant BASE_lzEndpoint = 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7;
223223
address public constant FANTOM_lzEndpoint = 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7;
224+
address public constant LINEA_lzEndpoint = 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7;
225+
address public constant BLAST_lzEndpoint = 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7;
224226

225227
address[] public lzEndpoints = [
226228
0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675,
@@ -1433,6 +1435,18 @@ abstract contract BaseSetup is StdInvariant, Test {
14331435
/// @dev using USDC price feed
14341436
tokenPriceFeeds[FANTOM][getContract(FANTOM, "sUSDe")] = 0x2553f4eeb82d5A26427b8d1106C51499CBa5D99c;
14351437
tokenPriceFeeds[FANTOM][getContract(FANTOM, "USDe")] = 0x2553f4eeb82d5A26427b8d1106C51499CBa5D99c;
1438+
1439+
/// LINEA
1440+
tokenPriceFeeds[LINEA][getContract(LINEA, "DAI")] = 0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5;
1441+
tokenPriceFeeds[LINEA][getContract(LINEA, "USDC")] = 0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5;
1442+
/// @dev note using ETH's price feed for WETH (as 1 WETH = 1 ETH)
1443+
tokenPriceFeeds[LINEA][getContract(LINEA, "WETH")] = 0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA;
1444+
tokenPriceFeeds[LINEA][NATIVE_TOKEN] = 0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA;
1445+
tokenPriceFeeds[LINEA][getContract(LINEA, "ezETH")] = 0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA;
1446+
tokenPriceFeeds[LINEA][getContract(LINEA, "wstETH")] = 0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA;
1447+
/// @dev using USDC price feed
1448+
tokenPriceFeeds[LINEA][getContract(LINEA, "sUSDe")] = 0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5;
1449+
tokenPriceFeeds[LINEA][getContract(LINEA, "USDe")] = 0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5;
14361450
}
14371451

14381452
function _preDeploymentSetup(bool pinnedBlock, bool invariant) internal {
@@ -1446,10 +1460,10 @@ abstract contract BaseSetup is StdInvariant, Test {
14461460
forks[POLY] = pinnedBlock ? vm.createFork(POLYGON_RPC_URL, 60_619_414) : vm.createFork(POLYGON_RPC_URL_QN);
14471461
forks[ARBI] =
14481462
pinnedBlock ? vm.createFork(ARBITRUM_RPC_URL, 243_122_707) : vm.createFork(ARBITRUM_RPC_URL_QN);
1449-
forks[OP] = pinnedBlock ? vm.createFork(OPTIMISM_RPC_URL, 124_063_271) : vm.createFork(OPTIMISM_RPC_URL_QN);
1463+
forks[OP] = pinnedBlock ? vm.createFork(OPTIMISM_RPC_URL, 125_149_636) : vm.createFork(OPTIMISM_RPC_URL_QN);
14501464
forks[BASE] = pinnedBlock ? vm.createFork(BASE_RPC_URL) : vm.createFork(BASE_RPC_URL_QN);
14511465
forks[FANTOM] = pinnedBlock ? vm.createFork(FANTOM_RPC_URL, 88_933_543) : vm.createFork(FANTOM_RPC_URL_QN);
1452-
forks[LINEA] = pinnedBlock ? vm.createFork(LINEA_RPC_URL, 9_012_611) : vm.createFork(LINEA_RPC_URL_QN);
1466+
forks[LINEA] = pinnedBlock ? vm.createFork(LINEA_RPC_URL, 9_241_361) : vm.createFork(LINEA_RPC_URL_QN);
14531467
forks[BLAST] = pinnedBlock ? vm.createFork(BLAST_RPC_URL, 8_315_221) : vm.createFork(BLAST_RPC_URL_QN);
14541468
}
14551469

@@ -1534,6 +1548,8 @@ abstract contract BaseSetup is StdInvariant, Test {
15341548
lzEndpointsStorage[OP] = OP_lzEndpoint;
15351549
lzEndpointsStorage[BASE] = BASE_lzEndpoint;
15361550
lzEndpointsStorage[FANTOM] = FANTOM_lzEndpoint;
1551+
lzEndpointsStorage[LINEA] = LINEA_lzEndpoint;
1552+
lzEndpointsStorage[BLAST] = BLAST_lzEndpoint;
15371553

15381554
mapping(uint64 => address) storage hyperlaneMailboxesStorage = HYPERLANE_MAILBOXES;
15391555
hyperlaneMailboxesStorage[ETH] = hyperlaneMailboxes[0];
@@ -1544,6 +1560,8 @@ abstract contract BaseSetup is StdInvariant, Test {
15441560
hyperlaneMailboxesStorage[OP] = hyperlaneMailboxes[5];
15451561
hyperlaneMailboxesStorage[BASE] = hyperlaneMailboxes[6];
15461562
hyperlaneMailboxesStorage[FANTOM] = hyperlaneMailboxes[7];
1563+
hyperlaneMailboxesStorage[LINEA] = hyperlaneMailboxes[8];
1564+
hyperlaneMailboxesStorage[BLAST] = hyperlaneMailboxes[9];
15471565

15481566
mapping(uint64 => uint16) storage wormholeChainIdsStorage = WORMHOLE_CHAIN_IDS;
15491567

0 commit comments

Comments
 (0)