Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCIP-4116 restructure tests #15165

Merged
merged 24 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6b9341c
restructure router, rmn and rate limiter
0xsuryansh Nov 8, 2024
727055e
ocr test split
0xsuryansh Nov 8, 2024
ea46a14
ArmProxy forge fmt
0xsuryansh Nov 8, 2024
3c8e891
CCIPHome test split
0xsuryansh Nov 8, 2024
3641d53
add changeset
0xsuryansh Nov 8, 2024
28f23fd
CCIP Home - remove unused import
0xsuryansh Nov 8, 2024
a187576
remove unused import
0xsuryansh Nov 8, 2024
1e86d99
pint pong demo test split
0xsuryansh Nov 8, 2024
f7daa23
EthSenderReceiverTest split
0xsuryansh Nov 8, 2024
220f7ca
remove EthSenderReceiverTest original test file
0xsuryansh Nov 8, 2024
5d38977
fix repeated tests
0xsuryansh Nov 8, 2024
45a5147
fix test contract name
0xsuryansh Nov 8, 2024
c615990
Uppercase folder
0xsuryansh Nov 8, 2024
e3c74bf
import fix
0xsuryansh Nov 8, 2024
7817c77
move contracts inside sub folder
0xsuryansh Nov 8, 2024
f7cca8f
[Bot] Update changeset file with jira issues
app-token-issuer-infra-releng[bot] Nov 8, 2024
abbcb81
move tokenAdminRegistry test contracts inside respective sub folder
0xsuryansh Nov 10, 2024
e8c36ce
Merge remote-tracking branch 'origin/CCIP-4116_Restructure-tests' int…
0xsuryansh Nov 10, 2024
4e31acf
Merge branch 'develop' into CCIP-4116_Restructure-tests
0xsuryansh Nov 10, 2024
e131829
add missing file
0xsuryansh Nov 10, 2024
df539f8
fix CCIPHome split
0xsuryansh Nov 10, 2024
0419cc2
add missing .t.sol to CCIPHome_supportsInterface test
0xsuryansh Nov 11, 2024
ca63592
split PingPong.plumbing.t.sol
0xsuryansh Nov 11, 2024
b039d1f
moved FeeQuoter tests out to parent
0xsuryansh Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions contracts/.changeset/six-games-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@chainlink/contracts': minor
---

#internal CCIP test restructuring

PR issue: CCIP-4116

