Skip to content

Commit

Permalink
Merge 5fda354 into e97914d
Browse files Browse the repository at this point in the history
  • Loading branch information
jhweintraub authored Oct 4, 2024
2 parents e97914d + 5fda354 commit 08b5dac
Show file tree
Hide file tree
Showing 12 changed files with 1,620 additions and 12 deletions.
49 changes: 41 additions & 8 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,33 @@ EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrit
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17925)
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25329)
EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26370)
FactoryBurnMintERC20approve:testApproveSuccess() (gas: 55767)
FactoryBurnMintERC20approve:testInvalidAddressReverts() (gas: 10709)
FactoryBurnMintERC20burn:testBasicBurnSuccess() (gas: 172380)
FactoryBurnMintERC20burn:testBurnFromZeroAddressReverts() (gas: 47384)
FactoryBurnMintERC20burn:testExceedsBalanceReverts() (gas: 21962)
FactoryBurnMintERC20burn:testSenderNotBurnerReverts() (gas: 13491)
FactoryBurnMintERC20burnFrom:testBurnFromSuccess() (gas: 58212)
FactoryBurnMintERC20burnFrom:testExceedsBalanceReverts() (gas: 36130)
FactoryBurnMintERC20burnFrom:testInsufficientAllowanceReverts() (gas: 22054)
FactoryBurnMintERC20burnFrom:testSenderNotBurnerReverts() (gas: 13491)
FactoryBurnMintERC20burnFromAlias:testBurnFromSuccess() (gas: 58187)
FactoryBurnMintERC20burnFromAlias:testExceedsBalanceReverts() (gas: 36094)
FactoryBurnMintERC20burnFromAlias:testInsufficientAllowanceReverts() (gas: 22009)
FactoryBurnMintERC20burnFromAlias:testSenderNotBurnerReverts() (gas: 13446)
FactoryBurnMintERC20constructor:testConstructorSuccess() (gas: 1495459)
FactoryBurnMintERC20decreaseApproval:testDecreaseApprovalSuccess() (gas: 31323)
FactoryBurnMintERC20grantMintAndBurnRoles:testGrantMintAndBurnRolesSuccess() (gas: 121439)
FactoryBurnMintERC20grantRole:testGrantBurnAccessSuccess() (gas: 53612)
FactoryBurnMintERC20grantRole:testGrantManySuccess() (gas: 963184)
FactoryBurnMintERC20grantRole:testGrantMintAccessSuccess() (gas: 94434)
FactoryBurnMintERC20increaseApproval:testIncreaseApprovalSuccess() (gas: 44368)
FactoryBurnMintERC20mint:testBasicMintSuccess() (gas: 149987)
FactoryBurnMintERC20mint:testMaxSupplyExceededReverts() (gas: 50703)
FactoryBurnMintERC20mint:testSenderNotMinterReverts() (gas: 11328)
FactoryBurnMintERC20supportsInterface:testConstructorSuccess() (gas: 11345)
FactoryBurnMintERC20transfer:testInvalidAddressReverts() (gas: 10707)
FactoryBurnMintERC20transfer:testTransferSuccess() (gas: 42427)
FeeQuoter_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16686)
FeeQuoter_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16588)
FeeQuoter_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16630)
Expand Down Expand Up @@ -368,20 +395,20 @@ FeeQuoter_getValidatedFee:test_NotAFeeToken_Revert() (gas: 21172)
FeeQuoter_getValidatedFee:test_SingleTokenMessage_Success() (gas: 113309)
FeeQuoter_getValidatedFee:test_TooManyTokens_Revert() (gas: 22691)
FeeQuoter_getValidatedFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 62714)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 1973907)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 1973865)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 1953984)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 1973639)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 1973843)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 1973655)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 1973707)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 1973665)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 1953784)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 1973439)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 1973643)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 1973455)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedOverStalenessPeriod_Success() (gas: 64610)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeed_Success() (gas: 64490)
FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPrice_Success() (gas: 58894)
FeeQuoter_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 1973352)
FeeQuoter_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 1973152)
FeeQuoter_getValidatedTokenPrice:test_StaleFeeToken_Success() (gas: 61764)
FeeQuoter_getValidatedTokenPrice:test_TokenNotSupportedFeed_Revert() (gas: 116495)
FeeQuoter_getValidatedTokenPrice:test_TokenNotSupported_Revert() (gas: 14037)
FeeQuoter_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 1972029)
FeeQuoter_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 1971829)
FeeQuoter_onReport:test_OnReport_StaleUpdate_Revert() (gas: 43631)
FeeQuoter_onReport:test_onReport_InvalidForwarder_Reverts() (gas: 23492)
FeeQuoter_onReport:test_onReport_Success() (gas: 80094)
Expand Down Expand Up @@ -983,6 +1010,12 @@ TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 5793246)
TokenPoolAndProxy:test_setPreviousPool_Success() (gas: 3070731)
TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6434801)
TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 6634934)
TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 1206695)
TokenPoolFactoryTests:test_createTokenPoolLockRelease_NoExistingToken_predict_Success() (gas: 12624842)
TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 12546380)
TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 12887535)
TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5833663)
TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5974010)
TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 1979943)
TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12113)
TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23476)
Expand Down
8 changes: 4 additions & 4 deletions contracts/gas-snapshots/operatorforwarder.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FactoryTest:test_DeployNewForwarderAndTransferOwnership_Success() (gas: 1059722)
FactoryTest:test_DeployNewForwarder_Success() (gas: 1048209)
FactoryTest:test_DeployNewOperatorAndForwarder_Success() (gas: 4069305)
FactoryTest:test_DeployNewOperator_Success() (gas: 3020464)
ForwarderTest:test_Forward_Success(uint256) (runs: 257, μ: 226979, ~: 227289)
ForwarderTest:test_MultiForward_Success(uint256,uint256) (runs: 257, μ: 258577, ~: 259120)
ForwarderTest:test_Forward_Success(uint256) (runs: 256, μ: 226978, ~: 227289)
ForwarderTest:test_MultiForward_Success(uint256,uint256) (runs: 256, μ: 258575, ~: 259120)
ForwarderTest:test_OwnerForward_Success() (gas: 30118)
ForwarderTest:test_SetAuthorizedSenders_Success() (gas: 160524)
ForwarderTest:test_TransferOwnershipWithMessage_Success() (gas: 35123)
OperatorTest:test_CancelOracleRequest_Success() (gas: 274436)
OperatorTest:test_FulfillOracleRequest_Success() (gas: 330603)
OperatorTest:test_NotAuthorizedSender_Revert() (gas: 246716)
OperatorTest:test_OracleRequest_Success() (gas: 250019)
OperatorTest:test_SendRequestAndCancelRequest_Success(uint96) (runs: 257, μ: 387121, ~: 387124)
OperatorTest:test_SendRequest_Success(uint96) (runs: 257, μ: 303612, ~: 303615)
OperatorTest:test_SendRequestAndCancelRequest_Success(uint96) (runs: 256, μ: 387121, ~: 387124)
OperatorTest:test_SendRequest_Success(uint96) (runs: 256, μ: 303612, ~: 303615)
14 changes: 14 additions & 0 deletions contracts/src/v0.8/ccip/interfaces/IRegistryModuleOwnerCustom.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.19;

