diff --git a/Makefile b/Makefile index 0e071eefc..6f34a00ee 100644 --- a/Makefile +++ b/Makefile @@ -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_printConfirmations --evm-version cancun -vvv + forge test --match-test test_lzConfig --evm-version cancun -vvv .PHONY: ftest ftest: ## Runs tests with cancun evm version diff --git a/test/mainnet/SmokeTest.t.sol b/test/mainnet/SmokeTest.t.sol index fc487d4f2..51866b23f 100644 --- a/test/mainnet/SmokeTest.t.sol +++ b/test/mainnet/SmokeTest.t.sol @@ -40,48 +40,6 @@ contract SmokeTest is MainnetBaseSetup { address[] optionalDVNs; // no duplicates. sorted an an ascending order. allowed overlap with requiredDVNs } - /* - function test_printConfirmations() public { - bytes memory config; - address oapp; - - ILayerZeroEndpointV2 endpoint = ILayerZeroEndpointV2(lzV2Endpoint); - - uint64 chain = BASE; - vm.selectFork(FORKS[BASE]); - oapp = 0x12dC9256Acc9895B076f6638D628382881e62CeE; - - uint64 dstChain = ARBI; - config = endpoint.getConfig(oapp, 0xB5320B0B3a13cC860893E2Bd79FCd7e13484Dda2, 30_110, 2); - UlnConfig memory ulnConfig = abi.decode(config, (UlnConfig)); - console.log("confirmations", ulnConfig.confirmations); - console.log("our confirmations", CONFIRMATIONS[chain][dstChain]); - assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]); - - chain = ARBI; - vm.selectFork(FORKS[ARBI]); - oapp = 0x12dC9256Acc9895B076f6638D628382881e62CeE; - - dstChain = BASE; - config = endpoint.getConfig(oapp, 0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6, 30_184, 2); - ulnConfig = abi.decode(config, (UlnConfig)); - console.log("confirmations", ulnConfig.confirmations); - console.log("our confirmations", CONFIRMATIONS[chain][dstChain]); - //assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]); - - chain = ARBI; - vm.selectFork(FORKS[ARBI]); - oapp = address(0); - - dstChain = POLY; - config = endpoint.getConfig(oapp, 0x7B9E184e07a6EE1aC23eAe0fe8D6Be2f663f05e6, 30_109, 2); - ulnConfig = abi.decode(config, (UlnConfig)); - console.log("confirmations", ulnConfig.confirmations); - console.log("our confirmations", CONFIRMATIONS[chain][dstChain]); - assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]); - } - */ - function test_lzConfig() public { bytes memory config; address oapp; @@ -98,7 +56,6 @@ contract SmokeTest is MainnetBaseSetup { if (chain != dstChain && !(dstChain == LINEA || dstChain == BLAST)) { config = endpoint.getConfig(oapp, lzV2SendLib[i], lz_v2_chainIds[j], 2); UlnConfig memory ulnConfig = abi.decode(config, (UlnConfig)); - assert(ulnConfig.confirmations == CONFIRMATIONS[chain][dstChain]); for (uint256 k = 0; k < ulnConfig.requiredDVNs.length; k++) { // Validate DVNs are properly ordered (ascending) if (SuperformDVNs[i] < LzDVNs[i]) { diff --git a/test/utils/BaseSetup.sol b/test/utils/BaseSetup.sol index d0c105eab..9e48e236f 100644 --- a/test/utils/BaseSetup.sol +++ b/test/utils/BaseSetup.sol @@ -246,8 +246,6 @@ abstract contract BaseSetup is StdInvariant, Test { uint8[] public ambIds = [uint8(1), 2, 3, 4, 5, 6]; bool[] public isBroadcastAMB = [false, false, false, true, false, false]; - mapping(uint64 => mapping(uint64 => uint64)) public CONFIRMATIONS; - /*////////////////////////////////////////////////////////////// AMB VARIABLES //////////////////////////////////////////////////////////////*/ @@ -2389,118 +2387,6 @@ abstract contract BaseSetup is StdInvariant, Test { 0x5979D7b546E38E414F7E9822514be443A4800529; erc5115ChosenAssets[42_161][0x80c12D5b6Cc494632Bf11b03F09436c8B61Cc5Df].assetOut = 0x5979D7b546E38E414F7E9822514be443A4800529; - - mapping(uint64 => mapping(uint64 => uint64)) storage confirmations = CONFIRMATIONS; - - /// ETH - confirmations[ETH][BSC] = 20; - confirmations[ETH][AVAX] = 12; - confirmations[ETH][POLY] = 512; - confirmations[ETH][OP] = 20; - confirmations[ETH][ARBI] = 20; - confirmations[ETH][BASE] = 10; - confirmations[ETH][FANTOM] = 5; - confirmations[ETH][LINEA] = 20; - confirmations[ETH][BLAST] = 20; - - /// BSC - confirmations[BSC][ETH] = 20; - confirmations[BSC][AVAX] = 20; - confirmations[BSC][POLY] = 20; - confirmations[BSC][OP] = 20; - confirmations[BSC][ARBI] = 20; - confirmations[BSC][BASE] = 20; - confirmations[BSC][FANTOM] = 20; - confirmations[BSC][LINEA] = 20; - confirmations[BSC][BLAST] = 20; - - /// AVAX - confirmations[AVAX][ETH] = 12; - confirmations[AVAX][BSC] = 12; - confirmations[AVAX][POLY] = 12; - confirmations[AVAX][OP] = 12; - confirmations[AVAX][ARBI] = 12; - confirmations[AVAX][BASE] = 12; - confirmations[AVAX][FANTOM] = 12; - confirmations[AVAX][LINEA] = 12; - confirmations[AVAX][BLAST] = 12; - - /// POLYGON - confirmations[POLY][AVAX] = 512; - confirmations[POLY][BSC] = 512; - confirmations[POLY][ETH] = 512; - confirmations[POLY][OP] = 512; - confirmations[POLY][ARBI] = 512; - confirmations[POLY][BASE] = 512; - confirmations[POLY][FANTOM] = 512; - confirmations[POLY][LINEA] = 512; - confirmations[POLY][BLAST] = 512; - - /// OPTIMISM - confirmations[OP][POLY] = 20; - confirmations[OP][AVAX] = 20; - confirmations[OP][BSC] = 20; - confirmations[OP][ETH] = 20; - confirmations[OP][ARBI] = 20; - confirmations[OP][BASE] = 20; - confirmations[OP][FANTOM] = 20; - confirmations[OP][LINEA] = 20; - confirmations[OP][BLAST] = 20; - - /// ARBITRUM - confirmations[ARBI][OP] = 20; - confirmations[ARBI][POLY] = 20; - confirmations[ARBI][AVAX] = 20; - confirmations[ARBI][BSC] = 20; - confirmations[ARBI][ETH] = 20; - confirmations[ARBI][BASE] = 20; - confirmations[ARBI][FANTOM] = 20; - confirmations[ARBI][LINEA] = 20; - confirmations[ARBI][BLAST] = 20; - - /// BASE - confirmations[BASE][OP] = 10; - confirmations[BASE][POLY] = 10; - confirmations[BASE][AVAX] = 10; - confirmations[BASE][BSC] = 10; - confirmations[BASE][ETH] = 10; - confirmations[BASE][ARBI] = 10; - confirmations[BASE][FANTOM] = 10; - confirmations[BASE][LINEA] = 10; - confirmations[BASE][BLAST] = 10; - - /// FANTOM - confirmations[FANTOM][OP] = 5; - confirmations[FANTOM][POLY] = 5; - confirmations[FANTOM][AVAX] = 5; - confirmations[FANTOM][BSC] = 5; - confirmations[FANTOM][ETH] = 5; - confirmations[FANTOM][BASE] = 5; - confirmations[FANTOM][ARBI] = 5; - confirmations[FANTOM][LINEA] = 5; - confirmations[FANTOM][BLAST] = 5; - - /// LINEA - confirmations[LINEA][OP] = 10; - confirmations[LINEA][POLY] = 10; - confirmations[LINEA][AVAX] = 10; - confirmations[LINEA][BSC] = 10; - confirmations[LINEA][ETH] = 10; - confirmations[LINEA][BASE] = 10; - confirmations[LINEA][ARBI] = 10; - confirmations[LINEA][FANTOM] = 10; - confirmations[LINEA][BLAST] = 10; - - /// BLAST - confirmations[BLAST][LINEA] = 15; - confirmations[BLAST][OP] = 15; - confirmations[BLAST][POLY] = 15; - confirmations[BLAST][AVAX] = 15; - confirmations[BLAST][BSC] = 15; - confirmations[BLAST][ETH] = 15; - confirmations[BLAST][BASE] = 15; - confirmations[BLAST][ARBI] = 15; - confirmations[BLAST][FANTOM] = 15; } function _fundNativeTokens() internal { diff --git a/test/utils/MainnetBaseSetup.sol b/test/utils/MainnetBaseSetup.sol index 80eaadf4d..90475a36d 100644 --- a/test/utils/MainnetBaseSetup.sol +++ b/test/utils/MainnetBaseSetup.sol @@ -128,7 +128,6 @@ abstract contract MainnetBaseSetup is BaseSetup { break; } } - console.log(trueIndex); _grabAddresses(j, trueIndex, Cycle.Prod, TARGET_DEPLOYMENT_CHAINS); } }