Solidity Review issue: CCIP-3966
108 changes: 54 additions & 54 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARMProxyStandaloneTest:test_ARMCallEmptyContractRevert() (gas: 19709)
ARMProxyStandaloneTest:test_Constructor() (gas: 302231)
ARMProxyStandaloneTest:test_SetARM() (gas: 16599)
ARMProxyStandaloneTest:test_SetARMzero() (gas: 11319)
ARMProxyTest:test_ARMCallRevertReasonForwarded() (gas: 45153)
ARMProxyTest:test_ARMIsCursed_Success() (gas: 47082)
ARMProxy_constructor:test_Constructor() (gas: 302231)
ARMProxy_isCursed:test_IsCursed_Success() (gas: 47209)
ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 19412)
ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 45210)
ARMProxy_setARM:test_SetARM() (gas: 16599)
ARMProxy_setARM:test_SetARMzero() (gas: 11275)
BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28962)
BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55341)
BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244152)
Expand Down Expand Up @@ -49,11 +49,10 @@ CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallRever
CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015)
CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072)
CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716)
CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63789)
CCIPHome_constructor:test_constructor_success() (gas: 3455842)
CCIPHome_constructor:test_getCapabilityConfiguration_success() (gas: 9150)
CCIPHome_constructor:test_supportsInterface_success() (gas: 9907)
CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767)
CCIPHome_constructor:test_constructor_success() (gas: 3455841)
CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000)
CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138)
CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397)
CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087)
CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005)
Expand All @@ -66,6 +65,7 @@ CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674)
CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383)
CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154)
CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439)
CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885)
DefensiveExampleTest:test_HappyPath_Success() (gas: 200473)
DefensiveExampleTest:test_Recovery() (gas: 424876)
E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1519829)
Expand All @@ -90,35 +90,35 @@ EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrit
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17969)
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25328)
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26392)
FactoryBurnMintERC20approve:test_Approve_Success() (gas: 55819)
FactoryBurnMintERC20approve:test_InvalidAddress_Reverts() (gas: 10703)
FactoryBurnMintERC20burn:test_BasicBurn_Success() (gas: 172464)
FactoryBurnMintERC20burn:test_BurnFromZeroAddress_Reverts() (gas: 47338)
FactoryBurnMintERC20burn:test_ExceedsBalance_Reverts() (gas: 22005)
FactoryBurnMintERC20burn:test_SenderNotBurner_Reverts() (gas: 13520)
FactoryBurnMintERC20burnFrom:test_BurnFrom_Success() (gas: 58274)
FactoryBurnMintERC20burnFrom:test_ExceedsBalance_Reverts() (gas: 36191)
FactoryBurnMintERC20burnFrom:test_InsufficientAllowance_Reverts() (gas: 22113)
FactoryBurnMintERC20burnFrom:test_SenderNotBurner_Reverts() (gas: 13487)
FactoryBurnMintERC20burnFromAlias:test_BurnFrom_Success() (gas: 58248)
FactoryBurnMintERC20burnFromAlias:test_ExceedsBalance_Reverts() (gas: 36155)
FactoryBurnMintERC20burnFromAlias:test_InsufficientAllowance_Reverts() (gas: 22068)
FactoryBurnMintERC20burnFromAlias:test_SenderNotBurner_Reverts() (gas: 13442)
FactoryBurnMintERC20constructor:test_Constructor_Success() (gas: 1450638)
FactoryBurnMintERC20decreaseApproval:test_DecreaseApproval_Success() (gas: 31419)
FactoryBurnMintERC20getCCIPAdmin:test_getCCIPAdmin_Success() (gas: 12717)
FactoryBurnMintERC20getCCIPAdmin:test_setCCIPAdmin_Success() (gas: 23874)
FactoryBurnMintERC20grantMintAndBurnRoles:test_GrantMintAndBurnRoles_Success() (gas: 121194)
FactoryBurnMintERC20grantRole:test_GrantBurnAccess_Success() (gas: 53403)
FactoryBurnMintERC20grantRole:test_GrantMany_Success() (gas: 961486)
FactoryBurnMintERC20grantRole:test_GrantMintAccess_Success() (gas: 94165)
FactoryBurnMintERC20increaseApproval:test_IncreaseApproval_Success() (gas: 44398)
FactoryBurnMintERC20mint:test_BasicMint_Success() (gas: 149804)
FactoryBurnMintERC20mint:test_MaxSupplyExceeded_Reverts() (gas: 50679)
FactoryBurnMintERC20mint:test_SenderNotMinter_Reverts() (gas: 11405)
FactoryBurnMintERC20supportsInterface:test_SupportsInterface_Success() (gas: 11538)
FactoryBurnMintERC20transfer:test_InvalidAddress_Reverts() (gas: 10701)
FactoryBurnMintERC20transfer:test_Transfer_Success() (gas: 42482)
FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55819)
FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10703)
FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172464)
FactoryBurnMintERC20_burn:test_BurnFromZeroAddress_Reverts() (gas: 47338)
FactoryBurnMintERC20_burn:test_ExceedsBalance_Reverts() (gas: 22005)
FactoryBurnMintERC20_burn:test_SenderNotBurner_Reverts() (gas: 13520)
FactoryBurnMintERC20_burnFrom:test_BurnFrom_Success() (gas: 58274)
FactoryBurnMintERC20_burnFrom:test_ExceedsBalance_Reverts() (gas: 36191)
FactoryBurnMintERC20_burnFrom:test_InsufficientAllowance_Reverts() (gas: 22113)
FactoryBurnMintERC20_burnFrom:test_SenderNotBurner_Reverts() (gas: 13487)
FactoryBurnMintERC20_burnFromAlias:test_BurnFrom_Success() (gas: 58248)
FactoryBurnMintERC20_burnFromAlias:test_ExceedsBalance_Reverts() (gas: 36155)
FactoryBurnMintERC20_burnFromAlias:test_InsufficientAllowance_Reverts() (gas: 22068)
FactoryBurnMintERC20_burnFromAlias:test_SenderNotBurner_Reverts() (gas: 13442)
FactoryBurnMintERC20_constructor:test_Constructor_Success() (gas: 1450638)
FactoryBurnMintERC20_decreaseApproval:test_DecreaseApproval_Success() (gas: 31419)
FactoryBurnMintERC20_getCCIPAdmin:test_getCCIPAdmin_Success() (gas: 12717)
FactoryBurnMintERC20_getCCIPAdmin:test_setCCIPAdmin_Success() (gas: 23874)
FactoryBurnMintERC20_grantMintAndBurnRoles:test_GrantMintAndBurnRoles_Success() (gas: 121194)
FactoryBurnMintERC20_grantRole:test_GrantBurnAccess_Success() (gas: 53403)
FactoryBurnMintERC20_grantRole:test_GrantMany_Success() (gas: 961486)
FactoryBurnMintERC20_grantRole:test_GrantMintAccess_Success() (gas: 94165)
FactoryBurnMintERC20_increaseApproval:test_IncreaseApproval_Success() (gas: 44398)
FactoryBurnMintERC20_mint:test_BasicMint_Success() (gas: 149804)
FactoryBurnMintERC20_mint:test_MaxSupplyExceeded_Reverts() (gas: 50679)
FactoryBurnMintERC20_mint:test_SenderNotMinter_Reverts() (gas: 11405)
FactoryBurnMintERC20_supportsInterface:test_SupportsInterface_Success() (gas: 11538)
FactoryBurnMintERC20_transfer:test_InvalidAddress_Reverts() (gas: 10701)
FactoryBurnMintERC20_transfer:test_Transfer_Success() (gas: 42482)
FeeQuoter_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16846)
FeeQuoter_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16759)
FeeQuoter_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16813)
Expand Down Expand Up @@ -554,16 +554,10 @@ OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigReentrancyGuardEntere
OnRamp_setDynamicConfig:test_setDynamicConfig_Success() (gas: 56440)
OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 125867)
PingPong_ccipReceive:test_CcipReceive_Success() (gas: 172841)
PingPong_plumbing:test_OutOfOrderExecution_Success() (gas: 20283)
PingPong_plumbing:test_Pausing_Success() (gas: 17738)
PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283)
PingPong_setPaused:test_Pausing_Success() (gas: 17738)
PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151954)
PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177569)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318)
RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522)
RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685)
RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23879)
RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 10597)
Expand All @@ -580,6 +574,12 @@ RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 30
RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 18854)
RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 14009)
RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 104862)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318)
RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522)
RMNRemote_constructor:test_constructor_success() (gas: 8334)
RMNRemote_constructor:test_constructor_zeroChainSelector_reverts() (gas: 59184)
RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154479)
Expand Down Expand Up @@ -678,13 +678,13 @@ TokenAdminRegistry_setPool:test_setPool_Success() (gas: 36267)
TokenAdminRegistry_setPool:test_setPool_ZeroAddressRemovesPool_Success() (gas: 30875)
TokenAdminRegistry_transferAdminRole:test_transferAdminRole_OnlyAdministrator_Revert() (gas: 18202)
TokenAdminRegistry_transferAdminRole:test_transferAdminRole_Success() (gas: 49592)
TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 1039441)
TokenPoolFactoryTests:test_createTokenPoolLockRelease_ExistingToken_predict_Success() (gas: 11591893)
TokenPoolFactoryTests:test_createTokenPool_BurnFromMintTokenPool_Success() (gas: 5848501)
TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 12227697)
TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 12564414)
TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5701802)
TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5845024)
TokenPoolFactory_constructor:test_constructor_Revert() (gas: 1039441)
TokenPoolFactory_createTokenPool:test_createTokenPoolLockRelease_ExistingToken_predict_Success() (gas: 11591871)
TokenPoolFactory_createTokenPool:test_createTokenPool_BurnFromMintTokenPool_Success() (gas: 5848479)
TokenPoolFactory_createTokenPool:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 12227675)
TokenPoolFactory_createTokenPool:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 12564436)
TokenPoolFactory_createTokenPool:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5701824)
TokenPoolFactory_createTokenPool:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5845002)
TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 1944108)
TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12119)
TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23567)
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/v0.8/ccip/test/NonceManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {OnRamp} from "../onRamp/OnRamp.sol";
import {BaseTest} from "./BaseTest.t.sol";
import {EVM2EVMOffRampHelper} from "./helpers/EVM2EVMOffRampHelper.sol";
import {OnRampHelper} from "./helpers/OnRampHelper.sol";
import {OffRampSetup} from "./offRamp/offRamp/OffRampSetup.t.sol";
import {OnRampSetup} from "./onRamp/onRamp/OnRampSetup.t.sol";
import {OffRampSetup} from "./offRamp/OffRamp/OffRampSetup.t.sol";
import {OnRampSetup} from "./onRamp/OnRamp/OnRampSetup.t.sol";

import {Test} from "forge-std/Test.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/test/TokenSetup.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {LockReleaseTokenPool} from "../pools/LockReleaseTokenPool.sol";
import {TokenPool} from "../pools/TokenPool.sol";
import {TokenAdminRegistry} from "../tokenAdminRegistry/TokenAdminRegistry.sol";
import {MaybeRevertingBurnMintTokenPool} from "./helpers/MaybeRevertingBurnMintTokenPool.sol";
import {RouterSetup} from "./router/RouterSetup.t.sol";
import {RouterSetup} from "./router/Router/RouterSetup.t.sol";

import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {DefensiveExample} from "../../applications/DefensiveExample.sol";
import {Client} from "../../libraries/Client.sol";
import {OnRampSetup} from "../onRamp/onRamp/OnRampSetup.t.sol";
import {DefensiveExample} from "../../../applications/DefensiveExample.sol";
import {Client} from "../../../libraries/Client.sol";
import {OnRampSetup} from "../../onRamp/OnRamp/OnRampSetup.t.sol";

import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol";
import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol";

contract DefensiveExampleTest is OnRampSetup {
event MessageFailed(bytes32 indexed messageId, bytes reason);
Expand Down
Loading
Loading