interface IRegistryModuleOwnerCustom {
/// @notice Registers the admin of the token using the `getCCIPAdmin` method.
/// @param token The token to register the admin for.
/// @dev The caller must be the admin returned by the `getCCIPAdmin` method.
function registerAdminViaGetCCIPAdmin(address token) external;

/// @notice Registers the admin of the token using the `owner` method.
/// @param token The token to register the admin for.
/// @dev The caller must be the admin returned by the `owner` method.
function registerAdminViaOwner(address token) external;
}
18 changes: 18 additions & 0 deletions contracts/src/v0.8/ccip/interfaces/ITokenAdminRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,22 @@ interface ITokenAdminRegistry {
/// @param localToken The token to register the administrator for.
/// @param administrator The administrator to register.
function proposeAdministrator(address localToken, address administrator) external;

/// @notice Accepts the administrator role for a token.
/// @param localToken The token to accept the administrator role for.
/// @dev This function can only be called by the pending administrator.
function acceptAdminRole(address localToken) external;

/// @notice Sets the pool for a token. Setting the pool to address(0) effectively delists the token
/// from CCIP. Setting the pool to any other address enables the token on CCIP.
/// @param localToken The token to set the pool for.
/// @param pool The pool to set for the token.
function setPool(address localToken, address pool) external;

/// @notice Transfers the administrator role for a token to a new address with a 2-step process.
/// @param localToken The token to transfer the administrator role for.
/// @param newAdmin The address to transfer the administrator role to. Can be address(0) to cancel
/// a pending transfer.
/// @dev The new admin must call `acceptAdminRole` to accept the role.
function transferAdminRole(address localToken, address newAdmin) external;
}
Loading

0 comments on commit 08b5dac

Please sign in to comment.