diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml index 02ab3ee101..64cfec1e0e 100644 --- a/.github/e2e-tests.yml +++ b/.github/e2e-tests.yml @@ -962,6 +962,32 @@ runner-test-matrix: E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/usdc_mock_deployment.toml + - id: ccip-smoke-lbtc-32bytes-destination-pool-data + path: integration-tests/ccip-tests/smoke/ccip_test.go + test_env_type: docker + runs_on: ubuntu-latest + triggers: + - PR E2E CCIP Tests + - Merge Queue E2E CCIP Tests + - Nightly E2E Tests + test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json + test_env_vars: + E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_32bytes_data.toml + + - id: ccip-smoke-lbtc-non32bytes-destination-pool-data + path: integration-tests/ccip-tests/smoke/ccip_test.go + test_env_type: docker + runs_on: ubuntu-latest + triggers: + - PR E2E CCIP Tests + - Merge Queue E2E CCIP Tests + - Nightly E2E Tests + test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json + test_env_vars: + E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2 + test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_non32bytes_data.toml + - id: ccip-smoke-db-compatibility path: integration-tests/ccip-tests/smoke/ccip_test.go test_env_type: docker diff --git a/.github/workflows/ccip-live-network-tests.yml b/.github/workflows/ccip-live-network-tests.yml index 68f012421f..f466fbc7cd 100644 --- a/.github/workflows/ccip-live-network-tests.yml +++ b/.github/workflows/ccip-live-network-tests.yml @@ -146,8 +146,6 @@ jobs: contents: read env: CHAINLINK_ENV_USER: ${{ github.actor }} - SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} - SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }} TEST_LOG_LEVEL: info REF_NAME: ${{ github.head_ref || github.ref_name }} CHAINLINK_TEST_VERSION: ${{ github.sha }} @@ -248,8 +246,6 @@ jobs: contents: read env: CHAINLINK_ENV_USER: ${{ github.actor }} - SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }} - SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }} TEST_LOG_LEVEL: info REF_NAME: ${{ github.head_ref || github.ref_name }} strategy: @@ -291,7 +287,7 @@ jobs: - name: 'METIS_ANDROMEDA' pairs: 'METIS_ANDROMEDA,ARBITRUM_MAINNET' enabled: true - phaseTimeout: 60m + phaseTimeout: 300m - name: 'MODE_MAINNET' pairs: 'MODE_MAINNET,OPTIMISM_MAINNET;MODE_MAINNET,ARBITRUM_MAINNET;MODE_MAINNET,BASE_MAINNET;MODE_MAINNET,BSC_MAINNET' enabled: true @@ -311,7 +307,7 @@ jobs: - name: 'ZKSYNC_MAINNET' pairs: 'ZKSYNC_MAINNET,ARBITRUM_MAINNET' enabled: true - phaseTimeout: 90m + phaseTimeout: 300m steps: - name: Collect Metrics if: ${{ matrix.lanes.enabled == true }} @@ -399,7 +395,7 @@ jobs: # Custom reporting Jobs start-slack-thread: name: Start Slack Thread - if: ${{ always() && needs.ccip-smoke-test.result != 'skipped' && needs.ccip-smoke-test.result != 'cancelled' }} + if: ${{ failure() && needs.ccip-smoke-test.result != 'skipped' && needs.ccip-smoke-test.result != 'cancelled' }} environment: integration outputs: thread_ts: ${{ steps.slack.outputs.thread_ts }} @@ -417,7 +413,7 @@ jobs: uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 id: slack with: - channel-id: "#test-run-notifications" + channel-id: "#ccip-testing" payload: | { "attachments": [ @@ -451,7 +447,7 @@ jobs: post-test-results-to-slack: name: Post Test Results - if: ${{ always() && needs.start-slack-thread.result != 'skipped' && needs.start-slack-thread.result != 'cancelled' }} + if: ${{ failure() && needs.start-slack-thread.result != 'skipped' && needs.start-slack-thread.result != 'cancelled' }} environment: integration permissions: checks: write @@ -473,7 +469,7 @@ jobs: workflow_run_id: ${{ github.run_id }} github_job_name_regex: ^CCIP Smoke (.*)$ message_title: CCIP Mainnet Smoke test - slack_channel_id: "#test-run-notifications" + slack_channel_id: "#ccip-testing" slack_bot_token: ${{ secrets.QA_SLACK_API_KEY }} slack_thread_ts: ${{ needs.start-slack-thread.outputs.thread_ts }} diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index b9bcd0555a..8e517673fd 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -32,7 +32,7 @@ jobs: { "name": "functions", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "keystone", "setup": { "run-coverage": true, "min-coverage": 72.8, "run-gas-snapshot": false, "run-forge-fmt": false }}, { "name": "l2ep", "setup": { "run-coverage": true, "min-coverage": 61.0, "run-gas-snapshot": true, "run-forge-fmt": false }}, - { "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "run-gas-snapshot": true, "run-forge-fmt": false }}, + { "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 44.3, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }}, { "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*'", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }}, diff --git a/ccip/config/evm/Avalanche_Fuji.toml b/ccip/config/evm/Avalanche_Fuji.toml index 5ba2e3cdc7..03f67180b9 100644 --- a/ccip/config/evm/Avalanche_Fuji.toml +++ b/ccip/config/evm/Avalanche_Fuji.toml @@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2 NoNewFinalizedHeadsThreshold = '1m' [GasEstimator] -PriceDefault = '25 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' +PriceDefault = '1 gwei' [GasEstimator.BlockHistory] BlockHistorySize = 24 diff --git a/ccip/config/evm/Avalanche_Mainnet.toml b/ccip/config/evm/Avalanche_Mainnet.toml index e7813842b4..0d96561bcc 100644 --- a/ccip/config/evm/Avalanche_Mainnet.toml +++ b/ccip/config/evm/Avalanche_Mainnet.toml @@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2 NoNewFinalizedHeadsThreshold = '1m' [GasEstimator] -PriceDefault = '25 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' +PriceDefault = '1 gwei' [GasEstimator.BlockHistory] # Average block time of 2s diff --git a/contracts/.changeset/metal-ducks-hunt.md b/contracts/.changeset/metal-ducks-hunt.md new file mode 100644 index 0000000000..caba481925 --- /dev/null +++ b/contracts/.changeset/metal-ducks-hunt.md @@ -0,0 +1,10 @@ +--- +'@chainlink/contracts': patch +--- + +#feature adds OZ AccessControl support to the registry module + + +PR issue: CCIP-4105 + +Solidity Review issue: CCIP-3966 \ No newline at end of file diff --git a/contracts/.changeset/wet-eyes-accept.md b/contracts/.changeset/wet-eyes-accept.md new file mode 100644 index 0000000000..ea78336622 --- /dev/null +++ b/contracts/.changeset/wet-eyes-accept.md @@ -0,0 +1,7 @@ +--- +'@chainlink/contracts': patch +--- + +Refactor MockCCIPRouter to support EVMExtraArgsV2 + +PR issue : CCIP-4288 diff --git a/contracts/GNUmakefile b/contracts/GNUmakefile index 862d75a432..5f50fb8ad0 100644 --- a/contracts/GNUmakefile +++ b/contracts/GNUmakefile @@ -43,7 +43,7 @@ mockery: $(mockery) ## Install mockery. .PHONY: foundry foundry: ## Install foundry. - foundryup --version nightly-515a4cc8aba1627a717a1057ff4f09c8cd3bf51f + foundryup --version nightly-fb5f0e1c4d9b9b0861be3e3bd07963524c5ac08e .PHONY: foundry-refresh foundry-refresh: foundry diff --git a/contracts/README.md b/contracts/README.md index 16ba2e8254..6234dfaf9b 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -47,8 +47,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Most of the contracts are licensed under the [MIT](https://choosealicense.com/licenses/mit/) license. An exception to this is the ccip folder, which defaults to be licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions -The CCIP repo is licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions - -- `src/v0.8/ccip/applications/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license -- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license -- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license +- `src/v0.8/ccip/applications/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license +- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license +- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license \ No newline at end of file diff --git a/contracts/foundry.toml b/contracts/foundry.toml index 781e875eb6..e1399964dd 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -95,7 +95,7 @@ test = 'src/v0.8/transmission/test' optimizer_runs = 1_000_000 src = 'src/v0.8/shared' test = 'src/v0.8/shared/test' -solc_version = '0.8.19' +solc_version = '0.8.24' # See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 1d3bb7b294..31f2cd52ab 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -19,25 +19,23 @@ AggregateTokenLimiter_setAdmin:test_Owner_Success() (gas: 19016) AggregateTokenLimiter_setRateLimiterConfig:test_OnlyOnlyCallableByAdminOrOwner_Revert() (gas: 17546) AggregateTokenLimiter_setRateLimiterConfig:test_Owner_Success() (gas: 30393) AggregateTokenLimiter_setRateLimiterConfig:test_TokenLimitAdmin_Success() (gas: 32407) -BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28842) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244024) -BurnFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24166) -BurnMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27609) -BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) -BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 241912) -BurnMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 17851) -BurnMintTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 28805) -BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56253) -BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 112391) -BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28842) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244050) -BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24168) -BurnWithFromMintTokenPool_releaseOrMint:test_Setup_Success() (gas: 24547) -BurnWithFromMintTokenPool_releaseOrMint:test_releaseOrMint_NegativeMintAmount_reverts() (gas: 93840) -BurnWithFromMintTokenPool_releaseOrMint:test_releaseOrMint_Success() (gas: 93423) -CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2058831) +BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27346) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 54856) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244410) +BurnFromMintTokenPool_lockOrBurn:test_setup_Success() (gas: 24167) +BurnMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27486) +BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 54856) +BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 242315) +BurnMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 17830) +BurnMintTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 27309) +BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 54618) +BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 109405) +BurnMintWithLockReleaseFlagTokenPool_lockOrBurn:test_LockOrBurn_CorrectReturnData_Success() (gas: 242495) +BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27346) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 54856) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244454) +BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24180) +CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2060218) CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 334693) CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 466117) CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 289739) @@ -112,30 +110,30 @@ CommitStore_verify:test_Blessed_Success() (gas: 96581) CommitStore_verify:test_NotBlessed_Success() (gas: 61473) CommitStore_verify:test_Paused_Revert() (gas: 18568) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36848) -DefensiveExampleTest:test_HappyPath_Success() (gas: 200200) -DefensiveExampleTest:test_Recovery() (gas: 424476) -E2E:test_E2E_3MessagesSuccess_gas() (gas: 1108425) +DefensiveExampleTest:test_HappyPath_Success() (gas: 200267) +DefensiveExampleTest:test_Recovery() (gas: 424613) +E2E:test_E2E_3MessagesSuccess_gas() (gas: 1138593) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38322) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 104438) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 86026) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 101428) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 80487) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 37365) -EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 95013) -EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 40341) -EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 87189) -EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 381594) -EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 140568) -EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 798833) -EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 178400) -EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 29681) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 67146) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 43605) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 208068) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 219365) +EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 91915) +EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37841) +EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 84113) +EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 369720) +EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 137592) +EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 766486) +EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 171941) +EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 29717) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 67360) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 43677) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 202313) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 213452) EVM2EVMOffRamp__report:test_Report_Success() (gas: 127774) -EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 237406) -EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 246039) -EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 329283) -EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 310166) +EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 230875) +EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 239552) +EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 323274) +EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 304201) EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17048) EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153120) EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5212732) @@ -143,7 +141,7 @@ EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 143845) EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21507) EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36936) EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 52324) -EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 473387) +EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 463753) EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 48346) EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 153019) EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 103946) @@ -154,25 +152,25 @@ EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 16011 EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175497) EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 237901) EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115048) -EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 406606) +EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 400597) EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54774) EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132556) EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52786) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 564471) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 494719) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 556453) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 486701) EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35887) -EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 546333) +EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 538315) EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 65298) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 124107) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 144365) EVM2EVMOffRamp_execute:test_execute_RouterYULCall_Success() (gas: 394187) EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18685) -EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 275257) +EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 269248) EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 18815) -EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 223182) +EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 216651) EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48391) EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 47823) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 311554) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 305545) EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 70839) EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 232136) EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 281170) @@ -186,13 +184,13 @@ EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 188280) EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 27574) EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 46457) EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 27948) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithMultipleMessagesAndSourceTokens_Success() (gas: 531330) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithSourceTokens_Success() (gas: 344463) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithMultipleMessagesAndSourceTokens_Success() (gas: 523312) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithSourceTokens_Success() (gas: 338454) EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 189760) -EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2195128) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 362054) +EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2192118) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 356045) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 145457) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 365283) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 359274) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimitManualExec_Success() (gas: 450711) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 192223) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_WithInvalidReceiverExecutionGasOverride_Revert() (gas: 155387) @@ -206,36 +204,36 @@ EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_NonOwner_Revert( EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_Success() (gas: 197985) EVM2EVMOnRamp_constructor:test_Constructor_Success() (gas: 5056698) EVM2EVMOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 36063) -EVM2EVMOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 99010) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 114925) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 114967) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 130991) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 139431) -EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 130607) +EVM2EVMOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 99022) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 114937) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 114979) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 131003) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 139443) +EVM2EVMOnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 130619) EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddressEncodePacked_Revert() (gas: 38647) EVM2EVMOnRamp_forwardFromRouter:test_InvalidAddress_Revert() (gas: 38830) EVM2EVMOnRamp_forwardFromRouter:test_InvalidChainSelector_Revert() (gas: 25726) EVM2EVMOnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 25545) -EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 84266) +EVM2EVMOnRamp_forwardFromRouter:test_MaxCapacityExceeded_Revert() (gas: 84273) EVM2EVMOnRamp_forwardFromRouter:test_MaxFeeBalanceReached_Revert() (gas: 36847) EVM2EVMOnRamp_forwardFromRouter:test_MessageGasLimitTooHigh_Revert() (gas: 29327) EVM2EVMOnRamp_forwardFromRouter:test_MessageTooLarge_Revert() (gas: 107850) EVM2EVMOnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 22823) -EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 226568) +EVM2EVMOnRamp_forwardFromRouter:test_OverValueWithARLOff_Success() (gas: 227322) EVM2EVMOnRamp_forwardFromRouter:test_Paused_Revert() (gas: 53432) EVM2EVMOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25757) EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 57722) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 182247) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 180718) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 133236) -EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3573653) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 133270) +EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3943537) EVM2EVMOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 30472) EVM2EVMOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 43480) EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 110111) EVM2EVMOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 316020) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 113033) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 113067) EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 72824) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_correctSourceTokenData_Success() (gas: 714726) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_correctSourceTokenData_Success() (gas: 719887) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 148808) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 192679) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 123243) @@ -264,15 +262,15 @@ EVM2EVMOnRamp_getTokenTransferCost:test_UnsupportedToken_Revert() (gas: 21353) EVM2EVMOnRamp_getTokenTransferCost:test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() (gas: 28382) EVM2EVMOnRamp_getTokenTransferCost:test_ZeroFeeConfigChargesMinFee_Success() (gas: 38899) EVM2EVMOnRamp_getTokenTransferCost:test__getTokenTransferCost_selfServeUsesDefaults_Success() (gas: 29674) -EVM2EVMOnRamp_linkAvailableForPayment:test_InsufficientLinkBalance_Success() (gas: 32756) -EVM2EVMOnRamp_linkAvailableForPayment:test_LinkAvailableForPayment_Success() (gas: 135247) -EVM2EVMOnRamp_payNops:test_AdminPayNops_Success() (gas: 143660) -EVM2EVMOnRamp_payNops:test_InsufficientBalance_Revert() (gas: 29196) -EVM2EVMOnRamp_payNops:test_NoFeesToPay_Revert() (gas: 127718) -EVM2EVMOnRamp_payNops:test_NoNopsToPay_Revert() (gas: 133580) -EVM2EVMOnRamp_payNops:test_NopPayNops_Success() (gas: 146947) -EVM2EVMOnRamp_payNops:test_OwnerPayNops_Success() (gas: 141522) -EVM2EVMOnRamp_payNops:test_PayNopsSuccessAfterSetNops() (gas: 298719) +EVM2EVMOnRamp_linkAvailableForPayment:test_InsufficientLinkBalance_Success() (gas: 32773) +EVM2EVMOnRamp_linkAvailableForPayment:test_LinkAvailableForPayment_Success() (gas: 135254) +EVM2EVMOnRamp_payNops:test_AdminPayNops_Success() (gas: 143667) +EVM2EVMOnRamp_payNops:test_InsufficientBalance_Revert() (gas: 29213) +EVM2EVMOnRamp_payNops:test_NoFeesToPay_Revert() (gas: 127659) +EVM2EVMOnRamp_payNops:test_NoNopsToPay_Revert() (gas: 133532) +EVM2EVMOnRamp_payNops:test_NopPayNops_Success() (gas: 146954) +EVM2EVMOnRamp_payNops:test_OwnerPayNops_Success() (gas: 141529) +EVM2EVMOnRamp_payNops:test_PayNopsSuccessAfterSetNops() (gas: 298706) EVM2EVMOnRamp_payNops:test_WrongPermissions_Revert() (gas: 15378) EVM2EVMOnRamp_setDynamicConfig:test_SetConfigInvalidConfig_Revert() (gas: 42524) EVM2EVMOnRamp_setDynamicConfig:test_SetConfigOnlyOwner_Revert() (gas: 21426) @@ -281,10 +279,10 @@ EVM2EVMOnRamp_setFeeTokenConfig:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 1 EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfigByAdmin_Success() (gas: 16497) EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfig_Success() (gas: 14036) EVM2EVMOnRamp_setNops:test_AdminCanSetNops_Success() (gas: 61872) -EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 470835) +EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 470886) EVM2EVMOnRamp_setNops:test_LinkTokenCannotBeNop_Revert() (gas: 57370) EVM2EVMOnRamp_setNops:test_NonOwnerOrAdmin_Revert() (gas: 14779) -EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 85200) +EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 85222) EVM2EVMOnRamp_setNops:test_SetNopsRemovesOldNopsCompletely_Success() (gas: 60868) EVM2EVMOnRamp_setNops:test_SetNops_Success() (gas: 174097) EVM2EVMOnRamp_setNops:test_TooManyNops_Revert() (gas: 193503) @@ -293,10 +291,10 @@ EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_InvalidD EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_OnlyCallableByOwnerOrAdmin_Revert() (gas: 14427) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_Success() (gas: 85487) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_byAdmin_Success() (gas: 17468) -EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83617) +EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83639) EVM2EVMOnRamp_withdrawNonLinkFees:test_NonOwnerOrAdmin_Revert() (gas: 15353) -EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272851) -EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53566) +EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272970) +EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53627) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawToZeroAddress_Revert() (gas: 12875) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96907) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49775) @@ -319,6 +317,35 @@ 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) +FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55766) +FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10709) +FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172367) +FactoryBurnMintERC20_burn:test_BurnFromZeroAddress_Reverts() (gas: 47272) +FactoryBurnMintERC20_burn:test_ExceedsBalance_Reverts() (gas: 21939) +FactoryBurnMintERC20_burn:test_SenderNotBurner_Reverts() (gas: 13493) +FactoryBurnMintERC20_burnFrom:test_BurnFrom_Success() (gas: 58231) +FactoryBurnMintERC20_burnFrom:test_ExceedsBalance_Reverts() (gas: 36138) +FactoryBurnMintERC20_burnFrom:test_InsufficientAllowance_Reverts() (gas: 22031) +FactoryBurnMintERC20_burnFrom:test_SenderNotBurner_Reverts() (gas: 13460) +FactoryBurnMintERC20_burnFromAlias:test_BurnFrom_Success() (gas: 58205) +FactoryBurnMintERC20_burnFromAlias:test_ExceedsBalance_Reverts() (gas: 36102) +FactoryBurnMintERC20_burnFromAlias:test_InsufficientAllowance_Reverts() (gas: 21986) +FactoryBurnMintERC20_burnFromAlias:test_SenderNotBurner_Reverts() (gas: 13415) +FactoryBurnMintERC20_constructor:test_Constructor_Success() (gas: 1475646) +FactoryBurnMintERC20_decreaseApproval:test_DecreaseApproval_Success() (gas: 31340) +FactoryBurnMintERC20_getCCIPAdmin:test_getCCIPAdmin_Success() (gas: 12684) +FactoryBurnMintERC20_getCCIPAdmin:test_setCCIPAdmin_Success() (gas: 23757) +FactoryBurnMintERC20_grantMintAndBurnRoles:test_GrantMintAndBurnRoles_Success() (gas: 121084) +FactoryBurnMintERC20_grantRole:test_GrantBurnAccess_Success() (gas: 53341) +FactoryBurnMintERC20_grantRole:test_GrantMany_Success() (gas: 961332) +FactoryBurnMintERC20_grantRole:test_GrantMintAccess_Success() (gas: 94068) +FactoryBurnMintERC20_increaseApproval:test_IncreaseApproval_Success() (gas: 44345) +FactoryBurnMintERC20_mint:test_BasicMint_Success() (gas: 149777) +FactoryBurnMintERC20_mint:test_MaxSupplyExceeded_Reverts() (gas: 50681) +FactoryBurnMintERC20_mint:test_SenderNotMinter_Reverts() (gas: 11372) +FactoryBurnMintERC20_supportsInterface:test_SupportsInterface_Success() (gas: 11439) +FactoryBurnMintERC20_transfer:test_InvalidAddress_Reverts() (gas: 10707) +FactoryBurnMintERC20_transfer:test_Transfer_Success() (gas: 42449) FeeQuoter_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16878) FeeQuoter_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16780) FeeQuoter_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16822) @@ -360,32 +387,32 @@ FeeQuoter_getTokenTransferCost:test_SmallTokenTransferChargesMinFeeAndGas_Succes FeeQuoter_getTokenTransferCost:test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() (gas: 27781) FeeQuoter_getTokenTransferCost:test_ZeroFeeConfigChargesMinFee_Success() (gas: 40372) FeeQuoter_getTokenTransferCost:test_getTokenTransferCost_selfServeUsesDefaults_Success() (gas: 29499) -FeeQuoter_getValidatedFee:test_DestinationChainNotEnabled_Revert() (gas: 18354) -FeeQuoter_getValidatedFee:test_EmptyMessage_Success() (gas: 82824) -FeeQuoter_getValidatedFee:test_EnforceOutOfOrder_Revert() (gas: 53482) -FeeQuoter_getValidatedFee:test_HighGasMessage_Success() (gas: 239286) -FeeQuoter_getValidatedFee:test_InvalidEVMAddress_Revert() (gas: 22593) -FeeQuoter_getValidatedFee:test_MessageGasLimitTooHigh_Revert() (gas: 29879) -FeeQuoter_getValidatedFee:test_MessageTooLarge_Revert() (gas: 100330) -FeeQuoter_getValidatedFee:test_MessageWithDataAndTokenTransfer_Success() (gas: 142496) -FeeQuoter_getValidatedFee:test_NotAFeeToken_Revert() (gas: 21211) -FeeQuoter_getValidatedFee:test_SingleTokenMessage_Success() (gas: 113826) -FeeQuoter_getValidatedFee:test_TooManyTokens_Revert() (gas: 22729) -FeeQuoter_getValidatedFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 63709) -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_getValidatedFee:test_DestinationChainNotEnabled_Revert() (gas: 18414) +FeeQuoter_getValidatedFee:test_EmptyMessage_Success() (gas: 82992) +FeeQuoter_getValidatedFee:test_EnforceOutOfOrder_Revert() (gas: 53530) +FeeQuoter_getValidatedFee:test_HighGasMessage_Success() (gas: 239454) +FeeQuoter_getValidatedFee:test_InvalidEVMAddress_Revert() (gas: 22617) +FeeQuoter_getValidatedFee:test_MessageGasLimitTooHigh_Revert() (gas: 29903) +FeeQuoter_getValidatedFee:test_MessageTooLarge_Revert() (gas: 100366) +FeeQuoter_getValidatedFee:test_MessageWithDataAndTokenTransfer_Success() (gas: 142856) +FeeQuoter_getValidatedFee:test_NotAFeeToken_Revert() (gas: 21223) +FeeQuoter_getValidatedFee:test_SingleTokenMessage_Success() (gas: 114090) +FeeQuoter_getValidatedFee:test_TooManyTokens_Revert() (gas: 22765) +FeeQuoter_getValidatedFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 63829) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 1913624) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 1913582) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 1893701) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 1913356) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 1913560) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 1913372) 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: 1913069) 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: 1911746) FeeQuoter_onReport:test_OnReport_StaleUpdate_Revert() (gas: 43675) FeeQuoter_onReport:test_onReport_InvalidForwarder_Reverts() (gas: 23514) FeeQuoter_onReport:test_onReport_Success() (gas: 80116) @@ -396,15 +423,15 @@ FeeQuoter_parseEVMExtraArgsFromBytes:test_EVMExtraArgsGasLimitTooHigh_Revert() ( FeeQuoter_parseEVMExtraArgsFromBytes:test_EVMExtraArgsInvalidExtraArgsTag_Revert() (gas: 18154) FeeQuoter_parseEVMExtraArgsFromBytes:test_EVMExtraArgsV1_Success() (gas: 18513) FeeQuoter_parseEVMExtraArgsFromBytes:test_EVMExtraArgsV2_Success() (gas: 18636) -FeeQuoter_processMessageArgs:test_processMessageArgs_InvalidEVMAddressDestToken_Revert() (gas: 44725) +FeeQuoter_processMessageArgs:test_processMessageArgs_InvalidEVMAddressDestToken_Revert() (gas: 44860) FeeQuoter_processMessageArgs:test_processMessageArgs_InvalidExtraArgs_Revert() (gas: 19914) FeeQuoter_processMessageArgs:test_processMessageArgs_MalformedEVMExtraArgs_Revert() (gas: 20333) FeeQuoter_processMessageArgs:test_processMessageArgs_MessageFeeTooHigh_Revert() (gas: 17904) -FeeQuoter_processMessageArgs:test_processMessageArgs_SourceTokenDataTooLarge_Revert() (gas: 122753) -FeeQuoter_processMessageArgs:test_processMessageArgs_TokenAmountArraysMismatching_Revert() (gas: 42054) +FeeQuoter_processMessageArgs:test_processMessageArgs_SourceTokenDataTooLarge_Revert() (gas: 122889) +FeeQuoter_processMessageArgs:test_processMessageArgs_TokenAmountArraysMismatching_Revert() (gas: 42122) FeeQuoter_processMessageArgs:test_processMessageArgs_WitEVMExtraArgsV2_Success() (gas: 28578) FeeQuoter_processMessageArgs:test_processMessageArgs_WithConvertedTokenAmount_Success() (gas: 29949) -FeeQuoter_processMessageArgs:test_processMessageArgs_WithCorrectPoolReturnData_Success() (gas: 76189) +FeeQuoter_processMessageArgs:test_processMessageArgs_WithCorrectPoolReturnData_Success() (gas: 76465) FeeQuoter_processMessageArgs:test_processMessageArgs_WithEVMExtraArgsV1_Success() (gas: 28176) FeeQuoter_processMessageArgs:test_processMessageArgs_WithEmptyEVMExtraArgs_Success() (gas: 26047) FeeQuoter_processMessageArgs:test_processMessageArgs_WithLinkTokenAmount_Success() (gas: 19523) @@ -424,69 +451,44 @@ FeeQuoter_validateDestFamilyAddress:test_InvalidEVMAddressPrecompiles_Revert() ( FeeQuoter_validateDestFamilyAddress:test_InvalidEVMAddress_Revert() (gas: 10839) FeeQuoter_validateDestFamilyAddress:test_ValidEVMAddress_Success() (gas: 6731) FeeQuoter_validateDestFamilyAddress:test_ValidNonEVMAddress_Success() (gas: 6511) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209248) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135879) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107090) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_onLockReleaseMechanism_Success() (gas: 144586) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214817) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423641) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268928) -HybridUSDCTokenPoolMigrationTests:test_ReleaseOrMint_WhileMigrationPause_Revert() (gas: 111484) -HybridUSDCTokenPoolMigrationTests:test_burnLockedUSDC_invalidPermissions_Revert() (gas: 39362) -HybridUSDCTokenPoolMigrationTests:test_cancelExistingCCTPMigrationProposal() (gas: 33189) -HybridUSDCTokenPoolMigrationTests:test_cannotCancelANonExistentMigrationProposal() (gas: 12669) -HybridUSDCTokenPoolMigrationTests:test_cannotModifyLiquidityWithoutPermissions_Revert() (gas: 13329) -HybridUSDCTokenPoolMigrationTests:test_cannotTransferLiquidityDuringPendingMigration_Revert() (gas: 160900) -HybridUSDCTokenPoolMigrationTests:test_lockOrBurn_then_BurnInCCTPMigration_Success() (gas: 255982) -HybridUSDCTokenPoolMigrationTests:test_transferLiquidity_Success() (gas: 165921) -HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_destChain_Success() (gas: 154242) -HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_homeChain_Success() (gas: 463740) -HybridUSDCTokenPoolTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209230) -HybridUSDCTokenPoolTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135880) -HybridUSDCTokenPoolTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107135) -HybridUSDCTokenPoolTests:test_LockOrBurn_onLockReleaseMechanism_Success() (gas: 144607) -HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214795) -HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423619) -HybridUSDCTokenPoolTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268910) -HybridUSDCTokenPoolTests:test_ReleaseOrMint_WhileMigrationPause_Revert() (gas: 111528) -HybridUSDCTokenPoolTests:test_cannotTransferLiquidityDuringPendingMigration_Revert() (gas: 160845) -HybridUSDCTokenPoolTests:test_transferLiquidity_Success() (gas: 165904) -LockReleaseTokenPoolAndProxy_setRebalancer:test_SetRebalancer_Revert() (gas: 10989) -LockReleaseTokenPoolAndProxy_setRebalancer:test_SetRebalancer_Success() (gas: 18028) -LockReleaseTokenPoolPoolAndProxy_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 3051552) -LockReleaseTokenPoolPoolAndProxy_provideLiquidity:test_LiquidityNotAccepted_Revert() (gas: 3047988) -LockReleaseTokenPoolPoolAndProxy_provideLiquidity:test_Unauthorized_Revert() (gas: 11489) -LockReleaseTokenPoolPoolAndProxy_supportsInterface:test_SupportsInterface_Success() (gas: 10196) -LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60187) -LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) -LockReleaseTokenPool_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 2836138) -LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30062) -LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Success() (gas: 79943) -LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59620) -LockReleaseTokenPool_provideLiquidity:test_LiquidityNotAccepted_Revert() (gas: 2832618) +HybridLockReleaseUSDCTokenPool_TransferLiquidity:test_cannotTransferLiquidityDuringPendingMigration_Revert() (gas: 176771) +HybridLockReleaseUSDCTokenPool_TransferLiquidity:test_transferLiquidity_Success() (gas: 166828) +HybridLockReleaseUSDCTokenPool_lockOrBurn:test_PrimaryMechanism_Success() (gas: 135764) +HybridLockReleaseUSDCTokenPool_lockOrBurn:test_WhileMigrationPause_Revert() (gas: 109696) +HybridLockReleaseUSDCTokenPool_lockOrBurn:test_onLockReleaseMechanism_Success() (gas: 146859) +HybridLockReleaseUSDCTokenPool_lockOrBurn:test_onLockReleaseMechanism_thenSwitchToPrimary_Success() (gas: 208941) +HybridLockReleaseUSDCTokenPool_releaseOrMint:test_OnLockReleaseMechanism_Success() (gas: 213084) +HybridLockReleaseUSDCTokenPool_releaseOrMint:test_WhileMigrationPause_Revert() (gas: 109606) +HybridLockReleaseUSDCTokenPool_releaseOrMint:test_incomingMessageWithPrimaryMechanism() (gas: 265786) +LockReleaseTokenPool_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 3129432) +LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 29734) +LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Success() (gas: 80502) +LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59205) +LockReleaseTokenPool_provideLiquidity:test_LiquidityNotAccepted_Revert() (gas: 3125846) LockReleaseTokenPool_provideLiquidity:test_Unauthorized_Revert() (gas: 11489) -LockReleaseTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 72743) -LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56352) -LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 225548) -LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Revert() (gas: 11011) -LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Success() (gas: 18094) +LockReleaseTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 74080) +LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 54717) +LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 223184) +LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Revert() (gas: 10893) +LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Success() (gas: 18072) LockReleaseTokenPool_supportsInterface:test_SupportsInterface_Success() (gas: 10196) -LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83231) -LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 55953) -LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60187) -LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) -LockRelease_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 11054) -LockRelease_setRateLimitAdmin:test_SetRateLimitAdmin_Success() (gas: 35060) +LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83270) +LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 56019) +LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60122) +LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11397) MerkleMultiProofTest:test_CVE_2023_34459() (gas: 5478) MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3585) MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891) MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661) MerkleMultiProofTest:test_SpecSync_gas() (gas: 34129) +MockRouterTest:test_ccipSendWithEVMExtraArgsV1_Success() (gas: 110073) +MockRouterTest:test_ccipSendWithEVMExtraArgsV2_Success() (gas: 132614) MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34037) -MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60842) -MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126576) -MockRouterTest:test_ccipSendWithLinkFeeTokenbutInsufficientAllowance_Revert() (gas: 63455) -MockRouterTest:test_ccipSendWithSufficientNativeFeeTokens_Success() (gas: 44012) +MockRouterTest:test_ccipSendWithInvalidEVMExtraArgs_Revert() (gas: 106684) +MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60886) +MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126696) +MockRouterTest:test_ccipSendWithLinkFeeTokenButInsufficientAllowance_Revert() (gas: 63500) +MockRouterTest:test_ccipSendWithSufficientNativeFeeTokens_Success() (gas: 44048) MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_MultipleConfigsBothLanes_Success() (gas: 133528) MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_MultipleConfigs_Success() (gas: 315630) MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_OnlyCallableByOwner_Revert() (gas: 17864) @@ -512,7 +514,7 @@ MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitExce MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitReset_Success() (gas: 76561) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 308233) MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokens_Success() (gas: 50558) -MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 1073669578) +MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 51181) MultiAggregateRateLimiter_onOutboundMessage:test_ValidateMessageWithNoTokens_Success() (gas: 19302) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageFromUnauthorizedCaller_Revert() (gas: 15913) MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 209885) @@ -565,8 +567,8 @@ MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 24234) MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61275) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39933) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 33049) -MultiOnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 233732) -MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1501821) +MultiOnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 233865) +MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1512594) NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37934) NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) @@ -624,17 +626,17 @@ OffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: OffRamp_applySourceChainConfigUpdates:test_RouterAddress_Revert() (gas: 13463) OffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 72746) OffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 15519) -OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 177991) -OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 335638) -OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 278904) -OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 169320) -OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 189033) -OffRamp_batchExecute:test_SingleReport_Success() (gas: 157144) -OffRamp_batchExecute:test_Unhealthy_Success() (gas: 554256) +OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 178112) +OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 335759) +OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 279025) +OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 169394) +OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 189154) +OffRamp_batchExecute:test_SingleReport_Success() (gas: 157181) +OffRamp_batchExecute:test_Unhealthy_Success() (gas: 546430) OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10622) OffRamp_ccipReceive:test_Reverts() (gas: 15407) OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92905) -OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 64099) +OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 61599) OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 68173) OffRamp_commit:test_InvalidInterval_Revert() (gas: 64291) OffRamp_commit:test_InvalidRootRevert() (gas: 63356) @@ -661,97 +663,97 @@ OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 161468) OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101189) OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101227) OffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17639) -OffRamp_execute:test_LargeBatch_Success() (gas: 3426335) -OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 372990) -OffRamp_execute:test_MultipleReports_Success() (gas: 300979) -OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7083611) -OffRamp_execute:test_NoConfig_Revert() (gas: 6308086) -OffRamp_execute:test_NonArray_Revert() (gas: 27562) -OffRamp_execute:test_SingleReport_Success() (gas: 176354) -OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 148372) -OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7086360) +OffRamp_execute:test_LargeBatch_Success() (gas: 3427645) +OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 373111) +OffRamp_execute:test_MultipleReports_Success() (gas: 301100) +OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7083648) +OffRamp_execute:test_NoConfig_Revert() (gas: 6308123) +OffRamp_execute:test_NonArray_Revert() (gas: 27599) +OffRamp_execute:test_SingleReport_Success() (gas: 176391) +OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 148409) +OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7086397) OffRamp_execute:test_ZeroReports_Revert() (gas: 17361) OffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18533) -OffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 244079) +OffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 238070) OffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20781) -OffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 205116) +OffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 198585) OffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 49306) OffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48750) OffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 218028) OffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 85296) -OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 274196) +OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 268187) OffRamp_executeSingleMessage:test_executeSingleMessage_WithVInterception_Success() (gas: 91724) -OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 28282) -OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 22084) -OffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 481794) -OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48394) -OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 33981) -OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 28458) -OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 188096) -OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 198552) -OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 40763) -OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 413245) -OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 249800) -OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 193614) -OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 213648) -OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 249550) -OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 142163) -OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409313) -OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58315) -OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 73890) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 583427) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 532141) -OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 33739) -OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 549786) -OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 549800) -OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 460521) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 135944) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 165649) +OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 28319) +OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 22074) +OffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 472256) +OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48431) +OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 34018) +OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 28495) +OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 188133) +OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 198626) +OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 40800) +OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 413282) +OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 249874) +OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 193688) +OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 213722) +OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 249587) +OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 142200) +OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 403400) +OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58352) +OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 73930) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 575505) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 524219) +OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 33823) +OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 541960) +OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 541974) +OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 452599) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 136018) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 165723) OffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3885554) OffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 120606) OffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 89288) -OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81016) -OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74027) -OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 173167) -OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 214124) -OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27085) -OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 164696) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27622) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55193) -OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 498549) -OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 316061) -OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2245222) -OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 165525) -OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 227169) -OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227709) -OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 781365) -OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 347346) +OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81352) +OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74113) +OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 173204) +OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 214198) +OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27122) +OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165422) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27659) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55236) +OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 498623) +OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 316276) +OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2242292) +OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 165599) +OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 227243) +OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227783) +OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 781795) +OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 347514) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37656) -OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 104404) -OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 85342) +OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 101388) +OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 79803) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36752) -OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 94382) -OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 39741) -OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 86516) -OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 162381) +OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 91284) +OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37241) +OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 83440) +OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 155850) OffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 23903) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62751) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 79790) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 174468) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_WithGasOverride_Success() (gas: 176380) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 187679) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62773) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 78303) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 168497) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_WithGasOverride_Success() (gas: 170409) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 181670) OffRamp_setDynamicConfig:test_FeeQuoterZeroAddress_Revert() (gas: 11291) OffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 13906) OffRamp_setDynamicConfig:test_SetDynamicConfigWithInterceptor_Success() (gas: 46378) OffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 24420) -OffRamp_trialExecute:test_RateLimitError_Success() (gas: 219377) -OffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 227999) -OffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 295396) -OffRamp_trialExecute:test_trialExecute_Success() (gas: 277896) -OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 396282) -OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_InvalidAllowListRequestDisabledAllowListWithAdds() (gas: 18018) -OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Revert() (gas: 67797) -OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Success() (gas: 325198) +OffRamp_trialExecute:test_RateLimitError_Success() (gas: 212846) +OffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 221512) +OffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 289387) +OffRamp_trialExecute:test_trialExecute_Success() (gas: 271931) +OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 398904) +OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_InvalidAllowListRequestDisabledAllowListWithAdds() (gas: 18030) +OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Revert() (gas: 67893) +OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Success() (gas: 325457) OnRamp_applyDestChainConfigUpdates:test_ApplyDestChainConfigUpdates_Success() (gas: 65878) OnRamp_applyDestChainConfigUpdates:test_ApplyDestChainConfigUpdates_WithInvalidChainSelector_Revert() (gas: 13631) OnRamp_constructor:test_Constructor_EnableAllowList_ForwardFromRouter_Reverts() (gas: 2673564) @@ -760,15 +762,15 @@ OnRamp_constructor:test_Constructor_InvalidConfigNonceManagerEqAddressZero_Rever OnRamp_constructor:test_Constructor_InvalidConfigRMNProxyEqAddressZero_Revert() (gas: 98224) OnRamp_constructor:test_Constructor_InvalidConfigTokenAdminRegistryEqAddressZero_Revert() (gas: 93247) OnRamp_constructor:test_Constructor_Success() (gas: 2753286) -OnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 115367) -OnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 146168) -OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 145765) -OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 143926) -OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 145962) -OnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 145360) -OnRamp_forwardFromRouter:test_ForwardFromRouter_Success_ConfigurableSourceRouter() (gas: 140701) +OnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2AllowOutOfOrderTrue_Success() (gas: 115379) +OnRamp_forwardFromRouter:test_ForwardFromRouterExtraArgsV2_Success() (gas: 146180) +OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessCustomExtraArgs() (gas: 145777) +OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessEmptyExtraArgs() (gas: 143938) +OnRamp_forwardFromRouter:test_ForwardFromRouterSuccessLegacyExtraArgs() (gas: 145974) +OnRamp_forwardFromRouter:test_ForwardFromRouter_Success() (gas: 145372) +OnRamp_forwardFromRouter:test_ForwardFromRouter_Success_ConfigurableSourceRouter() (gas: 140713) OnRamp_forwardFromRouter:test_InvalidExtraArgsTag_Revert() (gas: 38554) -OnRamp_forwardFromRouter:test_MessageInterceptionError_Revert() (gas: 143051) +OnRamp_forwardFromRouter:test_MessageInterceptionError_Revert() (gas: 143063) OnRamp_forwardFromRouter:test_MesssageFeeTooHigh_Revert() (gas: 36596) OnRamp_forwardFromRouter:test_MultiCannotSendZeroTokens_Revert() (gas: 36527) OnRamp_forwardFromRouter:test_OriginalSender_Revert() (gas: 18291) @@ -776,13 +778,13 @@ OnRamp_forwardFromRouter:test_Paused_Revert() (gas: 38431) OnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 23640) OnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 186528) OnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 212912) -OnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 146994) -OnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 161099) -OnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3615170) +OnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 147028) +OnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 161133) +OnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3984961) OnRamp_forwardFromRouter:test_UnAllowedOriginalSender_Revert() (gas: 24010) OnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 75866) OnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 38599) -OnRamp_forwardFromRouter:test_forwardFromRouter_WithInterception_Success() (gas: 280252) +OnRamp_forwardFromRouter:test_forwardFromRouter_WithInterception_Success() (gas: 281479) OnRamp_getFee:test_EmptyMessage_Success() (gas: 98597) OnRamp_getFee:test_EnforceOutOfOrder_Revert() (gas: 65467) OnRamp_getFee:test_GetFeeOfZeroForTokenMessage_Success() (gas: 87012) @@ -797,12 +799,12 @@ OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigInvalidConfig_Revert( OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigOnlyOwner_Revert() (gas: 16850) OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigReentrancyGuardEnteredEqTrue_Revert() (gas: 13265) OnRamp_setDynamicConfig:test_setDynamicConfig_Success() (gas: 56347) -OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97302) -PingPong_ccipReceive:test_CcipReceive_Success() (gas: 155829) +OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97341) +PingPong_ccipReceive:test_CcipReceive_Success() (gas: 155846) PingPong_plumbing:test_OutOfOrderExecution_Success() (gas: 20310) PingPong_plumbing:test_Pausing_Success() (gas: 17810) -PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 167051) -PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 186469) +PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 167068) +PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 186486) RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18822) RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18682) RMNHome__validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20371) @@ -917,30 +919,32 @@ RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24886) RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38944) RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46849) RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38506) -RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36033) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19739) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130086) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19559) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129905) +RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36107) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 20206) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 130628) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19773) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130108) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19593) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129927) Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89366) Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10662612) Router_applyRampUpdates:test_OnRampDisable() (gas: 56007) Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 12356) -Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 115079) -Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 202910) +Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 115091) +Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 203469) Router_ccipSend:test_CCIPSendNativeFeeNoTokenSuccess_gas() (gas: 127448) -Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215281) -Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 69000) +Router_ccipSend:test_CCIPSendNativeFeeOneTokenSuccess_gas() (gas: 215829) +Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 69017) Router_ccipSend:test_InvalidMsgValue() (gas: 32155) Router_ccipSend:test_NativeFeeTokenInsufficientValue() (gas: 71657) Router_ccipSend:test_NativeFeeTokenOverpay_Success() (gas: 175345) Router_ccipSend:test_NativeFeeTokenZeroValue() (gas: 58759) Router_ccipSend:test_NativeFeeToken_Success() (gas: 173861) -Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 243729) +Router_ccipSend:test_NonLinkFeeToken_Success() (gas: 243736) Router_ccipSend:test_UnsupportedDestinationChain_Revert() (gas: 24854) Router_ccipSend:test_WhenNotHealthy_Revert() (gas: 44811) Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 176149) -Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 246683) +Router_ccipSend:test_ZeroFeeAndGasPrice_Success() (gas: 246695) Router_constructor:test_Constructor_Success() (gas: 13128) Router_getArmProxy:test_getArmProxy() (gas: 10573) Router_getFee:test_GetFeeSupportedChain_Success() (gas: 49153) @@ -950,7 +954,7 @@ Router_recoverTokens:test_RecoverTokensInvalidRecipient_Revert() (gas: 11334) Router_recoverTokens:test_RecoverTokensNoFunds_Revert() (gas: 20267) Router_recoverTokens:test_RecoverTokensNonOwner_Revert() (gas: 11171) Router_recoverTokens:test_RecoverTokensValueReceiver_Revert() (gas: 358049) -Router_recoverTokens:test_RecoverTokens_Success() (gas: 52480) +Router_recoverTokens:test_RecoverTokens_Success() (gas: 52508) Router_routeMessage:test_AutoExec_Success() (gas: 42816) Router_routeMessage:test_ExecutionEvent_Success() (gas: 158520) Router_routeMessage:test_ManualExec_Success() (gas: 35546) @@ -958,7 +962,7 @@ Router_routeMessage:test_OnlyOffRamp_Revert() (gas: 25224) Router_routeMessage:test_WhenNotHealthy_Revert() (gas: 44799) Router_setWrappedNative:test_OnlyOwner_Revert() (gas: 10998) SelfFundedPingPong_ccipReceive:test_FundingIfNotANop_Revert() (gas: 55660) -SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 428138) +SelfFundedPingPong_ccipReceive:test_Funding_Success() (gas: 428230) SelfFundedPingPong_setCountIncrBeforeFunding:test_setCountIncrBeforeFunding() (gas: 20181) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_OnlyPendingAdministrator_Revert() (gas: 51163) TokenAdminRegistry_acceptAdminRole:test_acceptAdminRole_Success() (gas: 44004) @@ -982,58 +986,110 @@ TokenAdminRegistry_setPool:test_setPool_Success() (gas: 36135) TokenAdminRegistry_setPool:test_setPool_ZeroAddressRemovesPool_Success() (gas: 30842) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_OnlyAdministrator_Revert() (gas: 18103) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_Success() (gas: 49438) -TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 5586499) -TokenPoolAndProxy:test_lockOrBurn_burnWithFromMint_Success() (gas: 5618769) -TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 5793246) -TokenPoolAndProxy:test_setPreviousPool_Success() (gas: 3070731) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6440241) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 6640374) -TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 1979943) -TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12113) -TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23476) -TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowList_Success() (gas: 177848) +TokenPoolFactory_constructor:test_constructor_Revert() (gas: 1121620) +TokenPoolFactory_createTokenPool:test_createTokenPoolLockRelease_ExistingToken_predict_Success() (gas: 12535175) +TokenPoolFactory_createTokenPool:test_createTokenPool_BurnFromMintTokenPool_Success() (gas: 6414943) +TokenPoolFactory_createTokenPool:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 13284620) +TokenPoolFactory_createTokenPool:test_createTokenPool_RemoteTokenHasDifferentDecimals_Success() (gas: 13291989) +TokenPoolFactory_createTokenPool:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 13622819) +TokenPoolFactory_createTokenPool:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 6201644) +TokenPoolFactory_createTokenPool:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 6411396) +TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 2732579) +TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12059) +TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23512) +TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowList_Success() (gas: 177934) TokenPoolWithAllowList_getAllowList:test_GetAllowList_Success() (gas: 23764) -TokenPoolWithAllowList_getAllowListEnabled:test_GetAllowListEnabled_Success() (gas: 8375) +TokenPoolWithAllowList_getAllowListEnabled:test_GetAllowListEnabled_Success() (gas: 8353) TokenPoolWithAllowList_setRouter:test_SetRouter_Success() (gas: 24867) -TokenPool_applyChainUpdates:test_applyChainUpdates_DisabledNonZeroRateLimit_Revert() (gas: 271569) -TokenPool_applyChainUpdates:test_applyChainUpdates_InvalidRateLimitRate_Revert() (gas: 542359) -TokenPool_applyChainUpdates:test_applyChainUpdates_NonExistentChain_Revert() (gas: 18449) -TokenPool_applyChainUpdates:test_applyChainUpdates_OnlyCallableByOwner_Revert() (gas: 11469) -TokenPool_applyChainUpdates:test_applyChainUpdates_Success() (gas: 479160) -TokenPool_applyChainUpdates:test_applyChainUpdates_ZeroAddressNotAllowed_Revert() (gas: 157422) -TokenPool_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 70484) -TokenPool_constructor:test_immutableFields_Success() (gas: 20586) -TokenPool_getRemotePool:test_getRemotePool_Success() (gas: 274181) -TokenPool_onlyOffRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 277296) -TokenPool_onlyOffRamp:test_ChainNotAllowed_Revert() (gas: 290028) -TokenPool_onlyOffRamp:test_onlyOffRamp_Success() (gas: 350050) -TokenPool_onlyOnRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 277036) -TokenPool_onlyOnRamp:test_ChainNotAllowed_Revert() (gas: 254065) -TokenPool_onlyOnRamp:test_onlyOnRamp_Success() (gas: 305106) -TokenPool_setChainRateLimiterConfig:test_NonExistentChain_Revert() (gas: 17187) -TokenPool_setChainRateLimiterConfig:test_OnlyOwnerOrRateLimitAdmin_Revert() (gas: 15227) -TokenPool_setRemotePool:test_setRemotePool_NonExistentChain_Reverts() (gas: 15671) -TokenPool_setRemotePool:test_setRemotePool_OnlyOwner_Reverts() (gas: 13219) -TokenPool_setRemotePool:test_setRemotePool_Success() (gas: 282125) +TokenPoolWithAllowList_setRouter:test_ZeroAddressNotAllowed_Revert() (gas: 10696) +TokenPool_addRemotePool:test_NonExistentChain_Revert() (gas: 14222) +TokenPool_addRemotePool:test_PoolAlreadyAdded_Revert() (gas: 117183) +TokenPool_addRemotePool:test_ZeroLengthAddressNotAllowed_Revert() (gas: 14037) +TokenPool_addRemotePool:test_addRemotePool_MultipleActive() (gas: 472725) +TokenPool_addRemotePool:test_addRemotePool_Success() (gas: 157106) +TokenPool_applyChainUpdates:test_applyChainUpdates_InvalidRateLimitRate_Revert() (gas: 455399) +TokenPool_applyChainUpdates:test_applyChainUpdates_NonExistentChain_Revert() (gas: 15010) +TokenPool_applyChainUpdates:test_applyChainUpdates_OnlyCallableByOwner_Revert() (gas: 11819) +TokenPool_applyChainUpdates:test_applyChainUpdates_Success() (gas: 592007) +TokenPool_applyChainUpdates:test_applyChainUpdates_UpdatesRemotePoolHashes() (gas: 1077674) +TokenPool_applyChainUpdates:test_applyChainUpdates_ZeroAddressNotAllowed_Revert() (gas: 226422) +TokenPool_calculateLocalAmount:test_calculateLocalAmount() (gas: 94754) +TokenPool_calculateLocalAmount:test_calculateLocalAmount_RevertWhen_HighAmountOverflows() (gas: 2731145) +TokenPool_calculateLocalAmount:test_calculateLocalAmount_RevertWhen_HighLocalDecimalsOverflows() (gas: 2730754) +TokenPool_calculateLocalAmount:test_calculateLocalAmount_RevertWhen_HighRemoteDecimalsOverflows() (gas: 9558) +TokenPool_calculateLocalAmount:test_calculateLocalAmount_RevertWhen_LowRemoteDecimalsOverflows() (gas: 2730777) +TokenPool_constructor:test_constructor() (gas: 21909) +TokenPool_constructor:test_constructor_DecimalCallFails() (gas: 2728920) +TokenPool_constructor:test_constructor_RevertWhen_InvalidDecimalArgs() (gas: 77725) +TokenPool_constructor:test_constructor_RevertWhen_ZeroAddressNotAllowed() (gas: 71520) +TokenPool_getRemotePool:test_getRemotePools() (gas: 330178) +TokenPool_onlyOffRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 21458) +TokenPool_onlyOffRamp:test_ChainNotAllowed_Revert() (gas: 240293) +TokenPool_onlyOffRamp:test_onlyOffRamp_Success() (gas: 94196) +TokenPool_onlyOnRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 21155) +TokenPool_onlyOnRamp:test_ChainNotAllowed_Revert() (gas: 204261) +TokenPool_onlyOnRamp:test_onlyOnRamp_Success() (gas: 49198) +TokenPool_parseRemoteDecimals:test_parseRemoteDecimals() (gas: 13954) +TokenPool_parseRemoteDecimals:test_parseRemoteDecimals_NoDecimalsDefaultsToLocalDecimals() (gas: 9703) +TokenPool_parseRemoteDecimals:test_parseRemoteDecimals_RevertWhen_InvalidRemoteChainDecimals_DigitTooLarge() (gas: 10656) +TokenPool_parseRemoteDecimals:test_parseRemoteDecimals_RevertWhen_InvalidRemoteChainDecimals_WrongType() (gas: 11489) +TokenPool_removeRemotePool:test_InvalidRemotePoolForChain_Revert() (gas: 17488) +TokenPool_removeRemotePool:test_NonExistentChain_Revert() (gas: 14244) +TokenPool_removeRemotePool:test_removeRemotePool_Success() (gas: 187979) +TokenPool_setChainRateLimiterConfig:test_NonExistentChain_Revert() (gas: 17236) +TokenPool_setChainRateLimiterConfig:test_OnlyOwnerOrRateLimitAdmin_Revert() (gas: 15240) +TokenPool_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 10936) +TokenPool_setRateLimitAdmin:test_SetRateLimitAdmin_Success() (gas: 37540) TokenProxy_ccipSend:test_CcipSendGasShouldBeZero_Revert() (gas: 17226) -TokenProxy_ccipSend:test_CcipSendInsufficientAllowance_Revert() (gas: 139085) +TokenProxy_ccipSend:test_CcipSendInsufficientAllowance_Revert() (gas: 139114) TokenProxy_ccipSend:test_CcipSendInvalidToken_Revert() (gas: 16000) -TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 244493) +TokenProxy_ccipSend:test_CcipSendNative_Success() (gas: 245063) TokenProxy_ccipSend:test_CcipSendNoDataAllowed_Revert() (gas: 16384) -TokenProxy_ccipSend:test_CcipSend_Success() (gas: 263419) +TokenProxy_ccipSend:test_CcipSend_Success() (gas: 263889) TokenProxy_constructor:test_Constructor() (gas: 13836) TokenProxy_getFee:test_GetFeeGasShouldBeZero_Revert() (gas: 16899) TokenProxy_getFee:test_GetFeeInvalidToken_Revert() (gas: 12706) TokenProxy_getFee:test_GetFeeNoDataAllowed_Revert() (gas: 15885) TokenProxy_getFee:test_GetFee_Success() (gas: 90200) -USDCTokenPool__validateMessage:test_ValidateInvalidMessage_Revert() (gas: 25704) -USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35481) -USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30235) -USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 133508) -USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 478182) -USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 268672) -USDCTokenPool_releaseOrMint:test_TokenMaxCapacityExceeded_Revert() (gas: 50952) -USDCTokenPool_releaseOrMint:test_UnlockingUSDCFailed_Revert() (gas: 98987) +USDCBridgeMigrator_BurnLockedUSDC:test_PrimaryMechanism_Success() (gas: 135852) +USDCBridgeMigrator_BurnLockedUSDC:test_WhileMigrationPause_Revert() (gas: 109729) +USDCBridgeMigrator_BurnLockedUSDC:test_invalidPermissions_Revert() (gas: 39465) +USDCBridgeMigrator_BurnLockedUSDC:test_lockOrBurn_then_BurnInCCTPMigration_Success() (gas: 309798) +USDCBridgeMigrator_BurnLockedUSDC:test_onLockReleaseMechanism_Success() (gas: 146961) +USDCBridgeMigrator_BurnLockedUSDC:test_onLockReleaseMechanism_thenSwitchToPrimary_Success() (gas: 209091) +USDCBridgeMigrator_cancelMigrationProposal:test_cancelExistingCCTPMigrationProposal_Success() (gas: 56049) +USDCBridgeMigrator_cancelMigrationProposal:test_cannotCancelANonExistentMigrationProposal_Revert() (gas: 12636) +USDCBridgeMigrator_excludeTokensFromBurn:test_excludeTokensWhenNoMigrationProposalPending_Revert() (gas: 13513) +USDCBridgeMigrator_proposeMigration:test_ChainNotUsingLockRelease_Revert() (gas: 15699) +USDCBridgeMigrator_provideLiquidity:test_PrimaryMechanism_Success() (gas: 135852) +USDCBridgeMigrator_provideLiquidity:test_WhileMigrationPause_Revert() (gas: 109729) +USDCBridgeMigrator_provideLiquidity:test_cannotModifyLiquidityWithoutPermissions_Revert() (gas: 13362) +USDCBridgeMigrator_provideLiquidity:test_cannotProvideLiquidityWhenMigrationProposalPending_Revert() (gas: 67359) +USDCBridgeMigrator_provideLiquidity:test_cannotProvideLiquidity_AfterMigration_Revert() (gas: 313639) +USDCBridgeMigrator_provideLiquidity:test_invalidPermissions_Revert() (gas: 39444) +USDCBridgeMigrator_provideLiquidity:test_lockOrBurn_then_BurnInCCTPMigration_Success() (gas: 309816) +USDCBridgeMigrator_provideLiquidity:test_onLockReleaseMechanism_Success() (gas: 146983) +USDCBridgeMigrator_provideLiquidity:test_onLockReleaseMechanism_thenSwitchToPrimary_Success() (gas: 209108) +USDCBridgeMigrator_releaseOrMint:test_OnLockReleaseMechanism_Success() (gas: 213107) +USDCBridgeMigrator_releaseOrMint:test_WhileMigrationPause_Revert() (gas: 109606) +USDCBridgeMigrator_releaseOrMint:test_incomingMessageWithPrimaryMechanism() (gas: 265839) +USDCBridgeMigrator_releaseOrMint:test_unstickManualTxAfterMigration_destChain_Success() (gas: 150414) +USDCBridgeMigrator_releaseOrMint:test_unstickManualTxAfterMigration_homeChain_Success() (gas: 511552) +USDCBridgeMigrator_updateChainSelectorMechanism:test_PrimaryMechanism_Success() (gas: 135852) +USDCBridgeMigrator_updateChainSelectorMechanism:test_WhileMigrationPause_Revert() (gas: 109729) +USDCBridgeMigrator_updateChainSelectorMechanism:test_cannotRevertChainMechanism_afterMigration_Revert() (gas: 313218) +USDCBridgeMigrator_updateChainSelectorMechanism:test_invalidPermissions_Revert() (gas: 39465) +USDCBridgeMigrator_updateChainSelectorMechanism:test_lockOrBurn_then_BurnInCCTPMigration_Success() (gas: 309798) +USDCBridgeMigrator_updateChainSelectorMechanism:test_onLockReleaseMechanism_Success() (gas: 146961) +USDCBridgeMigrator_updateChainSelectorMechanism:test_onLockReleaseMechanism_thenSwitchToPrimary_Success() (gas: 209109) +USDCTokenPool__validateMessage:test_ValidateInvalidMessage_Revert() (gas: 25789) +USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35274) +USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 29875) +USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 133446) +USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 433218) +USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 265601) +USDCTokenPool_releaseOrMint:test_TokenMaxCapacityExceeded_Revert() (gas: 47169) +USDCTokenPool_releaseOrMint:test_UnlockingUSDCFailed_Revert() (gas: 95194) USDCTokenPool_setDomains:test_InvalidDomain_Revert() (gas: 66393) -USDCTokenPool_setDomains:test_OnlyOwner_Revert() (gas: 11363) +USDCTokenPool_setDomains:test_OnlyOwner_Revert() (gas: 11270) USDCTokenPool_supportsInterface:test_SupportsInterface_Success() (gas: 10041) \ No newline at end of file diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index 69e0271684..1e6966fe09 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -229,13 +229,13 @@ FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_RevertIfNotOwn FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_Success() (gas: 96240) FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 13819) FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: 22824) -Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 84725) -Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79140) +Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 81752) +Gas_AddConsumer:test_AddConsumer_Gas() (gas: 76167) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20562) -Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20024) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 501184) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 202376) -Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38518) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 984338) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 181561) \ No newline at end of file +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 17589) +Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 17051) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 498189) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 199381) +Gas_FundSubscription:test_FundSubscription_Gas() (gas: 35545) +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 981365) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 178588) \ No newline at end of file diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 3a21b733b0..4752a7bd6f 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,87 +1,87 @@ -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 165160) -CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 191990) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 27250) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 152585) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 99251) -CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 100235) -CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 397662) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 21955) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 173196) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 244098) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 256604) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 120335) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 46314) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 351528) -CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 184109) -CapabilitiesRegistry_AddDONTest_WhenMaliciousCapabilityConfigurationConfigured:test_RevertWhen_MaliciousCapabilitiesConfigContractTriesToRemoveCapabilitiesFromDONNodes() (gas: 351499) -CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 196412) -CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 20517) -CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 21853) -CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 370469) -CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 370412) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 308840) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 60242) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 29057) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 31777) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 29369) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 31590) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 30458) -CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 318363) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 92947) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 92416) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 25861) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 17253) -CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 94546) -CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 148509) -CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 79258) -CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 75791) -CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 13678) -CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 16541) -CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 43532) -CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 45407) -CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 78072) -CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 81113) -CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 65888) -CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17319) -CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 18221) -CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 42131) -CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 17570) -CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 128198) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 304051) -CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 580021) -CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 79607) -CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 81525) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 27098) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 20122) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 391972) -CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 20101) -CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 10699) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 21979) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 157054) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 20190) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 227956) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 243262) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 111705) -CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 167967) -CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 399442) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 24121) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 22970) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 22368) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 18126) -CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 43652) -CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 270986) -CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 172430) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 40754) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByAnotherNodeOperatorAdmin() (gas: 32851) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 33584) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 33290) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 35211) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 33256) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 480598) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 350838) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 32442) -CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 31565) -CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 172552) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_NoConfigurationContract() (gas: 154809) +CapabilitiesRegistry_AddCapabilitiesTest:test_AddCapability_WithConfiguration() (gas: 180379) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 24678) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_CapabilityExists() (gas: 145613) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 94543) +CapabilitiesRegistry_AddCapabilitiesTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 96326) +CapabilitiesRegistry_AddDONTest:test_AddDON() (gas: 373893) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19288) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 169767) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 239739) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 250950) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 116905) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 43373) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeAlreadyBelongsToWorkflowDON() (gas: 344037) +CapabilitiesRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 180165) +CapabilitiesRegistry_AddDONTest_WhenMaliciousCapabilityConfigurationConfigured:test_RevertWhen_MaliciousCapabilitiesConfigContractTriesToRemoveCapabilitiesFromDONNodes() (gas: 340514) +CapabilitiesRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 184157) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 17624) +CapabilitiesRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 18520) +CapabilitiesRegistry_AddNodesTest:test_AddsNodeParams() (gas: 358492) +CapabilitiesRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 358458) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301273) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55196) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidNodeOperator() (gas: 24917) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27691) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25130) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27430) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27069) +CapabilitiesRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 309723) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_DeprecatesCapability() (gas: 89742) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_EmitsEvent() (gas: 89870) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CalledByNonAdmin() (gas: 22879) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 16166) +CapabilitiesRegistry_DeprecateCapabilitiesTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 91134) +CapabilitiesRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 135488) +CapabilitiesRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 65468) +CapabilitiesRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 65016) +CapabilitiesRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 11428) +CapabilitiesRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 13087) +CapabilitiesRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 36429) +CapabilitiesRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 38714) +CapabilitiesRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 65288) +CapabilitiesRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73497) +CapabilitiesRegistry_RemoveDONsTest:test_RemovesDON() (gas: 54982) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15647) +CapabilitiesRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 16550) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 36122) +CapabilitiesRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15816) +CapabilitiesRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 115150) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenDONDeleted() (gas: 287838) +CapabilitiesRegistry_RemoveNodesTest:test_CanRemoveWhenNodeNoLongerPartOfDON() (gas: 561183) +CapabilitiesRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 73358) +CapabilitiesRegistry_RemoveNodesTest:test_RemovesNode() (gas: 75192) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25008) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18373) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_NodePartOfCapabilitiesDON() (gas: 385422) +CapabilitiesRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18363) +CapabilitiesRegistry_TypeAndVersionTest:test_TypeAndVersion() (gas: 9796) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19323) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 152958) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17749) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 222975) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 236986) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 107687) +CapabilitiesRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 163401) +CapabilitiesRegistry_UpdateDONTest:test_UpdatesDON() (gas: 373510) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 20684) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 20008) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorDoesNotExist() (gas: 19746) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorIdAndParamLengthsMismatch() (gas: 15386) +CapabilitiesRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 36990) +CapabilitiesRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 256437) +CapabilitiesRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 162210) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 35895) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByAnotherNodeOperatorAdmin() (gas: 29222) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 29399) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 29221) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 31348) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 29187) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByCapabilityDON() (gas: 471030) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_RemovingCapabilityRequiredByWorkflowDON() (gas: 341311) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 29080) +CapabilitiesRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 27609) +CapabilitiesRegistry_UpdateNodesTest:test_UpdatesNodeParams() (gas: 162264) KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 2006826) KeystoneForwarder_ReportTest:test_Report_FailedDelieryWhenReportReceiverConsumesAllGas() (gas: 1004827) KeystoneForwarder_ReportTest:test_Report_FailedDeliveryWhenReceiverInterfaceNotSupported() (gas: 124974) @@ -99,17 +99,17 @@ KeystoneForwarder_ReportTest:test_RevertWhen_RetryingInvalidContractTransmission KeystoneForwarder_ReportTest:test_RevertWhen_RetryingSuccessfulTransmission() (gas: 355992) KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 55314) KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 56050) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 36989) -KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 96835) -KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 17476) -KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 97845) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 124504) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingZeroAddressSigner() (gas: 124123) -KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1574325) -KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1580648) -KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 10619) -KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 11782) -KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 11738) -KeystoneRouter_SetConfigTest:test_RemoveForwarder_Success() (gas: 18831) -KeystoneRouter_SetConfigTest:test_Route_RevertWhen_UnauthorizedForwarder() (gas: 20110) -KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 89986) \ No newline at end of file +KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 20184) +KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 88057) +KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14533) +KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 88766) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 114578) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingZeroAddressSigner() (gas: 114233) +KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 1540665) +KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 1535361) +KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641) +KeystoneRouter_SetConfigTest:test_AddForwarder_RevertWhen_NotOwner() (gas: 10982) +KeystoneRouter_SetConfigTest:test_RemoveForwarder_RevertWhen_NotOwner() (gas: 10927) +KeystoneRouter_SetConfigTest:test_RemoveForwarder_Success() (gas: 17603) +KeystoneRouter_SetConfigTest:test_Route_RevertWhen_UnauthorizedForwarder() (gas: 18552) +KeystoneRouter_SetConfigTest:test_Route_Success() (gas: 80948) \ No newline at end of file diff --git a/contracts/gas-snapshots/l2ep.gas-snapshot b/contracts/gas-snapshots/l2ep.gas-snapshot index e793f8ce54..add2a354c3 100644 --- a/contracts/gas-snapshots/l2ep.gas-snapshot +++ b/contracts/gas-snapshots/l2ep.gas-snapshot @@ -1,142 +1,142 @@ -ArbitrumCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 37568) -ArbitrumCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 12963) -ArbitrumCrossDomainForwarder_Constructor:test_InitialState() (gas: 22163) -ArbitrumCrossDomainForwarder_Forward:test_Forward() (gas: 47867) -ArbitrumCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 22181) -ArbitrumCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 16056) -ArbitrumCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 41453) -ArbitrumCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 19290) -ArbitrumCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 18637) -ArbitrumCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 13242) -ArbitrumCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 37568) -ArbitrumCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 12963) -ArbitrumCrossDomainGovernor_Constructor:test_InitialState() (gas: 22186) -ArbitrumCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 50003) -ArbitrumCrossDomainGovernor_Forward:test_Forward() (gas: 47896) -ArbitrumCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 24326) -ArbitrumCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 18233) -ArbitrumCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 19386) -ArbitrumCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 60874) -ArbitrumCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 63003) -ArbitrumCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 18245) -ArbitrumCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 64368) -ArbitrumCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 41453) -ArbitrumCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 19290) -ArbitrumCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 18637) -ArbitrumCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 13242) -ArbitrumSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 104862) -ArbitrumSequencerUptimeFeed_AggregatorV3Interface:test_Return0WhenRoundDoesNotExistYet() (gas: 19967) -ArbitrumSequencerUptimeFeed_Constants:test_InitialState() (gas: 8518) -ArbitrumSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 604370) -ArbitrumSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 574432) -ArbitrumSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 99629) -ArbitrumSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 15447) -ArbitrumSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 114625) -ArbitrumSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 114708) -ArbitrumValidator_Validate:test_PostSequencerOffline() (gas: 69086) -OptimismCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47160) -OptimismCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22160) -OptimismCrossDomainForwarder_Constructor:test_InitialState() (gas: 21998) -OptimismCrossDomainForwarder_Forward:test_Forward() (gas: 58281) -OptimismCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 32560) -OptimismCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 13867) -OptimismCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 48933) -OptimismCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28753) -OptimismCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16448) -OptimismCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11053) -OptimismCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47160) -OptimismCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22160) -OptimismCrossDomainGovernor_Constructor:test_InitialState() (gas: 22021) -OptimismCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 47846) -OptimismCrossDomainGovernor_Forward:test_Forward() (gas: 58330) -OptimismCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 32619) -OptimismCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 16047) -OptimismCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 29189) -OptimismCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 72942) -OptimismCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 72947) -OptimismCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 16059) -OptimismCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 76156) -OptimismCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 48933) -OptimismCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28753) -OptimismCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16448) -OptimismCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11053) -OptimismSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 72400) -OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17653) -OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17893) -OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17642) -OptimismSequencerUptimeFeed_Constructor:test_InitialState() (gas: 22050) -OptimismSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 601594) -OptimismSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 574437) -OptimismSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 67873) -OptimismSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13079) -OptimismSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddrAndNotL1SenderAddr() (gas: 23542) -OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 77322) -OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 96182) -OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 96265) -OptimismValidator_SetGasLimit:test_CorrectlyUpdatesTheGasLimit() (gas: 18671) -OptimismValidator_Validate:test_PostSequencerOffline() (gas: 74790) -OptimismValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 74869) -OptimismValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15571) -ScrollCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47255) -ScrollCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22212) -ScrollCrossDomainForwarder_Constructor:test_InitialState() (gas: 21674) -ScrollCrossDomainForwarder_Forward:test_Forward() (gas: 58348) -ScrollCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 32618) -ScrollCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 13867) -ScrollCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 48999) -ScrollCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28819) -ScrollCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16448) -ScrollCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11053) -ScrollCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47255) -ScrollCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22212) -ScrollCrossDomainGovernor_Constructor:test_InitialState() (gas: 21697) -ScrollCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 47841) -ScrollCrossDomainGovernor_Forward:test_Forward() (gas: 58392) -ScrollCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 32674) -ScrollCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 16044) -ScrollCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 29250) -ScrollCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 73009) -ScrollCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 73014) -ScrollCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 16056) -ScrollCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 76224) -ScrollCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 48999) -ScrollCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28819) -ScrollCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16448) -ScrollCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11053) -ScrollSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 72423) -ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17653) -ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17893) -ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17642) -ScrollSequencerUptimeFeed_Constructor:test_InitialState() (gas: 173935) -ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 601594) -ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 574437) -ScrollSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 67919) -ScrollSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13079) -ScrollSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddrAndNotL1SenderAddr() (gas: 23542) -ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 77368) -ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 96228) -ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 96311) -ScrollValidator_SetGasLimit:test_CorrectlyUpdatesTheGasLimit() (gas: 18805) -ScrollValidator_Validate:test_PostSequencerOffline() (gas: 78326) -ScrollValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 78411) -ScrollValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15571) -ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 67166) -ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17653) -ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17893) -ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17642) -ZKSyncSequencerUptimeFeed_Constructor:test_InitialState() (gas: 22054) -ZKSyncSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 601614) -ZKSyncSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 574443) -ZKSyncSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 61924) -ZKSyncSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13035) -ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 71379) -ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 90241) -ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 90324) -ZKSyncValidator_Constructor:test_ConstructingRevertedWithInvalidChainId() (gas: 103725) -ZKSyncValidator_Constructor:test_ConstructingRevertedWithZeroL1BridgeAddress() (gas: 81440) -ZKSyncValidator_Constructor:test_ConstructingRevertedWithZeroL2UpdateFeedAddress() (gas: 81497) -ZKSyncValidator_GetChainId:test_CorrectlyGetsTheChainId() (gas: 8350) -ZKSyncValidator_GetSetL2GasPerPubdataByteLimit:test_CorrectlyGetsAndUpdatesTheGasPerPubdataByteLimit() (gas: 18915) -ZKSyncValidator_Validate:test_PostSequencerOffline() (gas: 52255) -ZKSyncValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 52355) -ZKSyncValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15644) \ No newline at end of file +ArbitrumCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 37548) +ArbitrumCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 12954) +ArbitrumCrossDomainForwarder_Constructor:test_InitialState() (gas: 22133) +ArbitrumCrossDomainForwarder_Forward:test_Forward() (gas: 47818) +ArbitrumCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 22154) +ArbitrumCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 16040) +ArbitrumCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 41439) +ArbitrumCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 19274) +ArbitrumCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 18622) +ArbitrumCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 13232) +ArbitrumCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 37548) +ArbitrumCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 12954) +ArbitrumCrossDomainGovernor_Constructor:test_InitialState() (gas: 22156) +ArbitrumCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 49953) +ArbitrumCrossDomainGovernor_Forward:test_Forward() (gas: 47847) +ArbitrumCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 24298) +ArbitrumCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 18216) +ArbitrumCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 19363) +ArbitrumCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 60787) +ArbitrumCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 62915) +ArbitrumCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 18228) +ArbitrumCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 64276) +ArbitrumCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 41439) +ArbitrumCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 19274) +ArbitrumCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 18622) +ArbitrumCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 13232) +ArbitrumSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 104748) +ArbitrumSequencerUptimeFeed_AggregatorV3Interface:test_Return0WhenRoundDoesNotExistYet() (gas: 19939) +ArbitrumSequencerUptimeFeed_Constants:test_InitialState() (gas: 8514) +ArbitrumSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 592246) +ArbitrumSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 562331) +ArbitrumSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 99559) +ArbitrumSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 15436) +ArbitrumSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 114515) +ArbitrumSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 114598) +ArbitrumValidator_Validate:test_PostSequencerOffline() (gas: 69027) +OptimismCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47108) +OptimismCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22132) +OptimismCrossDomainForwarder_Constructor:test_InitialState() (gas: 21969) +OptimismCrossDomainForwarder_Forward:test_Forward() (gas: 58213) +OptimismCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 32510) +OptimismCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 13852) +OptimismCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 48900) +OptimismCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28718) +OptimismCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16434) +OptimismCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11044) +OptimismCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47108) +OptimismCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22132) +OptimismCrossDomainGovernor_Constructor:test_InitialState() (gas: 21992) +OptimismCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 47797) +OptimismCrossDomainGovernor_Forward:test_Forward() (gas: 58262) +OptimismCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 32569) +OptimismCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 16031) +OptimismCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 29147) +OptimismCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 72836) +OptimismCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 72841) +OptimismCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 16043) +OptimismCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 76045) +OptimismCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 48900) +OptimismCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28718) +OptimismCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16434) +OptimismCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11044) +OptimismSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 72304) +OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17639) +OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17875) +OptimismSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17628) +OptimismSequencerUptimeFeed_Constructor:test_InitialState() (gas: 22024) +OptimismSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 589475) +OptimismSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 562336) +OptimismSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 67816) +OptimismSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13070) +OptimismSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddrAndNotL1SenderAddr() (gas: 23529) +OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 77211) +OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 96101) +OptimismSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 96184) +OptimismValidator_SetGasLimit:test_CorrectlyUpdatesTheGasLimit() (gas: 18658) +OptimismValidator_Validate:test_PostSequencerOffline() (gas: 74741) +OptimismValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 74820) +OptimismValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15556) +ScrollCrossDomainForwarder_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47200) +ScrollCrossDomainForwarder_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22182) +ScrollCrossDomainForwarder_Constructor:test_InitialState() (gas: 21645) +ScrollCrossDomainForwarder_Forward:test_Forward() (gas: 58277) +ScrollCrossDomainForwarder_Forward:test_ForwardRevert() (gas: 32566) +ScrollCrossDomainForwarder_Forward:test_NotCallableByUnknownAddress() (gas: 13852) +ScrollCrossDomainForwarder_TransferL1Ownership:test_CallableByL1Owner() (gas: 48963) +ScrollCrossDomainForwarder_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28782) +ScrollCrossDomainForwarder_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16434) +ScrollCrossDomainForwarder_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11044) +ScrollCrossDomainGovernor_AcceptL1Ownership:test_CallableByPendingL1Owner() (gas: 47200) +ScrollCrossDomainGovernor_AcceptL1Ownership:test_NotCallableByNonPendingOwners() (gas: 22182) +ScrollCrossDomainGovernor_Constructor:test_InitialState() (gas: 21668) +ScrollCrossDomainGovernor_Forward:test_CallableByL2Owner() (gas: 47792) +ScrollCrossDomainGovernor_Forward:test_Forward() (gas: 58321) +ScrollCrossDomainGovernor_Forward:test_ForwardRevert() (gas: 32622) +ScrollCrossDomainGovernor_Forward:test_NotCallableByUnknownAddress() (gas: 16028) +ScrollCrossDomainGovernor_ForwardDelegate:test_BubbleUpRevert() (gas: 29205) +ScrollCrossDomainGovernor_ForwardDelegate:test_CallableByCrossDomainMessengerAddressOrL1Owner() (gas: 72900) +ScrollCrossDomainGovernor_ForwardDelegate:test_CallableByL2Owner() (gas: 72905) +ScrollCrossDomainGovernor_ForwardDelegate:test_NotCallableByUnknownAddress() (gas: 16040) +ScrollCrossDomainGovernor_ForwardDelegate:test_RevertsBatchWhenOneCallFails() (gas: 76110) +ScrollCrossDomainGovernor_TransferL1Ownership:test_CallableByL1Owner() (gas: 48963) +ScrollCrossDomainGovernor_TransferL1Ownership:test_CallableByL1OwnerOrZeroAddress() (gas: 28782) +ScrollCrossDomainGovernor_TransferL1Ownership:test_NotCallableByL2Owner() (gas: 16434) +ScrollCrossDomainGovernor_TransferL1Ownership:test_NotCallableByNonOwners() (gas: 11044) +ScrollSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 72327) +ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17639) +ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17875) +ScrollSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17628) +ScrollSequencerUptimeFeed_Constructor:test_InitialState() (gas: 174375) +ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 589475) +ScrollSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 562336) +ScrollSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 67862) +ScrollSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13070) +ScrollSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddrAndNotL1SenderAddr() (gas: 23529) +ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 77257) +ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 96147) +ScrollSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 96230) +ScrollValidator_SetGasLimit:test_CorrectlyUpdatesTheGasLimit() (gas: 18792) +ScrollValidator_Validate:test_PostSequencerOffline() (gas: 78276) +ScrollValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 78361) +ScrollValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15556) +ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_AggregatorV3Interface() (gas: 67072) +ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetAnswerWhenRoundDoesNotExistYet() (gas: 17639) +ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetRoundDataWhenRoundDoesNotExistYet() (gas: 17875) +ZKSyncSequencerUptimeFeed_AggregatorV3Interface:test_RevertGetTimestampWhenRoundDoesNotExistYet() (gas: 17628) +ZKSyncSequencerUptimeFeed_Constructor:test_InitialState() (gas: 22028) +ZKSyncSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceAllowReadsIfConsumingContractIsWhitelisted() (gas: 589495) +ZKSyncSequencerUptimeFeed_ProtectReadsOnAggregatorV2V3InterfaceFunctions:test_AggregatorV2V3InterfaceDisallowReadsIfConsumingContractIsNotWhitelisted() (gas: 562342) +ZKSyncSequencerUptimeFeed_UpdateStatus:test_IgnoreOutOfOrderUpdates() (gas: 61871) +ZKSyncSequencerUptimeFeed_UpdateStatus:test_RevertIfNotL2CrossDomainMessengerAddr() (gas: 13026) +ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenNoChange() (gas: 71272) +ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndNoTimeChange() (gas: 90164) +ZKSyncSequencerUptimeFeed_UpdateStatus:test_UpdateStatusWhenStatusChangeAndTimeChange() (gas: 90247) +ZKSyncValidator_Constructor:test_ConstructingRevertedWithInvalidChainId() (gas: 104046) +ZKSyncValidator_Constructor:test_ConstructingRevertedWithZeroL1BridgeAddress() (gas: 81761) +ZKSyncValidator_Constructor:test_ConstructingRevertedWithZeroL2UpdateFeedAddress() (gas: 81818) +ZKSyncValidator_GetChainId:test_CorrectlyGetsTheChainId() (gas: 8346) +ZKSyncValidator_GetSetL2GasPerPubdataByteLimit:test_CorrectlyGetsAndUpdatesTheGasPerPubdataByteLimit() (gas: 18902) +ZKSyncValidator_Validate:test_PostSequencerOffline() (gas: 52205) +ZKSyncValidator_Validate:test_PostSequencerStatusWhenThereIsNotStatusChange() (gas: 52307) +ZKSyncValidator_Validate:test_RevertsIfCalledByAnAccountWithNoAccess() (gas: 15629) \ No newline at end of file diff --git a/contracts/gas-snapshots/liquiditymanager.gas-snapshot b/contracts/gas-snapshots/liquiditymanager.gas-snapshot index 6f67684cfc..48b45672d2 100644 --- a/contracts/gas-snapshots/liquiditymanager.gas-snapshot +++ b/contracts/gas-snapshots/liquiditymanager.gas-snapshot @@ -3,14 +3,14 @@ LiquidityManager_addLiquidity:test_addLiquiditySuccess() (gas: 279154) LiquidityManager_rebalanceLiquidity:test_InsufficientLiquidityReverts() (gas: 206745) LiquidityManager_rebalanceLiquidity:test_InvalidRemoteChainReverts() (gas: 192319) LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPoolsSuccess() (gas: 9141768) -LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPoolsSuccess_AlreadyFinalized() (gas: 8960797) -LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPools_MultiStageFinalization() (gas: 8956003) -LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPools_NativeRewrap() (gas: 8883801) -LiquidityManager_rebalanceLiquidity:test_rebalanceLiquiditySuccess() (gas: 382897) +LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPoolsSuccess_AlreadyFinalized() (gas: 9306597) +LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPools_MultiStageFinalization() (gas: 9301803) +LiquidityManager_rebalanceLiquidity:test_rebalanceBetweenPools_NativeRewrap() (gas: 9231693) +LiquidityManager_rebalanceLiquidity:test_rebalanceLiquiditySuccess() (gas: 382880) LiquidityManager_receive:test_receive_success() (gas: 21182) LiquidityManager_removeLiquidity:test_InsufficientLiquidityReverts() (gas: 184869) LiquidityManager_removeLiquidity:test_OnlyFinanceRoleReverts() (gas: 10872) -LiquidityManager_removeLiquidity:test_removeLiquiditySuccess() (gas: 236342) +LiquidityManager_removeLiquidity:test_removeLiquiditySuccess() (gas: 236324) LiquidityManager_setCrossChainRebalancer:test_OnlyOwnerReverts() (gas: 17005) LiquidityManager_setCrossChainRebalancer:test_ZeroAddressReverts() (gas: 21624) LiquidityManager_setCrossChainRebalancer:test_ZeroChainSelectorReverts() (gas: 13099) @@ -19,7 +19,7 @@ LiquidityManager_setFinanceRole:test_OnlyOwnerReverts() (gas: 10987) LiquidityManager_setFinanceRole:test_setFinanceRoleSuccess() (gas: 21836) LiquidityManager_setLocalLiquidityContainer:test_OnlyOwnerReverts() (gas: 11052) LiquidityManager_setLocalLiquidityContainer:test_ReverstWhen_CalledWithTheZeroAddress() (gas: 10643) -LiquidityManager_setLocalLiquidityContainer:test_setLocalLiquidityContainerSuccess() (gas: 3498806) +LiquidityManager_setLocalLiquidityContainer:test_setLocalLiquidityContainerSuccess() (gas: 3847225) LiquidityManager_setMinimumLiquidity:test_OnlyOwnerReverts() (gas: 10925) LiquidityManager_setMinimumLiquidity:test_setMinimumLiquiditySuccess() (gas: 36389) LiquidityManager_withdrawERC20:test_withdrawERC20Reverts() (gas: 180359) diff --git a/contracts/gas-snapshots/shared.gas-snapshot b/contracts/gas-snapshots/shared.gas-snapshot index dda850089c..a606675413 100644 --- a/contracts/gas-snapshots/shared.gas-snapshot +++ b/contracts/gas-snapshots/shared.gas-snapshot @@ -1,94 +1,127 @@ -AuthorizedCallers_applyAuthorizedCallerUpdates:test_AddAndRemove_Success() (gas: 125205) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyAdd_Success() (gas: 133100) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyCallableByOwner_Revert() (gas: 12350) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyRemove_Success() (gas: 45064) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_RemoveThenAdd_Success() (gas: 57241) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_SkipRemove_Success() (gas: 32121) -AuthorizedCallers_applyAuthorizedCallerUpdates:test_ZeroAddressNotAllowed_Revert() (gas: 64473) -AuthorizedCallers_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 64473) -AuthorizedCallers_constructor:test_constructor_Success() (gas: 720513) -BurnMintERC677_approve:testApproveSuccess() (gas: 55512) -BurnMintERC677_approve:testInvalidAddressReverts() (gas: 10663) -BurnMintERC677_burn:testBasicBurnSuccess() (gas: 173939) -BurnMintERC677_burn:testBurnFromZeroAddressReverts() (gas: 47201) -BurnMintERC677_burn:testExceedsBalanceReverts() (gas: 21841) -BurnMintERC677_burn:testSenderNotBurnerReverts() (gas: 13359) -BurnMintERC677_burnFrom:testBurnFromSuccess() (gas: 57923) -BurnMintERC677_burnFrom:testExceedsBalanceReverts() (gas: 35864) -BurnMintERC677_burnFrom:testInsufficientAllowanceReverts() (gas: 21849) -BurnMintERC677_burnFrom:testSenderNotBurnerReverts() (gas: 13359) -BurnMintERC677_burnFromAlias:testBurnFromSuccess() (gas: 57949) -BurnMintERC677_burnFromAlias:testExceedsBalanceReverts() (gas: 35880) -BurnMintERC677_burnFromAlias:testInsufficientAllowanceReverts() (gas: 21869) -BurnMintERC677_burnFromAlias:testSenderNotBurnerReverts() (gas: 13379) -BurnMintERC677_constructor:testConstructorSuccess() (gas: 1672809) -BurnMintERC677_decreaseApproval:testDecreaseApprovalSuccess() (gas: 31069) -BurnMintERC677_grantMintAndBurnRoles:testGrantMintAndBurnRolesSuccess() (gas: 121324) -BurnMintERC677_grantRole:testGrantBurnAccessSuccess() (gas: 53460) -BurnMintERC677_grantRole:testGrantManySuccess() (gas: 937759) -BurnMintERC677_grantRole:testGrantMintAccessSuccess() (gas: 94340) -BurnMintERC677_increaseApproval:testIncreaseApprovalSuccess() (gas: 44076) -BurnMintERC677_mint:testBasicMintSuccess() (gas: 149699) -BurnMintERC677_mint:testMaxSupplyExceededReverts() (gas: 50385) -BurnMintERC677_mint:testSenderNotMinterReverts() (gas: 11195) -BurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12476) -BurnMintERC677_transfer:testInvalidAddressReverts() (gas: 10639) -BurnMintERC677_transfer:testTransferSuccess() (gas: 42299) -CallWithExactGas__callWithExactGas:test_CallWithExactGasReceiverErrorSuccess() (gas: 67209) -CallWithExactGas__callWithExactGas:test_CallWithExactGasSafeReturnDataExactGas() (gas: 18324) -CallWithExactGas__callWithExactGas:test_NoContractReverts() (gas: 11559) -CallWithExactGas__callWithExactGas:test_NoGasForCallExactCheckReverts() (gas: 15788) -CallWithExactGas__callWithExactGas:test_NotEnoughGasForCallReverts() (gas: 16241) -CallWithExactGas__callWithExactGas:test_callWithExactGasSuccess(bytes,bytes4) (runs: 256, μ: 15766, ~: 15719) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractExactGasSuccess() (gas: 20116) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractReceiverErrorSuccess() (gas: 67721) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractSuccess(bytes,bytes4) (runs: 256, μ: 16276, ~: 16229) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NoContractSuccess() (gas: 12962) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NoGasForCallExactCheckReturnFalseSuccess() (gas: 13005) -CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NotEnoughGasForCallReturnsFalseSuccess() (gas: 13317) -CallWithExactGas__callWithExactGasSafeReturnData:test_CallWithExactGasSafeReturnDataExactGas() (gas: 20331) -CallWithExactGas__callWithExactGasSafeReturnData:test_NoContractReverts() (gas: 13917) -CallWithExactGas__callWithExactGasSafeReturnData:test_NoGasForCallExactCheckReverts() (gas: 16139) -CallWithExactGas__callWithExactGasSafeReturnData:test_NotEnoughGasForCallReverts() (gas: 16569) -CallWithExactGas__callWithExactGasSafeReturnData:test_callWithExactGasSafeReturnData_ThrowOOGError_Revert() (gas: 36708) -EnumerableMapAddresses_at:testAtSuccess() (gas: 95086) -EnumerableMapAddresses_at:testBytes32AtSuccess() (gas: 94877) -EnumerableMapAddresses_at:testBytesAtSuccess() (gas: 96564) -EnumerableMapAddresses_contains:testBytes32ContainsSuccess() (gas: 93518) -EnumerableMapAddresses_contains:testBytesContainsSuccess() (gas: 94012) -EnumerableMapAddresses_contains:testContainsSuccess() (gas: 93696) -EnumerableMapAddresses_get:testBytes32GetSuccess() (gas: 94278) -EnumerableMapAddresses_get:testBytesGetSuccess() (gas: 95879) -EnumerableMapAddresses_get:testGetSuccess() (gas: 94453) -EnumerableMapAddresses_get_errorMessage:testBytesGetErrorMessageSuccess() (gas: 95878) -EnumerableMapAddresses_get_errorMessage:testGetErrorMessageSuccess() (gas: 94489) -EnumerableMapAddresses_length:testBytes32LengthSuccess() (gas: 72445) -EnumerableMapAddresses_length:testBytesLengthSuccess() (gas: 73011) -EnumerableMapAddresses_length:testLengthSuccess() (gas: 72640) -EnumerableMapAddresses_remove:testBytes32RemoveSuccess() (gas: 73462) -EnumerableMapAddresses_remove:testBytesRemoveSuccess() (gas: 74249) -EnumerableMapAddresses_remove:testRemoveSuccess() (gas: 73686) -EnumerableMapAddresses_set:testBytes32SetSuccess() (gas: 94496) -EnumerableMapAddresses_set:testBytesSetSuccess() (gas: 95428) -EnumerableMapAddresses_set:testSetSuccess() (gas: 94685) -EnumerableMapAddresses_tryGet:testBytes32TryGetSuccess() (gas: 94622) -EnumerableMapAddresses_tryGet:testBytesTryGetSuccess() (gas: 96279) -EnumerableMapAddresses_tryGet:testTryGetSuccess() (gas: 94893) -OpStackBurnMintERC677_constructor:testConstructorSuccess() (gas: 1743649) -OpStackBurnMintERC677_interfaceCompatibility:testBurnCompatibility() (gas: 298649) -OpStackBurnMintERC677_interfaceCompatibility:testMintCompatibility() (gas: 137957) -OpStackBurnMintERC677_interfaceCompatibility:testStaticFunctionsCompatibility() (gas: 13781) -OpStackBurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12752) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySubset_Reverts() (gas: 5460) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySuperset_Reverts() (gas: 4661) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_HasDuplicates_Reverts() (gas: 8265) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_NotASubset_Reverts() (gas: 12487) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubset() (gas: 4489) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_Equal() (gas: 1464) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_NotEqual_Reverts() (gas: 6172) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetEqualsSuperset_NoRevert() (gas: 8867) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetLargerThanSuperset_Reverts() (gas: 16544) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SupersetHasDuplicates_Reverts() (gas: 9420) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSubset_Reverts() (gas: 7380) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSuperset_Reverts() (gas: 9600) -SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_ValidSubset_Success() (gas: 6490) \ No newline at end of file +AuthorizedCallers_applyAuthorizedCallerUpdates:test_AddAndRemove_Success() (gas: 124925) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyAdd_Success() (gas: 132902) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyCallableByOwner_Revert() (gas: 12335) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyRemove_Success() (gas: 44930) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_RemoveThenAdd_Success() (gas: 57028) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_SkipRemove_Success() (gas: 32013) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_ZeroAddressNotAllowed_Revert() (gas: 64661) +AuthorizedCallers_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 64661) +AuthorizedCallers_constructor:test_constructor_Success() (gas: 693193) +BurnMintERC20_approve:test_approve() (gas: 57609) +BurnMintERC20_approve:test_approve_RevertWhen_InvalidAddress() (gas: 11289) +BurnMintERC20_burn:test_BasicBurn() (gas: 153528) +BurnMintERC20_burn:test_burn_RevertWhen_BurnFromZeroAddress() (gas: 43800) +BurnMintERC20_burn:test_burn_RevertWhen_ExceedsBalance() (gas: 21868) +BurnMintERC20_burn:test_burn_RevertWhen_SenderNotBurner() (gas: 67663) +BurnMintERC20_burnFrom:test_BurnFrom() (gas: 57929) +BurnMintERC20_burnFrom:test_burnFrom_RevertWhen_ExceedsBalance() (gas: 35838) +BurnMintERC20_burnFrom:test_burnFrom_RevertWhen_InsufficientAllowance() (gas: 21834) +BurnMintERC20_burnFrom:test_burnFrom_RevertWhen_SenderNotBurner() (gas: 67662) +BurnMintERC20_burnFromAlias:test_burn() (gas: 57973) +BurnMintERC20_burnFromAlias:test_burn_RevertWhen_ExceedsBalance() (gas: 35880) +BurnMintERC20_burnFromAlias:test_burn_RevertWhen_InsufficientAllowance() (gas: 21897) +BurnMintERC20_burnFromAlias:test_burn_RevertWhen_SenderNotBurner() (gas: 67650) +BurnMintERC20_constructor:test_Constructor() (gas: 1680059) +BurnMintERC20_getCCIPAdmin:test_getCCIPAdmin() (gas: 10544) +BurnMintERC20_getCCIPAdmin:test_setCCIPAdmin() (gas: 21562) +BurnMintERC20_grantMintAndBurnRoles:test_GrantMintAndBurnRoles() (gas: 79089) +BurnMintERC20_mint:test_mint() (gas: 101815) +BurnMintERC20_mint:test_mint_RevertWhen_InvalidRecipient() (gas: 66372) +BurnMintERC20_mint:test_mint_RevertWhen_MaxSupplyExceeded() (gas: 50365) +BurnMintERC20_mint:test_mint_RevertWhen_SenderNotMinter() (gas: 65827) +BurnMintERC20_supportsInterface:test_SupportsInterface() (gas: 11202) +BurnMintERC20_transfer:test_transfer() (gas: 42318) +BurnMintERC20_transfer:test_transfer_RevertWhen_InvalidAddress() (gas: 11287) +BurnMintERC677_approve:testApproveSuccess() (gas: 55477) +BurnMintERC677_approve:testInvalidAddressReverts() (gas: 10653) +BurnMintERC677_burn:testBasicBurnSuccess() (gas: 172022) +BurnMintERC677_burn:testBurnFromZeroAddressReverts() (gas: 47166) +BurnMintERC677_burn:testExceedsBalanceReverts() (gas: 21816) +BurnMintERC677_burn:testSenderNotBurnerReverts() (gas: 13346) +BurnMintERC677_burnFrom:testBurnFromSuccess() (gas: 57892) +BurnMintERC677_burnFrom:testExceedsBalanceReverts() (gas: 35838) +BurnMintERC677_burnFrom:testInsufficientAllowanceReverts() (gas: 21824) +BurnMintERC677_burnFrom:testSenderNotBurnerReverts() (gas: 13346) +BurnMintERC677_burnFromAlias:testBurnFromSuccess() (gas: 57919) +BurnMintERC677_burnFromAlias:testExceedsBalanceReverts() (gas: 35854) +BurnMintERC677_burnFromAlias:testInsufficientAllowanceReverts() (gas: 21844) +BurnMintERC677_burnFromAlias:testSenderNotBurnerReverts() (gas: 13366) +BurnMintERC677_constructor:testConstructorSuccess() (gas: 1651040) +BurnMintERC677_decreaseApproval:testDecreaseApprovalSuccess() (gas: 31049) +BurnMintERC677_grantMintAndBurnRoles:testGrantMintAndBurnRolesSuccess() (gas: 121279) +BurnMintERC677_grantRole:testGrantBurnAccessSuccess() (gas: 53420) +BurnMintERC677_grantRole:testGrantManySuccess() (gas: 937593) +BurnMintERC677_grantRole:testGrantMintAccessSuccess() (gas: 94297) +BurnMintERC677_increaseApproval:testIncreaseApprovalSuccess() (gas: 44052) +BurnMintERC677_mint:testBasicMintSuccess() (gas: 149664) +BurnMintERC677_mint:testMaxSupplyExceededReverts() (gas: 50345) +BurnMintERC677_mint:testSenderNotMinterReverts() (gas: 11182) +BurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12455) +BurnMintERC677_transfer:testInvalidAddressReverts() (gas: 10629) +BurnMintERC677_transfer:testTransferSuccess() (gas: 42279) +CallWithExactGas__callWithExactGas:test_CallWithExactGasReceiverErrorSuccess() (gas: 65883) +CallWithExactGas__callWithExactGas:test_CallWithExactGasSafeReturnDataExactGas() (gas: 18293) +CallWithExactGas__callWithExactGas:test_NoContractReverts() (gas: 11544) +CallWithExactGas__callWithExactGas:test_NoGasForCallExactCheckReverts() (gas: 15760) +CallWithExactGas__callWithExactGas:test_NotEnoughGasForCallReverts() (gas: 16210) +CallWithExactGas__callWithExactGas:test_callWithExactGasSuccess(bytes,bytes4) (runs: 256, μ: 15741, ~: 15694) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractExactGasSuccess() (gas: 20076) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractReceiverErrorSuccess() (gas: 66394) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_CallWithExactGasEvenIfTargetIsNoContractSuccess(bytes,bytes4) (runs: 256, μ: 16250, ~: 16203) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NoContractSuccess() (gas: 12942) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NoGasForCallExactCheckReturnFalseSuccess() (gas: 12984) +CallWithExactGas__callWithExactGasEvenIfTargetIsNoContract:test_NotEnoughGasForCallReturnsFalseSuccess() (gas: 13293) +CallWithExactGas__callWithExactGasSafeReturnData:test_CallWithExactGasSafeReturnDataExactGas() (gas: 20287) +CallWithExactGas__callWithExactGasSafeReturnData:test_NoContractReverts() (gas: 13893) +CallWithExactGas__callWithExactGasSafeReturnData:test_NoGasForCallExactCheckReverts() (gas: 16108) +CallWithExactGas__callWithExactGasSafeReturnData:test_NotEnoughGasForCallReverts() (gas: 16535) +CallWithExactGas__callWithExactGasSafeReturnData:test_callWithExactGasSafeReturnData_ThrowOOGError_Revert() (gas: 36666) +EnumerableMapAddresses_at:testAtSuccess() (gas: 95055) +EnumerableMapAddresses_at:testBytes32AtSuccess() (gas: 94850) +EnumerableMapAddresses_at:testBytesAtSuccess() (gas: 96529) +EnumerableMapAddresses_contains:testBytes32ContainsSuccess() (gas: 93503) +EnumerableMapAddresses_contains:testBytesContainsSuccess() (gas: 93996) +EnumerableMapAddresses_contains:testContainsSuccess() (gas: 93678) +EnumerableMapAddresses_get:testBytes32GetSuccess() (gas: 94260) +EnumerableMapAddresses_get:testBytesGetSuccess() (gas: 95853) +EnumerableMapAddresses_get:testGetSuccess() (gas: 94431) +EnumerableMapAddresses_get_errorMessage:testBytesGetErrorMessageSuccess() (gas: 95852) +EnumerableMapAddresses_get_errorMessage:testGetErrorMessageSuccess() (gas: 94467) +EnumerableMapAddresses_length:testBytes32LengthSuccess() (gas: 72418) +EnumerableMapAddresses_length:testBytesLengthSuccess() (gas: 72982) +EnumerableMapAddresses_length:testLengthSuccess() (gas: 72609) +EnumerableMapAddresses_remove:testBytes32RemoveSuccess() (gas: 73432) +EnumerableMapAddresses_remove:testBytesRemoveSuccess() (gas: 74216) +EnumerableMapAddresses_remove:testRemoveSuccess() (gas: 73651) +EnumerableMapAddresses_set:testBytes32SetSuccess() (gas: 94475) +EnumerableMapAddresses_set:testBytesSetSuccess() (gas: 95405) +EnumerableMapAddresses_set:testSetSuccess() (gas: 94660) +EnumerableMapAddresses_tryGet:testBytes32TryGetSuccess() (gas: 94602) +EnumerableMapAddresses_tryGet:testBytesTryGetSuccess() (gas: 96250) +EnumerableMapAddresses_tryGet:testTryGetSuccess() (gas: 94869) +OpStackBurnMintERC677_constructor:testConstructorSuccess() (gas: 1721311) +OpStackBurnMintERC677_interfaceCompatibility:testBurnCompatibility() (gas: 291155) +OpStackBurnMintERC677_interfaceCompatibility:testMintCompatibility() (gas: 137917) +OpStackBurnMintERC677_interfaceCompatibility:testStaticFunctionsCompatibility() (gas: 13773) +OpStackBurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12728) +Ownable2Step_acceptOwnership:test_acceptOwnership_MustBeProposedOwner_reverts() (gas: 10353) +Ownable2Step_acceptOwnership:test_acceptOwnership_success() (gas: 31070) +Ownable2Step_constructor:test_constructor_OwnerCannotBeZero_reverts() (gas: 35924) +Ownable2Step_constructor:test_constructor_success() (gas: 10424) +Ownable2Step_onlyOwner:test_onlyOwner_OnlyCallableByOwner_reverts() (gas: 10746) +Ownable2Step_onlyOwner:test_onlyOwner_success() (gas: 7503) +Ownable2Step_transferOwnership:test_transferOwnership_CannotTransferToSelf_reverts() (gas: 10494) +Ownable2Step_transferOwnership:test_transferOwnership_success() (gas: 30124) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySubset_Reverts() (gas: 5191) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySuperset_Reverts() (gas: 4522) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_HasDuplicates_Reverts() (gas: 7738) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_NotASubset_Reverts() (gas: 11635) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubset() (gas: 3908) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_Equal() (gas: 1459) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_NotEqual_Reverts() (gas: 6149) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetEqualsSuperset_NoRevert() (gas: 7830) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetLargerThanSuperset_Reverts() (gas: 15363) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SupersetHasDuplicates_Reverts() (gas: 8767) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSubset_Reverts() (gas: 7106) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSuperset_Reverts() (gas: 8947) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_ValidSubset_Success() (gas: 5653) \ No newline at end of file diff --git a/contracts/gas-snapshots/workflow.gas-snapshot b/contracts/gas-snapshots/workflow.gas-snapshot new file mode 100644 index 0000000000..0a29158c2a --- /dev/null +++ b/contracts/gas-snapshots/workflow.gas-snapshot @@ -0,0 +1,53 @@ +WorkflowRegistryManager_activateVersion:test_WhenTheVersionNumberIsNotActive() (gas: 419) +WorkflowRegistryManageraddVersion:test_WhenAutoActivateIsFalse() (gas: 164) +WorkflowRegistryManageraddVersion:test_WhenAutoActivateIsTrue() (gas: 120) +WorkflowRegistryManagergetActiveVersion:test_WhenAnActiveVersionExists() (gas: 120) +WorkflowRegistryManagergetActiveVersion:test_WhenNoActiveVersionIsAvailable() (gas: 139) +WorkflowRegistryManagergetAllVersions:test_WhenLimitExceedsMaximumPaginationLimit() (gas: 161) +WorkflowRegistryManagergetAllVersions:test_WhenRequestingWithInvalidStartIndex() (gas: 142) +WorkflowRegistryManagergetAllVersions:test_WhenRequestingWithValidStartIndexAndLimitWithinBounds() (gas: 120) +WorkflowRegistryManagergetLatestVersion:test_WhenNoVersionsHaveBeenRegistered() (gas: 120) +WorkflowRegistryManagergetLatestVersion:test_WhenVersionsHaveBeenRegistered() (gas: 139) +WorkflowRegistryManagergetVersion:test_WhenVersionNumberIsNotRegistered() (gas: 120) +WorkflowRegistryManagergetVersion:test_WhenVersionNumberIsRegistered() (gas: 139) +WorkflowRegistryManagergetVersionNumber:test_WhenAVersionIsRegisteredForTheContractAddressAndChainIDCombination() (gas: 161) +WorkflowRegistryManagergetVersionNumber:test_WhenNoVersionIsRegisteredForTheContractAddressAndChainIDCombination() (gas: 120) +WorkflowRegistryManagergetVersionNumber:test_WhenTheContractAddressIsInvalid() (gas: 142) +WorkflowRegistry_activateWorkflow:test_WhenTheCallerIsAnAuthorizedAddress() (gas: 491327) +WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsAllowed() (gas: 400597) +WorkflowRegistry_deleteWorkflow:test_WhenTheCallerIsAnAuthorizedAddress_AndTheDonIDIsNotAllowed() (gas: 418579) +WorkflowRegistry_getAllAllowedDONs:test_WhenTheSetOfAllowedDONsIsEmpty() (gas: 25780) +WorkflowRegistry_getAllAllowedDONs:test_WhenThereAreMultipleAllowedDONs() (gas: 75437) +WorkflowRegistry_getAllAllowedDONs:test_WhenThereIsASingleAllowedDON() (gas: 16566) +WorkflowRegistry_getWorkflowMetadata:test_WhenTheWorkflowDoesNotExist() (gas: 17521) +WorkflowRegistry_getWorkflowMetadata:test_WhenTheWorkflowExistsWithTheOwnerAndName() (gas: 490176) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitExceedsTotalWorkflows() (gas: 127660) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitIsEqualToTotalWorkflows() (gas: 128013) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenLimitIsLessThanTotalWorkflows() (gas: 90119) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenStartIs0() (gas: 127572) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenStartIsGreaterThan0() (gas: 90076) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenStartIsGreaterThanOrEqualToTotalWorkflows() (gas: 13454) +WorkflowRegistry_getWorkflowMetadataListByDON:test_WhenTheDONHasNoWorkflows() (gas: 13410) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenLimitExceedsTotalWorkflows() (gas: 128221) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenLimitIsEqualToTotalWorkflows() (gas: 128320) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenLimitIsLessThanTotalWorkflows() (gas: 90404) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenStartIs0_AndLimitIs0() (gas: 128118) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenStartIsGreaterThan0() (gas: 90361) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenStartIsGreaterThanOrEqualToTotalWorkflows() (gas: 13764) +WorkflowRegistry_getWorkflowMetadataListByOwner:test_WhenTheOwnerHasNoWorkflows() (gas: 13984) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 491299) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 499097) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnAuthorizedAddress() (gas: 498850) +WorkflowRegistry_pauseWorkflow:test_WhenTheDonIDIsNotAllowed_AndTheCallerIsAnUnauthorizedAddress() (gas: 503264) +WorkflowRegistry_registerWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 549829) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsInAnAllowedDON() (gas: 891242) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsAnAuthorizedAddress_AndTheWorkflowIsNotInAnAllowedDON() (gas: 488397) +WorkflowRegistry_requestForceUpdateSecrets:test_WhenTheCallerIsNotAnAuthorizedAddress() (gas: 486751) +WorkflowRegistry_updateAllowedDONs:test_WhenTheBoolInputIsFalse() (gas: 29811) +WorkflowRegistry_updateAllowedDONs:test_WhenTheBoolInputIsTrue() (gas: 170386) +WorkflowRegistry_updateAuthorizedAddresses:test_WhenTheBoolInputIsFalse() (gas: 30350) +WorkflowRegistry_updateAuthorizedAddresses:test_WhenTheBoolInputIsTrue() (gas: 175605) +WorkflowRegistry_updateWorkflow:test_WhenTheWorkflowInputsAreAllValid() (gas: 501589) +WorkflowRegistrygetAllAuthorizedAddresses:test_WhenTheSetOfAuthorizedAddressesIsEmpty() (gas: 26152) +WorkflowRegistrygetAllAuthorizedAddresses:test_WhenThereAreMultipleAuthorizedAddresses() (gas: 78270) +WorkflowRegistrygetAllAuthorizedAddresses:test_WhenThereIsASingleAuthorizedAddress() (gas: 16814) \ No newline at end of file diff --git a/contracts/package.json b/contracts/package.json index ca007745ce..a723082974 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@chainlink/contracts-ccip", - "version": "1.5.0", + "version": "1.5.1", "description": "Chainlink CCIP smart contracts", "author": "Chainlink devs", "license": "BUSL-1.1", @@ -21,16 +21,13 @@ "prepare": "chmod +x .husky/prepare.sh && ./.husky/prepare.sh", "prepublishOnly": "pnpm compile && ./scripts/prepublish_generate_abi_folder", "publish-beta": "pnpm publish --tag beta", - "publish-prod": "npm dist-tag add @chainlink/contracts-ccip@1.5.0 latest", + "publish-prod": "npm dist-tag add @chainlink/contracts-ccip@1.5.1 latest", "solhint:ccip": "solhint --max-warnings 0 \"./src/v0.8/ccip/**/*.sol\"", "solhint": "solhint --max-warnings 0 \"./src/v0.8/**/*.sol\"" }, "files": [ "src/v0.8/ccip/**/*.sol", - "src/v0.8/shared/access/ConfirmedOwner.sol", - "src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol", - "src/v0.8/shared/access/OwnerIsCreator.sol", - "src/v0.8/shared/access/AuthorizedCallers.sol", + "src/v0.8/shared/access/*.sol", "src/v0.8/shared/call/CallWithExactGas.sol", "src/v0.8/shared/enumerable/EnumerableMapBytes32.sol", "src/v0.8/shared/enumerable/EnumerableMapAddresses.sol", @@ -45,13 +42,11 @@ "src/v0.8/shared/token/ERC677/BurnMintERC677.sol", "src/v0.8/shared/util/SortedSetValidationUtil.sol", "src/v0.8/liquiditymanager/interfaces/ILiquidityContainer.sol", - "src/v0.8/keystone/interfaces/ICapabilityConfiguration.sol", "src/v0.8/vendor/openzeppelin-solidity", "src/v0.8/vendor/Context.sol", "src/v0.8/vendor/Pausable.sol", "abi/v0.8/", "src/v0.8/ccip/LICENSE.md", - "src/v0.8/ccip/LICENSE-MIT.md", "src/v0.8/ccip/v1.5-CCIP-License-grants.md", "!src/v0.8/ccip/test/**/*", "src/v0.8/ccip/test/mocks/**/*", @@ -61,7 +56,10 @@ "!src/v0.8/ccip/ocr/MultiOCR3Base.sol", "!src/v0.8/ccip/NonceManager.sol", "!src/v0.8/ccip/MultiAggregateRateLimiter.sol", - "!src/v0.8/ccip/capability" + "!src/v0.8/ccip/capability", + "!src/v0.8/ccip/FeeQuoter.sol", + "!src/v0.8/ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol", + "!src/v0.8/ccip/rmn" ], "pnpm": { "_comment": "See https://github.com/ethers-io/ethers.js/discussions/2849#discussioncomment-2696454", diff --git a/contracts/scripts/native_solc_compile_all_ccip b/contracts/scripts/native_solc_compile_all_ccip index 2e1072411c..163c55b79b 100755 --- a/contracts/scripts/native_solc_compile_all_ccip +++ b/contracts/scripts/native_solc_compile_all_ccip @@ -79,10 +79,6 @@ compileContract ccip/pools/LockReleaseTokenPool.sol compileContract ccip/pools/BurnMintTokenPool.sol compileContract ccip/pools/BurnFromMintTokenPool.sol compileContract ccip/pools/BurnWithFromMintTokenPool.sol -compileContract ccip/pools/LockReleaseTokenPoolAndProxy.sol -compileContract ccip/pools/BurnMintTokenPoolAndProxy.sol -compileContract ccip/pools/BurnWithFromMintTokenPoolAndProxy.sol -compileContract ccip/pools/BurnWithFromMintRebasingTokenPool.sol compileContract ccip/pools/TokenPool.sol @@ -96,6 +92,7 @@ compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol compileContract ccip/test/helpers/MultiOCR3Helper.sol compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol +compileContract ccip/test/mocks/MockLBTCTokenPool.sol compileContract ccip/test/WETH9.sol diff --git a/contracts/src/v0.8/ccip/ARMProxy.sol b/contracts/src/v0.8/ccip/ARMProxy.sol index e9ccde8680..c37899c83c 100644 --- a/contracts/src/v0.8/ccip/ARMProxy.sol +++ b/contracts/src/v0.8/ccip/ARMProxy.sol @@ -22,13 +22,17 @@ contract ARMProxy is OwnerIsCreator, ITypeAndVersion { // DYNAMIC CONFIG address private s_arm; - constructor(address arm) { + constructor( + address arm + ) { setARM(arm); } /// @notice SetARM sets the ARM implementation contract address. /// @param arm The address of the arm implementation contract. - function setARM(address arm) public onlyOwner { + function setARM( + address arm + ) public onlyOwner { if (arm == address(0)) revert ZeroAddressNotAllowed(); s_arm = arm; emit ARMSet(arm); diff --git a/contracts/src/v0.8/ccip/AggregateRateLimiter.sol b/contracts/src/v0.8/ccip/AggregateRateLimiter.sol index 7401df2ed4..7a210e7c20 100644 --- a/contracts/src/v0.8/ccip/AggregateRateLimiter.sol +++ b/contracts/src/v0.8/ccip/AggregateRateLimiter.sol @@ -26,7 +26,9 @@ contract AggregateRateLimiter is OwnerIsCreator { RateLimiter.TokenBucket private s_rateLimiter; /// @param config The RateLimiter.Config - constructor(RateLimiter.Config memory config) { + constructor( + RateLimiter.Config memory config + ) { s_rateLimiter = RateLimiter.TokenBucket({ rate: config.rate, capacity: config.capacity, @@ -37,7 +39,9 @@ contract AggregateRateLimiter is OwnerIsCreator { } /// @notice Consumes value from the rate limiter bucket based on the token value given. - function _rateLimitValue(uint256 value) internal { + function _rateLimitValue( + uint256 value + ) internal { s_rateLimiter._consume(value, address(0)); } @@ -61,7 +65,9 @@ contract AggregateRateLimiter is OwnerIsCreator { /// @notice Sets the rate limited config. /// @param config The new rate limiter config. /// @dev should only be callable by the owner or token limit admin. - function setRateLimiterConfig(RateLimiter.Config memory config) external onlyAdminOrOwner { + function setRateLimiterConfig( + RateLimiter.Config memory config + ) external onlyAdminOrOwner { s_rateLimiter._setTokenBucketConfig(config); } @@ -78,7 +84,9 @@ contract AggregateRateLimiter is OwnerIsCreator { /// @notice Sets the token limit admin address. /// @param newAdmin the address of the new admin. /// @dev setting this to address(0) indicates there is no active admin. - function setAdmin(address newAdmin) external onlyAdminOrOwner { + function setAdmin( + address newAdmin + ) external onlyAdminOrOwner { s_admin = newAdmin; emit AdminSet(newAdmin); } diff --git a/contracts/src/v0.8/ccip/CommitStore.sol b/contracts/src/v0.8/ccip/CommitStore.sol index 77c2864d4f..4df251f63a 100644 --- a/contracts/src/v0.8/ccip/CommitStore.sol +++ b/contracts/src/v0.8/ccip/CommitStore.sol @@ -89,7 +89,9 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { /// only if one must strictly ensure that for a given round there is only one valid report ever generated by /// the DON. In our case additional valid reports (i.e. approved by >= f+1 oracles) are not a problem, as they will /// will either be ignored (reverted as an invalid interval) or will be accepted as an additional valid price update. - constructor(StaticConfig memory staticConfig) OCR2Base(false) { + constructor( + StaticConfig memory staticConfig + ) OCR2Base(false) { if ( staticConfig.onRamp == address(0) || staticConfig.chainSelector == 0 || staticConfig.sourceChainSelector == 0 || staticConfig.rmnProxy == address(0) @@ -113,7 +115,9 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { /// @notice Sets the minimum sequence number. /// @param minSeqNr The new minimum sequence number. - function setMinSeqNr(uint64 minSeqNr) external onlyOwner { + function setMinSeqNr( + uint64 minSeqNr + ) external onlyOwner { uint64 oldSeqNum = s_minSeqNr; s_minSeqNr = minSeqNr; @@ -129,7 +133,9 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { /// @notice Sets the latest epoch and round for price update. /// @param latestPriceEpochAndRound The new epoch and round for prices. - function setLatestPriceEpochAndRound(uint40 latestPriceEpochAndRound) external onlyOwner { + function setLatestPriceEpochAndRound( + uint40 latestPriceEpochAndRound + ) external onlyOwner { uint40 oldEpochAndRound = s_latestPriceEpochAndRound; s_latestPriceEpochAndRound = latestPriceEpochAndRound; @@ -142,14 +148,18 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { /// @param root The merkle root to check the commit status for. /// @return the timestamp of the committed root or zero in the case that it was never /// committed. - function getMerkleRoot(bytes32 root) external view returns (uint256) { + function getMerkleRoot( + bytes32 root + ) external view returns (uint256) { return s_roots[root]; } /// @notice Returns if a root is blessed or not. /// @param root The merkle root to check the blessing status for. /// @return whether the root is blessed or not. - function isBlessed(bytes32 root) public view returns (bool) { + function isBlessed( + bytes32 root + ) public view returns (bool) { return IRMN(i_rmnProxy).isBlessed(IRMN.TaggedRoot({commitStore: address(this), root: root})); } @@ -157,7 +167,9 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { /// posted and needs to be removed. The interval in the report is trusted. /// @param rootToReset The roots that will be reset. This function will only /// reset roots that are not blessed. - function resetUnblessedRoots(bytes32[] calldata rootToReset) external onlyOwner { + function resetUnblessedRoots( + bytes32[] calldata rootToReset + ) external onlyOwner { for (uint256 i = 0; i < rootToReset.length; ++i) { bytes32 root = rootToReset[i]; if (!isBlessed(root)) { @@ -255,7 +267,9 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { } /// @notice Sets the dynamic config. This function is called during `setOCR2Config` flow - function _beforeSetConfig(bytes memory onchainConfig) internal override { + function _beforeSetConfig( + bytes memory onchainConfig + ) internal override { DynamicConfig memory dynamicConfig = abi.decode(onchainConfig, (DynamicConfig)); if (dynamicConfig.priceRegistry == address(0)) revert InvalidCommitStoreConfig(); diff --git a/contracts/src/v0.8/ccip/FeeQuoter.sol b/contracts/src/v0.8/ccip/FeeQuoter.sol index 9c6d6a5331..efb0a420f2 100644 --- a/contracts/src/v0.8/ccip/FeeQuoter.sol +++ b/contracts/src/v0.8/ccip/FeeQuoter.sol @@ -238,7 +238,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, // ================================================================ /// @inheritdoc IPriceRegistry - function getTokenPrice(address token) public view override returns (Internal.TimestampedPackedUint224 memory) { + function getTokenPrice( + address token + ) public view override returns (Internal.TimestampedPackedUint224 memory) { Internal.TimestampedPackedUint224 memory tokenPrice = s_usdPerToken[token]; // If the token price is not stale, return it @@ -261,14 +263,18 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Get the `tokenPrice` for a given token, checks if the price is valid. /// @param token The token to get the price for. /// @return tokenPrice The tokenPrice for the given token if it exists and is valid. - function getValidatedTokenPrice(address token) external view returns (uint224) { + function getValidatedTokenPrice( + address token + ) external view returns (uint224) { return _getValidatedTokenPrice(token); } /// @notice Get the `tokenPrice` for an array of tokens. /// @param tokens The tokens to get prices for. /// @return tokenPrices The tokenPrices for the given tokens. - function getTokenPrices(address[] calldata tokens) external view returns (Internal.TimestampedPackedUint224[] memory) { + function getTokenPrices( + address[] calldata tokens + ) external view returns (Internal.TimestampedPackedUint224[] memory) { uint256 length = tokens.length; Internal.TimestampedPackedUint224[] memory tokenPrices = new Internal.TimestampedPackedUint224[](length); for (uint256 i = 0; i < length; ++i) { @@ -280,7 +286,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Returns the token price data feed configuration /// @param token The token to retrieve the feed config for /// @return tokenPriceFeedConfig The token price data feed config (if feed address is 0, the feed config is disabled) - function getTokenPriceFeedConfig(address token) external view returns (TokenPriceFeedConfig memory) { + function getTokenPriceFeedConfig( + address token + ) external view returns (TokenPriceFeedConfig memory) { return s_usdPriceFeedsPerToken[token]; } @@ -338,7 +346,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Gets the token price for a given token and reverts if the token is not supported /// @param token The address of the token to get the price for /// @return tokenPriceValue The token price - function _getValidatedTokenPrice(address token) internal view returns (uint224) { + function _getValidatedTokenPrice( + address token + ) internal view returns (uint224) { Internal.TimestampedPackedUint224 memory tokenPrice = getTokenPrice(token); // Token price must be set at least once if (tokenPrice.timestamp == 0 || tokenPrice.value == 0) revert TokenNotSupported(token); @@ -436,7 +446,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, // ================================================================ /// @inheritdoc IPriceRegistry - function updatePrices(Internal.PriceUpdates calldata priceUpdates) external override { + function updatePrices( + Internal.PriceUpdates calldata priceUpdates + ) external override { // The caller must be the fee updater _validateCaller(); @@ -461,13 +473,17 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Updates the USD token price feeds for given tokens /// @param tokenPriceFeedUpdates Token price feed updates to apply - function updateTokenPriceFeeds(TokenPriceFeedUpdate[] memory tokenPriceFeedUpdates) external onlyOwner { + function updateTokenPriceFeeds( + TokenPriceFeedUpdate[] memory tokenPriceFeedUpdates + ) external onlyOwner { _updateTokenPriceFeeds(tokenPriceFeedUpdates); } /// @notice Updates the USD token price feeds for given tokens /// @param tokenPriceFeedUpdates Token price feed updates to apply - function _updateTokenPriceFeeds(TokenPriceFeedUpdate[] memory tokenPriceFeedUpdates) private { + function _updateTokenPriceFeeds( + TokenPriceFeedUpdate[] memory tokenPriceFeedUpdates + ) private { for (uint256 i; i < tokenPriceFeedUpdates.length; ++i) { TokenPriceFeedUpdate memory update = tokenPriceFeedUpdates[i]; address sourceToken = update.sourceToken; @@ -607,7 +623,9 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Gets the fee configuration for a token. /// @param token The token to get the fee configuration for. /// @return premiumMultiplierWeiPerEth The multiplier for destination chain specific premiums. - function getPremiumMultiplierWeiPerEth(address token) external view returns (uint64 premiumMultiplierWeiPerEth) { + function getPremiumMultiplierWeiPerEth( + address token + ) external view returns (uint64 premiumMultiplierWeiPerEth) { return s_premiumMultiplierWeiPerEth[token]; } @@ -967,18 +985,24 @@ contract FeeQuoter is AuthorizedCallers, IFeeQuoter, ITypeAndVersion, IReceiver, /// @notice Returns the configured config for the dest chain selector. /// @param destChainSelector Destination chain selector to fetch config for. /// @return destChainConfig Config for the destination chain. - function getDestChainConfig(uint64 destChainSelector) external view returns (DestChainConfig memory) { + function getDestChainConfig( + uint64 destChainSelector + ) external view returns (DestChainConfig memory) { return s_destChainConfigs[destChainSelector]; } /// @notice Updates the destination chain specific config. /// @param destChainConfigArgs Array of source chain specific configs. - function applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) external onlyOwner { + function applyDestChainConfigUpdates( + DestChainConfigArgs[] memory destChainConfigArgs + ) external onlyOwner { _applyDestChainConfigUpdates(destChainConfigArgs); } /// @notice Internal version of applyDestChainConfigUpdates. - function _applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) internal { + function _applyDestChainConfigUpdates( + DestChainConfigArgs[] memory destChainConfigArgs + ) internal { for (uint256 i = 0; i < destChainConfigArgs.length; ++i) { DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[i]; uint64 destChainSelector = destChainConfigArgs[i].destChainSelector; diff --git a/contracts/src/v0.8/ccip/LICENSE-MIT.md b/contracts/src/v0.8/ccip/LICENSE-MIT.md deleted file mode 100644 index 812debd8e9..0000000000 --- a/contracts/src/v0.8/ccip/LICENSE-MIT.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 SmartContract ChainLink, Ltd. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/contracts/src/v0.8/ccip/MultiAggregateRateLimiter.sol b/contracts/src/v0.8/ccip/MultiAggregateRateLimiter.sol index 3935d6fab9..7dfcc0ef60 100644 --- a/contracts/src/v0.8/ccip/MultiAggregateRateLimiter.sol +++ b/contracts/src/v0.8/ccip/MultiAggregateRateLimiter.sol @@ -75,7 +75,9 @@ contract MultiAggregateRateLimiter is IMessageInterceptor, AuthorizedCallers, IT } /// @inheritdoc IMessageInterceptor - function onInboundMessage(Client.Any2EVMMessage memory message) external onlyAuthorizedCallers { + function onInboundMessage( + Client.Any2EVMMessage memory message + ) external onlyAuthorizedCallers { _applyRateLimit(message.sourceChainSelector, message.destTokenAmounts, false); } @@ -130,7 +132,9 @@ contract MultiAggregateRateLimiter is IMessageInterceptor, AuthorizedCallers, IT /// @notice Retrieves the token value for a token using the FeeQuoter. /// @param tokenAmount The token and amount to get the value for. /// @return tokenValue USD value in 18 decimals. - function _getTokenValue(Client.EVMTokenAmount memory tokenAmount) internal view returns (uint256) { + function _getTokenValue( + Client.EVMTokenAmount memory tokenAmount + ) internal view returns (uint256) { // not fetching validated price, as price staleness is not important for value-based rate limiting // we only need to verify the price is not 0 uint224 pricePerToken = IFeeQuoter(s_feeQuoter).getTokenPrice(tokenAmount.token).value; @@ -154,7 +158,9 @@ contract MultiAggregateRateLimiter is IMessageInterceptor, AuthorizedCallers, IT /// @notice Applies the provided rate limiter config updates. /// @param rateLimiterUpdates Rate limiter updates. /// @dev Only callable by the owner. - function applyRateLimiterConfigUpdates(RateLimiterConfigArgs[] memory rateLimiterUpdates) external onlyOwner { + function applyRateLimiterConfigUpdates( + RateLimiterConfigArgs[] memory rateLimiterUpdates + ) external onlyOwner { for (uint256 i = 0; i < rateLimiterUpdates.length; ++i) { RateLimiterConfigArgs memory updateArgs = rateLimiterUpdates[i]; RateLimiter.Config memory configUpdate = updateArgs.rateLimiterConfig; @@ -253,14 +259,18 @@ contract MultiAggregateRateLimiter is IMessageInterceptor, AuthorizedCallers, IT /// @notice Sets the FeeQuoter address. /// @param newFeeQuoter the address of the new FeeQuoter. /// @dev precondition The address must be a non-zero address. - function setFeeQuoter(address newFeeQuoter) external onlyOwner { + function setFeeQuoter( + address newFeeQuoter + ) external onlyOwner { _setFeeQuoter(newFeeQuoter); } /// @notice Sets the FeeQuoter address. /// @param newFeeQuoter the address of the new FeeQuoter. /// @dev precondition The address must be a non-zero address. - function _setFeeQuoter(address newFeeQuoter) internal { + function _setFeeQuoter( + address newFeeQuoter + ) internal { if (newFeeQuoter == address(0)) { revert ZeroAddressNotAllowed(); } diff --git a/contracts/src/v0.8/ccip/NonceManager.sol b/contracts/src/v0.8/ccip/NonceManager.sol index 5932e88b9c..a1db80aa7c 100644 --- a/contracts/src/v0.8/ccip/NonceManager.sol +++ b/contracts/src/v0.8/ccip/NonceManager.sol @@ -39,7 +39,9 @@ contract NonceManager is INonceManager, AuthorizedCallers, ITypeAndVersion { /// executed in the same order they are sent (assuming they are DON) mapping(uint64 sourceChainSelector => mapping(bytes sender => uint64 inboundNonce)) private s_inboundNonces; - constructor(address[] memory authorizedCallers) AuthorizedCallers(authorizedCallers) {} + constructor( + address[] memory authorizedCallers + ) AuthorizedCallers(authorizedCallers) {} /// @inheritdoc INonceManager function getIncrementedOutboundNonce( @@ -123,7 +125,9 @@ contract NonceManager is INonceManager, AuthorizedCallers, ITypeAndVersion { /// @notice Updates the previous ramps addresses. /// @param previousRampsArgs The previous on/off ramps addresses. - function applyPreviousRampsUpdates(PreviousRampsArgs[] calldata previousRampsArgs) external onlyOwner { + function applyPreviousRampsUpdates( + PreviousRampsArgs[] calldata previousRampsArgs + ) external onlyOwner { for (uint256 i = 0; i < previousRampsArgs.length; ++i) { PreviousRampsArgs calldata previousRampsArg = previousRampsArgs[i]; @@ -146,7 +150,9 @@ contract NonceManager is INonceManager, AuthorizedCallers, ITypeAndVersion { /// @notice Gets the previous onRamp address for the given chain selector /// @param chainSelector The chain selector /// @return previousRamps The previous on/offRamp addresses - function getPreviousRamps(uint64 chainSelector) external view returns (PreviousRamps memory) { + function getPreviousRamps( + uint64 chainSelector + ) external view returns (PreviousRamps memory) { return s_previousRamps[chainSelector]; } } diff --git a/contracts/src/v0.8/ccip/RMN.sol b/contracts/src/v0.8/ccip/RMN.sol index 3b9af7e0ce..fd1746f3fd 100644 --- a/contracts/src/v0.8/ccip/RMN.sol +++ b/contracts/src/v0.8/ccip/RMN.sol @@ -190,7 +190,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { /// 1. Cursedness is retained from a prior config. /// 2. The curse weight threshold was met at some point, which activated a curse, and enough voters unvoted to curse /// such that the curse weight threshold is no longer met. - function _shouldCurseBeActive(CurseVoteProgress storage sptr_upToDateCurseVoteProgress) internal view returns (bool) { + function _shouldCurseBeActive( + CurseVoteProgress storage sptr_upToDateCurseVoteProgress + ) internal view returns (bool) { return sptr_upToDateCurseVoteProgress.latestVoteToCurseByCurseVoteAddr[OWNER_CURSE_VOTE_ADDR].cursesHash != NO_VOTES_CURSES_HASH || sptr_upToDateCurseVoteProgress.accumulatedWeight >= sptr_upToDateCurseVoteProgress.curseWeightThreshold; @@ -291,7 +293,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { // Prevents a subject from receiving multiple votes to curse with the same curse id. error SubjectsMustBeStrictlyIncreasing(); - constructor(Config memory config) { + constructor( + Config memory config + ) { { // Ensure that the bitmap is large enough to hold MAX_NUM_VOTERS. // We do this in the constructor because MAX_NUM_VOTERS is constant. @@ -316,7 +320,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { return bitmap | (uint200(1) << index); } - function _bitmapCount(uint200 bitmap) internal pure returns (uint8 oneBits) { + function _bitmapCount( + uint200 bitmap + ) internal pure returns (uint8 oneBits) { assert(bitmap < 1 << MAX_NUM_VOTERS); // https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan for (; bitmap != 0; ++oneBits) { @@ -324,7 +330,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } } - function _taggedRootHash(IRMN.TaggedRoot memory taggedRoot) internal pure returns (bytes32) { + function _taggedRootHash( + IRMN.TaggedRoot memory taggedRoot + ) internal pure returns (bytes32) { return keccak256(abi.encode(taggedRoot.commitStore, taggedRoot.root)); } @@ -340,7 +348,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { /// /* address */, taggedRoot.root /* bytes32 */))`. /// @notice Tagged roots which are already (voted to be) blessed are skipped and emit corresponding events. In case /// the call has no effect, i.e., all passed tagged roots are skipped, the function reverts with a `VoteToBlessNoop`. - function voteToBless(IRMN.TaggedRoot[] calldata taggedRoots) external { + function voteToBless( + IRMN.TaggedRoot[] calldata taggedRoots + ) external { // If we have an active global curse, something is really wrong. Let's err on the // side of caution and not accept further blessings during this time of // uncertainty. @@ -402,7 +412,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { /// scenario. The owner must ensure that there are no in-flight transactions by RMN nodes voting for any of the /// taggedRoots before calling this function, as such in-flight transactions could lead to the roots becoming /// re-blessed shortly after the call to this function, contrary to the original intention. - function ownerResetBlessVotes(IRMN.TaggedRoot[] calldata taggedRoots) external onlyOwner { + function ownerResetBlessVotes( + IRMN.TaggedRoot[] calldata taggedRoots + ) external onlyOwner { uint32 configVersion = s_versionedConfig.configVersion; for (uint256 i = 0; i < taggedRoots.length; ++i) { IRMN.TaggedRoot memory taggedRoot = taggedRoots[i]; @@ -510,7 +522,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { /// We expect this to be called very rarely, e.g. in case of a bug in the /// offchain code causing false voteToCurse calls. /// @notice Should be called from curser's corresponding curseVoteAddr. - function unvoteToCurse(UnvoteToCurseRequest[] memory unvoteToCurseRequests) external { + function unvoteToCurse( + UnvoteToCurseRequest[] memory unvoteToCurseRequests + ) external { address curseVoteAddr = msg.sender; CurserRecord storage sptr_curserRecord = s_curserRecords[curseVoteAddr]; @@ -635,7 +649,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { /// @notice Enables the owner to remove curse votes. After the curse votes are removed, /// this function will check whether the curse is still valid and restore the uncursed state if possible. /// This function also enables the owner to lift a curse created through ownerCurse. - function ownerUnvoteToCurse(OwnerUnvoteToCurseRequest[] memory ownerUnvoteToCurseRequests) external onlyOwner { + function ownerUnvoteToCurse( + OwnerUnvoteToCurseRequest[] memory ownerUnvoteToCurseRequests + ) external onlyOwner { bool anyCurseWasLifted = false; bool anyVoteWasUnvoted = false; uint32 configVersion = s_versionedConfig.configVersion; @@ -667,7 +683,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } } - function setConfig(Config memory config) external onlyOwner { + function setConfig( + Config memory config + ) external onlyOwner { _setConfig(config); } @@ -695,7 +713,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } /// @inheritdoc IRMN - function isBlessed(IRMN.TaggedRoot calldata taggedRoot) external view returns (bool) { + function isBlessed( + IRMN.TaggedRoot calldata taggedRoot + ) external view returns (bool) { return s_blessVoteProgressByTaggedRootHash[_taggedRootHash(taggedRoot)].weightThresholdMet || s_permaBlessedCommitStores.contains(taggedRoot.commitStore); } @@ -711,7 +731,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { } /// @inheritdoc IRMN - function isCursed(bytes16 subject) public view returns (bool) { + function isCursed( + bytes16 subject + ) public view returns (bool) { if (s_curseHotVars.numSubjectsCursed == 0) { return false; // happy path costs a single SLOAD } else { @@ -864,7 +886,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { return page; } - function _validateConfig(Config memory config) internal pure returns (bool) { + function _validateConfig( + Config memory config + ) internal pure returns (bool) { if ( config.voters.length == 0 || config.voters.length > MAX_NUM_VOTERS || config.blessWeightThreshold == 0 || config.curseWeightThreshold == 0 @@ -905,7 +929,9 @@ contract RMN is IRMN, OwnerIsCreator, ITypeAndVersion { return totalBlessWeight >= config.blessWeightThreshold && totalCurseWeight >= config.curseWeightThreshold; } - function _setConfig(Config memory config) private { + function _setConfig( + Config memory config + ) private { if (!_validateConfig(config)) revert InvalidConfig(); // We can't directly assign s_versionedConfig.config to config diff --git a/contracts/src/v0.8/ccip/Router.sol b/contracts/src/v0.8/ccip/Router.sol index a5474fdd04..d83216fb6f 100644 --- a/contracts/src/v0.8/ccip/Router.sol +++ b/contracts/src/v0.8/ccip/Router.sol @@ -89,7 +89,9 @@ contract Router is IRouter, IRouterClient, ITypeAndVersion, OwnerIsCreator { } /// @notice This functionality has been removed and will revert when called. - function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory) { + function getSupportedTokens( + uint64 chainSelector + ) external view returns (address[] memory) { if (!isChainSupported(chainSelector)) { return new address[](0); } @@ -97,7 +99,9 @@ contract Router is IRouter, IRouterClient, ITypeAndVersion, OwnerIsCreator { } /// @inheritdoc IRouterClient - function isChainSupported(uint64 chainSelector) public view returns (bool) { + function isChainSupported( + uint64 chainSelector + ) public view returns (bool) { return s_onRamps[chainSelector] != address(0); } @@ -192,7 +196,9 @@ contract Router is IRouter, IRouterClient, ITypeAndVersion, OwnerIsCreator { /// @notice Sets a new wrapped native token. /// @param wrappedNative The address of the new wrapped native ERC20 token. - function setWrappedNative(address wrappedNative) external onlyOwner { + function setWrappedNative( + address wrappedNative + ) external onlyOwner { s_wrappedNative = wrappedNative; } @@ -203,7 +209,9 @@ contract Router is IRouter, IRouterClient, ITypeAndVersion, OwnerIsCreator { } /// @inheritdoc IRouter - function getOnRamp(uint64 destChainSelector) external view returns (address) { + function getOnRamp( + uint64 destChainSelector + ) external view returns (address) { return s_onRamps[destChainSelector]; } diff --git a/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol b/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol index 82de08ea64..56f3cd1fe8 100644 --- a/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol +++ b/contracts/src/v0.8/ccip/applications/CCIPClientExample.sol @@ -53,7 +53,9 @@ contract CCIPClientExample is CCIPReceiver, OwnerIsCreator { s_chains[chainSelector] = extraArgs; } - function disableChain(uint64 chainSelector) external onlyOwner { + function disableChain( + uint64 chainSelector + ) external onlyOwner { delete s_chains[chainSelector]; } @@ -66,7 +68,9 @@ contract CCIPClientExample is CCIPReceiver, OwnerIsCreator { _ccipReceive(message); } - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { + function _ccipReceive( + Client.Any2EVMMessage memory message + ) internal override { emit MessageReceived(message.messageId); } @@ -162,7 +166,9 @@ contract CCIPClientExample is CCIPReceiver, OwnerIsCreator { emit MessageSent(messageId); } - modifier validChain(uint64 chainSelector) { + modifier validChain( + uint64 chainSelector + ) { if (s_chains[chainSelector].length == 0) revert InvalidChain(chainSelector); _; } diff --git a/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol b/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol index 208c4e47ce..8caeb3fcca 100644 --- a/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol +++ b/contracts/src/v0.8/ccip/applications/CCIPReceiver.sol @@ -11,7 +11,9 @@ import {IERC165} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 { address internal immutable i_ccipRouter; - constructor(address router) { + constructor( + address router + ) { if (router == address(0)) revert InvalidRouter(address(0)); i_ccipRouter = router; } @@ -26,18 +28,24 @@ abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 { /// If this returns true, tokens are transferred and ccipReceive is called atomically. /// Additionally, if the receiver address does not have code associated with /// it at the time of execution (EXTCODESIZE returns 0), only tokens will be transferred. - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public view virtual override returns (bool) { return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId; } /// @inheritdoc IAny2EVMMessageReceiver - function ccipReceive(Client.Any2EVMMessage calldata message) external virtual override onlyRouter { + function ccipReceive( + Client.Any2EVMMessage calldata message + ) external virtual override onlyRouter { _ccipReceive(message); } /// @notice Override this function in your implementation. /// @param message Any2EVMMessage - function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual; + function _ccipReceive( + Client.Any2EVMMessage memory message + ) internal virtual; ///////////////////////////////////////////////////////////////////// // Plumbing diff --git a/contracts/src/v0.8/ccip/applications/DefensiveExample.sol b/contracts/src/v0.8/ccip/applications/DefensiveExample.sol index f0501b5d90..dbe8550933 100644 --- a/contracts/src/v0.8/ccip/applications/DefensiveExample.sol +++ b/contracts/src/v0.8/ccip/applications/DefensiveExample.sol @@ -101,7 +101,9 @@ contract DefensiveExample is CCIPClientExample { } // An example function to demonstrate recovery - function setSimRevert(bool simRevert) external onlyOwner { + function setSimRevert( + bool simRevert + ) external onlyOwner { s_simRevert = simRevert; } diff --git a/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol b/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol index 05d604d9c1..5bb0193c33 100644 --- a/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol +++ b/contracts/src/v0.8/ccip/applications/EtherSenderReceiver.sol @@ -43,7 +43,9 @@ contract EtherSenderReceiver is CCIPReceiver, ITypeAndVersion { IWrappedNative public immutable i_weth; /// @param router The CCIP router address. - constructor(address router) CCIPReceiver(router) { + constructor( + address router + ) CCIPReceiver(router) { i_weth = IWrappedNative(CCIPRouter(router).getWrappedNative()); i_weth.approve(router, type(uint256).max); } @@ -130,7 +132,9 @@ contract EtherSenderReceiver is CCIPReceiver, ITypeAndVersion { return validatedMessage; } - function _validateFeeToken(Client.EVM2AnyMessage calldata message) internal view { + function _validateFeeToken( + Client.EVM2AnyMessage calldata message + ) internal view { uint256 tokenAmount = message.tokenAmounts[0].amount; if (message.feeToken != address(0)) { @@ -146,7 +150,9 @@ contract EtherSenderReceiver is CCIPReceiver, ITypeAndVersion { /// @param message The CCIP message containing the wrapped ether amount and the final receiver. /// @dev The code below should never revert if the message being is valid according /// to the above _validatedMessage and _validateFeeToken functions. - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { + function _ccipReceive( + Client.Any2EVMMessage memory message + ) internal override { address receiver = abi.decode(message.data, (address)); if (message.destTokenAmounts.length != 1) { diff --git a/contracts/src/v0.8/ccip/applications/PingPongDemo.sol b/contracts/src/v0.8/ccip/applications/PingPongDemo.sol index 567ad3c27d..3fd3eec6ee 100644 --- a/contracts/src/v0.8/ccip/applications/PingPongDemo.sol +++ b/contracts/src/v0.8/ccip/applications/PingPongDemo.sol @@ -50,7 +50,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { _respond(1); } - function _respond(uint256 pingPongCount) internal virtual { + function _respond( + uint256 pingPongCount + ) internal virtual { if (pingPongCount & 1 == 1) { emit Ping(pingPongCount); } else { @@ -68,7 +70,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { IRouterClient(getRouter()).ccipSend(s_counterpartChainSelector, message); } - function _ccipReceive(Client.Any2EVMMessage memory message) internal override { + function _ccipReceive( + Client.Any2EVMMessage memory message + ) internal override { uint256 pingPongCount = abi.decode(message.data, (uint256)); if (!s_isPaused) { _respond(pingPongCount + 1); @@ -83,7 +87,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { return s_counterpartChainSelector; } - function setCounterpartChainSelector(uint64 chainSelector) external onlyOwner { + function setCounterpartChainSelector( + uint64 chainSelector + ) external onlyOwner { s_counterpartChainSelector = chainSelector; } @@ -95,7 +101,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { return s_feeToken; } - function setCounterpartAddress(address addr) external onlyOwner { + function setCounterpartAddress( + address addr + ) external onlyOwner { s_counterpartAddress = addr; } @@ -103,7 +111,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { return s_isPaused; } - function setPaused(bool pause) external onlyOwner { + function setPaused( + bool pause + ) external onlyOwner { s_isPaused = pause; } @@ -111,7 +121,9 @@ contract PingPongDemo is CCIPReceiver, OwnerIsCreator, ITypeAndVersion { return s_outOfOrderExecution; } - function setOutOfOrderExecution(bool outOfOrderExecution) external onlyOwner { + function setOutOfOrderExecution( + bool outOfOrderExecution + ) external onlyOwner { s_outOfOrderExecution = outOfOrderExecution; emit OutOfOrderExecutionChange(outOfOrderExecution); } diff --git a/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol b/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol index 09c81ad5de..fe807a7cfa 100644 --- a/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol +++ b/contracts/src/v0.8/ccip/applications/SelfFundedPingPong.sol @@ -23,7 +23,9 @@ contract SelfFundedPingPong is PingPongDemo { s_countIncrBeforeFunding = roundTripsBeforeFunding * 2; } - function _respond(uint256 pingPongCount) internal override { + function _respond( + uint256 pingPongCount + ) internal override { if (pingPongCount & 1 == 1) { emit Ping(pingPongCount); } else { @@ -45,7 +47,9 @@ contract SelfFundedPingPong is PingPongDemo { /// @notice A function that is responsible for funding this contract. /// The contract can only be funded if it is set as a nop in the target onRamp. /// In case your contract is not a nop you can prevent this function from being called by setting s_countIncrBeforeFunding=0. - function fundPingPong(uint256 pingPongCount) public { + function fundPingPong( + uint256 pingPongCount + ) public { // If selfFunding is disabled, or ping pong count has not reached s_countIncrPerFunding, do not attempt funding. if (s_countIncrBeforeFunding == 0 || pingPongCount < s_countIncrBeforeFunding) return; @@ -60,7 +64,9 @@ contract SelfFundedPingPong is PingPongDemo { return s_countIncrBeforeFunding; } - function setCountIncrBeforeFunding(uint8 countIncrBeforeFunding) external onlyOwner { + function setCountIncrBeforeFunding( + uint8 countIncrBeforeFunding + ) external onlyOwner { s_countIncrBeforeFunding = countIncrBeforeFunding; emit CountIncrBeforeFundingSet(countIncrBeforeFunding); } diff --git a/contracts/src/v0.8/ccip/applications/TokenProxy.sol b/contracts/src/v0.8/ccip/applications/TokenProxy.sol index 6fd26c076b..01d5b31430 100644 --- a/contracts/src/v0.8/ccip/applications/TokenProxy.sol +++ b/contracts/src/v0.8/ccip/applications/TokenProxy.sol @@ -64,7 +64,9 @@ contract TokenProxy is OwnerIsCreator { /// @notice Validates the message content. /// @dev Only allows a single token to be sent, and no data. - function _validateMessage(Client.EVM2AnyMessage calldata message) internal view { + function _validateMessage( + Client.EVM2AnyMessage calldata message + ) internal view { if (message.tokenAmounts.length != 1 || message.tokenAmounts[0].token != i_token) revert InvalidToken(); if (message.data.length > 0) revert NoDataAllowed(); diff --git a/contracts/src/v0.8/ccip/capability/CCIPHome.sol b/contracts/src/v0.8/ccip/capability/CCIPHome.sol index e387558946..e66e2f56ec 100644 --- a/contracts/src/v0.8/ccip/capability/CCIPHome.sol +++ b/contracts/src/v0.8/ccip/capability/CCIPHome.sol @@ -181,7 +181,9 @@ contract CCIPHome is OwnerIsCreator, ITypeAndVersion, ICapabilityConfiguration, /// @notice Constructor for the CCIPHome contract takes in the address of the capabilities registry. This address /// is the only allowed caller to mutate the configuration through beforeCapabilityConfigSet. - constructor(address capabilitiesRegistry) { + constructor( + address capabilitiesRegistry + ) { if (capabilitiesRegistry == address(0)) { revert ZeroAddressNotAllowed(); } @@ -200,7 +202,9 @@ contract CCIPHome is OwnerIsCreator, ITypeAndVersion, ICapabilityConfiguration, /// @inheritdoc IERC165 /// @dev Required for the capabilities registry to recognize this contract. - function supportsInterface(bytes4 interfaceId) external pure override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) external pure override returns (bool) { return interfaceId == type(ICapabilityConfiguration).interfaceId || interfaceId == type(IERC165).interfaceId; } @@ -246,7 +250,9 @@ contract CCIPHome is OwnerIsCreator, ITypeAndVersion, ICapabilityConfiguration, /// @inheritdoc ICapabilityConfiguration /// @dev The CCIP capability will fetch the configuration needed directly from this contract. /// The offchain syncer will call this function, so its important that it doesn't revert. - function getCapabilityConfiguration(uint32 /* donId */ ) external pure override returns (bytes memory configuration) { + function getCapabilityConfiguration( + uint32 /* donId */ + ) external pure override returns (bytes memory configuration) { return bytes(""); } @@ -457,7 +463,9 @@ contract CCIPHome is OwnerIsCreator, ITypeAndVersion, ICapabilityConfiguration, // │ Validation │ // ================================================================ - function _validateConfig(OCR3Config memory cfg) internal view { + function _validateConfig( + OCR3Config memory cfg + ) internal view { if (cfg.chainSelector == 0) revert ChainSelectorNotSet(); if (cfg.pluginType != Internal.OCRPluginType.Commit && cfg.pluginType != Internal.OCRPluginType.Execution) { revert InvalidPluginType(); @@ -603,7 +611,9 @@ contract CCIPHome is OwnerIsCreator, ITypeAndVersion, ICapabilityConfiguration, /// @notice Helper function to ensure that a node is in the capabilities registry. /// @param p2pIds The P2P IDs of the node to check. - function _ensureInRegistry(bytes32[] memory p2pIds) internal view { + function _ensureInRegistry( + bytes32[] memory p2pIds + ) internal view { for (uint256 i = 0; i < p2pIds.length; ++i) { // TODO add a method that does the validation in the ICapabilitiesRegistry contract if (ICapabilitiesRegistry(i_capabilitiesRegistry).getNode(p2pIds[i]).p2pId == bytes32("")) { diff --git a/contracts/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol b/contracts/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol index 6305311050..2a38d82739 100644 --- a/contracts/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol +++ b/contracts/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol @@ -11,5 +11,7 @@ interface IAny2EVMMessageReceiver { /// will move to a FAILED state and become available for manual execution. /// @param message CCIP Message /// @dev Note ensure you check the msg.sender is the OffRampRouter - function ccipReceive(Client.Any2EVMMessage calldata message) external; + function ccipReceive( + Client.Any2EVMMessage calldata message + ) external; } diff --git a/contracts/src/v0.8/ccip/interfaces/IAny2EVMOffRamp.sol b/contracts/src/v0.8/ccip/interfaces/IAny2EVMOffRamp.sol index 1881dede2e..f18c6a73f5 100644 --- a/contracts/src/v0.8/ccip/interfaces/IAny2EVMOffRamp.sol +++ b/contracts/src/v0.8/ccip/interfaces/IAny2EVMOffRamp.sol @@ -5,5 +5,7 @@ interface IAny2EVMOffRamp { /// @notice Returns the the current nonce for a receiver. /// @param sender The sender address /// @return nonce The nonce value belonging to the sender address. - function getSenderNonce(address sender) external view returns (uint64 nonce); + function getSenderNonce( + address sender + ) external view returns (uint64 nonce); } diff --git a/contracts/src/v0.8/ccip/interfaces/ICapabilitiesRegistry.sol b/contracts/src/v0.8/ccip/interfaces/ICapabilitiesRegistry.sol index dac7317e41..e8bba76d42 100644 --- a/contracts/src/v0.8/ccip/interfaces/ICapabilitiesRegistry.sol +++ b/contracts/src/v0.8/ccip/interfaces/ICapabilitiesRegistry.sol @@ -27,5 +27,7 @@ interface ICapabilitiesRegistry { /// @notice Gets a node's data /// @param p2pId The P2P ID of the node to query for /// @return NodeInfo The node data - function getNode(bytes32 p2pId) external view returns (NodeInfo memory); + function getNode( + bytes32 p2pId + ) external view returns (NodeInfo memory); } diff --git a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol index d657e148cb..c2d0d6cdb2 100644 --- a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol +++ b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRamp.sol @@ -11,5 +11,7 @@ interface IEVM2AnyOnRamp is IEVM2AnyOnRampClient { /// @notice Get the next nonce for a given sender /// @param sender The sender to get the nonce for /// @return nonce The next nonce for the sender - function getSenderNonce(address sender) external view returns (uint64 nonce); + function getSenderNonce( + address sender + ) external view returns (uint64 nonce); } diff --git a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRampClient.sol b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRampClient.sol index 1dfae1abbc..d2fe34721b 100644 --- a/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRampClient.sol +++ b/contracts/src/v0.8/ccip/interfaces/IEVM2AnyOnRampClient.sol @@ -23,7 +23,9 @@ interface IEVM2AnyOnRampClient { /// @notice Gets a list of all supported source chain tokens. /// @param destChainSelector The destination chain selector /// @return tokens The addresses of all tokens that this onRamp supports the given destination chain - function getSupportedTokens(uint64 destChainSelector) external view returns (address[] memory tokens); + function getSupportedTokens( + uint64 destChainSelector + ) external view returns (address[] memory tokens); /// @notice Send a message to the remote chain /// @dev only callable by the Router diff --git a/contracts/src/v0.8/ccip/interfaces/IMessageInterceptor.sol b/contracts/src/v0.8/ccip/interfaces/IMessageInterceptor.sol index c2b432426b..0432a222df 100644 --- a/contracts/src/v0.8/ccip/interfaces/IMessageInterceptor.sol +++ b/contracts/src/v0.8/ccip/interfaces/IMessageInterceptor.sol @@ -13,7 +13,9 @@ interface IMessageInterceptor { /// @notice Intercepts & validates the given OffRamp message. Reverts on validation failure /// @param message to validate - function onInboundMessage(Client.Any2EVMMessage memory message) external; + function onInboundMessage( + Client.Any2EVMMessage memory message + ) external; /// @notice Intercepts & validates the given OnRamp message. Reverts on validation failure /// @param destChainSelector remote destination chain selector where the message is being sent to diff --git a/contracts/src/v0.8/ccip/interfaces/IPool.sol b/contracts/src/v0.8/ccip/interfaces/IPool.sol index a2b9281228..3545e57fa4 100644 --- a/contracts/src/v0.8/ccip/interfaces/IPool.sol +++ b/contracts/src/v0.8/ccip/interfaces/IPool.sol @@ -28,10 +28,14 @@ interface IPoolV1 is IERC165 { /// @notice Checks whether a remote chain is supported in the token pool. /// @param remoteChainSelector The selector of the remote chain. /// @return true if the given chain is a permissioned remote chain. - function isSupportedChain(uint64 remoteChainSelector) external view returns (bool); + function isSupportedChain( + uint64 remoteChainSelector + ) external view returns (bool); /// @notice Returns if the token pool supports the given token. /// @param token The address of the token. /// @return true if the token is supported by the pool. - function isSupportedToken(address token) external view returns (bool); + function isSupportedToken( + address token + ) external view returns (bool); } diff --git a/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol b/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol index 583a2e890b..b20c1b7229 100644 --- a/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol +++ b/contracts/src/v0.8/ccip/interfaces/IPriceRegistry.sol @@ -6,22 +6,30 @@ import {Internal} from "../libraries/Internal.sol"; interface IPriceRegistry { /// @notice Update the price for given tokens and gas prices for given chains. /// @param priceUpdates The price updates to apply. - function updatePrices(Internal.PriceUpdates memory priceUpdates) external; + function updatePrices( + Internal.PriceUpdates memory priceUpdates + ) external; /// @notice Get the `tokenPrice` for a given token. /// @param token The token to get the price for. /// @return tokenPrice The tokenPrice for the given token. - function getTokenPrice(address token) external view returns (Internal.TimestampedPackedUint224 memory); + function getTokenPrice( + address token + ) external view returns (Internal.TimestampedPackedUint224 memory); /// @notice Get the `tokenPrice` for a given token, checks if the price is valid. /// @param token The token to get the price for. /// @return tokenPrice The tokenPrice for the given token if it exists and is valid. - function getValidatedTokenPrice(address token) external view returns (uint224); + function getValidatedTokenPrice( + address token + ) external view returns (uint224); /// @notice Get the `tokenPrice` for an array of tokens. /// @param tokens The tokens to get prices for. /// @return tokenPrices The tokenPrices for the given tokens. - function getTokenPrices(address[] calldata tokens) external view returns (Internal.TimestampedPackedUint224[] memory); + function getTokenPrices( + address[] calldata tokens + ) external view returns (Internal.TimestampedPackedUint224[] memory); /// @notice Get an encoded `gasPrice` for a given destination chain ID. /// The 224-bit result encodes necessary gas price components. diff --git a/contracts/src/v0.8/ccip/interfaces/IRMN.sol b/contracts/src/v0.8/ccip/interfaces/IRMN.sol index a409731549..4bd8f8348f 100644 --- a/contracts/src/v0.8/ccip/interfaces/IRMN.sol +++ b/contracts/src/v0.8/ccip/interfaces/IRMN.sol @@ -10,12 +10,16 @@ interface IRMN { } /// @notice Callers MUST NOT cache the return value as a blessed tagged root could become unblessed. - function isBlessed(TaggedRoot calldata taggedRoot) external view returns (bool); + function isBlessed( + TaggedRoot calldata taggedRoot + ) external view returns (bool); /// @notice Iff there is an active global or legacy curse, this function returns true. function isCursed() external view returns (bool); /// @notice Iff there is an active global curse, or an active curse for `subject`, this function returns true. /// @param subject To check whether a particular chain is cursed, set to bytes16(uint128(chainSelector)). - function isCursed(bytes16 subject) external view returns (bool); + function isCursed( + bytes16 subject + ) external view returns (bool); } diff --git a/contracts/src/v0.8/ccip/interfaces/IRMNRemote.sol b/contracts/src/v0.8/ccip/interfaces/IRMNRemote.sol index 536a823720..3754a2fe91 100644 --- a/contracts/src/v0.8/ccip/interfaces/IRMNRemote.sol +++ b/contracts/src/v0.8/ccip/interfaces/IRMNRemote.sol @@ -35,5 +35,7 @@ interface IRMNRemote { /// @notice If there is an active global curse, or an active curse for `subject`, this function returns true. /// @param subject To check whether a particular chain is cursed, set to bytes16(uint128(chainSelector)). /// @return bool true if the provided subject is cured *or* if there is an active global curse - function isCursed(bytes16 subject) external view returns (bool); + function isCursed( + bytes16 subject + ) external view returns (bool); } diff --git a/contracts/src/v0.8/ccip/interfaces/IRouter.sol b/contracts/src/v0.8/ccip/interfaces/IRouter.sol index 7f4544fd0f..d8f19bf5df 100644 --- a/contracts/src/v0.8/ccip/interfaces/IRouter.sol +++ b/contracts/src/v0.8/ccip/interfaces/IRouter.sol @@ -26,7 +26,9 @@ interface IRouter { /// @notice Returns the configured onramp for a specific destination chain. /// @param destChainSelector The destination chain Id to get the onRamp for. /// @return onRampAddress The address of the onRamp. - function getOnRamp(uint64 destChainSelector) external view returns (address onRampAddress); + function getOnRamp( + uint64 destChainSelector + ) external view returns (address onRampAddress); /// @notice Return true if the given offRamp is a configured offRamp for the given source chain. /// @param sourceChainSelector The source chain selector to check. diff --git a/contracts/src/v0.8/ccip/interfaces/IRouterClient.sol b/contracts/src/v0.8/ccip/interfaces/IRouterClient.sol index 27913b597d..36218b36b3 100644 --- a/contracts/src/v0.8/ccip/interfaces/IRouterClient.sol +++ b/contracts/src/v0.8/ccip/interfaces/IRouterClient.sol @@ -11,7 +11,9 @@ interface IRouterClient { /// @notice Checks if the given chain ID is supported for sending/receiving. /// @param destChainSelector The chain to check. /// @return supported is true if it is supported, false if not. - function isChainSupported(uint64 destChainSelector) external view returns (bool supported); + function isChainSupported( + uint64 destChainSelector + ) external view returns (bool supported); /// @param destinationChainSelector The destination chainSelector /// @param message The cross-chain CCIP message including data and/or tokens diff --git a/contracts/src/v0.8/ccip/interfaces/ITokenAdminRegistry.sol b/contracts/src/v0.8/ccip/interfaces/ITokenAdminRegistry.sol index 0e44122901..484289d1e7 100644 --- a/contracts/src/v0.8/ccip/interfaces/ITokenAdminRegistry.sol +++ b/contracts/src/v0.8/ccip/interfaces/ITokenAdminRegistry.sol @@ -3,10 +3,32 @@ pragma solidity ^0.8.0; interface ITokenAdminRegistry { /// @notice Returns the pool for the given token. - function getPool(address token) external view returns (address); + function getPool( + address token + ) external view returns (address); /// @notice Proposes an administrator for the given token as pending administrator. /// @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; } diff --git a/contracts/src/v0.8/ccip/interfaces/IWrappedNative.sol b/contracts/src/v0.8/ccip/interfaces/IWrappedNative.sol index 4225827a61..f4f824361e 100644 --- a/contracts/src/v0.8/ccip/interfaces/IWrappedNative.sol +++ b/contracts/src/v0.8/ccip/interfaces/IWrappedNative.sol @@ -6,5 +6,7 @@ import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ interface IWrappedNative is IERC20 { function deposit() external payable; - function withdraw(uint256 wad) external; + function withdraw( + uint256 wad + ) external; } diff --git a/contracts/src/v0.8/ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol b/contracts/src/v0.8/ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol index 026c5fa50b..5cba49bc7f 100644 --- a/contracts/src/v0.8/ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol +++ b/contracts/src/v0.8/ccip/interfaces/encodingutils/ICCIPEncodingUtils.sol @@ -12,5 +12,7 @@ interface ICCIPEncodingUtils { function exposeRmnReport(bytes32 rmnReportVersion, RMNRemote.Report memory rmnReport) external; /// @dev the OCR3Config Config struct is used in integration / E2E tests - function exposeOCR3Config(CCIPHome.OCR3Config[] calldata config) external view returns (bytes memory); + function exposeOCR3Config( + CCIPHome.OCR3Config[] calldata config + ) external view returns (bytes memory); } diff --git a/contracts/src/v0.8/ccip/libraries/Client.sol b/contracts/src/v0.8/ccip/libraries/Client.sol index a985371bef..de1f6f1580 100644 --- a/contracts/src/v0.8/ccip/libraries/Client.sol +++ b/contracts/src/v0.8/ccip/libraries/Client.sol @@ -33,7 +33,9 @@ library Client { uint256 gasLimit; } - function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) { + function _argsToBytes( + EVMExtraArgsV1 memory extraArgs + ) internal pure returns (bytes memory bts) { return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs); } @@ -49,7 +51,9 @@ library Client { bool allowOutOfOrderExecution; } - function _argsToBytes(EVMExtraArgsV2 memory extraArgs) internal pure returns (bytes memory bts) { + function _argsToBytes( + EVMExtraArgsV2 memory extraArgs + ) internal pure returns (bytes memory bts) { return abi.encodeWithSelector(EVM_EXTRA_ARGS_V2_TAG, extraArgs); } } diff --git a/contracts/src/v0.8/ccip/libraries/Internal.sol b/contracts/src/v0.8/ccip/libraries/Internal.sol index 90b36adb7b..31f107592e 100644 --- a/contracts/src/v0.8/ccip/libraries/Internal.sol +++ b/contracts/src/v0.8/ccip/libraries/Internal.sol @@ -249,7 +249,9 @@ library Internal { /// address is within the EVM address space. If it isn't it will revert with an InvalidEVMAddress error, which /// we can catch and handle more gracefully than a revert from abi.decode. /// @return The address if it is valid, the function will revert otherwise. - function _validateEVMAddress(bytes memory encodedAddress) internal pure returns (address) { + function _validateEVMAddress( + bytes memory encodedAddress + ) internal pure returns (address) { if (encodedAddress.length != 32) revert InvalidEVMAddress(encodedAddress); uint256 encodedAddressUint = abi.decode(encodedAddress, (uint256)); if (encodedAddressUint > type(uint160).max || encodedAddressUint < PRECOMPILE_SPACE) { diff --git a/contracts/src/v0.8/ccip/libraries/RateLimiter.sol b/contracts/src/v0.8/ccip/libraries/RateLimiter.sol index 84914749e0..431b772816 100644 --- a/contracts/src/v0.8/ccip/libraries/RateLimiter.sol +++ b/contracts/src/v0.8/ccip/libraries/RateLimiter.sol @@ -85,7 +85,9 @@ library RateLimiter { /// @notice Gets the token bucket with its values for the block it was requested at. /// @return The token bucket. - function _currentTokenBucketState(TokenBucket memory bucket) internal view returns (TokenBucket memory) { + function _currentTokenBucketState( + TokenBucket memory bucket + ) internal view returns (TokenBucket memory) { // We update the bucket to reflect the status at the exact time of the // call. This means we might need to refill a part of the bucket based // on the time that has passed since the last update. diff --git a/contracts/src/v0.8/ccip/ocr/MultiOCR3Base.sol b/contracts/src/v0.8/ccip/ocr/MultiOCR3Base.sol index 2e698cd230..ba1dc1e32c 100644 --- a/contracts/src/v0.8/ccip/ocr/MultiOCR3Base.sol +++ b/contracts/src/v0.8/ccip/ocr/MultiOCR3Base.sol @@ -128,7 +128,9 @@ abstract contract MultiOCR3Base is ITypeAndVersion, OwnerIsCreator { /// @dev precondition number of transmitters should match the expected F/fChain relationship. /// For transmitters, the function only validates that len(transmitters) > 0 && len(transmitters) <= MAX_NUM_ORACLES /// && len(transmitters) <= len(signers) [if sig verification is enabled] - function setOCR3Configs(OCRConfigArgs[] memory ocrConfigArgs) external onlyOwner { + function setOCR3Configs( + OCRConfigArgs[] memory ocrConfigArgs + ) external onlyOwner { for (uint256 i; i < ocrConfigArgs.length; ++i) { _setOCR3Config(ocrConfigArgs[i]); } @@ -136,7 +138,9 @@ abstract contract MultiOCR3Base is ITypeAndVersion, OwnerIsCreator { /// @notice Sets offchain reporting protocol configuration incl. participating oracles for a single OCR plugin type. /// @param ocrConfigArgs OCR config update args. - function _setOCR3Config(OCRConfigArgs memory ocrConfigArgs) internal { + function _setOCR3Config( + OCRConfigArgs memory ocrConfigArgs + ) internal { if (ocrConfigArgs.F == 0) revert InvalidConfig(InvalidConfigErrorType.F_MUST_BE_POSITIVE); uint8 ocrPluginType = ocrConfigArgs.ocrPluginType; @@ -187,7 +191,9 @@ abstract contract MultiOCR3Base is ITypeAndVersion, OwnerIsCreator { /// @notice Hook that is called after a plugin's OCR3 config changes. /// @param ocrPluginType Plugin type for which the config changed. - function _afterOCR3ConfigSet(uint8 ocrPluginType) internal virtual; + function _afterOCR3ConfigSet( + uint8 ocrPluginType + ) internal virtual; /// @notice Clears oracle roles for the provided oracle addresses. /// @param ocrPluginType OCR plugin type to clear roles for. @@ -321,7 +327,9 @@ abstract contract MultiOCR3Base is ITypeAndVersion, OwnerIsCreator { /// @notice Information about current offchain reporting protocol configuration. /// @param ocrPluginType OCR plugin type to return config details for. /// @return ocrConfig OCR config for the plugin type. - function latestConfigDetails(uint8 ocrPluginType) external view returns (OCRConfig memory ocrConfig) { + function latestConfigDetails( + uint8 ocrPluginType + ) external view returns (OCRConfig memory ocrConfig) { return s_ocrConfigs[ocrPluginType]; } } diff --git a/contracts/src/v0.8/ccip/ocr/OCR2Base.sol b/contracts/src/v0.8/ccip/ocr/OCR2Base.sol index 74c8e47917..3cd10f2c55 100644 --- a/contracts/src/v0.8/ccip/ocr/OCR2Base.sol +++ b/contracts/src/v0.8/ccip/ocr/OCR2Base.sol @@ -89,7 +89,9 @@ abstract contract OCR2Base is OwnerIsCreator, OCR2Abstract { bool internal immutable i_uniqueReports; uint256 internal immutable i_chainID; - constructor(bool uniqueReports) { + constructor( + bool uniqueReports + ) { i_uniqueReports = uniqueReports; i_chainID = block.chainid; } @@ -176,7 +178,9 @@ abstract contract OCR2Base is OwnerIsCreator, OCR2Abstract { /// @dev Hook that is run from setOCR2Config() right after validating configuration. /// Empty by default, please provide an implementation in a child contract if you need additional configuration processing - function _beforeSetConfig(bytes memory _onchainConfig) internal virtual; + function _beforeSetConfig( + bytes memory _onchainConfig + ) internal virtual; /// @return list of addresses permitted to transmit reports to this contract /// @dev The list will match the order used to specify the transmitter during setConfig diff --git a/contracts/src/v0.8/ccip/ocr/OCR2BaseNoChecks.sol b/contracts/src/v0.8/ccip/ocr/OCR2BaseNoChecks.sol index 8bada2c378..b9a2b31ef2 100644 --- a/contracts/src/v0.8/ccip/ocr/OCR2BaseNoChecks.sol +++ b/contracts/src/v0.8/ccip/ocr/OCR2BaseNoChecks.sol @@ -158,7 +158,9 @@ abstract contract OCR2BaseNoChecks is OwnerIsCreator, OCR2Abstract { /// @dev Hook that is run from setOCR2Config() right after validating configuration. /// Empty by default, please provide an implementation in a child contract if you need additional configuration processing - function _beforeSetConfig(bytes memory _onchainConfig) internal virtual; + function _beforeSetConfig( + bytes memory _onchainConfig + ) internal virtual; /// @return list of addresses permitted to transmit reports to this contract /// @dev The list will match the order used to specify the transmitter during setConfig @@ -238,5 +240,7 @@ abstract contract OCR2BaseNoChecks is OwnerIsCreator, OCR2Abstract { return (true, bytes32(0), uint32(0)); } - function _report(bytes calldata report) internal virtual; + function _report( + bytes calldata report + ) internal virtual; } diff --git a/contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol b/contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol index 0be7fe7511..c1fd117de6 100644 --- a/contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol @@ -187,7 +187,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio /// @param sequenceNumber The sequence number of the message to get the execution state for. /// @return The current execution state of the message. /// @dev we use the literal number 128 because using a constant increased gas usage. - function getExecutionState(uint64 sequenceNumber) public view returns (Internal.MessageExecutionState) { + function getExecutionState( + uint64 sequenceNumber + ) public view returns (Internal.MessageExecutionState) { return Internal.MessageExecutionState( (s_executionStates[sequenceNumber / 128] >> ((sequenceNumber % 128) * MESSAGE_EXECUTION_STATE_BIT_WIDTH)) & MESSAGE_EXECUTION_STATE_MASK @@ -211,7 +213,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio } /// @inheritdoc IAny2EVMOffRamp - function getSenderNonce(address sender) external view returns (uint64 nonce) { + function getSenderNonce( + address sender + ) external view returns (uint64 nonce) { uint256 senderNonce = s_senderNonce[sender]; if (senderNonce == 0) { @@ -276,7 +280,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio /// @notice Entrypoint for execution, called by the OCR network /// @dev Expects an encoded ExecutionReport /// @dev Supplies no GasLimitOverrides as the DON will only execute with the original gas limits. - function _report(bytes calldata report) internal override { + function _report( + bytes calldata report + ) internal override { _execute(abi.decode(report, (Internal.ExecutionReport)), new GasLimitOverride[](0)); } @@ -540,7 +546,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio } /// @notice creates a unique hash to be used in message hashing. - function _metadataHash(bytes32 prefix) internal view returns (bytes32) { + function _metadataHash( + bytes32 prefix + ) internal view returns (bytes32) { return keccak256(abi.encode(prefix, i_sourceChainSelector, i_chainSelector, i_onRamp)); } @@ -570,7 +578,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio } /// @notice Sets the dynamic config. This function is called during `setOCR2Config` flow - function _beforeSetConfig(bytes memory onchainConfig) internal override { + function _beforeSetConfig( + bytes memory onchainConfig + ) internal override { DynamicConfig memory dynamicConfig = abi.decode(onchainConfig, (DynamicConfig)); if (dynamicConfig.router == address(0)) revert ZeroAddressNotAllowed(); @@ -789,7 +799,9 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio // ================================================================ /// @notice Reverts as this contract should not access CCIP messages - function ccipReceive(Client.Any2EVMMessage calldata) external pure { + function ccipReceive( + Client.Any2EVMMessage calldata + ) external pure { // solhint-disable-next-line revert(); } diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index 14d5ae5c75..63232c038e 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -880,7 +880,9 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { } /// @inheritdoc MultiOCR3Base - function _afterOCR3ConfigSet(uint8 ocrPluginType) internal override { + function _afterOCR3ConfigSet( + uint8 ocrPluginType + ) internal override { if (ocrPluginType == uint8(Internal.OCRPluginType.Commit)) { // Signature verification must be enabled for commit plugin if (!s_ocrConfigs[ocrPluginType].configInfo.isSignatureVerificationEnabled) { @@ -920,7 +922,9 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @notice Returns the source chain config for the provided source chain selector /// @param sourceChainSelector chain to retrieve configuration for /// @return sourceChainConfig The config for the source chain - function getSourceChainConfig(uint64 sourceChainSelector) external view returns (SourceChainConfig memory) { + function getSourceChainConfig( + uint64 sourceChainSelector + ) external view returns (SourceChainConfig memory) { return s_sourceChainConfigs[sourceChainSelector]; } @@ -938,13 +942,17 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @notice Updates source configs /// @param sourceChainConfigUpdates Source chain configs - function applySourceChainConfigUpdates(SourceChainConfigArgs[] memory sourceChainConfigUpdates) external onlyOwner { + function applySourceChainConfigUpdates( + SourceChainConfigArgs[] memory sourceChainConfigUpdates + ) external onlyOwner { _applySourceChainConfigUpdates(sourceChainConfigUpdates); } /// @notice Updates source configs /// @param sourceChainConfigUpdates Source chain configs - function _applySourceChainConfigUpdates(SourceChainConfigArgs[] memory sourceChainConfigUpdates) internal { + function _applySourceChainConfigUpdates( + SourceChainConfigArgs[] memory sourceChainConfigUpdates + ) internal { for (uint256 i = 0; i < sourceChainConfigUpdates.length; ++i) { SourceChainConfigArgs memory sourceConfigUpdate = sourceChainConfigUpdates[i]; uint64 sourceChainSelector = sourceConfigUpdate.sourceChainSelector; @@ -988,13 +996,17 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @notice Sets the dynamic config. /// @param dynamicConfig The new dynamic config. - function setDynamicConfig(DynamicConfig memory dynamicConfig) external onlyOwner { + function setDynamicConfig( + DynamicConfig memory dynamicConfig + ) external onlyOwner { _setDynamicConfig(dynamicConfig); } /// @notice Sets the dynamic config. /// @param dynamicConfig The dynamic config. - function _setDynamicConfig(DynamicConfig memory dynamicConfig) internal { + function _setDynamicConfig( + DynamicConfig memory dynamicConfig + ) internal { if (dynamicConfig.feeQuoter == address(0)) { revert ZeroAddressNotAllowed(); } @@ -1007,7 +1019,9 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { /// @notice Returns a source chain config with a check that the config is enabled /// @param sourceChainSelector Source chain selector to check for cursing /// @return sourceChainConfig The source chain config storage pointer - function _getEnabledSourceChainConfig(uint64 sourceChainSelector) internal view returns (SourceChainConfig storage) { + function _getEnabledSourceChainConfig( + uint64 sourceChainSelector + ) internal view returns (SourceChainConfig storage) { SourceChainConfig storage sourceChainConfig = s_sourceChainConfigs[sourceChainSelector]; if (!sourceChainConfig.isEnabled) { revert SourceChainNotEnabled(sourceChainSelector); @@ -1021,7 +1035,9 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { // ================================================================ /// @notice Reverts as this contract should not be able to receive CCIP messages - function ccipReceive(Client.Any2EVMMessage calldata) external pure { + function ccipReceive( + Client.Any2EVMMessage calldata + ) external pure { // solhint-disable-next-line revert(); } diff --git a/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol b/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol index 0c48b10e64..99bc27e80a 100644 --- a/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol @@ -246,7 +246,9 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, } /// @inheritdoc IEVM2AnyOnRamp - function getSenderNonce(address sender) external view returns (uint64) { + function getSenderNonce( + address sender + ) external view returns (uint64) { uint256 senderNonce = s_senderNonce[sender]; if (i_prevOnRamp != address(0)) { @@ -399,7 +401,9 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, /// @dev Convert the extra args bytes into a struct /// @param extraArgs The extra args bytes /// @return The extra args struct - function _fromBytes(bytes calldata extraArgs) internal view returns (Client.EVMExtraArgsV2 memory) { + function _fromBytes( + bytes calldata extraArgs + ) internal view returns (Client.EVMExtraArgsV2 memory) { if (extraArgs.length == 0) { return Client.EVMExtraArgsV2({gasLimit: i_defaultTxGasLimit, allowOutOfOrderExecution: false}); } @@ -467,12 +471,16 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, /// @notice Sets the dynamic configuration. /// @param dynamicConfig The configuration. - function setDynamicConfig(DynamicConfig memory dynamicConfig) external onlyOwner { + function setDynamicConfig( + DynamicConfig memory dynamicConfig + ) external onlyOwner { _setDynamicConfig(dynamicConfig); } /// @notice Internal version of setDynamicConfig to allow for reuse in the constructor. - function _setDynamicConfig(DynamicConfig memory dynamicConfig) internal { + function _setDynamicConfig( + DynamicConfig memory dynamicConfig + ) internal { // We permit router to be set to zero as a way to pause the contract. if (dynamicConfig.priceRegistry == address(0)) revert InvalidConfig(); s_dynamicConfig = dynamicConfig; @@ -502,7 +510,9 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, } /// @inheritdoc IEVM2AnyOnRampClient - function getSupportedTokens(uint64) external pure returns (address[] memory) { + function getSupportedTokens( + uint64 + ) external pure returns (address[] memory) { revert GetSupportedTokensFunctionalityRemovedCheckAdminRegistry(); } @@ -688,20 +698,26 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, /// @notice Gets the fee configuration for a token /// @param token The token to get the fee configuration for /// @return feeTokenConfig FeeTokenConfig struct - function getFeeTokenConfig(address token) external view returns (FeeTokenConfig memory feeTokenConfig) { + function getFeeTokenConfig( + address token + ) external view returns (FeeTokenConfig memory feeTokenConfig) { return s_feeTokenConfig[token]; } /// @notice Sets the fee configuration for a token /// @param feeTokenConfigArgs Array of FeeTokenConfigArgs structs. - function setFeeTokenConfig(FeeTokenConfigArgs[] memory feeTokenConfigArgs) external { + function setFeeTokenConfig( + FeeTokenConfigArgs[] memory feeTokenConfigArgs + ) external { _onlyOwnerOrAdmin(); _setFeeTokenConfig(feeTokenConfigArgs); } /// @dev Set the fee config /// @param feeTokenConfigArgs The fee token configs. - function _setFeeTokenConfig(FeeTokenConfigArgs[] memory feeTokenConfigArgs) internal { + function _setFeeTokenConfig( + FeeTokenConfigArgs[] memory feeTokenConfigArgs + ) internal { for (uint256 i = 0; i < feeTokenConfigArgs.length; ++i) { FeeTokenConfigArgs memory configArg = feeTokenConfigArgs[i]; @@ -791,7 +807,9 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, /// @notice Sets the Nops and their weights /// @param nopsAndWeights Array of NopAndWeight structs - function setNops(NopAndWeight[] calldata nopsAndWeights) external { + function setNops( + NopAndWeight[] calldata nopsAndWeights + ) external { _onlyOwnerOrAdmin(); _setNops(nopsAndWeights); } @@ -800,7 +818,9 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, /// @dev Clears existing nops, sets new nops and weights /// @dev We permit fees to accrue before nops are configured, in which case /// they will go to the first set of configured nops. - function _setNops(NopAndWeight[] memory nopsAndWeights) internal { + function _setNops( + NopAndWeight[] memory nopsAndWeights + ) internal { uint256 numberOfNops = nopsAndWeights.length; if (numberOfNops > MAX_NUMBER_OF_NOPS) revert TooManyNops(); diff --git a/contracts/src/v0.8/ccip/onRamp/OnRamp.sol b/contracts/src/v0.8/ccip/onRamp/OnRamp.sol index e053baf507..d7af0d9eb2 100644 --- a/contracts/src/v0.8/ccip/onRamp/OnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/OnRamp.sol @@ -155,7 +155,9 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// @notice Gets the next sequence number to be used in the onRamp /// @param destChainSelector The destination chain selector /// @return nextSequenceNumber The next sequence number to be used - function getExpectedNextSequenceNumber(uint64 destChainSelector) external view returns (uint64) { + function getExpectedNextSequenceNumber( + uint64 destChainSelector + ) external view returns (uint64) { return s_destChainConfigs[destChainSelector].sequenceNumber + 1; } @@ -329,19 +331,25 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// @notice Sets the dynamic configuration. /// @param dynamicConfig The configuration. - function setDynamicConfig(DynamicConfig memory dynamicConfig) external onlyOwner { + function setDynamicConfig( + DynamicConfig memory dynamicConfig + ) external onlyOwner { _setDynamicConfig(dynamicConfig); } /// @notice Gets the source router for a destination chain /// @param destChainSelector The destination chain selector /// @return router the router for the provided destination chain - function getRouter(uint64 destChainSelector) external view returns (IRouter) { + function getRouter( + uint64 destChainSelector + ) external view returns (IRouter) { return s_destChainConfigs[destChainSelector].router; } /// @notice Internal version of setDynamicConfig to allow for reuse in the constructor. - function _setDynamicConfig(DynamicConfig memory dynamicConfig) internal { + function _setDynamicConfig( + DynamicConfig memory dynamicConfig + ) internal { if ( dynamicConfig.feeQuoter == address(0) || dynamicConfig.feeAggregator == address(0) || dynamicConfig.reentrancyGuardEntered @@ -362,12 +370,16 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// @notice Updates destination chains specific configs. /// @param destChainConfigArgs Array of destination chain specific configs. - function applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) external onlyOwner { + function applyDestChainConfigUpdates( + DestChainConfigArgs[] memory destChainConfigArgs + ) external onlyOwner { _applyDestChainConfigUpdates(destChainConfigArgs); } /// @notice Internal version of applyDestChainConfigUpdates. - function _applyDestChainConfigUpdates(DestChainConfigArgs[] memory destChainConfigArgs) internal { + function _applyDestChainConfigUpdates( + DestChainConfigArgs[] memory destChainConfigArgs + ) internal { for (uint256 i = 0; i < destChainConfigArgs.length; ++i) { DestChainConfigArgs memory destChainConfigArg = destChainConfigArgs[i]; uint64 destChainSelector = destChainConfigArgs[i].destChainSelector; @@ -404,7 +416,9 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// @notice get allowedSenders List configured for the DestinationChainSelector /// @param destChainSelector The destination chain selector /// @return array of allowedList of Senders - function getAllowedSendersList(uint64 destChainSelector) public view returns (address[] memory) { + function getAllowedSendersList( + uint64 destChainSelector + ) public view returns (address[] memory) { return s_destChainConfigs[destChainSelector].allowedSendersList.values(); } @@ -415,7 +429,9 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// @notice Updates allowListConfig for Senders /// @dev configuration used to set the list of senders who are authorized to send messages /// @param allowListConfigArgsItems Array of AllowListConfigArguments where each item is for a destChainSelector - function applyAllowListUpdates(AllowListConfigArgs[] calldata allowListConfigArgsItems) external { + function applyAllowListUpdates( + AllowListConfigArgs[] calldata allowListConfigArgsItems + ) external { if (msg.sender != owner()) { if (msg.sender != s_dynamicConfig.allowListAdmin) { revert OnlyCallableByOwnerOrAllowlistAdmin(); @@ -466,7 +482,9 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { } /// @inheritdoc IEVM2AnyOnRampClient - function getSupportedTokens(uint64 /*destChainSelector*/ ) external pure returns (address[] memory) { + function getSupportedTokens( + uint64 /*destChainSelector*/ + ) external pure returns (address[] memory) { revert GetSupportedTokensFunctionalityRemovedCheckAdminRegistry(); } diff --git a/contracts/src/v0.8/ccip/pools/BurnFromMintTokenPool.sol b/contracts/src/v0.8/ccip/pools/BurnFromMintTokenPool.sol index 4ea6664a5c..8ce63a12bb 100644 --- a/contracts/src/v0.8/ccip/pools/BurnFromMintTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/BurnFromMintTokenPool.sol @@ -18,21 +18,24 @@ import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/tok contract BurnFromMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { using SafeERC20 for IBurnMintERC20; - string public constant override typeAndVersion = "BurnFromMintTokenPool 1.5.0"; + string public constant override typeAndVersion = "BurnFromMintTokenPool 1.5.1"; constructor( IBurnMintERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router - ) TokenPool(token, allowlist, rmnProxy, router) { + ) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) { // Some tokens allow burning from the sender without approval, but not all do. // To be safe, we approve the pool to burn from the pool. token.safeIncreaseAllowance(address(this), type(uint256).max); } /// @inheritdoc BurnMintTokenPoolAbstract - function _burn(uint256 amount) internal virtual override { + function _burn( + uint256 amount + ) internal virtual override { IBurnMintERC20(address(i_token)).burnFrom(address(this), amount); } } diff --git a/contracts/src/v0.8/ccip/pools/BurnMintTokenPool.sol b/contracts/src/v0.8/ccip/pools/BurnMintTokenPool.sol index c48c8e51fb..30203a4ced 100644 --- a/contracts/src/v0.8/ccip/pools/BurnMintTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/BurnMintTokenPool.sol @@ -14,17 +14,20 @@ import {TokenPool} from "./TokenPool.sol"; /// If that is expected, please make sure the token's burner/minter roles are adjustable. /// @dev This contract is a variant of BurnMintTokenPool that uses `burn(amount)`. contract BurnMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion { - string public constant override typeAndVersion = "BurnMintTokenPool 1.5.0"; + string public constant override typeAndVersion = "BurnMintTokenPool 1.5.1"; constructor( IBurnMintERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router - ) TokenPool(token, allowlist, rmnProxy, router) {} + ) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) {} /// @inheritdoc BurnMintTokenPoolAbstract - function _burn(uint256 amount) internal virtual override { + function _burn( + uint256 amount + ) internal virtual override { IBurnMintERC20(address(i_token)).burn(amount); } } diff --git a/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAbstract.sol b/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAbstract.sol index 99908c91d0..b3bbf4ff5e 100644 --- a/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAbstract.sol +++ b/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAbstract.sol @@ -10,7 +10,9 @@ abstract contract BurnMintTokenPoolAbstract is TokenPool { /// @notice Contains the specific burn call for a pool. /// @dev overriding this method allows us to create pools with different burn signatures /// without duplicating the underlying logic. - function _burn(uint256 amount) internal virtual; + function _burn( + uint256 amount + ) internal virtual; /// @notice Burn the token in the pool /// @dev The _validateLockOrBurn check is an essential security check @@ -23,7 +25,10 @@ abstract contract BurnMintTokenPoolAbstract is TokenPool { emit Burned(msg.sender, lockOrBurnIn.amount); - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); + return Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), + destPoolData: _encodeLocalDecimals() + }); } /// @notice Mint tokens from the pool to the recipient @@ -33,11 +38,15 @@ abstract contract BurnMintTokenPoolAbstract is TokenPool { ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { _validateReleaseOrMint(releaseOrMintIn); + // Calculate the local amount + uint256 localAmount = + _calculateLocalAmount(releaseOrMintIn.amount, _parseRemoteDecimals(releaseOrMintIn.sourcePoolData)); + // Mint to the receiver - IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount); + IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, localAmount); - emit Minted(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); + emit Minted(msg.sender, releaseOrMintIn.receiver, localAmount); - return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); + return Pool.ReleaseOrMintOutV1({destinationAmount: localAmount}); } } diff --git a/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAndProxy.sol b/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAndProxy.sol deleted file mode 100644 index 6e3fb0f479..0000000000 --- a/contracts/src/v0.8/ccip/pools/BurnMintTokenPoolAndProxy.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; -import {IBurnMintERC20} from "../../shared/token/ERC20/IBurnMintERC20.sol"; - -import {Pool} from "../libraries/Pool.sol"; -import {LegacyPoolWrapper} from "./LegacyPoolWrapper.sol"; - -contract BurnMintTokenPoolAndProxy is ITypeAndVersion, LegacyPoolWrapper { - string public constant override typeAndVersion = "BurnMintTokenPoolAndProxy 1.5.0"; - - constructor( - IBurnMintERC20 token, - address[] memory allowlist, - address rmnProxy, - address router - ) LegacyPoolWrapper(token, allowlist, rmnProxy, router) {} - - /// @notice Burn the token in the pool - /// @dev The _validateLockOrBurn check is an essential security check - function lockOrBurn( - Pool.LockOrBurnInV1 calldata lockOrBurnIn - ) external virtual override returns (Pool.LockOrBurnOutV1 memory) { - _validateLockOrBurn(lockOrBurnIn); - - if (!_hasLegacyPool()) { - IBurnMintERC20(address(i_token)).burn(lockOrBurnIn.amount); - } else { - _lockOrBurnLegacy(lockOrBurnIn); - } - - emit Burned(msg.sender, lockOrBurnIn.amount); - - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); - } - - /// @notice Mint tokens from the pool to the recipient - /// @dev The _validateReleaseOrMint check is an essential security check - function releaseOrMint( - Pool.ReleaseOrMintInV1 calldata releaseOrMintIn - ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { - _validateReleaseOrMint(releaseOrMintIn); - - if (!_hasLegacyPool()) { - IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount); - } else { - _releaseOrMintLegacy(releaseOrMintIn); - } - - emit Minted(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); - - return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); - } -} diff --git a/contracts/src/v0.8/ccip/pools/BurnWithFromMintRebasingTokenPool.sol b/contracts/src/v0.8/ccip/pools/BurnWithFromMintRebasingTokenPool.sol deleted file mode 100644 index 16acdb03b6..0000000000 --- a/contracts/src/v0.8/ccip/pools/BurnWithFromMintRebasingTokenPool.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IBurnMintERC20} from "../../shared/token/ERC20/IBurnMintERC20.sol"; - -import {Pool} from "../libraries/Pool.sol"; -import {BurnWithFromMintTokenPool} from "./BurnWithFromMintTokenPool.sol"; - -/// @notice This pool mints and burns a 3rd-party token. -/// @dev This contract is a variant of BurnMintTokenPool that uses `burn(from, amount)`. -/// @dev This contract supports minting tokens that do not mint the exact amount they are asked to mint. This can be -/// used for rebasing tokens. NOTE: for true rebasing support, the lockOrBurn method must also be updated to support -/// relaying the correct amount. -contract BurnWithFromMintRebasingTokenPool is BurnWithFromMintTokenPool { - error NegativeMintAmount(uint256 amountBurned); - - string public constant override typeAndVersion = "BurnWithFromMintRebasingTokenPool 1.5.0"; - - constructor( - IBurnMintERC20 token, - address[] memory allowlist, - address rmnProxy, - address router - ) BurnWithFromMintTokenPool(token, allowlist, rmnProxy, router) {} - - /// @notice Mint tokens from the pool to the recipient - /// @dev The _validateReleaseOrMint check is an essential security check - function releaseOrMint( - Pool.ReleaseOrMintInV1 calldata releaseOrMintIn - ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { - _validateReleaseOrMint(releaseOrMintIn); - - uint256 balancePre = IBurnMintERC20(address(i_token)).balanceOf(releaseOrMintIn.receiver); - - // Mint to the receiver - IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount); - - uint256 balancePost = IBurnMintERC20(address(i_token)).balanceOf(releaseOrMintIn.receiver); - - // Mint should not reduce the number of tokens in the receiver, if it does it will revert the call. - if (balancePost < balancePre) { - revert NegativeMintAmount(balancePre - balancePost); - } - - emit Minted(msg.sender, releaseOrMintIn.receiver, balancePost - balancePre); - - return Pool.ReleaseOrMintOutV1({destinationAmount: balancePost - balancePre}); - } -} diff --git a/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPool.sol b/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPool.sol index b999be6981..fb8538141c 100644 --- a/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPool.sol @@ -20,21 +20,24 @@ contract BurnWithFromMintTokenPool is BurnMintTokenPoolAbstract, ITypeAndVersion constructor( IBurnMintERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router - ) TokenPool(token, allowlist, rmnProxy, router) { + ) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) { // Some tokens allow burning from the sender without approval, but not all do. // To be safe, we approve the pool to burn from the pool. token.safeIncreaseAllowance(address(this), type(uint256).max); } /// @inheritdoc BurnMintTokenPoolAbstract - function _burn(uint256 amount) internal virtual override { + function _burn( + uint256 amount + ) internal virtual override { IBurnMintERC20(address(i_token)).burn(address(this), amount); } function typeAndVersion() external pure virtual override returns (string memory) { - return "BurnWithFromMintTokenPool 1.5.0"; + return "BurnWithFromMintTokenPool 1.5.1"; } } diff --git a/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPoolAndProxy.sol b/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPoolAndProxy.sol deleted file mode 100644 index d9c4df0a6c..0000000000 --- a/contracts/src/v0.8/ccip/pools/BurnWithFromMintTokenPoolAndProxy.sol +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; -import {IBurnMintERC20} from "../../shared/token/ERC20/IBurnMintERC20.sol"; - -import {Pool} from "../libraries/Pool.sol"; -import {LegacyPoolWrapper} from "./LegacyPoolWrapper.sol"; - -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; - -contract BurnWithFromMintTokenPoolAndProxy is ITypeAndVersion, LegacyPoolWrapper { - using SafeERC20 for IBurnMintERC20; - - string public constant override typeAndVersion = "BurnWithFromMintTokenPoolAndProxy 1.5.0"; - - constructor( - IBurnMintERC20 token, - address[] memory allowlist, - address rmnProxy, - address router - ) LegacyPoolWrapper(token, allowlist, rmnProxy, router) { - // Some tokens allow burning from the sender without approval, but not all do. - // To be safe, we approve the pool to burn from the pool. - token.safeIncreaseAllowance(address(this), type(uint256).max); - } - - /// @notice Burn the token in the pool - /// @dev The _validateLockOrBurn check is an essential security check - function lockOrBurn( - Pool.LockOrBurnInV1 calldata lockOrBurnIn - ) external virtual override returns (Pool.LockOrBurnOutV1 memory) { - _validateLockOrBurn(lockOrBurnIn); - - if (!_hasLegacyPool()) { - IBurnMintERC20(address(i_token)).burnFrom(address(this), lockOrBurnIn.amount); - } else { - _lockOrBurnLegacy(lockOrBurnIn); - } - - emit Burned(msg.sender, lockOrBurnIn.amount); - - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); - } - - /// @notice Mint tokens from the pool to the recipient - /// @dev The _validateReleaseOrMint check is an essential security check - function releaseOrMint( - Pool.ReleaseOrMintInV1 calldata releaseOrMintIn - ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { - _validateReleaseOrMint(releaseOrMintIn); - - if (!_hasLegacyPool()) { - IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount); - } else { - _releaseOrMintLegacy(releaseOrMintIn); - } - - emit Minted(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); - - return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); - } -} diff --git a/contracts/src/v0.8/ccip/pools/LegacyPoolWrapper.sol b/contracts/src/v0.8/ccip/pools/LegacyPoolWrapper.sol deleted file mode 100644 index 43326681e5..0000000000 --- a/contracts/src/v0.8/ccip/pools/LegacyPoolWrapper.sol +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IPoolPriorTo1_5} from "../interfaces/IPoolPriorTo1_5.sol"; - -import {Pool} from "../libraries/Pool.sol"; -import {TokenPool} from "./TokenPool.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; - -abstract contract LegacyPoolWrapper is TokenPool { - using SafeERC20 for IERC20; - - event LegacyPoolChanged(IPoolPriorTo1_5 oldPool, IPoolPriorTo1_5 newPool); - - /// @dev The previous pool, if there is any. This is a property to make the older 1.0-1.4 pools - /// compatible with the current 1.5 pool. To achieve this, we set the previous pool address to the - /// currently deployed legacy pool. Then we configure this new pool as onRamp and offRamp on the legacy pools. - /// In the case of a 1.4 pool, this new pool contract has to be set to the Router as well, as it validates - /// who can call it through the router calls. This contract will always return itself as the only allowed ramp. - /// @dev Can be address(0), this would indicate that this pool is operating as a normal pool as opposed to - /// a proxy pool. - IPoolPriorTo1_5 internal s_previousPool; - - constructor( - IERC20 token, - address[] memory allowlist, - address rmnProxy, - address router - ) TokenPool(token, allowlist, rmnProxy, router) {} - - // ================================================================ - // │ Legacy Fallbacks │ - // ================================================================ - // Legacy fallbacks for older token pools that do not implement the new interface. - - /// @notice Legacy fallback for the 1.4 token pools. - function getOnRamp(uint64) external view returns (address onRampAddress) { - return address(this); - } - - /// @notice Return true if the given offRamp is a configured offRamp for the given source chain. - function isOffRamp(uint64 sourceChainSelector, address offRamp) external view returns (bool) { - return offRamp == address(this) || s_router.isOffRamp(sourceChainSelector, offRamp); - } - - /// @notice Configures the legacy fallback option. If the previous pool is set, this pool will act as a proxy for - /// the legacy pool. - /// @param prevPool The address of the previous pool. - function setPreviousPool(IPoolPriorTo1_5 prevPool) external onlyOwner { - IPoolPriorTo1_5 oldPrevPool = s_previousPool; - s_previousPool = prevPool; - - emit LegacyPoolChanged(oldPrevPool, prevPool); - } - - /// @notice Returns the address of the previous pool. - function getPreviousPool() external view returns (address) { - return address(s_previousPool); - } - - function _hasLegacyPool() internal view returns (bool) { - return address(s_previousPool) != address(0); - } - - function _lockOrBurnLegacy(Pool.LockOrBurnInV1 memory lockOrBurnIn) internal { - i_token.safeTransfer(address(s_previousPool), lockOrBurnIn.amount); - s_previousPool.lockOrBurn( - lockOrBurnIn.originalSender, lockOrBurnIn.receiver, lockOrBurnIn.amount, lockOrBurnIn.remoteChainSelector, "" - ); - } - - /// @notice This call converts the arguments from a >=1.5 pool call to those of a <1.5 pool call, and uses these - /// to call the previous pool. - /// @param releaseOrMintIn The 1.5 style release or mint arguments. - /// @dev Overwrites the receiver so the previous pool sends the tokens to the sender of this call, which is the - /// offRamp. This is due to the older pools sending funds directly to the receiver, while the new pools do a hop - /// through the offRamp to ensure the correct tokens are sent. - /// @dev Since extraData has never been used in LockRelease or MintBurn token pools, we can safely ignore it. - function _releaseOrMintLegacy(Pool.ReleaseOrMintInV1 memory releaseOrMintIn) internal { - s_previousPool.releaseOrMint( - releaseOrMintIn.originalSender, - releaseOrMintIn.receiver, - releaseOrMintIn.amount, - releaseOrMintIn.remoteChainSelector, - "" - ); - } -} diff --git a/contracts/src/v0.8/ccip/pools/LockReleaseTokenPool.sol b/contracts/src/v0.8/ccip/pools/LockReleaseTokenPool.sol index 3a4a4aef6d..ecc28a14dd 100644 --- a/contracts/src/v0.8/ccip/pools/LockReleaseTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/LockReleaseTokenPool.sol @@ -9,6 +9,7 @@ import {TokenPool} from "./TokenPool.sol"; import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IERC165} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; /// @notice Token pool used for tokens on their native chain. This uses a lock and release mechanism. /// Because of lock/unlock requiring liquidity, this pool contract also has function to add and remove @@ -22,7 +23,7 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion event LiquidityTransferred(address indexed from, uint256 amount); - string public constant override typeAndVersion = "LockReleaseTokenPool 1.5.0"; + string public constant override typeAndVersion = "LockReleaseTokenPool 1.5.1"; /// @dev Whether or not the pool accepts liquidity. /// External liquidity is not required when there is one canonical token deployed to a chain, @@ -34,11 +35,12 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion constructor( IERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, bool acceptLiquidity, address router - ) TokenPool(token, allowlist, rmnProxy, router) { + ) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) { i_acceptLiquidity = acceptLiquidity; } @@ -51,7 +53,10 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion emit Locked(msg.sender, lockOrBurnIn.amount); - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); + return Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), + destPoolData: _encodeLocalDecimals() + }); } /// @notice Release tokens from the pool to the recipient @@ -61,16 +66,22 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { _validateReleaseOrMint(releaseOrMintIn); + // Calculate the local amount + uint256 localAmount = + _calculateLocalAmount(releaseOrMintIn.amount, _parseRemoteDecimals(releaseOrMintIn.sourcePoolData)); + // Release to the recipient - getToken().safeTransfer(releaseOrMintIn.receiver, releaseOrMintIn.amount); + getToken().safeTransfer(releaseOrMintIn.receiver, localAmount); - emit Released(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); + emit Released(msg.sender, releaseOrMintIn.receiver, localAmount); - return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); + return Pool.ReleaseOrMintOutV1({destinationAmount: localAmount}); } - // @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + /// @inheritdoc IERC165 + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { return interfaceId == type(ILiquidityContainer).interfaceId || super.supportsInterface(interfaceId); } @@ -82,7 +93,9 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion /// @notice Sets the LiquidityManager address. /// @dev Only callable by the owner. - function setRebalancer(address rebalancer) external onlyOwner { + function setRebalancer( + address rebalancer + ) external onlyOwner { s_rebalancer = rebalancer; } @@ -94,7 +107,9 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion /// @notice Adds liquidity to the pool. The tokens should be approved first. /// @param amount The amount of liquidity to provide. - function provideLiquidity(uint256 amount) external { + function provideLiquidity( + uint256 amount + ) external { if (!i_acceptLiquidity) revert LiquidityNotAccepted(); if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender); @@ -104,7 +119,9 @@ contract LockReleaseTokenPool is TokenPool, ILiquidityContainer, ITypeAndVersion /// @notice Removed liquidity to the pool. The tokens will be sent to msg.sender. /// @param amount The amount of liquidity to remove. - function withdrawLiquidity(uint256 amount) external { + function withdrawLiquidity( + uint256 amount + ) external { if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender); if (i_token.balanceOf(address(this)) < amount) revert InsufficientLiquidity(); diff --git a/contracts/src/v0.8/ccip/pools/LockReleaseTokenPoolAndProxy.sol b/contracts/src/v0.8/ccip/pools/LockReleaseTokenPoolAndProxy.sol deleted file mode 100644 index e8c39127de..0000000000 --- a/contracts/src/v0.8/ccip/pools/LockReleaseTokenPoolAndProxy.sol +++ /dev/null @@ -1,135 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {ILiquidityContainer} from "../../liquiditymanager/interfaces/ILiquidityContainer.sol"; -import {ITypeAndVersion} from "../../shared/interfaces/ITypeAndVersion.sol"; - -import {Pool} from "../libraries/Pool.sol"; -import {LegacyPoolWrapper} from "./LegacyPoolWrapper.sol"; - -import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {SafeERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; - -/// @notice Token pool used for tokens on their native chain. This uses a lock and release mechanism. -/// Because of lock/unlock requiring liquidity, this pool contract also has function to add and remove -/// liquidity. This allows for proper bookkeeping for both user and liquidity provider balances. -/// @dev One token per LockReleaseTokenPool. -contract LockReleaseTokenPoolAndProxy is LegacyPoolWrapper, ILiquidityContainer, ITypeAndVersion { - using SafeERC20 for IERC20; - - error InsufficientLiquidity(); - error LiquidityNotAccepted(); - - string public constant override typeAndVersion = "LockReleaseTokenPoolAndProxy 1.5.0"; - - /// @dev Whether or not the pool accepts liquidity. - /// External liquidity is not required when there is one canonical token deployed to a chain, - /// and CCIP is facilitating mint/burn on all the other chains, in which case the invariant - /// balanceOf(pool) on home chain >= sum(totalSupply(mint/burn "wrapped" token) on all remote chains) should always hold - bool internal immutable i_acceptLiquidity; - /// @notice The address of the rebalancer. - address internal s_rebalancer; - - constructor( - IERC20 token, - address[] memory allowlist, - address rmnProxy, - bool acceptLiquidity, - address router - ) LegacyPoolWrapper(token, allowlist, rmnProxy, router) { - i_acceptLiquidity = acceptLiquidity; - } - - /// @notice Locks the token in the pool - /// @dev The _validateLockOrBurn check is an essential security check - function lockOrBurn( - Pool.LockOrBurnInV1 calldata lockOrBurnIn - ) external virtual override returns (Pool.LockOrBurnOutV1 memory) { - _validateLockOrBurn(lockOrBurnIn); - - if (_hasLegacyPool()) { - _lockOrBurnLegacy(lockOrBurnIn); - } - - emit Locked(msg.sender, lockOrBurnIn.amount); - - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); - } - - /// @notice Release tokens from the pool to the recipient - /// @dev The _validateReleaseOrMint check is an essential security check - function releaseOrMint( - Pool.ReleaseOrMintInV1 calldata releaseOrMintIn - ) external virtual override returns (Pool.ReleaseOrMintOutV1 memory) { - _validateReleaseOrMint(releaseOrMintIn); - - if (!_hasLegacyPool()) { - // Release to the recipient - getToken().safeTransfer(releaseOrMintIn.receiver, releaseOrMintIn.amount); - } else { - _releaseOrMintLegacy(releaseOrMintIn); - } - - emit Released(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); - - return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); - } - - // @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { - return interfaceId == type(ILiquidityContainer).interfaceId || super.supportsInterface(interfaceId); - } - - /// @notice Gets LiquidityManager, can be address(0) if none is configured. - /// @return The current liquidity manager. - function getRebalancer() external view returns (address) { - return s_rebalancer; - } - - /// @notice Sets the LiquidityManager address. - /// @dev Only callable by the owner. - function setRebalancer(address rebalancer) external onlyOwner { - s_rebalancer = rebalancer; - } - - /// @notice Checks if the pool can accept liquidity. - /// @return true if the pool can accept liquidity, false otherwise. - function canAcceptLiquidity() external view returns (bool) { - return i_acceptLiquidity; - } - - /// @notice Adds liquidity to the pool. The tokens should be approved first. - /// @param amount The amount of liquidity to provide. - function provideLiquidity(uint256 amount) external { - if (!i_acceptLiquidity) revert LiquidityNotAccepted(); - if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender); - - i_token.safeTransferFrom(msg.sender, address(this), amount); - emit LiquidityAdded(msg.sender, amount); - } - - /// @notice Removed liquidity to the pool. The tokens will be sent to msg.sender. - /// @param amount The amount of liquidity to remove. - function withdrawLiquidity(uint256 amount) external { - if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender); - - if (i_token.balanceOf(address(this)) < amount) revert InsufficientLiquidity(); - i_token.safeTransfer(msg.sender, amount); - emit LiquidityRemoved(msg.sender, amount); - } - - /// @notice This function can be used to transfer liquidity from an older version of the pool to this pool. To do so - /// this pool will have to be set as the rebalancer in the older version of the pool. This allows it to transfer the - /// funds in the old pool to the new pool. - /// @dev When upgrading a LockRelease pool, this function can be called at the same time as the pool is changed in the - /// TokenAdminRegistry. This allows for a smooth transition of both liquidity and transactions to the new pool. - /// Alternatively, when no multicall is available, a portion of the funds can be transferred to the new pool before - /// changing which pool CCIP uses, to ensure both pools can operate. Then the pool should be changed in the - /// TokenAdminRegistry, which will activate the new pool. All new transactions will use the new pool and its - /// liquidity. Finally, the remaining liquidity can be transferred to the new pool using this function one more time. - /// @param from The address of the old pool. - /// @param amount The amount of liquidity to transfer. - function transferLiquidity(address from, uint256 amount) external onlyOwner { - LockReleaseTokenPoolAndProxy(from).withdrawLiquidity(amount); - } -} diff --git a/contracts/src/v0.8/ccip/pools/TokenPool.sol b/contracts/src/v0.8/ccip/pools/TokenPool.sol index ebd613134a..cd3096f4ef 100644 --- a/contracts/src/v0.8/ccip/pools/TokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/TokenPool.sol @@ -5,18 +5,32 @@ import {IPoolV1} from "../interfaces/IPool.sol"; import {IRMN} from "../interfaces/IRMN.sol"; import {IRouter} from "../interfaces/IRouter.sol"; -import {OwnerIsCreator} from "../../shared/access/OwnerIsCreator.sol"; +import {Ownable2StepMsgSender} from "../../shared/access/Ownable2StepMsgSender.sol"; import {Pool} from "../libraries/Pool.sol"; import {RateLimiter} from "../libraries/RateLimiter.sol"; import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from + "../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {IERC165} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/structs/EnumerableSet.sol"; -/// @notice Base abstract class with common functions for all token pools. -/// A token pool serves as isolated place for holding tokens and token specific logic -/// that may execute as tokens move across the bridge. -abstract contract TokenPool is IPoolV1, OwnerIsCreator { +/// @dev This pool supports different decimals on different chains but using this feature could impact the total number +/// of tokens in circulation. Since all of the tokens are locked/burned on the source, and a rounded amount is minted/released on the +/// destination, the number of tokens minted/released could be less than the number of tokens burned/locked. This is because the source +/// chain does not know about the destination token decimals. This is not a problem if the decimals are the same on both +/// chains. +/// +/// Example: +/// Assume there is a token with 6 decimals on chain A and 3 decimals on chain B. +/// - 1.234567 tokens are burned on chain A. +/// - 1.234 tokens are minted on chain B. +/// When sending the 1.234 tokens back to chain A, you will receive 1.234000 tokens on chain A, effectively losing +/// 0.000567 tokens. +/// In the case of a burnMint pool on chain A, these funds are burned in the pool on chain A. +/// In the case of a lockRelease pool on chain A, these funds accumulate in the pool on chain A. +abstract contract TokenPool is IPoolV1, Ownable2StepMsgSender { + using EnumerableSet for EnumerableSet.Bytes32Set; using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; using RateLimiter for RateLimiter.TokenBucket; @@ -32,6 +46,11 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { error InvalidSourcePoolAddress(bytes sourcePoolAddress); error InvalidToken(address token); error Unauthorized(address caller); + error PoolAlreadyAdded(uint64 remoteChainSelector, bytes remotePoolAddress); + error InvalidRemotePoolForChain(uint64 remoteChainSelector, bytes remotePoolAddress); + error InvalidRemoteChainDecimals(bytes sourcePoolData); + error OverflowDetected(uint8 remoteDecimals, uint8 localDecimals, uint256 remoteAmount); + error InvalidDecimalArgs(uint8 expected, uint8 actual); event Locked(address indexed sender, uint256 amount); event Burned(address indexed sender, uint256 amount); @@ -49,16 +68,17 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { RateLimiter.Config inboundRateLimiterConfig ); event ChainRemoved(uint64 remoteChainSelector); - event RemotePoolSet(uint64 indexed remoteChainSelector, bytes previousPoolAddress, bytes remotePoolAddress); + event RemotePoolAdded(uint64 indexed remoteChainSelector, bytes remotePoolAddress); + event RemotePoolRemoved(uint64 indexed remoteChainSelector, bytes remotePoolAddress); event AllowListAdd(address sender); event AllowListRemove(address sender); event RouterUpdated(address oldRouter, address newRouter); + event RateLimitAdminSet(address rateLimitAdmin); struct ChainUpdate { - uint64 remoteChainSelector; // ──╮ Remote chain selector - bool allowed; // ────────────────╯ Whether the chain should be enabled - bytes remotePoolAddress; // Address of the remote pool, ABI encoded in the case of a remote EVM chain. - bytes remoteTokenAddress; // Address of the remote token, ABI encoded in the case of a remote EVM chain. + uint64 remoteChainSelector; // Remote chain selector + bytes[] remotePoolAddresses; // Address of the remote pool, ABI encoded in the case of a remote EVM chain. + bytes remoteTokenAddress; // Address of the remote token, ABI encoded in the case of a remote EVM chain. RateLimiter.Config outboundRateLimiterConfig; // Outbound rate limited config, meaning the rate limits for all of the onRamps for the given chain RateLimiter.Config inboundRateLimiterConfig; // Inbound rate limited config, meaning the rate limits for all of the offRamps for the given chain } @@ -66,21 +86,23 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { struct RemoteChainConfig { RateLimiter.TokenBucket outboundRateLimiterConfig; // Outbound rate limited config, meaning the rate limits for all of the onRamps for the given chain RateLimiter.TokenBucket inboundRateLimiterConfig; // Inbound rate limited config, meaning the rate limits for all of the offRamps for the given chain - bytes remotePoolAddress; // Address of the remote pool, ABI encoded in the case of a remote EVM chain. bytes remoteTokenAddress; // Address of the remote token, ABI encoded in the case of a remote EVM chain. + EnumerableSet.Bytes32Set remotePools; // Set of remote pool hashes, ABI encoded in the case of a remote EVM chain. } - /// @dev The bridgeable token that is managed by this pool. + /// @dev The bridgeable token that is managed by this pool. Pools could support multiple tokens at the same time if + /// required, but this implementation only supports one token. IERC20 internal immutable i_token; + /// @dev The number of decimals of the token managed by this pool. + uint8 internal immutable i_tokenDecimals; /// @dev The address of the RMN proxy address internal immutable i_rmnProxy; /// @dev The immutable flag that indicates if the pool is access-controlled. bool internal immutable i_allowlistEnabled; /// @dev A set of addresses allowed to trigger lockOrBurn as original senders. /// Only takes effect if i_allowlistEnabled is true. - /// This can be used to ensure only token-issuer specified addresses can - /// move tokens. - EnumerableSet.AddressSet internal s_allowList; + /// This can be used to ensure only token-issuer specified addresses can move tokens. + EnumerableSet.AddressSet internal s_allowlist; /// @dev The address of the router IRouter internal s_router; /// @dev A set of allowed chain selectors. We want the allowlist to be enumerable to @@ -88,14 +110,28 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @dev The chain selectors are in uint256 format because of the EnumerableSet implementation. EnumerableSet.UintSet internal s_remoteChainSelectors; mapping(uint64 remoteChainSelector => RemoteChainConfig) internal s_remoteChainConfigs; + /// @notice A mapping of hashed pool addresses to their unhashed form. This is used to be able to find the actually + /// configured pools and not just their hashed versions. + mapping(bytes32 poolAddressHash => bytes poolAddress) internal s_remotePoolAddresses; /// @notice The address of the rate limiter admin. /// @dev Can be address(0) if none is configured. address internal s_rateLimitAdmin; - constructor(IERC20 token, address[] memory allowlist, address rmnProxy, address router) { + constructor(IERC20 token, uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router) { if (address(token) == address(0) || router == address(0) || rmnProxy == address(0)) revert ZeroAddressNotAllowed(); i_token = token; i_rmnProxy = rmnProxy; + + try IERC20Metadata(address(token)).decimals() returns (uint8 actualTokenDecimals) { + if (localTokenDecimals != actualTokenDecimals) { + revert InvalidDecimalArgs(localTokenDecimals, actualTokenDecimals); + } + } catch { + // The decimals function doesn't exist, which is possible since it's optional in the ERC20 spec. We skip the check and + // assume the supplied token decimals are correct. + } + i_tokenDecimals = localTokenDecimals; + s_router = IRouter(router); // Pool can be set as permissioned or permissionless at deployment time only to save hot-path gas. @@ -105,14 +141,10 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { } } - /// @notice Get RMN proxy address - /// @return rmnProxy Address of RMN proxy - function getRmnProxy() public view returns (address rmnProxy) { - return i_rmnProxy; - } - /// @inheritdoc IPoolV1 - function isSupportedToken(address token) public view virtual returns (bool) { + function isSupportedToken( + address token + ) public view virtual returns (bool) { return token == address(i_token); } @@ -122,6 +154,12 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { return i_token; } + /// @notice Get RMN proxy address + /// @return rmnProxy Address of RMN proxy + function getRmnProxy() public view returns (address rmnProxy) { + return i_rmnProxy; + } + /// @notice Gets the pool's Router /// @return router The pool's Router function getRouter() public view returns (address router) { @@ -130,7 +168,9 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @notice Sets the pool's Router /// @param newRouter The new Router - function setRouter(address newRouter) public onlyOwner { + function setRouter( + address newRouter + ) public onlyOwner { if (newRouter == address(0)) revert ZeroAddressNotAllowed(); address oldRouter = address(s_router); s_router = IRouter(newRouter); @@ -139,7 +179,9 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { } /// @notice Signals which version of the pool interface is supported - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { return interfaceId == Pool.CCIP_POOL_V1 || interfaceId == type(IPoolV1).interfaceId || interfaceId == type(IERC165).interfaceId; } @@ -157,7 +199,9 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @param lockOrBurnIn The input to validate. /// @dev This function should always be called before executing a lock or burn. Not doing so would allow /// for various exploits. - function _validateLockOrBurn(Pool.LockOrBurnInV1 memory lockOrBurnIn) internal { + function _validateLockOrBurn( + Pool.LockOrBurnInV1 calldata lockOrBurnIn + ) internal { if (!isSupportedToken(lockOrBurnIn.localToken)) revert InvalidToken(lockOrBurnIn.localToken); if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(lockOrBurnIn.remoteChainSelector)))) revert CursedByRMN(); _checkAllowList(lockOrBurnIn.originalSender); @@ -175,22 +219,84 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @param releaseOrMintIn The input to validate. /// @dev This function should always be called before executing a release or mint. Not doing so would allow /// for various exploits. - function _validateReleaseOrMint(Pool.ReleaseOrMintInV1 memory releaseOrMintIn) internal { + function _validateReleaseOrMint( + Pool.ReleaseOrMintInV1 calldata releaseOrMintIn + ) internal { if (!isSupportedToken(releaseOrMintIn.localToken)) revert InvalidToken(releaseOrMintIn.localToken); if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(releaseOrMintIn.remoteChainSelector)))) revert CursedByRMN(); _onlyOffRamp(releaseOrMintIn.remoteChainSelector); // Validates that the source pool address is configured on this pool. - bytes memory configuredRemotePool = getRemotePool(releaseOrMintIn.remoteChainSelector); - if ( - configuredRemotePool.length == 0 - || keccak256(releaseOrMintIn.sourcePoolAddress) != keccak256(configuredRemotePool) - ) { + if (!isRemotePool(releaseOrMintIn.remoteChainSelector, releaseOrMintIn.sourcePoolAddress)) { revert InvalidSourcePoolAddress(releaseOrMintIn.sourcePoolAddress); } + _consumeInboundRateLimit(releaseOrMintIn.remoteChainSelector, releaseOrMintIn.amount); } + // ================================================================ + // │ Token decimals │ + // ================================================================ + + /// @notice Gets the IERC20 token decimals on the local chain. + function getTokenDecimals() public view virtual returns (uint8 decimals) { + return i_tokenDecimals; + } + + function _encodeLocalDecimals() internal view virtual returns (bytes memory) { + return abi.encode(i_tokenDecimals); + } + + function _parseRemoteDecimals( + bytes memory sourcePoolData + ) internal view virtual returns (uint8) { + // Fallback to the local token decimals if the source pool data is empty. This allows for backwards compatibility. + if (sourcePoolData.length == 0) { + return i_tokenDecimals; + } + if (sourcePoolData.length != 32) { + revert InvalidRemoteChainDecimals(sourcePoolData); + } + uint256 remoteDecimals = abi.decode(sourcePoolData, (uint256)); + if (remoteDecimals > type(uint8).max) { + revert InvalidRemoteChainDecimals(sourcePoolData); + } + return uint8(remoteDecimals); + } + + /// @notice Calculates the local amount based on the remote amount and decimals. + /// @param remoteAmount The amount on the remote chain. + /// @param remoteDecimals The decimals of the token on the remote chain. + /// @return The local amount. + /// @dev This function protects against overflows. If there is a transaction that hits the overflow check, it is + /// probably incorrect as that means the amount cannot be represented on this chain. If the local decimals have been + /// wrongly configured, the token issuer could redeploy the pool with the correct decimals and manually re-execute the + /// CCIP tx to fix the issue. + function _calculateLocalAmount(uint256 remoteAmount, uint8 remoteDecimals) internal view virtual returns (uint256) { + if (remoteDecimals == i_tokenDecimals) { + return remoteAmount; + } + if (remoteDecimals > i_tokenDecimals) { + uint8 decimalsDiff = remoteDecimals - i_tokenDecimals; + if (decimalsDiff > 77) { + // This is a safety check to prevent overflow in the next calculation. + revert OverflowDetected(remoteDecimals, i_tokenDecimals, remoteAmount); + } + // Solidity rounds down so there is no risk of minting more tokens than the remote chain sent. + return remoteAmount / (10 ** decimalsDiff); + } + + // This is a safety check to prevent overflow in the next calculation. + // More than 77 would never fit in a uint256 and would cause an overflow. We also check if the resulting amount + // would overflow. + uint8 diffDecimals = i_tokenDecimals - remoteDecimals; + if (diffDecimals > 77 || remoteAmount > type(uint256).max / (10 ** diffDecimals)) { + revert OverflowDetected(remoteDecimals, i_tokenDecimals, remoteAmount); + } + + return remoteAmount * (10 ** diffDecimals); + } + // ================================================================ // │ Chain permissions │ // ================================================================ @@ -198,31 +304,63 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @notice Gets the pool address on the remote chain. /// @param remoteChainSelector Remote chain selector. /// @dev To support non-evm chains, this value is encoded into bytes - function getRemotePool(uint64 remoteChainSelector) public view returns (bytes memory) { - return s_remoteChainConfigs[remoteChainSelector].remotePoolAddress; + function getRemotePools( + uint64 remoteChainSelector + ) public view returns (bytes[] memory) { + bytes32[] memory remotePoolHashes = s_remoteChainConfigs[remoteChainSelector].remotePools.values(); + + bytes[] memory remotePools = new bytes[](remotePoolHashes.length); + for (uint256 i = 0; i < remotePoolHashes.length; ++i) { + remotePools[i] = s_remotePoolAddresses[remotePoolHashes[i]]; + } + + return remotePools; + } + + /// @notice Checks if the pool address is configured on the remote chain. + /// @param remoteChainSelector Remote chain selector. + /// @param remotePoolAddress The address of the remote pool. + function isRemotePool(uint64 remoteChainSelector, bytes calldata remotePoolAddress) public view returns (bool) { + return s_remoteChainConfigs[remoteChainSelector].remotePools.contains(keccak256(remotePoolAddress)); } /// @notice Gets the token address on the remote chain. /// @param remoteChainSelector Remote chain selector. /// @dev To support non-evm chains, this value is encoded into bytes - function getRemoteToken(uint64 remoteChainSelector) public view returns (bytes memory) { + function getRemoteToken( + uint64 remoteChainSelector + ) public view returns (bytes memory) { return s_remoteChainConfigs[remoteChainSelector].remoteTokenAddress; } - /// @notice Sets the remote pool address for a given chain selector. - /// @param remoteChainSelector The remote chain selector for which the remote pool address is being set. - /// @param remotePoolAddress The address of the remote pool. - function setRemotePool(uint64 remoteChainSelector, bytes calldata remotePoolAddress) external onlyOwner { + /// @notice Adds a remote pool for a given chain selector. This could be due to a pool being upgraded on the remote + /// chain. We don't simply want to replace the old pool as there could still be valid inflight messages from the old + /// pool. This function allows for multiple pools to be added for a single chain selector. + /// @param remoteChainSelector The remote chain selector for which the remote pool address is being added. + /// @param remotePoolAddress The address of the new remote pool. + function addRemotePool(uint64 remoteChainSelector, bytes calldata remotePoolAddress) external onlyOwner { + if (!isSupportedChain(remoteChainSelector)) revert NonExistentChain(remoteChainSelector); + + _setRemotePool(remoteChainSelector, remotePoolAddress); + } + + /// @notice Removes the remote pool address for a given chain selector. + /// @dev All inflight txs from the remote pool will be rejected after it is removed. To ensure no loss of funds, there + /// should be no inflight txs from the given pool. + function removeRemotePool(uint64 remoteChainSelector, bytes calldata remotePoolAddress) external onlyOwner { if (!isSupportedChain(remoteChainSelector)) revert NonExistentChain(remoteChainSelector); - bytes memory prevAddress = s_remoteChainConfigs[remoteChainSelector].remotePoolAddress; - s_remoteChainConfigs[remoteChainSelector].remotePoolAddress = remotePoolAddress; + if (!s_remoteChainConfigs[remoteChainSelector].remotePools.remove(keccak256(remotePoolAddress))) { + revert InvalidRemotePoolForChain(remoteChainSelector, remotePoolAddress); + } - emit RemotePoolSet(remoteChainSelector, prevAddress, remotePoolAddress); + emit RemotePoolRemoved(remoteChainSelector, remotePoolAddress); } /// @inheritdoc IPoolV1 - function isSupportedChain(uint64 remoteChainSelector) public view returns (bool) { + function isSupportedChain( + uint64 remoteChainSelector + ) public view returns (bool) { return s_remoteChainSelectors.contains(remoteChainSelector); } @@ -240,72 +378,128 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @notice Sets the permissions for a list of chains selectors. Actual senders for these chains /// need to be allowed on the Router to interact with this pool. - /// @dev Only callable by the owner - /// @param chains A list of chains and their new permission status & rate limits. Rate limits + /// @param remoteChainSelectorsToRemove A list of chain selectors to remove. + /// @param chainsToAdd A list of chains and their new permission status & rate limits. Rate limits /// are only used when the chain is being added through `allowed` being true. - function applyChainUpdates(ChainUpdate[] calldata chains) external virtual onlyOwner { - for (uint256 i = 0; i < chains.length; ++i) { - ChainUpdate memory update = chains[i]; - RateLimiter._validateTokenBucketConfig(update.outboundRateLimiterConfig, !update.allowed); - RateLimiter._validateTokenBucketConfig(update.inboundRateLimiterConfig, !update.allowed); - - if (update.allowed) { - // If the chain already exists, revert - if (!s_remoteChainSelectors.add(update.remoteChainSelector)) { - revert ChainAlreadyExists(update.remoteChainSelector); - } - - if (update.remotePoolAddress.length == 0 || update.remoteTokenAddress.length == 0) { - revert ZeroAddressNotAllowed(); - } - - s_remoteChainConfigs[update.remoteChainSelector] = RemoteChainConfig({ - outboundRateLimiterConfig: RateLimiter.TokenBucket({ - rate: update.outboundRateLimiterConfig.rate, - capacity: update.outboundRateLimiterConfig.capacity, - tokens: update.outboundRateLimiterConfig.capacity, - lastUpdated: uint32(block.timestamp), - isEnabled: update.outboundRateLimiterConfig.isEnabled - }), - inboundRateLimiterConfig: RateLimiter.TokenBucket({ - rate: update.inboundRateLimiterConfig.rate, - capacity: update.inboundRateLimiterConfig.capacity, - tokens: update.inboundRateLimiterConfig.capacity, - lastUpdated: uint32(block.timestamp), - isEnabled: update.inboundRateLimiterConfig.isEnabled - }), - remotePoolAddress: update.remotePoolAddress, - remoteTokenAddress: update.remoteTokenAddress - }); - - emit ChainAdded( - update.remoteChainSelector, - update.remoteTokenAddress, - update.outboundRateLimiterConfig, - update.inboundRateLimiterConfig - ); - } else { - // If the chain doesn't exist, revert - if (!s_remoteChainSelectors.remove(update.remoteChainSelector)) { - revert NonExistentChain(update.remoteChainSelector); - } - - delete s_remoteChainConfigs[update.remoteChainSelector]; - - emit ChainRemoved(update.remoteChainSelector); + /// @dev Only callable by the owner + function applyChainUpdates( + uint64[] calldata remoteChainSelectorsToRemove, + ChainUpdate[] calldata chainsToAdd + ) external virtual onlyOwner { + for (uint256 i = 0; i < remoteChainSelectorsToRemove.length; ++i) { + uint64 remoteChainSelectorToRemove = remoteChainSelectorsToRemove[i]; + // If the chain doesn't exist, revert + if (!s_remoteChainSelectors.remove(remoteChainSelectorToRemove)) { + revert NonExistentChain(remoteChainSelectorToRemove); + } + + // Remove all remote pool hashes for the chain + bytes32[] memory remotePools = s_remoteChainConfigs[remoteChainSelectorToRemove].remotePools.values(); + for (uint256 j = 0; j < remotePools.length; ++j) { + s_remoteChainConfigs[remoteChainSelectorToRemove].remotePools.remove(remotePools[j]); + } + + delete s_remoteChainConfigs[remoteChainSelectorToRemove]; + + emit ChainRemoved(remoteChainSelectorToRemove); + } + + for (uint256 i = 0; i < chainsToAdd.length; ++i) { + ChainUpdate memory newChain = chainsToAdd[i]; + RateLimiter._validateTokenBucketConfig(newChain.outboundRateLimiterConfig, false); + RateLimiter._validateTokenBucketConfig(newChain.inboundRateLimiterConfig, false); + + if (newChain.remoteTokenAddress.length == 0) { + revert ZeroAddressNotAllowed(); + } + + // If the chain already exists, revert + if (!s_remoteChainSelectors.add(newChain.remoteChainSelector)) { + revert ChainAlreadyExists(newChain.remoteChainSelector); + } + + RemoteChainConfig storage remoteChainConfig = s_remoteChainConfigs[newChain.remoteChainSelector]; + + remoteChainConfig.outboundRateLimiterConfig = RateLimiter.TokenBucket({ + rate: newChain.outboundRateLimiterConfig.rate, + capacity: newChain.outboundRateLimiterConfig.capacity, + tokens: newChain.outboundRateLimiterConfig.capacity, + lastUpdated: uint32(block.timestamp), + isEnabled: newChain.outboundRateLimiterConfig.isEnabled + }); + remoteChainConfig.inboundRateLimiterConfig = RateLimiter.TokenBucket({ + rate: newChain.inboundRateLimiterConfig.rate, + capacity: newChain.inboundRateLimiterConfig.capacity, + tokens: newChain.inboundRateLimiterConfig.capacity, + lastUpdated: uint32(block.timestamp), + isEnabled: newChain.inboundRateLimiterConfig.isEnabled + }); + remoteChainConfig.remoteTokenAddress = newChain.remoteTokenAddress; + + for (uint256 j = 0; j < newChain.remotePoolAddresses.length; ++j) { + _setRemotePool(newChain.remoteChainSelector, newChain.remotePoolAddresses[j]); } + + emit ChainAdded( + newChain.remoteChainSelector, + newChain.remoteTokenAddress, + newChain.outboundRateLimiterConfig, + newChain.inboundRateLimiterConfig + ); + } + } + + /// @notice Adds a pool address to the allowed remote token pools for a particular chain. + /// @param remoteChainSelector The remote chain selector for which the remote pool address is being added. + /// @param remotePoolAddress The address of the new remote pool. + function _setRemotePool(uint64 remoteChainSelector, bytes memory remotePoolAddress) internal { + if (remotePoolAddress.length == 0) { + revert ZeroAddressNotAllowed(); + } + + bytes32 poolHash = keccak256(remotePoolAddress); + + // Check if the pool already exists. + if (!s_remoteChainConfigs[remoteChainSelector].remotePools.add(poolHash)) { + revert PoolAlreadyAdded(remoteChainSelector, remotePoolAddress); } + + // Add the pool to the mapping to be able to un-hash it later. + s_remotePoolAddresses[poolHash] = remotePoolAddress; + + emit RemotePoolAdded(remoteChainSelector, remotePoolAddress); } // ================================================================ // │ Rate limiting │ // ================================================================ + /// @dev The inbound rate limits should be slightly higher than the outbound rate limits. This is because many chains + /// finalize blocks in batches. CCIP also commits messages in batches: the commit plugin bundles multiple messages in + /// a single merkle root. + /// Imagine the following scenario. + /// - Chain A has an inbound and outbound rate limit of 100 tokens capacity and 1 token per second refill rate. + /// - Chain B has an inbound and outbound rate limit of 100 tokens capacity and 1 token per second refill rate. + /// + /// At time 0: + /// - Chain A sends 100 tokens to Chain B. + /// At time 5: + /// - Chain A sends 5 tokens to Chain B. + /// At time 6: + /// The epoch that contains blocks [0-5] is finalized. + /// Both transactions will be included in the same merkle root and become executable at the same time. This means + /// the token pool on chain B requires a capacity of 105 to successfully execute both messages at the same time. + /// The exact additional capacity required depends on the refill rate and the size of the source chain epochs and the + /// CCIP round time. For simplicity, a 5-10% buffer should be sufficient in most cases. + /// @notice Sets the rate limiter admin address. /// @dev Only callable by the owner. /// @param rateLimitAdmin The new rate limiter admin address. - function setRateLimitAdmin(address rateLimitAdmin) external onlyOwner { + function setRateLimitAdmin( + address rateLimitAdmin + ) external onlyOwner { s_rateLimitAdmin = rateLimitAdmin; + emit RateLimitAdminSet(rateLimitAdmin); } /// @notice Gets the rate limiter admin address. @@ -372,14 +566,18 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned onRamp for the given chain on the Router. - function _onlyOnRamp(uint64 remoteChainSelector) internal view { + function _onlyOnRamp( + uint64 remoteChainSelector + ) internal view { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!(msg.sender == s_router.getOnRamp(remoteChainSelector))) revert CallerIsNotARampOnRouter(msg.sender); } /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned offRamp for the given chain on the Router. - function _onlyOffRamp(uint64 remoteChainSelector) internal view { + function _onlyOffRamp( + uint64 remoteChainSelector + ) internal view { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!s_router.isOffRamp(remoteChainSelector, msg.sender)) revert CallerIsNotARampOnRouter(msg.sender); } @@ -388,15 +586,17 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { // │ Allowlist │ // ================================================================ - function _checkAllowList(address sender) internal view { + function _checkAllowList( + address sender + ) internal view { if (i_allowlistEnabled) { - if (!s_allowList.contains(sender)) { + if (!s_allowlist.contains(sender)) { revert SenderNotAllowed(sender); } } } - /// @notice Gets whether the allowList functionality is enabled. + /// @notice Gets whether the allowlist functionality is enabled. /// @return true is enabled, false if not. function getAllowListEnabled() external view returns (bool) { return i_allowlistEnabled; @@ -405,7 +605,7 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { /// @notice Gets the allowed addresses. /// @return The allowed addresses. function getAllowList() external view returns (address[] memory) { - return s_allowList.values(); + return s_allowlist.values(); } /// @notice Apply updates to the allow list. @@ -421,7 +621,7 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { for (uint256 i = 0; i < removes.length; ++i) { address toRemove = removes[i]; - if (s_allowList.remove(toRemove)) { + if (s_allowlist.remove(toRemove)) { emit AllowListRemove(toRemove); } } @@ -430,7 +630,7 @@ abstract contract TokenPool is IPoolV1, OwnerIsCreator { if (toAdd == address(0)) { continue; } - if (s_allowList.add(toAdd)) { + if (s_allowlist.add(toAdd)) { emit AllowListAdd(toAdd); } } diff --git a/contracts/src/v0.8/ccip/pools/USDC/BurnMintWithLockReleaseFlagTokenPool.sol b/contracts/src/v0.8/ccip/pools/USDC/BurnMintWithLockReleaseFlagTokenPool.sol new file mode 100644 index 0000000000..746df9b4e1 --- /dev/null +++ b/contracts/src/v0.8/ccip/pools/USDC/BurnMintWithLockReleaseFlagTokenPool.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {Pool} from "../../libraries/Pool.sol"; +import {BurnMintTokenPool} from "../BurnMintTokenPool.sol"; +import {LOCK_RELEASE_FLAG} from "./HybridLockReleaseUSDCTokenPool.sol"; + +/// @notice A standard BurnMintTokenPool with modified destPoolData so that the remote pool knows to release tokens +/// instead of minting. This enables interoperability with HybridLockReleaseUSDCTokenPool which uses +// the destPoolData to determine whether to mint or release tokens. +/// @dev The only difference between this contract and BurnMintTokenPool is the destPoolData returns the +/// abi-encoded LOCK_RELEASE_FLAG instead of an empty string. +contract BurnMintWithLockReleaseFlagTokenPool is BurnMintTokenPool { + constructor( + IBurnMintERC20 token, + uint8 localTokenDecimals, + address[] memory allowlist, + address rmnProxy, + address router + ) BurnMintTokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) {} + + /// @notice Burn the token in the pool + /// @dev The _validateLockOrBurn check is an essential security check + /// @dev Performs the exact same functionality as BurnMintTokenPool, but returns the LOCK_RELEASE_FLAG + /// as the destPoolData to signal to the remote pool to release tokens instead of minting them. + function lockOrBurn( + Pool.LockOrBurnInV1 calldata lockOrBurnIn + ) external override returns (Pool.LockOrBurnOutV1 memory) { + _validateLockOrBurn(lockOrBurnIn); + + _burn(lockOrBurnIn.amount); + + emit Burned(msg.sender, lockOrBurnIn.amount); + + // LOCK_RELEASE_FLAG = bytes4(keccak256("NO_CCTP_USE_LOCK_RELEASE")) + return Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), + destPoolData: abi.encode(LOCK_RELEASE_FLAG) + }); + } +} diff --git a/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol b/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol index 5fbd71bb2c..264b1230c7 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/HybridLockReleaseUSDCTokenPool.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.24; import {ILiquidityContainer} from "../../../liquiditymanager/interfaces/ILiquidityContainer.sol"; import {ITokenMessenger} from "../USDC/ITokenMessenger.sol"; -import {OwnerIsCreator} from "../../../shared/access/OwnerIsCreator.sol"; +import {Ownable2StepMsgSender} from "../../../shared/access/Ownable2StepMsgSender.sol"; import {Pool} from "../../libraries/Pool.sol"; import {TokenPool} from "../TokenPool.sol"; import {USDCTokenPool} from "../USDC/USDCTokenPool.sol"; @@ -14,6 +14,9 @@ import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/tok import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; +// bytes4(keccak256("NO_CCTP_USE_LOCK_RELEASE")) +bytes4 constant LOCK_RELEASE_FLAG = 0xfa7c07de; + /// @notice A token pool for USDC which uses CCTP for supported chains and Lock/Release for all others /// @dev The functionality from LockReleaseTokenPool.sol has been duplicated due to lack of compiler support for shared /// constructors between parents @@ -34,9 +37,6 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { error LanePausedForCCTPMigration(uint64 remoteChainSelector); error TokenLockingNotAllowedAfterMigration(uint64 remoteChainSelector); - /// bytes4(keccak256("NO_CTTP_USE_LOCK_RELEASE")) - bytes4 public constant LOCK_RELEASE_FLAG = 0xd43c7897; - /// @notice The address of the liquidity provider for a specific chain. /// External liquidity is not required when there is one canonical token deployed to a chain, /// and CCIP is facilitating mint/burn on all the other chains, in which case the invariant @@ -49,7 +49,7 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { address[] memory allowlist, address rmnProxy, address router - ) USDCTokenPool(tokenMessenger, token, allowlist, rmnProxy, router) USDCBridgeMigrator(address(token), router) {} + ) USDCTokenPool(tokenMessenger, token, allowlist, rmnProxy, router) USDCBridgeMigrator(address(token)) {} // ================================================================ // │ Incoming/Outgoing Mechanisms | @@ -81,7 +81,7 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { ) public virtual override returns (Pool.ReleaseOrMintOutV1 memory) { // Use CCTP Burn/Mint mechanism for chains which have it enabled. The LOCK_RELEASE_FLAG is used in sourcePoolData to // discern this, since the source-chain will not be a hybrid-pool but a standard burn-mint. In the event of a - // stuck message after a migration has occured, and the message was not executed properly before the migration + // stuck message after a migration has occurred, and the message was not executed properly before the migration // began, and locked tokens were not released until now, the message will already have been committed to with this // flag so it is safe to release the tokens. The source USDC pool is trusted to send messages with the correct // flag as well. @@ -99,7 +99,7 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { _validateReleaseOrMint(releaseOrMintIn); // Circle requires a supply-lock to prevent incoming messages once the migration process begins. - // This prevents new outgoing messages once the migration has begun to ensure any the procedure runs as expected + // This prevents new incoming messages once the migration has begun to ensure any the procedure runs as expected if (s_proposedUSDCMigrationChain == releaseOrMintIn.remoteChainSelector) { revert LanePausedForCCTPMigration(s_proposedUSDCMigrationChain); } @@ -114,7 +114,6 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { s_lockedTokensByChainSelector[releaseOrMintIn.remoteChainSelector] -= releaseOrMintIn.amount; } - // Release to the offRamp, which forwards it to the recipient getToken().safeTransfer(releaseOrMintIn.receiver, releaseOrMintIn.amount); emit Released(msg.sender, releaseOrMintIn.receiver, releaseOrMintIn.amount); @@ -145,7 +144,9 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { /// @notice Gets LiquidityManager, can be address(0) if none is configured. /// @return The current liquidity manager for the given chain selector - function getLiquidityProvider(uint64 remoteChainSelector) external view returns (address) { + function getLiquidityProvider( + uint64 remoteChainSelector + ) external view returns (address) { return s_liquidityProvider[remoteChainSelector]; } @@ -171,6 +172,16 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { function provideLiquidity(uint64 remoteChainSelector, uint256 amount) external { if (s_liquidityProvider[remoteChainSelector] != msg.sender) revert TokenPool.Unauthorized(msg.sender); + // Prevent adding liquidity to a chain which has already been migrated + if (s_migratedChains.contains(remoteChainSelector)) { + revert TokenLockingNotAllowedAfterMigration(remoteChainSelector); + } + + // prevent adding liquidity to a chain which has been proposed for migration + if (remoteChainSelector == s_proposedUSDCMigrationChain) { + revert LanePausedForCCTPMigration(remoteChainSelector); + } + s_lockedTokensByChainSelector[remoteChainSelector] += amount; i_token.safeTransferFrom(msg.sender, address(this), amount); @@ -185,7 +196,7 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { /// withdrawn on this chain, otherwise a mismatch may occur between locked token balance and remote circulating supply /// which may block a potential future migration of the chain to CCTP. function withdrawLiquidity(uint64 remoteChainSelector, uint256 amount) external onlyOwner { - // Circle requires a supply-lock to prevent outgoing messages once the migration process begins. + // A supply-lock is required to prevent outgoing messages once the migration process begins. // This prevents new outgoing messages once the migration has begun to ensure any the procedure runs as expected if (remoteChainSelector == s_proposedUSDCMigrationChain) { revert LanePausedForCCTPMigration(remoteChainSelector); @@ -211,16 +222,10 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { /// @param from The address of the old pool. /// @param remoteChainSelector The chain for which liquidity is being transferred. function transferLiquidity(address from, uint64 remoteChainSelector) external onlyOwner { - // Prevent Liquidity Transfers when a migration is pending. This prevents requiring the new pool to manage - // token exclusions for edge-case messages and ensures that the migration is completed before any new liquidity - // is added to the pool. - if (HybridLockReleaseUSDCTokenPool(from).getCurrentProposedCCTPChainMigration() == remoteChainSelector) { - revert LanePausedForCCTPMigration(remoteChainSelector); - } - - OwnerIsCreator(from).acceptOwnership(); + Ownable2StepMsgSender(from).acceptOwnership(); - // Withdraw all available liquidity from the old pool. + // Withdraw all available liquidity from the old pool. No check is needed for pending migrations, as the old pool + // will revert if the migration has begun. uint256 withdrawAmount = HybridLockReleaseUSDCTokenPool(from).getLockedTokensForChain(remoteChainSelector); HybridLockReleaseUSDCTokenPool(from).withdrawLiquidity(remoteChainSelector, withdrawAmount); @@ -235,14 +240,17 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { /// @notice Return whether a lane should use the alternative L/R mechanism in the token pool. /// @param remoteChainSelector the remote chain the lane is interacting with - /// @return bool Return true if the alternative L/R mechanism should be used - function shouldUseLockRelease(uint64 remoteChainSelector) public view virtual returns (bool) { + /// @return bool Return true if the alternative L/R mechanism should be used, and is decided by the Owner + function shouldUseLockRelease( + uint64 remoteChainSelector + ) public view virtual returns (bool) { return s_shouldUseLockRelease[remoteChainSelector]; } - /// @notice Updates Updates designations for chains on whether to use primary or alt mechanism on CCIP messages + /// @notice Updates designations for chains on whether to use primary or alt mechanism on CCIP messages /// @param removes A list of chain selectors to disable Lock-Release, and enforce BM - /// @param adds A list of chain selectors to enable LR instead of BM + /// @param adds A list of chain selectors to enable LR instead of BM. These chains must not have been migrated + /// to CCTP yet or the transaction will revert function updateChainSelectorMechanisms(uint64[] calldata removes, uint64[] calldata adds) external onlyOwner { for (uint256 i = 0; i < removes.length; ++i) { delete s_shouldUseLockRelease[removes[i]]; @@ -250,6 +258,10 @@ contract HybridLockReleaseUSDCTokenPool is USDCTokenPool, USDCBridgeMigrator { } for (uint256 i = 0; i < adds.length; ++i) { + // Prevent enabling lock release on chains which have already been migrated + if (s_migratedChains.contains(adds[i])) { + revert TokenLockingNotAllowedAfterMigration(adds[i]); + } s_shouldUseLockRelease[adds[i]] = true; emit LockReleaseEnabled(adds[i]); } diff --git a/contracts/src/v0.8/ccip/pools/USDC/USDCBridgeMigrator.sol b/contracts/src/v0.8/ccip/pools/USDC/USDCBridgeMigrator.sol index 98616cd79f..1dcecac8b2 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/USDCBridgeMigrator.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/USDCBridgeMigrator.sol @@ -1,16 +1,15 @@ -pragma solidity ^0.8.24; +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; -import {OwnerIsCreator} from "../../../shared/access/OwnerIsCreator.sol"; +import {Ownable2StepMsgSender} from "../../../shared/access/Ownable2StepMsgSender.sol"; import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; -import {Router} from "../../Router.sol"; - /// @notice Allows migration of a lane in a token pool from Lock/Release to CCTP supported Burn/Mint. Contract /// functionality is based on hard requirements defined by Circle to allow for future CCTP compatibility /// https://github.com/circlefin/stablecoin-evm/blob/master/doc/bridged_USDC_standard.md -abstract contract USDCBridgeMigrator is OwnerIsCreator { +abstract contract USDCBridgeMigrator is Ownable2StepMsgSender { using EnumerableSet for EnumerableSet.UintSet; event CCTPMigrationProposed(uint64 remoteChainSelector); @@ -23,12 +22,10 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { error onlyCircle(); error ExistingMigrationProposal(); - error NoExistingMigrationProposal(); error NoMigrationProposalPending(); - error InvalidChainSelector(uint64 remoteChainSelector); + error InvalidChainSelector(); - IBurnMintERC20 internal immutable i_USDC; - Router internal immutable i_router; + IBurnMintERC20 private immutable i_USDC; address internal s_circleUSDCMigrator; uint64 internal s_proposedUSDCMigrationChain; @@ -38,9 +35,12 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { mapping(uint64 chainSelector => bool shouldUseLockRelease) internal s_shouldUseLockRelease; - constructor(address token, address router) { + EnumerableSet.UintSet internal s_migratedChains; + + constructor( + address token + ) { i_USDC = IBurnMintERC20(token); - i_router = Router(router); } /// @notice Burn USDC locked for a specific lane so that destination USDC can be converted from @@ -49,9 +49,9 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// @dev proposeCCTPMigration must be called first on an approved lane to execute properly. /// @dev This function signature should NEVER be overwritten, otherwise it will be unable to be called by /// circle to properly migrate USDC over to CCTP. - function burnLockedUSDC() public { + function burnLockedUSDC() external { if (msg.sender != s_circleUSDCMigrator) revert onlyCircle(); - if (s_proposedUSDCMigrationChain == 0) revert ExistingMigrationProposal(); + if (s_proposedUSDCMigrationChain == 0) revert NoMigrationProposalPending(); uint64 burnChainSelector = s_proposedUSDCMigrationChain; @@ -71,6 +71,8 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { // Disable L/R automatically on burned chain and enable CCTP delete s_shouldUseLockRelease[burnChainSelector]; + s_migratedChains.add(burnChainSelector); + emit CCTPMigrationExecuted(burnChainSelector, tokensToBurn); } @@ -80,10 +82,15 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// non-canonical form of USDC which they wish to update to canonical. Function will revert if an existing migration /// proposal is already in progress. /// @dev This function can only be called by the owner - function proposeCCTPMigration(uint64 remoteChainSelector) external onlyOwner { + function proposeCCTPMigration( + uint64 remoteChainSelector + ) external onlyOwner { // Prevent overwriting existing migration proposals until the current one is finished if (s_proposedUSDCMigrationChain != 0) revert ExistingMigrationProposal(); + // Ensure that the chain is currently using lock/release and not CCTP + if (!s_shouldUseLockRelease[remoteChainSelector]) revert InvalidChainSelector(); + s_proposedUSDCMigrationChain = remoteChainSelector; emit CCTPMigrationProposed(remoteChainSelector); @@ -92,7 +99,7 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// @notice Cancel an existing proposal to migrate a lane to CCTP. /// @notice This function will revert if no proposal is currently in progress. function cancelExistingCCTPMigrationProposal() external onlyOwner { - if (s_proposedUSDCMigrationChain == 0) revert NoExistingMigrationProposal(); + if (s_proposedUSDCMigrationChain == 0) revert NoMigrationProposalPending(); uint64 currentProposalChainSelector = s_proposedUSDCMigrationChain; delete s_proposedUSDCMigrationChain; @@ -114,7 +121,9 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// @notice Set the address of the circle-controlled wallet which will execute a CCTP lane migration /// @dev The function should only be invoked once the address has been confirmed by Circle prior to /// chain expansion. - function setCircleMigratorAddress(address migrator) external onlyOwner { + function setCircleMigratorAddress( + address migrator + ) external onlyOwner { s_circleUSDCMigrator = migrator; emit CircleMigratorAddressSet(migrator); @@ -125,7 +134,9 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// non-canonical form of USDC at present. /// @return uint256 the amount of USDC locked into the specified lane. If non-zero, the number /// should match the current circulating supply of USDC on the destination chain - function getLockedTokensForChain(uint64 remoteChainSelector) public view returns (uint256) { + function getLockedTokensForChain( + uint64 remoteChainSelector + ) public view returns (uint256) { return s_lockedTokensByChainSelector[remoteChainSelector]; } @@ -136,6 +147,8 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// @dev This function should ONLY be called on the home chain, where tokens are locked, NOT on the remote chain /// and strict scrutiny should be applied to ensure that the amount of tokens excluded is accurate. function excludeTokensFromBurn(uint64 remoteChainSelector, uint256 amount) external onlyOwner { + if (s_proposedUSDCMigrationChain != remoteChainSelector) revert NoMigrationProposalPending(); + s_tokensExcludedFromBurn[remoteChainSelector] += amount; uint256 burnableAmountAfterExclusion = @@ -148,7 +161,9 @@ abstract contract USDCBridgeMigrator is OwnerIsCreator { /// @dev The sum of locked tokens and excluded tokens should equal the supply of the token on the remote chain /// @param remoteChainSelector The chain for which the excluded tokens are being queried /// @return uint256 amount of tokens excluded from being burned in a CCTP-migration - function getExcludedTokensByChain(uint64 remoteChainSelector) public view returns (uint256) { + function getExcludedTokensByChain( + uint64 remoteChainSelector + ) external view returns (uint256) { return s_tokensExcludedFromBurn[remoteChainSelector]; } } diff --git a/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol b/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol index 56ab40c9b5..5998e52f15 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol @@ -50,7 +50,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { uint32 sourceDomain; } - string public constant override typeAndVersion = "USDCTokenPool 1.5.0"; + string public constant override typeAndVersion = "USDCTokenPool 1.5.1"; // We restrict to the first version. New pool may be required for subsequent versions. uint32 public constant SUPPORTED_USDC_VERSION = 0; @@ -78,7 +78,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { address[] memory allowlist, address rmnProxy, address router - ) TokenPool(token, allowlist, rmnProxy, router) { + ) TokenPool(token, 6, allowlist, rmnProxy, router) { if (address(tokenMessenger) == address(0)) revert InvalidConfig(); IMessageTransmitter transmitter = IMessageTransmitter(tokenMessenger.localMessageTransmitter()); uint32 transmitterVersion = transmitter.version(); @@ -126,7 +126,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { /// @notice Mint tokens from the pool to the recipient /// * sourceTokenData is part of the verified message and passed directly from - /// the offramp so it is guaranteed to be what the lockOrBurn pool released on the + /// the offRamp so it is guaranteed to be what the lockOrBurn pool released on the /// source chain. It contains (nonce, sourceDomain) which is guaranteed by CCTP /// to be unique. /// * offchainTokenData is untrusted (can be supplied by manual execution), but we assert @@ -206,13 +206,17 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { // ================================================================ /// @notice Gets the CCTP domain for a given CCIP chain selector. - function getDomain(uint64 chainSelector) external view returns (Domain memory) { + function getDomain( + uint64 chainSelector + ) external view returns (Domain memory) { return s_chainToDomain[chainSelector]; } /// @notice Sets the CCTP domain for a CCIP chain selector. /// @dev Must verify mapping of selectors -> (domain, caller) offchain. - function setDomains(DomainUpdate[] calldata domains) external onlyOwner { + function setDomains( + DomainUpdate[] calldata domains + ) external onlyOwner { for (uint256 i = 0; i < domains.length; ++i) { DomainUpdate memory domain = domains[i]; if (domain.allowedCaller == bytes32(0) || domain.destChainSelector == 0) revert InvalidDomain(domain); diff --git a/contracts/src/v0.8/ccip/rmn/RMNHome.sol b/contracts/src/v0.8/ccip/rmn/RMNHome.sol index d13385aed8..978b200213 100644 --- a/contracts/src/v0.8/ccip/rmn/RMNHome.sol +++ b/contracts/src/v0.8/ccip/rmn/RMNHome.sol @@ -161,7 +161,9 @@ contract RMNHome is OwnerIsCreator, ITypeAndVersion { /// @param configDigest The digest of the config to fetch. /// @return versionedConfig The config and its version. /// @return ok True if the config was found, false otherwise. - function getConfig(bytes32 configDigest) external view returns (VersionedConfig memory versionedConfig, bool ok) { + function getConfig( + bytes32 configDigest + ) external view returns (VersionedConfig memory versionedConfig, bool ok) { for (uint256 i = 0; i < MAX_CONCURRENT_CONFIGS; ++i) { // We never want to return true for a zero digest, even if the caller is asking for it, as this can expose old // config state that is invalid. @@ -236,7 +238,9 @@ contract RMNHome is OwnerIsCreator, ITypeAndVersion { /// remove it without it ever having to be promoted. It's also possible to revoke the candidate config by setting a /// newer candidate config using `setCandidate`. /// @param configDigest The digest of the config to revoke. This is done to prevent accidental revokes. - function revokeCandidate(bytes32 configDigest) external onlyOwner { + function revokeCandidate( + bytes32 configDigest + ) external onlyOwner { if (configDigest == ZERO_DIGEST) { revert RevokingZeroDigestNotAllowed(); } diff --git a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol index 0d38da22b3..6a4366e29f 100644 --- a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol +++ b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol @@ -76,7 +76,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { mapping(address signer => bool exists) private s_signers; // for more gas efficient verify /// @param localChainSelector the chain selector of the chain this contract is deployed to - constructor(uint64 localChainSelector) { + constructor( + uint64 localChainSelector + ) { if (localChainSelector == 0) revert ZeroValueNotAllowed(); i_localChainSelector = localChainSelector; } @@ -130,7 +132,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { /// @notice Sets the configuration of the contract /// @param newConfig the new configuration /// @dev setting config is atomic; we delete all pre-existing config and set everything from scratch - function setConfig(Config calldata newConfig) external onlyOwner { + function setConfig( + Config calldata newConfig + ) external onlyOwner { // signers are in ascending order of nodeIndex for (uint256 i = 1; i < newConfig.signers.length; ++i) { if (!(newConfig.signers[i - 1].nodeIndex < newConfig.signers[i].nodeIndex)) { @@ -186,7 +190,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { /// @notice Curse a single subject /// @param subject the subject to curse - function curse(bytes16 subject) external { + function curse( + bytes16 subject + ) external { bytes16[] memory subjects = new bytes16[](1); subjects[0] = subject; curse(subjects); @@ -195,7 +201,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { /// @notice Curse an array of subjects /// @param subjects the subjects to curse /// @dev reverts if any of the subjects are already cursed or if there is a duplicate - function curse(bytes16[] memory subjects) public onlyOwner { + function curse( + bytes16[] memory subjects + ) public onlyOwner { for (uint256 i = 0; i < subjects.length; ++i) { if (!s_cursedSubjects.add(subjects[i])) { revert AlreadyCursed(subjects[i]); @@ -206,7 +214,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { /// @notice Uncurse a single subject /// @param subject the subject to uncurse - function uncurse(bytes16 subject) external { + function uncurse( + bytes16 subject + ) external { bytes16[] memory subjects = new bytes16[](1); subjects[0] = subject; uncurse(subjects); @@ -215,7 +225,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { /// @notice Uncurse an array of subjects /// @param subjects the subjects to uncurse /// @dev reverts if any of the subjects are not cursed or if there is a duplicate - function uncurse(bytes16[] memory subjects) public onlyOwner { + function uncurse( + bytes16[] memory subjects + ) public onlyOwner { for (uint256 i = 0; i < subjects.length; ++i) { if (!s_cursedSubjects.remove(subjects[i])) { revert NotCursed(subjects[i]); @@ -238,7 +250,9 @@ contract RMNRemote is OwnerIsCreator, ITypeAndVersion, IRMNRemote { } /// @inheritdoc IRMNRemote - function isCursed(bytes16 subject) external view returns (bool) { + function isCursed( + bytes16 subject + ) external view returns (bool) { if (s_cursedSubjects.length() == 0) { return false; } diff --git a/contracts/src/v0.8/ccip/test/BaseTest.t.sol b/contracts/src/v0.8/ccip/test/BaseTest.t.sol index 0c4d7d632c..2bffe9c143 100644 --- a/contracts/src/v0.8/ccip/test/BaseTest.t.sol +++ b/contracts/src/v0.8/ccip/test/BaseTest.t.sol @@ -42,6 +42,7 @@ contract BaseTest is Test { uint16 internal constant DEFAULT_TOKEN_FEE_USD_CENTS = 50; uint32 internal constant DEFAULT_TOKEN_DEST_GAS_OVERHEAD = 90_000; uint32 internal constant DEFAULT_TOKEN_BYTES_OVERHEAD = 32; + uint8 internal constant DEFAULT_TOKEN_DECIMALS = 18; bool private s_baseTestInitialized; @@ -99,7 +100,9 @@ contract BaseTest is Test { vm.mockCall(address(s_mockRMNRemote), abi.encodeWithSignature("isCursed(bytes16)"), abi.encode(false)); // no curses by defaule } - function _setMockRMNGlobalCurse(bool isCursed) internal { + function _setMockRMNGlobalCurse( + bool isCursed + ) internal { vm.mockCall(address(s_mockRMNRemote), abi.encodeWithSignature("isCursed()"), abi.encode(isCursed)); } diff --git a/contracts/src/v0.8/ccip/test/TokenSetup.t.sol b/contracts/src/v0.8/ccip/test/TokenSetup.t.sol index 203145881e..4996b0b740 100644 --- a/contracts/src/v0.8/ccip/test/TokenSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/TokenSetup.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {BurnMintERC677} from "../../shared/token/ERC677/BurnMintERC677.sol"; +import {BurnMintERC20} from "../../shared/token/ERC20/BurnMintERC20.sol"; import {Client} from "../libraries/Client.sol"; import {BurnMintTokenPool} from "../pools/BurnMintTokenPool.sol"; import {LockReleaseTokenPool} from "../pools/LockReleaseTokenPool.sol"; @@ -27,14 +27,14 @@ contract TokenSetup is RouterSetup { mapping(address sourceToken => address destToken) internal s_destTokenBySourceToken; function _deploySourceToken(string memory tokenName, uint256 dealAmount, uint8 decimals) internal returns (address) { - BurnMintERC677 token = new BurnMintERC677(tokenName, tokenName, decimals, 0); + BurnMintERC20 token = new BurnMintERC20(tokenName, tokenName, decimals, 0, 0); s_sourceTokens.push(address(token)); deal(address(token), OWNER, dealAmount); return address(token); } function _deployDestToken(string memory tokenName, uint256 dealAmount) internal returns (address) { - BurnMintERC677 token = new BurnMintERC677(tokenName, tokenName, 18, 0); + BurnMintERC20 token = new BurnMintERC20(tokenName, tokenName, 18, 0, 0); s_destTokens.push(address(token)); deal(address(token), OWNER, dealAmount); return address(token); @@ -46,8 +46,9 @@ contract TokenSetup is RouterSetup { router = address(s_destRouter); } - LockReleaseTokenPool pool = - new LockReleaseTokenPool(IERC20(token), new address[](0), address(s_mockRMN), true, router); + LockReleaseTokenPool pool = new LockReleaseTokenPool( + IERC20(token), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), true, router + ); if (isSourcePool) { s_sourcePoolByToken[address(token)] = address(pool); @@ -63,9 +64,10 @@ contract TokenSetup is RouterSetup { router = address(s_destRouter); } - BurnMintTokenPool pool = - new MaybeRevertingBurnMintTokenPool(BurnMintERC677(token), new address[](0), address(s_mockRMN), router); - BurnMintERC677(token).grantMintAndBurnRoles(address(pool)); + BurnMintTokenPool pool = new MaybeRevertingBurnMintTokenPool( + BurnMintERC20(token), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), router + ); + BurnMintERC20(token).grantMintAndBurnRoles(address(pool)); if (isSourcePool) { s_sourcePoolByToken[address(token)] = address(pool); @@ -136,18 +138,6 @@ contract TokenSetup is RouterSetup { } } - function _getCastedSourceEVMTokenAmountsWithZeroAmounts() - internal - view - returns (Client.EVMTokenAmount[] memory tokenAmounts) - { - tokenAmounts = new Client.EVMTokenAmount[](s_sourceTokens.length); - for (uint256 i = 0; i < tokenAmounts.length; ++i) { - tokenAmounts[i].token = s_sourceTokens[i]; - } - return tokenAmounts; - } - function _setPool( TokenAdminRegistry tokenAdminRegistry, address token, @@ -163,16 +153,30 @@ contract TokenSetup is RouterSetup { tokenAdminRegistry.setPool(token, pool); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(remotePoolAddress); + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ remoteChainSelector: remoteChainSelector, - remotePoolAddress: abi.encode(remotePoolAddress), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(remoteToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - TokenPool(pool).applyChainUpdates(chainUpdates); + TokenPool(pool).applyChainUpdates(new uint64[](0), chainUpdates); + } + + function _getCastedSourceEVMTokenAmountsWithZeroAmounts() + internal + view + returns (Client.EVMTokenAmount[] memory tokenAmounts) + { + tokenAmounts = new Client.EVMTokenAmount[](s_sourceTokens.length); + for (uint256 i = 0; i < tokenAmounts.length; ++i) { + tokenAmounts[i].token = s_sourceTokens[i]; + } + return tokenAmounts; } } diff --git a/contracts/src/v0.8/ccip/test/WETH9.sol b/contracts/src/v0.8/ccip/test/WETH9.sol index fbc19ee2c4..bfd2b5f022 100644 --- a/contracts/src/v0.8/ccip/test/WETH9.sol +++ b/contracts/src/v0.8/ccip/test/WETH9.sol @@ -43,7 +43,9 @@ contract WETH9 { _deposit(); } - function withdraw(uint256 wad) external { + function withdraw( + uint256 wad + ) external { require(balanceOf[msg.sender] >= wad); balanceOf[msg.sender] -= wad; payable(msg.sender).transfer(wad); diff --git a/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol b/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol index cfd402d910..489ebcf8b8 100644 --- a/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol +++ b/contracts/src/v0.8/ccip/test/applications/EtherSenderReceiver.t.sol @@ -107,7 +107,9 @@ contract EtherSenderReceiverTest_validatedMessage is EtherSenderReceiverTest { uint256 internal constant amount = 100; - function test_Fuzz_validatedMessage_msgSenderOverwrite(bytes memory data) public view { + function test_Fuzz_validatedMessage_msgSenderOverwrite( + bytes memory data + ) public view { Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); tokenAmounts[0] = Client.EVMTokenAmount({ token: address(0), // callers may not specify this. @@ -130,7 +132,9 @@ contract EtherSenderReceiverTest_validatedMessage is EtherSenderReceiverTest { assertEq(validatedMessage.extraArgs, bytes(""), "extraArgs must be empty"); } - function test_Fuzz_validatedMessage_tokenAddressOverwrite(address token) public view { + function test_Fuzz_validatedMessage_tokenAddressOverwrite( + address token + ) public view { Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); tokenAmounts[0] = Client.EVMTokenAmount({token: token, amount: amount}); Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({ @@ -300,7 +304,9 @@ contract EtherSenderReceiverTest_ccipReceive is EtherSenderReceiverTest { error InvalidTokenAmounts(uint256 gotAmounts); error InvalidToken(address gotToken, address expectedToken); - function test_Fuzz_ccipReceive(uint256 tokenAmount) public { + function test_Fuzz_ccipReceive( + uint256 tokenAmount + ) public { // cap to 10 ether because OWNER only has 10 ether. if (tokenAmount > 10 ether) { return; diff --git a/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol b/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol index f253a72fcb..c9f7493e4b 100644 --- a/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol +++ b/contracts/src/v0.8/ccip/test/applications/PingPongDemo.t.sol @@ -91,7 +91,9 @@ contract PingPong_startPingPong is PingPongDappSetup { _assertPingPongSuccess(message); } - function _assertPingPongSuccess(Internal.EVM2EVMMessage memory message) internal { + function _assertPingPongSuccess( + Internal.EVM2EVMMessage memory message + ) internal { message.messageId = Internal._hash(message, s_metadataHash); vm.expectEmit(); @@ -128,13 +130,17 @@ contract PingPong_ccipReceive is PingPongDappSetup { } contract PingPong_plumbing is PingPongDappSetup { - function test_Fuzz_CounterPartChainSelector_Success(uint64 chainSelector) public { + function test_Fuzz_CounterPartChainSelector_Success( + uint64 chainSelector + ) public { s_pingPong.setCounterpartChainSelector(chainSelector); assertEq(s_pingPong.getCounterpartChainSelector(), chainSelector); } - function test_Fuzz_CounterPartAddress_Success(address counterpartAddress) public { + function test_Fuzz_CounterPartAddress_Success( + address counterpartAddress + ) public { s_pingPong.setCounterpartAddress(counterpartAddress); assertEq(s_pingPong.getCounterpartAddress(), counterpartAddress); diff --git a/contracts/src/v0.8/ccip/test/arm/RMN.t.sol b/contracts/src/v0.8/ccip/test/arm/RMN.t.sol index 85501170e3..da1c98e0d2 100644 --- a/contracts/src/v0.8/ccip/test/arm/RMN.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/RMN.t.sol @@ -1002,7 +1002,9 @@ contract RMN_permaBlessing is RMNSetup { return new address[](0); } - function addresses(address a) private pure returns (address[] memory) { + function addresses( + address a + ) private pure returns (address[] memory) { address[] memory arr = new address[](1); arr[0] = a; return arr; diff --git a/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol b/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol index 8feacb95f4..4a333306ec 100644 --- a/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/RMNSetup.t.sol @@ -6,7 +6,9 @@ import {IRMN} from "../../interfaces/IRMN.sol"; import {Test} from "forge-std/Test.sol"; -function makeSubjects(bytes16 a) pure returns (bytes16[] memory) { +function makeSubjects( + bytes16 a +) pure returns (bytes16[] memory) { bytes16[] memory subjects = new bytes16[](1); subjects[0] = a; return subjects; @@ -20,14 +22,18 @@ function makeSubjects(bytes16 a, bytes16 b) pure returns (bytes16[] memory) { } // in order from earliest to latest curse ids -function makeCursesHashFromList(bytes32[] memory curseIds) pure returns (bytes28 cursesHash) { +function makeCursesHashFromList( + bytes32[] memory curseIds +) pure returns (bytes28 cursesHash) { for (uint256 i = 0; i < curseIds.length; ++i) { cursesHash = bytes28(keccak256(abi.encode(cursesHash, curseIds[i]))); } } // hides the ugliness from tests -function makeCursesHash(bytes32 a) pure returns (bytes28) { +function makeCursesHash( + bytes32 a +) pure returns (bytes28) { bytes32[] memory curseIds = new bytes32[](1); curseIds[0] = a; return makeCursesHashFromList(curseIds); @@ -102,20 +108,28 @@ contract RMNSetup is Test { return votes; } - function makeTaggedRootSingleton(uint256 index) internal pure returns (IRMN.TaggedRoot[] memory) { + function makeTaggedRootSingleton( + uint256 index + ) internal pure returns (IRMN.TaggedRoot[] memory) { return makeTaggedRootsInclusive(index, index); } - function makeTaggedRoot(uint256 index) internal pure returns (IRMN.TaggedRoot memory) { + function makeTaggedRoot( + uint256 index + ) internal pure returns (IRMN.TaggedRoot memory) { return makeTaggedRootSingleton(index)[0]; } - function makeTaggedRootHash(uint256 index) internal pure returns (bytes32) { + function makeTaggedRootHash( + uint256 index + ) internal pure returns (bytes32) { IRMN.TaggedRoot memory taggedRoot = makeTaggedRootSingleton(index)[0]; return keccak256(abi.encode(taggedRoot.commitStore, taggedRoot.root)); } - function makeCurseId(uint256 index) internal pure returns (bytes16) { + function makeCurseId( + uint256 index + ) internal pure returns (bytes16) { return bytes16(uint128(index)); } @@ -137,7 +151,9 @@ contract RMNSetup is Test { return false; } - function getWeightOfVotesToBlessRoot(IRMN.TaggedRoot memory taggedRoot_) internal view returns (uint16) { + function getWeightOfVotesToBlessRoot( + IRMN.TaggedRoot memory taggedRoot_ + ) internal view returns (uint16) { (, uint16 weight,) = s_rmn.getBlessProgress(taggedRoot_); return weight; } diff --git a/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol b/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol index 8564614a74..cd17f023c7 100644 --- a/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol +++ b/contracts/src/v0.8/ccip/test/arm/RMN_benchmark.t.sol @@ -5,7 +5,9 @@ import {GLOBAL_CURSE_SUBJECT, OWNER_CURSE_VOTE_ADDR, RMN} from "../../RMN.sol"; import {RMNSetup, makeCursesHash, makeSubjects} from "./RMNSetup.t.sol"; contract RMN_voteToBless_Benchmark is RMNSetup { - function test_RootSuccess_gas(uint256 n) internal { + function test_RootSuccess_gas( + uint256 n + ) internal { vm.prank(BLESS_VOTER_1); s_rmn.voteToBless(makeTaggedRootsInclusive(1, n)); } @@ -151,7 +153,9 @@ contract RMN_lazyVoteToCurseUpdate_Benchmark is RMN_voteToCurse_Benchmark { contract RMN_setConfig_Benchmark is RMNSetup { uint256 s_numVoters; - function configWithVoters(uint256 numVoters) internal pure returns (RMN.Config memory) { + function configWithVoters( + uint256 numVoters + ) internal pure returns (RMN.Config memory) { RMN.Config memory cfg = RMN.Config({voters: new RMN.Voter[](numVoters), blessWeightThreshold: 1, curseWeightThreshold: 1}); for (uint256 i = 1; i <= numVoters; ++i) { diff --git a/contracts/src/v0.8/ccip/test/attacks/onRamp/FacadeClient.sol b/contracts/src/v0.8/ccip/test/attacks/onRamp/FacadeClient.sol index ad549e6ccc..8947a27df1 100644 --- a/contracts/src/v0.8/ccip/test/attacks/onRamp/FacadeClient.sol +++ b/contracts/src/v0.8/ccip/test/attacks/onRamp/FacadeClient.sol @@ -30,7 +30,9 @@ contract FacadeClient { /// @dev Calls Router to initiate CCIP send. /// The expectation is that s_msg_sequence will always match the sequence in emitted CCIP messages. - function send(uint256 amount) public { + function send( + uint256 amount + ) public { Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); tokenAmounts[0].token = address(i_sourceToken); tokenAmounts[0].amount = amount; diff --git a/contracts/src/v0.8/ccip/test/attacks/onRamp/MultiOnRampTokenPoolReentrancy.t.sol b/contracts/src/v0.8/ccip/test/attacks/onRamp/MultiOnRampTokenPoolReentrancy.t.sol index 4700d7edea..63b22cc12c 100644 --- a/contracts/src/v0.8/ccip/test/attacks/onRamp/MultiOnRampTokenPoolReentrancy.t.sol +++ b/contracts/src/v0.8/ccip/test/attacks/onRamp/MultiOnRampTokenPoolReentrancy.t.sol @@ -30,19 +30,22 @@ contract MultiOnRampTokenPoolReentrancy is OnRampSetup { new FacadeClient(address(s_sourceRouter), DEST_CHAIN_SELECTOR, s_sourceToken, s_feeToken, i_receiver); s_maliciousTokenPool = new ReentrantMaliciousTokenPool( - address(s_facadeClient), s_sourceToken, address(s_mockRMN), address(s_sourceRouter) + address(s_facadeClient), s_sourceToken, DEFAULT_TOKEN_DECIMALS, address(s_mockRMN), address(s_sourceRouter) ); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_destPoolBySourceToken[s_sourceTokens[0]]); + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destPoolBySourceToken[s_sourceTokens[0]]), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destTokens[0]), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - s_maliciousTokenPool.applyChainUpdates(chainUpdates); + + s_maliciousTokenPool.applyChainUpdates(new uint64[](0), chainUpdates); s_sourcePoolByToken[address(s_sourceToken)] = address(s_maliciousTokenPool); Internal.PoolUpdate[] memory removes = new Internal.PoolUpdate[](1); diff --git a/contracts/src/v0.8/ccip/test/attacks/onRamp/OnRampTokenPoolReentrancy.t.sol b/contracts/src/v0.8/ccip/test/attacks/onRamp/OnRampTokenPoolReentrancy.t.sol index 03db40a293..71a7d7cf42 100644 --- a/contracts/src/v0.8/ccip/test/attacks/onRamp/OnRampTokenPoolReentrancy.t.sol +++ b/contracts/src/v0.8/ccip/test/attacks/onRamp/OnRampTokenPoolReentrancy.t.sol @@ -30,19 +30,21 @@ contract OnRampTokenPoolReentrancy is EVM2EVMOnRampSetup { new FacadeClient(address(s_sourceRouter), DEST_CHAIN_SELECTOR, s_sourceToken, s_feeToken, i_receiver); s_maliciousTokenPool = new ReentrantMaliciousTokenPool( - address(s_facadeClient), s_sourceToken, address(s_mockRMN), address(s_sourceRouter) + address(s_facadeClient), s_sourceToken, DEFAULT_TOKEN_DECIMALS, address(s_mockRMN), address(s_sourceRouter) ); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_destPoolBySourceToken[s_sourceTokens[0]]); + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destPoolBySourceToken[s_sourceTokens[0]]), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destTokens[0]), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - s_maliciousTokenPool.applyChainUpdates(chainUpdates); + s_maliciousTokenPool.applyChainUpdates(new uint64[](0), chainUpdates); s_sourcePoolByToken[address(s_sourceToken)] = address(s_maliciousTokenPool); Internal.PoolUpdate[] memory removes = new Internal.PoolUpdate[](1); diff --git a/contracts/src/v0.8/ccip/test/attacks/onRamp/ReentrantMaliciousTokenPool.sol b/contracts/src/v0.8/ccip/test/attacks/onRamp/ReentrantMaliciousTokenPool.sol index 5b6b367984..a2166d36d5 100644 --- a/contracts/src/v0.8/ccip/test/attacks/onRamp/ReentrantMaliciousTokenPool.sol +++ b/contracts/src/v0.8/ccip/test/attacks/onRamp/ReentrantMaliciousTokenPool.sol @@ -15,9 +15,10 @@ contract ReentrantMaliciousTokenPool is TokenPool { constructor( address facade, IERC20 token, + uint8 localTokenDecimals, address rmnProxy, address router - ) TokenPool(token, new address[](0), rmnProxy, router) { + ) TokenPool(token, localTokenDecimals, new address[](0), rmnProxy, router) { i_facade = facade; } @@ -26,15 +27,20 @@ contract ReentrantMaliciousTokenPool is TokenPool { Pool.LockOrBurnInV1 calldata lockOrBurnIn ) external override returns (Pool.LockOrBurnOutV1 memory) { if (s_attacked) { - return - Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); + return Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), + destPoolData: _encodeLocalDecimals() + }); } s_attacked = true; FacadeClient(i_facade).send(lockOrBurnIn.amount); emit Burned(msg.sender, lockOrBurnIn.amount); - return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); + return Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), + destPoolData: _encodeLocalDecimals() + }); } function releaseOrMint( diff --git a/contracts/src/v0.8/ccip/test/capability/CCIPHome.t.sol b/contracts/src/v0.8/ccip/test/capability/CCIPHome.t.sol index f4784b0d0f..5b80a4e6a2 100644 --- a/contracts/src/v0.8/ccip/test/capability/CCIPHome.t.sol +++ b/contracts/src/v0.8/ccip/test/capability/CCIPHome.t.sol @@ -76,7 +76,9 @@ contract CCIPHomeTest is Test { ); } - function _getBaseConfig(Internal.OCRPluginType pluginType) internal pure returns (CCIPHome.OCR3Config memory) { + function _getBaseConfig( + Internal.OCRPluginType pluginType + ) internal pure returns (CCIPHome.OCR3Config memory) { CCIPHome.OCR3Node[] memory nodes = new CCIPHome.OCR3Node[](4); for (uint256 i = 0; i < nodes.length; i++) { nodes[i] = CCIPHome.OCR3Node({ @@ -398,7 +400,9 @@ contract CCIPHome_promoteCandidateAndRevokeActive is CCIPHomeTest { assertEq(candidateDigest, ZERO_DIGEST); } - function promoteCandidateAndRevokeActive(Internal.OCRPluginType pluginType) public { + function promoteCandidateAndRevokeActive( + Internal.OCRPluginType pluginType + ) public { CCIPHome.OCR3Config memory config = _getBaseConfig(pluginType); bytes32 firstConfigToPromote = s_ccipHome.setCandidate(DEFAULT_DON_ID, pluginType, config, ZERO_DIGEST); @@ -473,7 +477,9 @@ contract CCIPHome__validateConfig is CCIPHomeTest { s_ccipHome = new CCIPHomeHelper(CAPABILITIES_REGISTRY); } - function _addChainConfig(uint256 numNodes) internal returns (CCIPHome.OCR3Node[] memory nodes) { + function _addChainConfig( + uint256 numNodes + ) internal returns (CCIPHome.OCR3Node[] memory nodes) { return _addChainConfig(numNodes, 1); } diff --git a/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol b/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol index 0976ab96c5..0cc23f8a6d 100644 --- a/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol +++ b/contracts/src/v0.8/ccip/test/commitStore/CommitStore.t.sol @@ -117,7 +117,9 @@ contract CommitStore_constructor is FeeQuoterSetup, OCR2BaseSetup { } contract CommitStore_setMinSeqNr is CommitStoreSetup { - function test_Fuzz_SetMinSeqNr_Success(uint64 minSeqNr) public { + function test_Fuzz_SetMinSeqNr_Success( + uint64 minSeqNr + ) public { vm.expectEmit(); emit CommitStore.SequenceNumberSet(s_commitStore.getExpectedNextSequenceNumber(), minSeqNr); @@ -135,7 +137,9 @@ contract CommitStore_setMinSeqNr is CommitStoreSetup { } contract CommitStore_setDynamicConfig is CommitStoreSetup { - function test_Fuzz_SetDynamicConfig_Success(address priceRegistry) public { + function test_Fuzz_SetDynamicConfig_Success( + address priceRegistry + ) public { vm.assume(priceRegistry != address(0)); CommitStore.StaticConfig memory staticConfig = s_commitStore.getStaticConfig(); CommitStore.DynamicConfig memory dynamicConfig = CommitStore.DynamicConfig({priceRegistry: priceRegistry}); diff --git a/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol b/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol index 114265a248..8c931dd4fc 100644 --- a/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol +++ b/contracts/src/v0.8/ccip/test/e2e/End2End.t.sol @@ -93,7 +93,9 @@ contract E2E is EVM2EVMOnRampSetup, CommitStoreSetup, EVM2EVMOffRampSetup { s_offRamp.execute(execReport, new EVM2EVMOffRamp.GasLimitOverride[](0)); } - function sendRequest(uint64 expectedSeqNum) public returns (Internal.EVM2EVMMessage memory) { + function sendRequest( + uint64 expectedSeqNum + ) public returns (Internal.EVM2EVMMessage memory) { Client.EVM2AnyMessage memory message = _generateTokenMessage(); uint256 expectedFee = s_sourceRouter.getFee(DEST_CHAIN_SELECTOR, message); diff --git a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.t.sol b/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.t.sol index 48bfa668df..14da65a32e 100644 --- a/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.t.sol +++ b/contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.t.sol @@ -43,7 +43,9 @@ contract MultiRampsE2E is OnRampSetup, OffRampSetup { for (uint256 i = 0; i < s_sourceTokens.length; ++i) { address token = s_sourceTokens[i]; address pool = address( - new LockReleaseTokenPool(IERC20(token), new address[](0), address(s_mockRMN), true, address(s_sourceRouter2)) + new LockReleaseTokenPool( + IERC20(token), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), true, address(s_sourceRouter2) + ) ); s_sourcePoolByDestPool[s_destPoolBySourceToken[token]] = pool; diff --git a/contracts/src/v0.8/ccip/test/feeQuoter/FeeQuoterSetup.t.sol b/contracts/src/v0.8/ccip/test/feeQuoter/FeeQuoterSetup.t.sol index 9d98fa7e77..eeab674b95 100644 --- a/contracts/src/v0.8/ccip/test/feeQuoter/FeeQuoterSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/feeQuoter/FeeQuoterSetup.t.sol @@ -270,7 +270,9 @@ contract FeeQuoterSetup is TokenSetup { assertEq(config1.tokenDecimals, config2.tokenDecimals); } - function _assertTokenPriceFeedConfigUnconfigured(FeeQuoter.TokenPriceFeedConfig memory config) internal pure virtual { + function _assertTokenPriceFeedConfigUnconfigured( + FeeQuoter.TokenPriceFeedConfig memory config + ) internal pure virtual { _assertTokenPriceFeedConfigEquality( config, FeeQuoter.TokenPriceFeedConfig({dataFeedAddress: address(0), tokenDecimals: 0}) ); @@ -419,7 +421,7 @@ contract FeeQuoterFeeSetup is FeeQuoterSetup { return Internal.EVM2AnyTokenTransfer({ sourcePoolAddress: tokenAdminRegistry.getTokenConfig(tokenAmount.token).tokenPool, destTokenAddress: abi.encode(destToken), - extraData: "", + extraData: abi.encode(DEFAULT_TOKEN_DECIMALS), amount: tokenAmount.amount, destExecData: abi.encode(expectedDestGasAmount) }); @@ -433,7 +435,9 @@ contract FeeQuoterFeeSetup is FeeQuoterSetup { return (tokenAmount * ratio) / 1e5; } - function _configUSDCentToWei(uint256 usdCent) internal pure returns (uint256) { + function _configUSDCentToWei( + uint256 usdCent + ) internal pure returns (uint256) { return usdCent * 1e16; } } diff --git a/contracts/src/v0.8/ccip/test/helpers/AggregateRateLimiterHelper.sol b/contracts/src/v0.8/ccip/test/helpers/AggregateRateLimiterHelper.sol index ced605a752..f41bcc430d 100644 --- a/contracts/src/v0.8/ccip/test/helpers/AggregateRateLimiterHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/AggregateRateLimiterHelper.sol @@ -4,9 +4,13 @@ pragma solidity 0.8.24; import "../../AggregateRateLimiter.sol"; contract AggregateRateLimiterHelper is AggregateRateLimiter { - constructor(RateLimiter.Config memory config) AggregateRateLimiter(config) {} + constructor( + RateLimiter.Config memory config + ) AggregateRateLimiter(config) {} - function rateLimitValue(uint256 value) public { + function rateLimitValue( + uint256 value + ) public { _rateLimitValue(value); } diff --git a/contracts/src/v0.8/ccip/test/helpers/BurnMintERC677Helper.sol b/contracts/src/v0.8/ccip/test/helpers/BurnMintERC677Helper.sol index 9d2346996a..c3f95a7e06 100644 --- a/contracts/src/v0.8/ccip/test/helpers/BurnMintERC677Helper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/BurnMintERC677Helper.sol @@ -8,7 +8,9 @@ contract BurnMintERC677Helper is BurnMintERC677, IGetCCIPAdmin { constructor(string memory name, string memory symbol) BurnMintERC677(name, symbol, 18, 0) {} // Gives one full token to any given address. - function drip(address to) external { + function drip( + address to + ) external { _mint(to, 1e18); } diff --git a/contracts/src/v0.8/ccip/test/helpers/CCIPHomeHelper.sol b/contracts/src/v0.8/ccip/test/helpers/CCIPHomeHelper.sol index 8e460b791e..0bc97c7aa5 100644 --- a/contracts/src/v0.8/ccip/test/helpers/CCIPHomeHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/CCIPHomeHelper.sol @@ -4,13 +4,19 @@ pragma solidity 0.8.24; import {CCIPHome} from "../../capability/CCIPHome.sol"; contract CCIPHomeHelper is CCIPHome { - constructor(address capabilitiesRegistry) CCIPHome(capabilitiesRegistry) {} + constructor( + address capabilitiesRegistry + ) CCIPHome(capabilitiesRegistry) {} - function validateConfig(OCR3Config memory cfg) external view { + function validateConfig( + OCR3Config memory cfg + ) external view { return _validateConfig(cfg); } - function ensureInRegistry(bytes32[] memory p2pIds) external view { + function ensureInRegistry( + bytes32[] memory p2pIds + ) external view { return _ensureInRegistry(p2pIds); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/CCIPReaderTester.sol b/contracts/src/v0.8/ccip/test/helpers/CCIPReaderTester.sol index c2acddc796..18afc48918 100644 --- a/contracts/src/v0.8/ccip/test/helpers/CCIPReaderTester.sol +++ b/contracts/src/v0.8/ccip/test/helpers/CCIPReaderTester.sol @@ -13,7 +13,9 @@ contract CCIPReaderTester { /// @notice Gets the next sequence number to be used in the onRamp /// @param destChainSelector The destination chain selector /// @return nextSequenceNumber The next sequence number to be used - function getExpectedNextSequenceNumber(uint64 destChainSelector) external view returns (uint64) { + function getExpectedNextSequenceNumber( + uint64 destChainSelector + ) external view returns (uint64) { return s_destChainSeqNrs[destChainSelector] + 1; } @@ -24,7 +26,9 @@ contract CCIPReaderTester { s_destChainSeqNrs[destChainSelector] = sequenceNumber; } - function getSourceChainConfig(uint64 sourceChainSelector) external view returns (OffRamp.SourceChainConfig memory) { + function getSourceChainConfig( + uint64 sourceChainSelector + ) external view returns (OffRamp.SourceChainConfig memory) { return s_sourceChainConfigs[sourceChainSelector]; } @@ -59,7 +63,9 @@ contract CCIPReaderTester { event CommitReportAccepted(OffRamp.CommitReport report); - function emitCommitReportAccepted(OffRamp.CommitReport memory report) external { + function emitCommitReportAccepted( + OffRamp.CommitReport memory report + ) external { emit CommitReportAccepted(report); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/CommitStoreHelper.sol b/contracts/src/v0.8/ccip/test/helpers/CommitStoreHelper.sol index c8d66b8d72..2759a3312f 100644 --- a/contracts/src/v0.8/ccip/test/helpers/CommitStoreHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/CommitStoreHelper.sol @@ -4,7 +4,9 @@ pragma solidity 0.8.24; import "../../CommitStore.sol"; contract CommitStoreHelper is CommitStore { - constructor(StaticConfig memory staticConfig) CommitStore(staticConfig) {} + constructor( + StaticConfig memory staticConfig + ) CommitStore(staticConfig) {} /// @dev Expose _report for tests function report(bytes calldata commitReport, uint40 epochAndRound) external { diff --git a/contracts/src/v0.8/ccip/test/helpers/ERC20RebasingHelper.sol b/contracts/src/v0.8/ccip/test/helpers/ERC20RebasingHelper.sol index e5ef16d060..617d39af5c 100644 --- a/contracts/src/v0.8/ccip/test/helpers/ERC20RebasingHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/ERC20RebasingHelper.sol @@ -17,11 +17,15 @@ contract ERC20RebasingHelper is ERC20 { _burn(to, amount * s_multiplierPercentage / 100); } - function setMultiplierPercentage(uint16 multiplierPercentage) external { + function setMultiplierPercentage( + uint16 multiplierPercentage + ) external { s_multiplierPercentage = multiplierPercentage; } - function setMintShouldBurn(bool mintShouldBurn) external { + function setMintShouldBurn( + bool mintShouldBurn + ) external { s_mintShouldBurn = mintShouldBurn; } } diff --git a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMOffRampHelper.sol b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMOffRampHelper.sol index 1b537702be..510a79dc91 100644 --- a/contracts/src/v0.8/ccip/test/helpers/EVM2EVMOffRampHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/EVM2EVMOffRampHelper.sol @@ -14,7 +14,9 @@ contract EVM2EVMOffRampHelper is EVM2EVMOffRamp, IgnoreContractSize { _setExecutionState(sequenceNumber, state); } - function getExecutionStateBitMap(uint64 bitmapIndex) public view returns (uint256) { + function getExecutionStateBitMap( + uint64 bitmapIndex + ) public view returns (uint256) { return s_executionStates[bitmapIndex]; } @@ -49,7 +51,9 @@ contract EVM2EVMOffRampHelper is EVM2EVMOffRamp, IgnoreContractSize { return _trialExecute(message, offchainTokenData, tokenGasOverrides); } - function report(bytes calldata executableMessages) external { + function report( + bytes calldata executableMessages + ) external { _report(executableMessages); } diff --git a/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol b/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol index 71a5cdc7ab..e357645bcb 100644 --- a/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/EtherSenderReceiverHelper.sol @@ -5,17 +5,25 @@ import {EtherSenderReceiver} from "../../applications/EtherSenderReceiver.sol"; import {Client} from "../../libraries/Client.sol"; contract EtherSenderReceiverHelper is EtherSenderReceiver { - constructor(address router) EtherSenderReceiver(router) {} + constructor( + address router + ) EtherSenderReceiver(router) {} - function validatedMessage(Client.EVM2AnyMessage calldata message) public view returns (Client.EVM2AnyMessage memory) { + function validatedMessage( + Client.EVM2AnyMessage calldata message + ) public view returns (Client.EVM2AnyMessage memory) { return _validatedMessage(message); } - function validateFeeToken(Client.EVM2AnyMessage calldata message) public payable { + function validateFeeToken( + Client.EVM2AnyMessage calldata message + ) public payable { _validateFeeToken(message); } - function publicCcipReceive(Client.Any2EVMMessage memory message) public { + function publicCcipReceive( + Client.Any2EVMMessage memory message + ) public { _ccipReceive(message); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/MaybeRevertingBurnMintTokenPool.sol b/contracts/src/v0.8/ccip/test/helpers/MaybeRevertingBurnMintTokenPool.sol index 7290e91509..9def768814 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MaybeRevertingBurnMintTokenPool.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MaybeRevertingBurnMintTokenPool.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; @@ -13,20 +13,27 @@ contract MaybeRevertingBurnMintTokenPool is BurnMintTokenPool { constructor( IBurnMintERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router - ) BurnMintTokenPool(token, allowlist, rmnProxy, router) {} + ) BurnMintTokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) {} - function setShouldRevert(bytes calldata revertReason) external { + function setShouldRevert( + bytes calldata revertReason + ) external { s_revertReason = revertReason; } - function setSourceTokenData(bytes calldata sourceTokenData) external { + function setSourceTokenData( + bytes calldata sourceTokenData + ) external { s_sourceTokenData = sourceTokenData; } - function setReleaseOrMintMultiplier(uint256 multiplier) external { + function setReleaseOrMintMultiplier( + uint256 multiplier + ) external { s_releaseOrMintMultiplier = multiplier; } @@ -46,7 +53,7 @@ contract MaybeRevertingBurnMintTokenPool is BurnMintTokenPool { emit Burned(msg.sender, lockOrBurnIn.amount); return Pool.LockOrBurnOutV1({ destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), - destPoolData: s_sourceTokenData + destPoolData: s_sourceTokenData.length == 0 ? _encodeLocalDecimals() : s_sourceTokenData }); } @@ -62,7 +69,11 @@ contract MaybeRevertingBurnMintTokenPool is BurnMintTokenPool { revert(add(32, revertReason), mload(revertReason)) } } - uint256 amount = releaseOrMintIn.amount * s_releaseOrMintMultiplier; + // Calculate the local amount + uint256 localAmount = + _calculateLocalAmount(releaseOrMintIn.amount, _parseRemoteDecimals(releaseOrMintIn.sourcePoolData)); + + uint256 amount = localAmount * s_releaseOrMintMultiplier; IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, amount); emit Minted(msg.sender, releaseOrMintIn.receiver, amount); diff --git a/contracts/src/v0.8/ccip/test/helpers/MerkleHelper.sol b/contracts/src/v0.8/ccip/test/helpers/MerkleHelper.sol index ccb05681f1..231b386656 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MerkleHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MerkleHelper.sol @@ -14,7 +14,9 @@ library MerkleHelper { /// d c /// / \ /// a b - function getMerkleRoot(bytes32[] memory hashedLeaves) public pure returns (bytes32) { + function getMerkleRoot( + bytes32[] memory hashedLeaves + ) public pure returns (bytes32) { require(hashedLeaves.length <= 256); while (hashedLeaves.length > 1) { hashedLeaves = computeNextLayer(hashedLeaves); @@ -25,7 +27,9 @@ library MerkleHelper { /// @notice Computes a single layer of a merkle proof by hashing each pair (i, i+1) for /// each i, i+2, i+4.. n. When an uneven number of leaves is supplied the last item /// is simply included as the last element in the result set and not hashed. - function computeNextLayer(bytes32[] memory layer) public pure returns (bytes32[] memory) { + function computeNextLayer( + bytes32[] memory layer + ) public pure returns (bytes32[] memory) { uint256 leavesLen = layer.length; if (leavesLen == 1) return layer; diff --git a/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol b/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol index ea8ba98d44..db89a38612 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MessageHasher.sol @@ -61,15 +61,21 @@ contract MessageHasher { return abi.encode(leafDomainSeparator, implicitMetadataHash, fixedSizeFieldsHash, dataHash, tokenAmountsHash); } - function encodeEVMExtraArgsV1(Client.EVMExtraArgsV1 memory extraArgs) public pure returns (bytes memory) { + function encodeEVMExtraArgsV1( + Client.EVMExtraArgsV1 memory extraArgs + ) public pure returns (bytes memory) { return Client._argsToBytes(extraArgs); } - function encodeEVMExtraArgsV2(Client.EVMExtraArgsV2 memory extraArgs) public pure returns (bytes memory) { + function encodeEVMExtraArgsV2( + Client.EVMExtraArgsV2 memory extraArgs + ) public pure returns (bytes memory) { return Client._argsToBytes(extraArgs); } - function decodeEVMExtraArgsV1(uint256 gasLimit) public pure returns (Client.EVMExtraArgsV1 memory) { + function decodeEVMExtraArgsV1( + uint256 gasLimit + ) public pure returns (Client.EVMExtraArgsV1 memory) { return Client.EVMExtraArgsV1(gasLimit); } diff --git a/contracts/src/v0.8/ccip/test/helpers/MessageInterceptorHelper.sol b/contracts/src/v0.8/ccip/test/helpers/MessageInterceptorHelper.sol index a54145da84..80cdf61602 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MessageInterceptorHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MessageInterceptorHelper.sol @@ -14,7 +14,9 @@ contract MessageInterceptorHelper is IMessageInterceptor { } /// @inheritdoc IMessageInterceptor - function onInboundMessage(Client.Any2EVMMessage memory message) external view { + function onInboundMessage( + Client.Any2EVMMessage memory message + ) external view { if (s_invalidMessageIds[message.messageId]) { revert MessageValidationError(bytes("Invalid message")); } diff --git a/contracts/src/v0.8/ccip/test/helpers/MultiAggregateRateLimiterHelper.sol b/contracts/src/v0.8/ccip/test/helpers/MultiAggregateRateLimiterHelper.sol index d011ba0685..7c2e6cc8c2 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MultiAggregateRateLimiterHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MultiAggregateRateLimiterHelper.sol @@ -10,7 +10,9 @@ contract MultiAggregateRateLimiterHelper is MultiAggregateRateLimiter { address[] memory authorizedCallers ) MultiAggregateRateLimiter(feeQuoter, authorizedCallers) {} - function getTokenValue(Client.EVMTokenAmount memory tokenAmount) public view returns (uint256) { + function getTokenValue( + Client.EVMTokenAmount memory tokenAmount + ) public view returns (uint256) { return _getTokenValue(tokenAmount); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/MultiOCR3Helper.sol b/contracts/src/v0.8/ccip/test/helpers/MultiOCR3Helper.sol index 003a5326b8..e760b79935 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MultiOCR3Helper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MultiOCR3Helper.sol @@ -10,7 +10,9 @@ contract MultiOCR3Helper is MultiOCR3Base { /// Defined in storage since it cannot be passed as calldata due to strict transmit checks uint8 internal s_transmitOcrPluginType; - function setTransmitOcrPluginType(uint8 ocrPluginType) external { + function setTransmitOcrPluginType( + uint8 ocrPluginType + ) external { s_transmitOcrPluginType = ocrPluginType; } @@ -39,7 +41,9 @@ contract MultiOCR3Helper is MultiOCR3Base { return "MultiOCR3BaseHelper 1.0.0"; } - function _afterOCR3ConfigSet(uint8 ocrPluginType) internal virtual override { + function _afterOCR3ConfigSet( + uint8 ocrPluginType + ) internal virtual override { emit AfterConfigSet(ocrPluginType); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/MultiTokenPool.sol b/contracts/src/v0.8/ccip/test/helpers/MultiTokenPool.sol index 5a1bf5021d..93eee7249a 100644 --- a/contracts/src/v0.8/ccip/test/helpers/MultiTokenPool.sol +++ b/contracts/src/v0.8/ccip/test/helpers/MultiTokenPool.sol @@ -108,7 +108,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { } /// @inheritdoc IPoolV1 - function isSupportedToken(address token) public view virtual returns (bool) { + function isSupportedToken( + address token + ) public view virtual returns (bool) { return s_tokens.contains(token); } @@ -130,7 +132,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { /// @notice Sets the pool's Router /// @param newRouter The new Router - function setRouter(address newRouter) public onlyOwner { + function setRouter( + address newRouter + ) public onlyOwner { if (newRouter == address(0)) revert ZeroAddressNotAllowed(); address oldRouter = address(s_router); s_router = IRouter(newRouter); @@ -139,7 +143,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { } /// @notice Signals which version of the pool interface is supported - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { return interfaceId == Pool.CCIP_POOL_V1 || interfaceId == type(IPoolV1).interfaceId || interfaceId == type(IERC165).interfaceId; } @@ -157,7 +163,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { /// @param lockOrBurnIn The input to validate. /// @dev This function should always be called before executing a lock or burn. Not doing so would allow /// for various exploits. - function _validateLockOrBurn(Pool.LockOrBurnInV1 memory lockOrBurnIn) internal { + function _validateLockOrBurn( + Pool.LockOrBurnInV1 memory lockOrBurnIn + ) internal { if (!isSupportedToken(lockOrBurnIn.localToken)) revert InvalidToken(lockOrBurnIn.localToken); if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(lockOrBurnIn.remoteChainSelector)))) revert CursedByRMN(); _checkAllowList(lockOrBurnIn.originalSender); @@ -175,7 +183,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { /// @param releaseOrMintIn The input to validate. /// @dev This function should always be called before executing a lock or burn. Not doing so would allow /// for various exploits. - function _validateReleaseOrMint(Pool.ReleaseOrMintInV1 memory releaseOrMintIn) internal { + function _validateReleaseOrMint( + Pool.ReleaseOrMintInV1 memory releaseOrMintIn + ) internal { if (!isSupportedToken(releaseOrMintIn.localToken)) revert InvalidToken(releaseOrMintIn.localToken); if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(releaseOrMintIn.remoteChainSelector)))) revert CursedByRMN(); _onlyOffRamp(releaseOrMintIn.remoteChainSelector); @@ -226,7 +236,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { } /// @inheritdoc IPoolV1 - function isSupportedChain(uint64 remoteChainSelector) public view returns (bool) { + function isSupportedChain( + uint64 remoteChainSelector + ) public view returns (bool) { return s_remoteChainSelectors.contains(remoteChainSelector); } @@ -357,14 +369,18 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned onRamp for the given chain on the Router. - function _onlyOnRamp(uint64 remoteChainSelector) internal view { + function _onlyOnRamp( + uint64 remoteChainSelector + ) internal view { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!(msg.sender == s_router.getOnRamp(remoteChainSelector))) revert CallerIsNotARampOnRouter(msg.sender); } /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned offRamp for the given chain on the Router. - function _onlyOffRamp(uint64 remoteChainSelector) internal view { + function _onlyOffRamp( + uint64 remoteChainSelector + ) internal view { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!s_router.isOffRamp(remoteChainSelector, msg.sender)) revert CallerIsNotARampOnRouter(msg.sender); } @@ -373,7 +389,9 @@ abstract contract MultiTokenPool is IPoolV1, OwnerIsCreator { // │ Allowlist │ // ================================================================ - function _checkAllowList(address sender) internal view { + function _checkAllowList( + address sender + ) internal view { if (i_allowlistEnabled && !s_allowList.contains(sender)) revert SenderNotAllowed(sender); } diff --git a/contracts/src/v0.8/ccip/test/helpers/OCR2Helper.sol b/contracts/src/v0.8/ccip/test/helpers/OCR2Helper.sol index cb66352ff6..8bac7e8c00 100644 --- a/contracts/src/v0.8/ccip/test/helpers/OCR2Helper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/OCR2Helper.sol @@ -34,5 +34,7 @@ contract OCR2Helper is OCR2Base(false) { return "OCR2BaseHelper 1.0.0"; } - function _beforeSetConfig(bytes memory _onchainConfig) internal override {} + function _beforeSetConfig( + bytes memory _onchainConfig + ) internal override {} } diff --git a/contracts/src/v0.8/ccip/test/helpers/OCR2NoChecksHelper.sol b/contracts/src/v0.8/ccip/test/helpers/OCR2NoChecksHelper.sol index a1ececa326..3885fa11b7 100644 --- a/contracts/src/v0.8/ccip/test/helpers/OCR2NoChecksHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/OCR2NoChecksHelper.sol @@ -28,11 +28,15 @@ contract OCR2NoChecksHelper is OCR2BaseNoChecks { ); } - function _report(bytes calldata report) internal override {} + function _report( + bytes calldata report + ) internal override {} function typeAndVersion() public pure override returns (string memory) { return "OCR2BaseHelper 1.0.0"; } - function _beforeSetConfig(bytes memory _onchainConfig) internal override {} + function _beforeSetConfig( + bytes memory _onchainConfig + ) internal override {} } diff --git a/contracts/src/v0.8/ccip/test/helpers/RateLimiterHelper.sol b/contracts/src/v0.8/ccip/test/helpers/RateLimiterHelper.sol index 8fb96a0c1c..6cd1c18705 100644 --- a/contracts/src/v0.8/ccip/test/helpers/RateLimiterHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/RateLimiterHelper.sol @@ -8,7 +8,9 @@ contract RateLimiterHelper { RateLimiter.TokenBucket internal s_rateLimiter; - constructor(RateLimiter.Config memory config) { + constructor( + RateLimiter.Config memory config + ) { s_rateLimiter = RateLimiter.TokenBucket({ rate: config.rate, capacity: config.capacity, @@ -26,7 +28,9 @@ contract RateLimiterHelper { return s_rateLimiter._currentTokenBucketState(); } - function setTokenBucketConfig(RateLimiter.Config memory config) external { + function setTokenBucketConfig( + RateLimiter.Config memory config + ) external { s_rateLimiter._setTokenBucketConfig(config); } diff --git a/contracts/src/v0.8/ccip/test/helpers/ReportCodec.sol b/contracts/src/v0.8/ccip/test/helpers/ReportCodec.sol index 2e50124ab4..3bd97035c8 100644 --- a/contracts/src/v0.8/ccip/test/helpers/ReportCodec.sol +++ b/contracts/src/v0.8/ccip/test/helpers/ReportCodec.sol @@ -8,11 +8,15 @@ contract ReportCodec { event ExecuteReportDecoded(Internal.ExecutionReportSingleChain[] report); event CommitReportDecoded(OffRamp.CommitReport report); - function decodeExecuteReport(bytes memory report) public pure returns (Internal.ExecutionReportSingleChain[] memory) { + function decodeExecuteReport( + bytes memory report + ) public pure returns (Internal.ExecutionReportSingleChain[] memory) { return abi.decode(report, (Internal.ExecutionReportSingleChain[])); } - function decodeCommitReport(bytes memory report) public pure returns (OffRamp.CommitReport memory) { + function decodeCommitReport( + bytes memory report + ) public pure returns (OffRamp.CommitReport memory) { return abi.decode(report, (OffRamp.CommitReport)); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/TokenPoolHelper.sol b/contracts/src/v0.8/ccip/test/helpers/TokenPoolHelper.sol index 4965d1ed2f..c067b220fc 100644 --- a/contracts/src/v0.8/ccip/test/helpers/TokenPoolHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/TokenPoolHelper.sol @@ -5,32 +5,58 @@ import {Pool} from "../../libraries/Pool.sol"; import {TokenPool} from "../../pools/TokenPool.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/structs/EnumerableSet.sol"; contract TokenPoolHelper is TokenPool { + using EnumerableSet for EnumerableSet.Bytes32Set; + constructor( IERC20 token, + uint8 localTokenDecimals, address[] memory allowlist, address rmnProxy, address router - ) TokenPool(token, allowlist, rmnProxy, router) {} + ) TokenPool(token, localTokenDecimals, allowlist, rmnProxy, router) {} function lockOrBurn( Pool.LockOrBurnInV1 calldata lockOrBurnIn - ) external view override returns (Pool.LockOrBurnOutV1 memory) { + ) external override returns (Pool.LockOrBurnOutV1 memory) { + _validateLockOrBurn(lockOrBurnIn); + return Pool.LockOrBurnOutV1({destTokenAddress: getRemoteToken(lockOrBurnIn.remoteChainSelector), destPoolData: ""}); } function releaseOrMint( Pool.ReleaseOrMintInV1 calldata releaseOrMintIn - ) external pure override returns (Pool.ReleaseOrMintOutV1 memory) { + ) external override returns (Pool.ReleaseOrMintOutV1 memory) { + _validateReleaseOrMint(releaseOrMintIn); + return Pool.ReleaseOrMintOutV1({destinationAmount: releaseOrMintIn.amount}); } - function onlyOnRampModifier(uint64 remoteChainSelector) external view { + function encodeLocalDecimals() external view returns (bytes memory) { + return _encodeLocalDecimals(); + } + + function parseRemoteDecimals( + bytes memory sourcePoolData + ) external view returns (uint256) { + return _parseRemoteDecimals(sourcePoolData); + } + + function calculateLocalAmount(uint256 remoteAmount, uint8 remoteDecimals) external view returns (uint256) { + return _calculateLocalAmount(remoteAmount, remoteDecimals); + } + + function onlyOnRampModifier( + uint64 remoteChainSelector + ) external view { _onlyOnRamp(remoteChainSelector); } - function onlyOffRampModifier(uint64 remoteChainSelector) external view { + function onlyOffRampModifier( + uint64 remoteChainSelector + ) external view { _onlyOffRamp(remoteChainSelector); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol index 159cd7a851..d4102da075 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ConformingReceiver.sol @@ -9,7 +9,9 @@ contract ConformingReceiver is CCIPReceiver { constructor(address router, address feeToken) CCIPReceiver(router) {} - function _ccipReceive(Client.Any2EVMMessage memory) internal virtual override { + function _ccipReceive( + Client.Any2EVMMessage memory + ) internal virtual override { emit MessageReceived(); } } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol index 143f83307b..82afdbf9f3 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol @@ -23,23 +23,31 @@ contract MaybeRevertMessageReceiver is IAny2EVMMessageReceiver, IERC165 { bool public s_toRevert; bytes private s_err; - constructor(bool toRevert) { + constructor( + bool toRevert + ) { s_manager = msg.sender; s_toRevert = toRevert; } - function setRevert(bool toRevert) external { + function setRevert( + bool toRevert + ) external { s_toRevert = toRevert; } - function setErr(bytes memory err) external { + function setErr( + bytes memory err + ) external { s_err = err; } /// @notice IERC165 supports an interfaceId /// @param interfaceId The interfaceId to check /// @return true if the interfaceId is supported - function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public pure override returns (bool) { return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId; } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiverNo165.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiverNo165.sol index 4f56394c4e..7db4eab3b2 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiverNo165.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/MaybeRevertMessageReceiverNo165.sol @@ -9,16 +9,22 @@ contract MaybeRevertMessageReceiverNo165 is IAny2EVMMessageReceiver { event MessageReceived(); - constructor(bool toRevert) { + constructor( + bool toRevert + ) { s_manager = msg.sender; s_toRevert = toRevert; } - function setRevert(bool toRevert) external { + function setRevert( + bool toRevert + ) external { s_toRevert = toRevert; } - function ccipReceive(Client.Any2EVMMessage calldata) external override { + function ccipReceive( + Client.Any2EVMMessage calldata + ) external override { if (s_toRevert) { revert(); } diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol index b69bbcaa43..562de05f66 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuser.sol @@ -19,11 +19,15 @@ contract ReentrancyAbuser is CCIPReceiver { s_offRamp = offRamp; } - function setPayload(Internal.ExecutionReport calldata payload) public { + function setPayload( + Internal.ExecutionReport calldata payload + ) public { s_payload = payload; } - function _ccipReceive(Client.Any2EVMMessage memory) internal override { + function _ccipReceive( + Client.Any2EVMMessage memory + ) internal override { // Use original message gas limits in manual execution EVM2EVMOffRamp.GasLimitOverride[] memory gasOverrides = _getGasLimitsFromMessages(s_payload.messages); diff --git a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol index c8eee48808..3f068151a1 100644 --- a/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol +++ b/contracts/src/v0.8/ccip/test/helpers/receivers/ReentrancyAbuserMultiRamp.sol @@ -17,11 +17,15 @@ contract ReentrancyAbuserMultiRamp is CCIPReceiver { s_offRamp = offRamp; } - function setPayload(Internal.ExecutionReportSingleChain calldata payload) public { + function setPayload( + Internal.ExecutionReportSingleChain calldata payload + ) public { s_payload = payload; } - function _ccipReceive(Client.Any2EVMMessage memory) internal override { + function _ccipReceive( + Client.Any2EVMMessage memory + ) internal override { // Use original message gas limits in manual execution uint256 numMsgs = s_payload.messages.length; OffRamp.GasLimitOverride[][] memory gasOverrides = new OffRamp.GasLimitOverride[][](1); diff --git a/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_2.sol b/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_2.sol index 44de2787c6..20343bc1c9 100644 --- a/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_2.sol +++ b/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_2.sol @@ -96,7 +96,9 @@ abstract contract TokenPool1_2 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { } /// @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { return interfaceId == type(IPoolPriorTo1_5).interfaceId || interfaceId == type(IERC165).interfaceId; } @@ -106,13 +108,17 @@ abstract contract TokenPool1_2 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @notice Checks whether something is a permissioned onRamp on this contract. /// @return true if the given address is a permissioned onRamp. - function isOnRamp(address onRamp) public view returns (bool) { + function isOnRamp( + address onRamp + ) public view returns (bool) { return s_onRamps.contains(onRamp); } /// @notice Checks whether something is a permissioned offRamp on this contract. /// @return true if the given address is a permissioned offRamp. - function isOffRamp(address offRamp) public view returns (bool) { + function isOffRamp( + address offRamp + ) public view returns (bool) { return s_offRamps.contains(offRamp); } @@ -195,24 +201,32 @@ abstract contract TokenPool1_2 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { // ================================================================ /// @notice Consumes outbound rate limiting capacity in this pool - function _consumeOnRampRateLimit(uint256 amount) internal { + function _consumeOnRampRateLimit( + uint256 amount + ) internal { s_onRampRateLimits[msg.sender]._consume(amount, address(i_token)); } /// @notice Consumes inbound rate limiting capacity in this pool - function _consumeOffRampRateLimit(uint256 amount) internal { + function _consumeOffRampRateLimit( + uint256 amount + ) internal { s_offRampRateLimits[msg.sender]._consume(amount, address(i_token)); } /// @notice Gets the token bucket with its values for the block it was requested at. /// @return The token bucket. - function currentOnRampRateLimiterState(address onRamp) external view returns (RateLimiter.TokenBucket memory) { + function currentOnRampRateLimiterState( + address onRamp + ) external view returns (RateLimiter.TokenBucket memory) { return s_onRampRateLimits[onRamp]._currentTokenBucketState(); } /// @notice Gets the token bucket with its values for the block it was requested at. /// @return The token bucket. - function currentOffRampRateLimiterState(address offRamp) external view returns (RateLimiter.TokenBucket memory) { + function currentOffRampRateLimiterState( + address offRamp + ) external view returns (RateLimiter.TokenBucket memory) { return s_offRampRateLimits[offRamp]._currentTokenBucketState(); } @@ -254,7 +268,9 @@ abstract contract TokenPool1_2 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { // │ Allowlist │ // ================================================================ - modifier checkAllowList(address sender) { + modifier checkAllowList( + address sender + ) { if (i_allowlistEnabled && !s_allowList.contains(sender)) revert SenderNotAllowed(sender); _; } diff --git a/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_4.sol b/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_4.sol index 168afee4f0..26107cdefd 100644 --- a/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_4.sol +++ b/contracts/src/v0.8/ccip/test/legacy/BurnMintTokenPool1_4.sol @@ -114,7 +114,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @notice Sets the pool's Router /// @param newRouter The new Router - function setRouter(address newRouter) public onlyOwner { + function setRouter( + address newRouter + ) public onlyOwner { if (newRouter == address(0)) revert ZeroAddressNotAllowed(); address oldRouter = address(s_router); s_router = IRouter(newRouter); @@ -123,7 +125,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { } /// @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { return interfaceId == type(IPoolPriorTo1_5).interfaceId || interfaceId == type(IERC165).interfaceId; } @@ -133,7 +137,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @notice Checks whether a chain selector is permissioned on this contract. /// @return true if the given chain selector is a permissioned remote chain. - function isSupportedChain(uint64 remoteChainSelector) public view returns (bool) { + function isSupportedChain( + uint64 remoteChainSelector + ) public view returns (bool) { return s_remoteChainSelectors.contains(remoteChainSelector); } @@ -154,7 +160,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @dev Only callable by the owner /// @param chains A list of chains and their new permission status & rate limits. Rate limits /// are only used when the chain is being added through `allowed` being true. - function applyChainUpdates(ChainUpdate[] calldata chains) external virtual onlyOwner { + function applyChainUpdates( + ChainUpdate[] calldata chains + ) external virtual onlyOwner { for (uint256 i = 0; i < chains.length; ++i) { ChainUpdate memory update = chains[i]; RateLimiter._validateTokenBucketConfig(update.outboundRateLimiterConfig, !update.allowed); @@ -256,7 +264,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned onRamp for the given chain on the Router. - modifier onlyOnRamp(uint64 remoteChainSelector) { + modifier onlyOnRamp( + uint64 remoteChainSelector + ) { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!(msg.sender == s_router.getOnRamp(remoteChainSelector))) revert CallerIsNotARampOnRouter(msg.sender); _; @@ -264,7 +274,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { /// @notice Checks whether remote chain selector is configured on this contract, and if the msg.sender /// is a permissioned offRamp for the given chain on the Router. - modifier onlyOffRamp(uint64 remoteChainSelector) { + modifier onlyOffRamp( + uint64 remoteChainSelector + ) { if (!isSupportedChain(remoteChainSelector)) revert ChainNotAllowed(remoteChainSelector); if (!s_router.isOffRamp(remoteChainSelector, msg.sender)) revert CallerIsNotARampOnRouter(msg.sender); _; @@ -274,7 +286,9 @@ abstract contract TokenPool1_4 is IPoolPriorTo1_5, OwnerIsCreator, IERC165 { // │ Allowlist │ // ================================================================ - modifier checkAllowList(address sender) { + modifier checkAllowList( + address sender + ) { if (i_allowlistEnabled && !s_allowList.contains(sender)) revert SenderNotAllowed(sender); _; } @@ -331,7 +345,9 @@ abstract contract BurnMintTokenPoolAbstract is TokenPool1_4 { /// @notice Contains the specific burn call for a pool. /// @dev overriding this method allows us to create pools with different burn signatures /// without duplicating the underlying logic. - function _burn(uint256 amount) internal virtual; + function _burn( + uint256 amount + ) internal virtual; /// @notice Burn the token in the pool /// @param amount Amount to burn @@ -392,7 +408,9 @@ contract BurnMintTokenPool1_4 is BurnMintTokenPoolAbstract, ITypeAndVersion { ) TokenPool1_4(token, allowlist, armProxy, router) {} /// @inheritdoc BurnMintTokenPoolAbstract - function _burn(uint256 amount) internal virtual override { + function _burn( + uint256 amount + ) internal virtual override { IBurnMintERC20(address(i_token)).burn(amount); } } diff --git a/contracts/src/v0.8/ccip/test/legacy/TokenPoolAndProxy.t.sol b/contracts/src/v0.8/ccip/test/legacy/TokenPoolAndProxy.t.sol deleted file mode 100644 index 9645d70b7a..0000000000 --- a/contracts/src/v0.8/ccip/test/legacy/TokenPoolAndProxy.t.sol +++ /dev/null @@ -1,671 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.0; - -import {IPoolV1} from "../../interfaces/IPool.sol"; -import {IPoolPriorTo1_5} from "../../interfaces/IPoolPriorTo1_5.sol"; - -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {Client} from "../../libraries/Client.sol"; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {BurnMintTokenPoolAndProxy} from "../../pools/BurnMintTokenPoolAndProxy.sol"; -import {BurnWithFromMintTokenPoolAndProxy} from "../../pools/BurnWithFromMintTokenPoolAndProxy.sol"; -import {LockReleaseTokenPoolAndProxy} from "../../pools/LockReleaseTokenPoolAndProxy.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {EVM2EVMOnRampSetup} from "../onRamp/EVM2EVMOnRampSetup.t.sol"; -import {RouterSetup} from "../router/RouterSetup.t.sol"; -import {BurnMintTokenPool1_2, TokenPool1_2} from "./BurnMintTokenPool1_2.sol"; -import {BurnMintTokenPool1_4, TokenPool1_4} from "./BurnMintTokenPool1_4.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {IERC165} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; - -contract TokenPoolAndProxyMigration is EVM2EVMOnRampSetup { - BurnMintTokenPoolAndProxy internal s_newPool; - IPoolPriorTo1_5 internal s_legacyPool; - BurnMintERC677 internal s_token; - - address internal s_offRamp; - address internal s_sourcePool = makeAddr("source_pool"); - address internal s_sourceToken = makeAddr("source_token"); - uint256 internal constant AMOUNT = 1; - - function setUp() public virtual override { - super.setUp(); - // Create a system with a token and a legacy pool - s_token = new BurnMintERC677("Test", "TEST", 18, type(uint256).max); - // dealing doesn't update the total supply, meaning the first time we burn a token we underflow, which isn't - // guarded against. Then, when we mint a token, we overflow, which is guarded against and will revert. - s_token.grantMintAndBurnRoles(OWNER); - s_token.mint(OWNER, 1e18); - - s_offRamp = s_offRamps[0]; - // Approve enough for a few calls - s_token.approve(address(s_sourceRouter), AMOUNT * 100); - - // Approve infinite fee tokens - IERC20(s_sourceFeeToken).approve(address(s_sourceRouter), type(uint256).max); - } - - /// @notice This test covers the entire migration plan for 1.0-1.2 pools to 1.5 pools. For simplicity - /// we will refer to the 1.0/1.2 pools as 1.2 pools, as they are functionally the same. - function test_tokenPoolMigration_Success_1_2() public { - // ================================================================ - // | 1 1.2 prior to upgrade | - // ================================================================ - _deployPool1_2(); - - // Ensure everything works on the 1.2 pool - _ccipSend_OLD(); - _fakeReleaseOrMintFromOffRamp_OLD(); - - // ================================================================ - // | 2 Deploy self serve | - // ================================================================ - _deploySelfServe(); - - // This doesn't impact the 1.2 pool, so it should still be functional - _ccipSend_OLD(); - _fakeReleaseOrMintFromOffRamp_OLD(); - - // ================================================================ - // | 3 Configure new pool on old pool | - // ================================================================ - // In the 1.2 case, everything keeps working on both the 1.2 and 1.5 pools. This config can be - // done in advance of the actual swap to 1.5 lanes. - vm.startPrank(OWNER); - TokenPool1_2.RampUpdate[] memory rampUpdates = new TokenPool1_2.RampUpdate[](1); - rampUpdates[0] = TokenPool1_2.RampUpdate({ - ramp: address(s_newPool), - allowed: true, - // The rate limits should be turned off for this fake ramp, as the 1.5 pool will handle all the - // rate limiting for us. - rateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}) - }); - // Since this call doesn't impact the usability of the old pool, we can do it whenever we want - BurnMintTokenPool1_2(address(s_legacyPool)).applyRampUpdates(rampUpdates, rampUpdates); - - // Assert the 1.2 lanes still work - _ccipSend_OLD(); - _fakeReleaseOrMintFromOffRamp_OLD(); - - // ================================================================ - // | 4 Update the router with to 1.5 | - // ================================================================ - - // This will stop any new messages entering the old lanes, and will direct all traffic to the - // new 1.5 lanes, and therefore to the 1.5 pools. Note that the old pools will still receive - // inflight messages, and will need to continue functioning until all of those are processed. - _fakeReleaseOrMintFromOffRamp_OLD(); - - // Everything is configured, we can now send a ccip tx to the new pool - _ccipSend1_5(); - _fakeReleaseOrMintFromOffRamp1_5(); - - // ================================================================ - // | 5 Migrate to using 1.5 the pool | - // ================================================================ - // Turn off the legacy pool, this enabled the 1.5 pool logic. This should be done AFTER the new pool - // has gotten permissions to mint/burn. We see the case where that isn't done below. - vm.startPrank(OWNER); - s_newPool.setPreviousPool(IPoolPriorTo1_5(address(0))); - - // The new pool is now active, but is has not been given permissions to burn/mint yet - vm.expectRevert(abi.encodeWithSelector(BurnMintERC677.SenderNotBurner.selector, address(s_newPool))); - _ccipSend1_5(); - vm.expectRevert(abi.encodeWithSelector(BurnMintERC677.SenderNotMinter.selector, address(s_newPool))); - _fakeReleaseOrMintFromOffRamp1_5(); - - // When we do give burn/mint, the new pool is fully active - vm.startPrank(OWNER); - s_token.grantMintAndBurnRoles(address(s_newPool)); - _ccipSend1_5(); - _fakeReleaseOrMintFromOffRamp1_5(); - - // Even after the pool has taken over as primary, the old pool can still process messages from the old lane - _fakeReleaseOrMintFromOffRamp_OLD(); - } - - function test_tokenPoolMigration_Success_1_4() public { - // ================================================================ - // | 1 1.4 prior to upgrade | - // ================================================================ - _deployPool1_4(); - - // Ensure everything works on the 1.4 pool - _ccipSend_OLD(); - _fakeReleaseOrMintFromOffRamp_OLD(); - - // ================================================================ - // | 2 Deploy self serve | - // ================================================================ - _deploySelfServe(); - - // This doesn't impact the 1.4 pool, so it should still be functional - _ccipSend_OLD(); - _fakeReleaseOrMintFromOffRamp_OLD(); - - // ================================================================ - // | 3 Configure new pool on old pool | - // | AND | - // | Update the router with to 1.5 | - // ================================================================ - // NOTE: when this call is made, the SENDING SIDE of old lanes stop working. - vm.startPrank(OWNER); - BurnMintTokenPool1_4(address(s_legacyPool)).setRouter(address(s_newPool)); - - // This will stop any new messages entering the old lanes, and will direct all traffic to the - // new 1.5 lanes, and therefore to the 1.5 pools. Note that the old pools will still receive - // inflight messages, and will need to continue functioning until all of those are processed. - _fakeReleaseOrMintFromOffRamp_OLD(); - - // Sending to the old 1.4 pool no longer works - _ccipSend_OLD_Reverts(); - - // Everything is configured, we can now send a ccip tx - _ccipSend1_5(); - _fakeReleaseOrMintFromOffRamp1_5(); - - // ================================================================ - // | 4 Migrate to using 1.5 the pool | - // ================================================================ - // Turn off the legacy pool, this enabled the 1.5 pool logic. This should be done AFTER the new pool - // has gotten permissions to mint/burn. We see the case where that isn't done below. - vm.startPrank(OWNER); - s_newPool.setPreviousPool(IPoolPriorTo1_5(address(0))); - - // The new pool is now active, but is has not been given permissions to burn/mint yet - vm.expectRevert(abi.encodeWithSelector(BurnMintERC677.SenderNotBurner.selector, address(s_newPool))); - _ccipSend1_5(); - vm.expectRevert(abi.encodeWithSelector(BurnMintERC677.SenderNotMinter.selector, address(s_newPool))); - _fakeReleaseOrMintFromOffRamp1_5(); - - // When we do give burn/mint, the new pool is fully active - vm.startPrank(OWNER); - s_token.grantMintAndBurnRoles(address(s_newPool)); - _ccipSend1_5(); - _fakeReleaseOrMintFromOffRamp1_5(); - - // Even after the pool has taken over as primary, the old pool can still process messages from the old lane - _fakeReleaseOrMintFromOffRamp_OLD(); - } - - function _ccipSend_OLD() internal { - // We send the funds to the pool manually, as the ramp normally does that - deal(address(s_token), address(s_legacyPool), AMOUNT); - vm.startPrank(address(s_onRamp)); - s_legacyPool.lockOrBurn(OWNER, abi.encode(OWNER), AMOUNT, DEST_CHAIN_SELECTOR, ""); - } - - function _ccipSend_OLD_Reverts() internal { - // We send the funds to the pool manually, as the ramp normally does that - deal(address(s_token), address(s_legacyPool), AMOUNT); - vm.startPrank(address(s_onRamp)); - - vm.expectRevert(abi.encodeWithSelector(TokenPool1_4.CallerIsNotARampOnRouter.selector, address(s_onRamp))); - - s_legacyPool.lockOrBurn(OWNER, abi.encode(OWNER), AMOUNT, DEST_CHAIN_SELECTOR, ""); - } - - function _ccipSend1_5() internal { - vm.startPrank(address(OWNER)); - Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](1); - tokenAmounts[0] = Client.EVMTokenAmount({token: address(s_token), amount: AMOUNT}); - - s_sourceRouter.ccipSend( - DEST_CHAIN_SELECTOR, - Client.EVM2AnyMessage({ - receiver: abi.encode(OWNER), - data: "", - tokenAmounts: tokenAmounts, - feeToken: s_sourceFeeToken, - extraArgs: "" - }) - ); - } - - function _fakeReleaseOrMintFromOffRamp1_5() internal { - // This is a fake call to simulate the release or mint from the "offRamp" - vm.startPrank(s_offRamp); - s_newPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - receiver: OWNER, - amount: AMOUNT, - localToken: address(s_token), - sourcePoolAddress: abi.encode(s_sourcePool), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function _fakeReleaseOrMintFromOffRamp_OLD() internal { - // This is a fake call to simulate the release or mint from the "offRamp" - vm.startPrank(s_offRamp); - s_legacyPool.releaseOrMint(abi.encode(OWNER), OWNER, AMOUNT, SOURCE_CHAIN_SELECTOR, ""); - } - - function _deployPool1_2() internal { - vm.startPrank(OWNER); - s_legacyPool = new BurnMintTokenPool1_2(s_token, new address[](0), address(s_mockRMN)); - s_token.grantMintAndBurnRoles(address(s_legacyPool)); - - TokenPool1_2.RampUpdate[] memory onRampUpdates = new TokenPool1_2.RampUpdate[](1); - onRampUpdates[0] = TokenPool1_2.RampUpdate({ - ramp: address(s_onRamp), - allowed: true, - rateLimiterConfig: _getInboundRateLimiterConfig() - }); - TokenPool1_2.RampUpdate[] memory offRampUpdates = new TokenPool1_2.RampUpdate[](1); - offRampUpdates[0] = TokenPool1_2.RampUpdate({ - ramp: address(s_offRamp), - allowed: true, - rateLimiterConfig: _getInboundRateLimiterConfig() - }); - BurnMintTokenPool1_2(address(s_legacyPool)).applyRampUpdates(onRampUpdates, offRampUpdates); - } - - function _deployPool1_4() internal { - vm.startPrank(OWNER); - s_legacyPool = new BurnMintTokenPool1_4(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - s_token.grantMintAndBurnRoles(address(s_legacyPool)); - - TokenPool1_4.ChainUpdate[] memory legacyChainUpdates = new TokenPool1_4.ChainUpdate[](2); - legacyChainUpdates[0] = TokenPool1_4.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - legacyChainUpdates[1] = TokenPool1_4.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - BurnMintTokenPool1_4(address(s_legacyPool)).applyChainUpdates(legacyChainUpdates); - } - - function _deploySelfServe() internal { - vm.startPrank(OWNER); - // Deploy the new pool - s_newPool = new BurnMintTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - // Set the previous pool on the new pool - s_newPool.setPreviousPool(s_legacyPool); - - // Configure the lanes just like the legacy pool - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destTokenPool), - remoteTokenAddress: abi.encode(s_destToken), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - chainUpdates[1] = TokenPool.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_sourcePool), - remoteTokenAddress: abi.encode(s_sourceToken), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_newPool.applyChainUpdates(chainUpdates); - - // Register the token on the token admin registry - s_tokenAdminRegistry.proposeAdministrator(address(s_token), OWNER); - // Accept ownership of the token - s_tokenAdminRegistry.acceptAdminRole(address(s_token)); - // Set the pool on the admin registry - s_tokenAdminRegistry.setPool(address(s_token), address(s_newPool)); - } -} - -contract TokenPoolAndProxy is EVM2EVMOnRampSetup { - event Burned(address indexed sender, uint256 amount); - event Minted(address indexed sender, address indexed recipient, uint256 amount); - - IPoolV1 internal s_pool; - BurnMintERC677 internal s_token; - IPoolPriorTo1_5 internal s_legacyPool; - address internal s_fakeOffRamp = makeAddr("off_ramp"); - - address internal s_destPool = makeAddr("dest_pool"); - - function setUp() public virtual override { - super.setUp(); - s_token = BurnMintERC677(s_sourceFeeToken); - - Router.OffRamp[] memory fakeOffRamps = new Router.OffRamp[](1); - fakeOffRamps[0] = Router.OffRamp({sourceChainSelector: DEST_CHAIN_SELECTOR, offRamp: s_fakeOffRamp}); - s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), fakeOffRamps); - - s_token.grantMintAndBurnRoles(OWNER); - s_token.mint(OWNER, 1e18); - } - - function test_lockOrBurn_burnMint_Success() public { - s_pool = new BurnMintTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - _configurePool(); - _deployOldPool(); - _assertLockOrBurnCorrect(); - - vm.startPrank(OWNER); - BurnMintTokenPoolAndProxy(address(s_pool)).setPreviousPool(IPoolPriorTo1_5(address(0))); - - _assertReleaseOrMintCorrect(); - } - - function test_lockOrBurn_burnWithFromMint_Success() public { - s_pool = - new BurnWithFromMintTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - _configurePool(); - _deployOldPool(); - _assertLockOrBurnCorrect(); - - vm.startPrank(OWNER); - BurnMintTokenPoolAndProxy(address(s_pool)).setPreviousPool(IPoolPriorTo1_5(address(0))); - - _assertReleaseOrMintCorrect(); - } - - function test_lockOrBurn_lockRelease_Success() public { - s_pool = - new LockReleaseTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), false, address(s_sourceRouter)); - _configurePool(); - _deployOldPool(); - _assertLockOrBurnCorrect(); - - vm.startPrank(OWNER); - BurnMintTokenPoolAndProxy(address(s_pool)).setPreviousPool(IPoolPriorTo1_5(address(0))); - - _assertReleaseOrMintCorrect(); - } - - function _deployOldPool() internal { - s_legacyPool = new BurnMintTokenPool1_2(s_token, new address[](0), address(s_mockRMN)); - s_token.grantMintAndBurnRoles(address(s_legacyPool)); - - TokenPool1_2.RampUpdate[] memory onRampUpdates = new TokenPool1_2.RampUpdate[](1); - onRampUpdates[0] = - TokenPool1_2.RampUpdate({ramp: address(s_pool), allowed: true, rateLimiterConfig: _getInboundRateLimiterConfig()}); - TokenPool1_2.RampUpdate[] memory offRampUpdates = new TokenPool1_2.RampUpdate[](1); - offRampUpdates[0] = - TokenPool1_2.RampUpdate({ramp: address(s_pool), allowed: true, rateLimiterConfig: _getInboundRateLimiterConfig()}); - BurnMintTokenPool1_2(address(s_legacyPool)).applyRampUpdates(onRampUpdates, offRampUpdates); - } - - function _configurePool() internal { - TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1); - chains[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destPool), - remoteTokenAddress: abi.encode(s_destToken), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - BurnMintTokenPoolAndProxy(address(s_pool)).applyChainUpdates(chains); - - // CCIP Token Admin has already been registered from TokenSetup - s_tokenAdminRegistry.setPool(address(s_token), address(s_pool)); - - s_token.grantMintAndBurnRoles(address(s_pool)); - } - - function _assertLockOrBurnCorrect() internal { - uint256 amount = 1234; - vm.startPrank(address(s_onRamp)); - - // lockOrBurn, assert normal path is taken - deal(address(s_token), address(s_pool), amount); - - s_pool.lockOrBurn( - Pool.LockOrBurnInV1({ - receiver: abi.encode(OWNER), - remoteChainSelector: DEST_CHAIN_SELECTOR, - originalSender: OWNER, - amount: amount, - localToken: address(s_token) - }) - ); - - // set legacy pool - - vm.startPrank(OWNER); - BurnMintTokenPoolAndProxy(address(s_pool)).setPreviousPool(s_legacyPool); - - // lockOrBurn, assert legacy pool is called - - vm.startPrank(address(s_onRamp)); - deal(address(s_token), address(s_pool), amount); - - vm.expectEmit(address(s_legacyPool)); - emit Burned(address(s_pool), amount); - - s_pool.lockOrBurn( - Pool.LockOrBurnInV1({ - receiver: abi.encode(OWNER), - remoteChainSelector: DEST_CHAIN_SELECTOR, - originalSender: OWNER, - amount: amount, - localToken: address(s_token) - }) - ); - } - - function _assertReleaseOrMintCorrect() internal { - uint256 amount = 1234; - vm.startPrank(s_fakeOffRamp); - - // releaseOrMint, assert normal path is taken - deal(address(s_token), address(s_pool), amount); - - s_pool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - receiver: OWNER, - remoteChainSelector: DEST_CHAIN_SELECTOR, - originalSender: abi.encode(OWNER), - amount: amount, - localToken: address(s_token), - sourcePoolAddress: abi.encode(s_destPool), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - - // set legacy pool - - vm.startPrank(OWNER); - BurnMintTokenPoolAndProxy(address(s_pool)).setPreviousPool(s_legacyPool); - - // releaseOrMint, assert legacy pool is called - - vm.startPrank(address(s_fakeOffRamp)); - - vm.expectEmit(address(s_legacyPool)); - emit Minted(address(s_pool), address(OWNER), amount); - - s_pool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - receiver: OWNER, - remoteChainSelector: DEST_CHAIN_SELECTOR, - originalSender: abi.encode(OWNER), - amount: amount, - localToken: address(s_token), - sourcePoolAddress: abi.encode(s_destPool), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function test_setPreviousPool_Success() public { - LockReleaseTokenPoolAndProxy pool = - new LockReleaseTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), true, address(s_sourceRouter)); - - assertEq(pool.getPreviousPool(), address(0)); - - address newLegacyPool = makeAddr("new_legacy_pool"); - - vm.startPrank(OWNER); - pool.setPreviousPool(IPoolPriorTo1_5(newLegacyPool)); - assertEq(pool.getPreviousPool(), address(newLegacyPool)); - } -} - -//// -/// Duplicated tests from LockReleaseTokenPool.t.sol -/// - -contract LockReleaseTokenPoolAndProxySetup is RouterSetup { - IERC20 internal s_token; - LockReleaseTokenPoolAndProxy internal s_lockReleaseTokenPoolAndProxy; - LockReleaseTokenPoolAndProxy internal s_lockReleaseTokenPoolAndProxyWithAllowList; - address[] internal s_allowedList; - - address internal s_allowedOnRamp = address(123); - address internal s_allowedOffRamp = address(234); - - address internal s_destPoolAddress = address(2736782345); - address internal s_sourcePoolAddress = address(53852352095); - - function setUp() public virtual override { - RouterSetup.setUp(); - s_token = new BurnMintERC677("LINK", "LNK", 18, 0); - deal(address(s_token), OWNER, type(uint256).max); - s_lockReleaseTokenPoolAndProxy = - new LockReleaseTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), true, address(s_sourceRouter)); - - s_allowedList.push(USER_1); - s_allowedList.push(DUMMY_CONTRACT_ADDRESS); - s_lockReleaseTokenPoolAndProxyWithAllowList = - new LockReleaseTokenPoolAndProxy(s_token, s_allowedList, address(s_mockRMN), true, address(s_sourceRouter)); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destPoolAddress), - remoteTokenAddress: abi.encode(address(s_token)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_lockReleaseTokenPoolAndProxy.applyChainUpdates(chainUpdate); - s_lockReleaseTokenPoolAndProxyWithAllowList.applyChainUpdates(chainUpdate); - s_lockReleaseTokenPoolAndProxy.setRebalancer(OWNER); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_allowedOnRamp}); - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: s_allowedOffRamp}); - s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); - } -} - -contract LockReleaseTokenPoolAndProxy_setRebalancer is LockReleaseTokenPoolAndProxySetup { - function test_SetRebalancer_Success() public { - assertEq(address(s_lockReleaseTokenPoolAndProxy.getRebalancer()), OWNER); - s_lockReleaseTokenPoolAndProxy.setRebalancer(STRANGER); - assertEq(address(s_lockReleaseTokenPoolAndProxy.getRebalancer()), STRANGER); - } - - function test_SetRebalancer_Revert() public { - vm.startPrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - s_lockReleaseTokenPoolAndProxy.setRebalancer(STRANGER); - } -} - -contract LockReleaseTokenPoolPoolAndProxy_canAcceptLiquidity is LockReleaseTokenPoolAndProxySetup { - function test_CanAcceptLiquidity_Success() public { - assertEq(true, s_lockReleaseTokenPoolAndProxy.canAcceptLiquidity()); - - s_lockReleaseTokenPoolAndProxy = - new LockReleaseTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), false, address(s_sourceRouter)); - assertEq(false, s_lockReleaseTokenPoolAndProxy.canAcceptLiquidity()); - } -} - -contract LockReleaseTokenPoolPoolAndProxy_provideLiquidity is LockReleaseTokenPoolAndProxySetup { - function test_Fuzz_ProvideLiquidity_Success(uint256 amount) public { - uint256 balancePre = s_token.balanceOf(OWNER); - s_token.approve(address(s_lockReleaseTokenPoolAndProxy), amount); - - s_lockReleaseTokenPoolAndProxy.provideLiquidity(amount); - - assertEq(s_token.balanceOf(OWNER), balancePre - amount); - assertEq(s_token.balanceOf(address(s_lockReleaseTokenPoolAndProxy)), amount); - } - - // Reverts - - function test_Unauthorized_Revert() public { - vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); - - s_lockReleaseTokenPoolAndProxy.provideLiquidity(1); - } - - function test_Fuzz_ExceedsAllowance(uint256 amount) public { - vm.assume(amount > 0); - vm.expectRevert("ERC20: insufficient allowance"); - s_lockReleaseTokenPoolAndProxy.provideLiquidity(amount); - } - - function test_LiquidityNotAccepted_Revert() public { - s_lockReleaseTokenPoolAndProxy = - new LockReleaseTokenPoolAndProxy(s_token, new address[](0), address(s_mockRMN), false, address(s_sourceRouter)); - - vm.expectRevert(LockReleaseTokenPoolAndProxy.LiquidityNotAccepted.selector); - s_lockReleaseTokenPoolAndProxy.provideLiquidity(1); - } -} - -contract LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity is LockReleaseTokenPoolAndProxySetup { - function test_Fuzz_WithdrawalLiquidity_Success(uint256 amount) public { - uint256 balancePre = s_token.balanceOf(OWNER); - s_token.approve(address(s_lockReleaseTokenPoolAndProxy), amount); - s_lockReleaseTokenPoolAndProxy.provideLiquidity(amount); - - s_lockReleaseTokenPoolAndProxy.withdrawLiquidity(amount); - - assertEq(s_token.balanceOf(OWNER), balancePre); - } - - // Reverts - - function test_Unauthorized_Revert() public { - vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); - - s_lockReleaseTokenPoolAndProxy.withdrawLiquidity(1); - } - - function test_InsufficientLiquidity_Revert() public { - uint256 maxUint256 = 2 ** 256 - 1; - s_token.approve(address(s_lockReleaseTokenPoolAndProxy), maxUint256); - s_lockReleaseTokenPoolAndProxy.provideLiquidity(maxUint256); - - vm.startPrank(address(s_lockReleaseTokenPoolAndProxy)); - s_token.transfer(OWNER, maxUint256); - vm.startPrank(OWNER); - - vm.expectRevert(LockReleaseTokenPoolAndProxy.InsufficientLiquidity.selector); - s_lockReleaseTokenPoolAndProxy.withdrawLiquidity(1); - } -} - -contract LockReleaseTokenPoolPoolAndProxy_supportsInterface is LockReleaseTokenPoolAndProxySetup { - function test_SupportsInterface_Success() public view { - assertTrue(s_lockReleaseTokenPoolAndProxy.supportsInterface(type(IPoolV1).interfaceId)); - assertTrue(s_lockReleaseTokenPoolAndProxy.supportsInterface(type(IERC165).interfaceId)); - } -} diff --git a/contracts/src/v0.8/ccip/test/mocks/MockCommitStore.sol b/contracts/src/v0.8/ccip/test/mocks/MockCommitStore.sol index aff06016fa..941977367e 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockCommitStore.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockCommitStore.sol @@ -23,7 +23,9 @@ contract MockCommitStore is ICommitStore { return s_expectedNextSequenceNumber; } - function setExpectedNextSequenceNumber(uint64 nextSeqNum) external { + function setExpectedNextSequenceNumber( + uint64 nextSeqNum + ) external { s_expectedNextSequenceNumber = nextSeqNum; } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockE2EUSDCTransmitter.sol b/contracts/src/v0.8/ccip/test/mocks/MockE2EUSDCTransmitter.sol index bbd9c7dcc6..c9226a47c3 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockE2EUSDCTransmitter.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockE2EUSDCTransmitter.sol @@ -72,7 +72,9 @@ contract MockE2EUSDCTransmitter is IMessageTransmitterWithRelay { return s_shouldSucceed; } - function setShouldSucceed(bool shouldSucceed) external { + function setShouldSucceed( + bool shouldSucceed + ) external { s_shouldSucceed = shouldSucceed; } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol new file mode 100644 index 0000000000..ff73afec5b --- /dev/null +++ b/contracts/src/v0.8/ccip/test/mocks/MockLBTCTokenPool.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {Pool} from "../../libraries/Pool.sol"; +import {TokenPool} from "../../pools/TokenPool.sol"; + +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; + +/// @notice This mock contract facilitates testing of LBTC token transfers by burning and minting tokens. +contract MockLBTCTokenPool is TokenPool, ITypeAndVersion { + using SafeERC20 for IERC20; + + string public constant override typeAndVersion = "MockLBTCTokenPool 1.5.1"; + + // This variable i_destPoolData will have either a 32-byte or non-32-byte value, which will change the off-chain behavior. + // If it is 32 bytes, the off-chain will consider it as attestation enabled and call the attestation API. + // If it is non-32 bytes, the off-chain will consider it as attestation disabled. + bytes public i_destPoolData; + + constructor( + IERC20 token, + address[] memory allowlist, + address rmnProxy, + address router, + bytes memory destPoolData + ) TokenPool(token, 8, allowlist, rmnProxy, router) { + i_destPoolData = destPoolData; + } + + function lockOrBurn( + Pool.LockOrBurnInV1 calldata lockOrBurnIn + ) public virtual override returns (Pool.LockOrBurnOutV1 memory) { + IBurnMintERC20(address(i_token)).burn(lockOrBurnIn.amount); + emit Burned(msg.sender, lockOrBurnIn.amount); + + return + Pool.LockOrBurnOutV1({ + destTokenAddress: getRemoteToken( + lockOrBurnIn.remoteChainSelector + ), + destPoolData: i_destPoolData + }); + } + + function releaseOrMint( + Pool.ReleaseOrMintInV1 calldata releaseOrMintIn + ) public virtual override returns (Pool.ReleaseOrMintOutV1 memory) { + IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount); + + emit Minted( + msg.sender, + releaseOrMintIn.receiver, + releaseOrMintIn.amount + ); + + return + Pool.ReleaseOrMintOutV1({ + destinationAmount: releaseOrMintIn.amount + }); + } +} + diff --git a/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol b/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol index 343078cc37..435c669763 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockRMN.sol @@ -17,7 +17,9 @@ contract MockRMN is IRMN { s_blessedByRoot[taggedRoot.commitStore][taggedRoot.root] = blessed; } - function setGlobalCursed(bool cursed) external { + function setGlobalCursed( + bool cursed + ) external { s_globalCursed = cursed; } @@ -27,7 +29,9 @@ contract MockRMN is IRMN { /// @notice Setting a revert error with length of 0 will disable reverts /// @dev Useful to test revert handling of ARMProxy - function setIsCursedRevert(bytes calldata revertErr) external { + function setIsCursedRevert( + bytes calldata revertErr + ) external { s_isCursedRevert = revertErr; } @@ -40,14 +44,18 @@ contract MockRMN is IRMN { return s_globalCursed; } - function isCursed(bytes16 subject) external view returns (bool) { + function isCursed( + bytes16 subject + ) external view returns (bool) { if (s_isCursedRevert.length > 0) { revert CustomError(s_isCursedRevert); } return s_globalCursed || s_cursedBySubject[subject]; } - function isBlessed(IRMN.TaggedRoot calldata taggedRoot) external view returns (bool) { + function isBlessed( + IRMN.TaggedRoot calldata taggedRoot + ) external view returns (bool) { return s_blessedByRoot[taggedRoot.commitStore][taggedRoot.root]; } } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol b/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol index d1a488d557..2f1df4926c 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol @@ -54,14 +54,18 @@ contract MockRMN is IRMN, OwnerIsCreator { return s_curse; } - function isCursed(bytes16 subject) external view override returns (bool) { + function isCursed( + bytes16 subject + ) external view override returns (bool) { if (s_err.length != 0) { revert CustomError(s_err); } return s_curse || s_curseBySubject[subject]; } - function voteToCurse(bytes32) external { + function voteToCurse( + bytes32 + ) external { s_curse = true; } @@ -69,7 +73,9 @@ contract MockRMN is IRMN, OwnerIsCreator { s_curseBySubject[subject] = true; } - function ownerUnvoteToCurse(OldRMN.UnvoteToCurseRecord[] memory) external { + function ownerUnvoteToCurse( + OldRMN.UnvoteToCurseRecord[] memory + ) external { s_curse = false; } @@ -77,11 +83,15 @@ contract MockRMN is IRMN, OwnerIsCreator { s_curseBySubject[subject] = false; } - function setRevert(bytes memory err) external { + function setRevert( + bytes memory err + ) external { s_err = err; } - function isBlessed(IRMN.TaggedRoot calldata) external view override returns (bool) { + function isBlessed( + IRMN.TaggedRoot calldata + ) external view override returns (bool) { return !s_curse; } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockRouter.sol b/contracts/src/v0.8/ccip/test/mocks/MockRouter.sol index 88a1740886..3ded9fd78f 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockRouter.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockRouter.sol @@ -119,21 +119,34 @@ contract MockCCIPRouter is IRouter, IRouterClient { return mockMsgId; } - function _fromBytes(bytes calldata extraArgs) internal pure returns (Client.EVMExtraArgsV1 memory) { + function _fromBytes( + bytes calldata extraArgs + ) internal pure returns (Client.EVMExtraArgsV2 memory) { if (extraArgs.length == 0) { - return Client.EVMExtraArgsV1({gasLimit: DEFAULT_GAS_LIMIT}); + return Client.EVMExtraArgsV2({gasLimit: DEFAULT_GAS_LIMIT, allowOutOfOrderExecution: false}); } - if (bytes4(extraArgs) != Client.EVM_EXTRA_ARGS_V1_TAG) revert InvalidExtraArgsTag(); - return abi.decode(extraArgs[4:], (Client.EVMExtraArgsV1)); + + bytes4 extraArgsTag = bytes4(extraArgs); + if (extraArgsTag == Client.EVM_EXTRA_ARGS_V2_TAG) { + return abi.decode(extraArgs[4:], (Client.EVMExtraArgsV2)); + } else if (extraArgsTag == Client.EVM_EXTRA_ARGS_V1_TAG) { + return Client.EVMExtraArgsV2({gasLimit: abi.decode(extraArgs[4:], (uint256)), allowOutOfOrderExecution: false}); + } + + revert InvalidExtraArgsTag(); } /// @notice Always returns true to make sure this check can be performed on any chain. - function isChainSupported(uint64) external pure returns (bool supported) { + function isChainSupported( + uint64 + ) external pure returns (bool supported) { return true; } /// @notice Returns an empty array. - function getSupportedTokens(uint64) external pure returns (address[] memory tokens) { + function getSupportedTokens( + uint64 + ) external pure returns (address[] memory tokens) { return new address[](0); } @@ -143,12 +156,16 @@ contract MockCCIPRouter is IRouter, IRouterClient { } /// @notice Sets the fees returned by getFee but is only checked when using native fee tokens - function setFee(uint256 feeAmount) external { + function setFee( + uint256 feeAmount + ) external { s_mockFeeTokenAmount = feeAmount; } /// @notice Always returns address(1234567890) - function getOnRamp(uint64 /* destChainSelector */ ) external pure returns (address onRampAddress) { + function getOnRamp( + uint64 /* destChainSelector */ + ) external pure returns (address onRampAddress) { return address(1234567890); } diff --git a/contracts/src/v0.8/ccip/test/mocks/test/MockRouterTest.t.sol b/contracts/src/v0.8/ccip/test/mocks/test/MockRouterTest.t.sol index 6cbe7bf58f..9acfd9b1ce 100644 --- a/contracts/src/v0.8/ccip/test/mocks/test/MockRouterTest.t.sol +++ b/contracts/src/v0.8/ccip/test/mocks/test/MockRouterTest.t.sol @@ -49,7 +49,7 @@ contract MockRouterTest is TokenSetup { mockRouter.ccipSend{value: 0.1 ether}(mockChainSelector, message); } - function test_ccipSendWithLinkFeeTokenbutInsufficientAllowance_Revert() public { + function test_ccipSendWithLinkFeeTokenButInsufficientAllowance_Revert() public { message.feeToken = s_sourceFeeToken; vm.expectRevert(bytes("ERC20: insufficient allowance")); @@ -65,4 +65,24 @@ contract MockRouterTest is TokenSetup { mockRouter.ccipSend(mockChainSelector, message); } + + function test_ccipSendWithEVMExtraArgsV1_Success() public { + Client.EVMExtraArgsV1 memory extraArgs = Client.EVMExtraArgsV1({gasLimit: 500_000}); + message.extraArgs = Client._argsToBytes(extraArgs); + mockRouter.ccipSend{value: 0.1 ether}(mockChainSelector, message); + } + + function test_ccipSendWithEVMExtraArgsV2_Success() public { + Client.EVMExtraArgsV2 memory extraArgs = Client.EVMExtraArgsV2({gasLimit: 500_000, allowOutOfOrderExecution: true}); + message.extraArgs = Client._argsToBytes(extraArgs); + mockRouter.ccipSend{value: 0.1 ether}(mockChainSelector, message); + } + + function test_ccipSendWithInvalidEVMExtraArgs_Revert() public { + uint256 gasLimit = 500_000; + bytes4 invalidExtraArgsTag = bytes4(keccak256("CCIP EVMExtraArgsInvalid")); + message.extraArgs = abi.encodeWithSelector(invalidExtraArgsTag, gasLimit); + vm.expectRevert(MockCCIPRouter.InvalidExtraArgsTag.selector); + mockRouter.ccipSend{value: 0.1 ether}(mockChainSelector, message); + } } diff --git a/contracts/src/v0.8/ccip/test/ocr/MultiOCR3BaseSetup.t.sol b/contracts/src/v0.8/ccip/test/ocr/MultiOCR3BaseSetup.t.sol index 6f6219bc9b..9cfddf0dd5 100644 --- a/contracts/src/v0.8/ccip/test/ocr/MultiOCR3BaseSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/ocr/MultiOCR3BaseSetup.t.sol @@ -84,7 +84,9 @@ contract MultiOCR3BaseSetup is BaseTest { vm.assertEq(configA.transmitters, configB.transmitters); } - function _assertOCRConfigUnconfigured(MultiOCR3Base.OCRConfig memory config) internal pure { + function _assertOCRConfigUnconfigured( + MultiOCR3Base.OCRConfig memory config + ) internal pure { assertEq(config.configInfo.configDigest, bytes32("")); assertEq(config.signers.length, 0); assertEq(config.transmitters.length, 0); diff --git a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol index 493d02c7c2..876d74144d 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/EVM2EVMOffRamp.t.sol @@ -248,7 +248,9 @@ contract EVM2EVMOffRamp_execute is EVM2EVMOffRampSetup { assertEq(startingBalance + amounts[0], dstToken0.balanceOf(message.receiver)); } - function test_Fuzz_getSenderNonce(uint8 trialExecutions) public { + function test_Fuzz_getSenderNonce( + uint8 trialExecutions + ) public { vm.assume(trialExecutions > 1); Internal.EVM2EVMMessage[] memory messages; @@ -279,7 +281,9 @@ contract EVM2EVMOffRamp_execute is EVM2EVMOffRampSetup { assertEq(s_offRamp.getSenderNonce(messages[0].sender), nonceBefore, "sender nonce is not as expected"); } - function test_Fuzz_getSenderNonceWithPrevOffRamp_Success(uint8 trialExecutions) public { + function test_Fuzz_getSenderNonceWithPrevOffRamp_Success( + uint8 trialExecutions + ) public { vm.assume(trialExecutions > 1); // Fuzz a random nonce for getSenderNonce test_Fuzz_getSenderNonce(trialExecutions); @@ -543,7 +547,9 @@ contract EVM2EVMOffRamp_execute is EVM2EVMOffRampSetup { assertEq(uint64(2), s_offRamp.getSenderNonce(OWNER)); } - function test_Fuzz_InterleavingOrderedAndUnorderedMessages_Success(bool[7] memory orderings) public { + function test_Fuzz_InterleavingOrderedAndUnorderedMessages_Success( + bool[7] memory orderings + ) public { Internal.EVM2EVMMessage[] memory messages = new Internal.EVM2EVMMessage[](orderings.length); // number of tokens needs to be capped otherwise we hit UnsupportedNumberOfTokens. Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](3); @@ -981,7 +987,9 @@ contract EVM2EVMOffRamp_executeSingleMessage is EVM2EVMOffRampSetup { s_offRamp.executeSingleMessage(message, new bytes[](message.tokenAmounts.length), new uint32[](0)); } - function _generateMsgWithoutTokens(uint256 gasLimit) internal view returns (Internal.EVM2EVMMessage memory) { + function _generateMsgWithoutTokens( + uint256 gasLimit + ) internal view returns (Internal.EVM2EVMMessage memory) { Internal.EVM2EVMMessage memory message = _generateAny2EVMMessageNoTokens(1); message.gasLimit = gasLimit; message.data = ""; @@ -2055,7 +2063,9 @@ contract EVM2EVMOffRamp__releaseOrMintTokens is EVM2EVMOffRampSetup { /// forge-config: default.fuzz.runs = 32 /// forge-config: ccip.fuzz.runs = 1024 // Uint256 gives a good range of values to test, both inside and outside of the eth address space. - function test_Fuzz__releaseOrMintTokens_AnyRevertIsCaught_Success(uint256 destPool) public { + function test_Fuzz__releaseOrMintTokens_AnyRevertIsCaught_Success( + uint256 destPool + ) public { // Input 447301751254033913445893214690834296930546521452, which is 0x4E59B44847B379578588920CA78FBF26C0B4956C // triggers some Create2Deployer and causes it to fail vm.assume(destPool != 447301751254033913445893214690834296930546521452); @@ -2165,7 +2175,9 @@ contract EVM2EVMOffRamp_updateRateLimitTokens is EVM2EVMOffRampSetup { assertEq(adds[1].destToken, destTokens[0]); } - function test_Fuzz_UpdateRateLimitTokens(uint8 numTokens) public { + function test_Fuzz_UpdateRateLimitTokens( + uint8 numTokens + ) public { // Needs to be more than 1 so that the division doesn't round down and the even makes the comparisons simpler vm.assume(numTokens > 1 && numTokens % 2 == 0); diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp.t.sol index 9cf0321a85..e86784ce88 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp.t.sol @@ -695,7 +695,9 @@ contract OffRamp_executeSingleReport is OffRampSetup { assertEq(uint64(2), s_inboundNonceManager.getInboundNonce(SOURCE_CHAIN_SELECTOR_1, abi.encode(OWNER))); } - function test_Fuzz_InterleavingOrderedAndUnorderedMessages_Success(bool[7] memory orderings) public { + function test_Fuzz_InterleavingOrderedAndUnorderedMessages_Success( + bool[7] memory orderings + ) public { Internal.Any2EVMRampMessage[] memory messages = new Internal.Any2EVMRampMessage[](orderings.length); // number of tokens needs to be capped otherwise we hit UnsupportedNumberOfTokens. Client.EVMTokenAmount[] memory tokenAmounts = new Client.EVMTokenAmount[](3); @@ -990,7 +992,9 @@ contract OffRamp_executeSingleReport is OffRampSetup { ); } - function _constructCommitReport(bytes32 merkleRoot) internal view returns (OffRamp.CommitReport memory) { + function _constructCommitReport( + bytes32 merkleRoot + ) internal view returns (OffRamp.CommitReport memory) { Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](1); roots[0] = Internal.MerkleRoot({ sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, @@ -2969,7 +2973,9 @@ contract OffRamp_releaseOrMintTokens is OffRampSetup { /// forge-config: default.fuzz.runs = 32 /// forge-config: ccip.fuzz.runs = 1024 // Uint256 gives a good range of values to test, both inside and outside of the eth address space. - function test_Fuzz__releaseOrMintTokens_AnyRevertIsCaught_Success(address destPool) public { + function test_Fuzz__releaseOrMintTokens_AnyRevertIsCaught_Success( + address destPool + ) public { // Input 447301751254033913445893214690834296930546521452, which is 0x4E59B44847B379578588920CA78FBF26C0B4956C // triggers some Create2Deployer and causes it to fail vm.assume(destPool != 0x4e59b44847b379578588920cA78FbF26c0B4956C); diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRampSetup.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRampSetup.t.sol index 0fb4ff5094..4202807102 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRampSetup.t.sol @@ -188,7 +188,9 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { _setupMultipleOffRampsFromConfigs(sourceChainConfigs); } - function _setupMultipleOffRampsFromConfigs(OffRamp.SourceChainConfigArgs[] memory sourceChainConfigs) internal { + function _setupMultipleOffRampsFromConfigs( + OffRamp.SourceChainConfigArgs[] memory sourceChainConfigs + ) internal { s_offRamp.applySourceChainConfigUpdates(sourceChainConfigs); Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](0); @@ -223,7 +225,9 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { uint32 internal constant MAX_TOKEN_POOL_RELEASE_OR_MINT_GAS = 200_000; uint32 internal constant MAX_TOKEN_POOL_TRANSFER_GAS = 50_000; - function _generateDynamicOffRampConfig(address feeQuoter) internal pure returns (OffRamp.DynamicConfig memory) { + function _generateDynamicOffRampConfig( + address feeQuoter + ) internal pure returns (OffRamp.DynamicConfig memory) { return OffRamp.DynamicConfig({ permissionLessExecutionThresholdSeconds: PERMISSION_LESS_EXECUTION_THRESHOLD_SECONDS, feeQuoter: feeQuoter, @@ -463,7 +467,9 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { s_offRamp.commit(reportContext, abi.encode(commitReport), rs, ss, rawVs); } - function _execute(Internal.ExecutionReportSingleChain[] memory reports) internal { + function _execute( + Internal.ExecutionReportSingleChain[] memory reports + ) internal { bytes32[3] memory reportContext = [s_configDigestExec, s_configDigestExec, s_configDigestExec]; vm.startPrank(s_validTransmitters[0]); @@ -526,7 +532,9 @@ contract OffRampSetup is FeeQuoterSetup, MultiOCR3BaseSetup { } } - function _assertNoEmit(bytes32 eventSelector) internal { + function _assertNoEmit( + bytes32 eventSelector + ) internal { Vm.Log[] memory logs = vm.getRecordedLogs(); for (uint256 i = 0; i < logs.length; i++) { diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol index f0cd0f80ed..07f3f459ce 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRamp.t.sol @@ -14,6 +14,9 @@ import {TokenPool} from "../../pools/TokenPool.sol"; import {MaybeRevertingBurnMintTokenPool} from "../helpers/MaybeRevertingBurnMintTokenPool.sol"; import "./EVM2EVMOnRampSetup.t.sol"; +import {IERC20Metadata} from + "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; + contract EVM2EVMOnRamp_constructor is EVM2EVMOnRampSetup { function test_Constructor_Success() public { EVM2EVMOnRamp.StaticConfig memory staticConfig = EVM2EVMOnRamp.StaticConfig({ @@ -67,7 +70,9 @@ contract EVM2EVMOnRamp_constructor is EVM2EVMOnRampSetup { } contract EVM2EVMOnRamp_payNops_fuzz is EVM2EVMOnRampSetup { - function test_Fuzz_NopPayNops_Success(uint96 nopFeesJuels) public { + function test_Fuzz_NopPayNops_Success( + uint96 nopFeesJuels + ) public { (EVM2EVMOnRamp.NopAndWeight[] memory nopsAndWeights, uint256 weightsTotal) = s_onRamp.getNops(); // To avoid NoFeesToPay vm.assume(nopFeesJuels > weightsTotal); @@ -569,7 +574,7 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup { Internal.SourceTokenData({ sourcePoolAddress: abi.encode(s_sourcePoolByToken[changedToken]), destTokenAddress: abi.encode(s_destTokenBySourceToken[changedToken]), - extraData: "", + extraData: abi.encode(DEFAULT_TOKEN_DECIMALS), // The user will be billed either the default or the override, so we send the exact amount that we billed for // to the destination chain to be used for the token releaseOrMint and transfer. destGasAmount: tokenTransferFeeConfigArgs[0].destGasOverhead @@ -770,7 +775,7 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup { vm.startPrank(OWNER); MaybeRevertingBurnMintTokenPool newPool = new MaybeRevertingBurnMintTokenPool( - BurnMintERC677(sourceETH), new address[](0), address(s_mockRMN), address(s_sourceRouter) + BurnMintERC677(sourceETH), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) ); BurnMintERC677(sourceETH).grantMintAndBurnRoles(address(newPool)); deal(address(sourceETH), address(newPool), type(uint256).max); @@ -778,17 +783,19 @@ contract EVM2EVMOnRamp_forwardFromRouter is EVM2EVMOnRampSetup { // Add TokenPool to OnRamp s_tokenAdminRegistry.setPool(sourceETH, address(newPool)); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_destTokenPool); + // Allow chain in TokenPool TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destTokenPool), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - newPool.applyChainUpdates(chainUpdates); + newPool.applyChainUpdates(new uint64[](0), chainUpdates); Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(address(sourceETH), 1000); @@ -995,34 +1002,47 @@ contract EVM2EVMOnRamp_getFeeSetup is EVM2EVMOnRampSetup { s_tokenAdminRegistry.acceptAdminRole(CUSTOM_TOKEN); LockReleaseTokenPool wrappedNativePool = new LockReleaseTokenPool( - IERC20(s_sourceRouter.getWrappedNative()), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + IERC20(s_sourceRouter.getWrappedNative()), + DEFAULT_TOKEN_DECIMALS, + new address[](0), + address(s_mockRMN), + true, + address(s_sourceRouter) ); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(address(111111)); + TokenPool.ChainUpdate[] memory wrappedNativeChainUpdate = new TokenPool.ChainUpdate[](1); wrappedNativeChainUpdate[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(address(111111)), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - wrappedNativePool.applyChainUpdates(wrappedNativeChainUpdate); + wrappedNativePool.applyChainUpdates(new uint64[](0), wrappedNativeChainUpdate); s_tokenAdminRegistry.setPool(s_sourceRouter.getWrappedNative(), address(wrappedNativePool)); + vm.mockCall( + CUSTOM_TOKEN, abi.encodeWithSelector(IERC20Metadata.decimals.selector), abi.encode(DEFAULT_TOKEN_DECIMALS) + ); + LockReleaseTokenPool customPool = new LockReleaseTokenPool( - IERC20(CUSTOM_TOKEN), new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + IERC20(CUSTOM_TOKEN), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), true, address(s_sourceRouter) ); + + remotePoolAddresses[0] = abi.encode(makeAddr("random")); + TokenPool.ChainUpdate[] memory customChainUpdate = new TokenPool.ChainUpdate[](1); customChainUpdate[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(makeAddr("random")), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - customPool.applyChainUpdates(customChainUpdate); + customPool.applyChainUpdates(new uint64[](0), customChainUpdate); s_tokenAdminRegistry.setPool(CUSTOM_TOKEN, address(customPool)); s_feeTokenPrice = s_sourceTokenPrices[0]; @@ -1045,7 +1065,9 @@ contract EVM2EVMOnRamp_getFeeSetup is EVM2EVMOnRampSetup { return (tokenAmount * ratio) / 1e5; } - function configUSDCentToWei(uint256 usdCent) internal pure returns (uint256) { + function configUSDCentToWei( + uint256 usdCent + ) internal pure returns (uint256) { return usdCent * 1e16; } } diff --git a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol index 84350448a1..ead48ed98e 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/EVM2EVMOnRampSetup.t.sol @@ -223,7 +223,7 @@ contract EVM2EVMOnRampSetup is TokenSetup, FeeQuoterSetup { Internal.SourceTokenData({ sourcePoolAddress: abi.encode(s_sourcePoolByToken[message.tokenAmounts[i].token]), destTokenAddress: abi.encode(s_destTokenBySourceToken[message.tokenAmounts[i].token]), - extraData: "", + extraData: abi.encode(DEFAULT_TOKEN_DECIMALS), destGasAmount: tokenTransferFeeConfig.isEnabled ? tokenTransferFeeConfig.destGasOverhead : DEFAULT_TOKEN_DEST_GAS_OVERHEAD diff --git a/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol index 16889db39e..fdd6130e3d 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol @@ -531,7 +531,11 @@ contract OnRamp_forwardFromRouter is OnRampSetup { vm.startPrank(OWNER); MaybeRevertingBurnMintTokenPool newPool = new MaybeRevertingBurnMintTokenPool( - BurnMintERC677(sourceETH), new address[](0), address(s_mockRMNRemote), address(s_sourceRouter) + BurnMintERC677(sourceETH), + DEFAULT_TOKEN_DECIMALS, + new address[](0), + address(s_mockRMNRemote), + address(s_sourceRouter) ); BurnMintERC677(sourceETH).grantMintAndBurnRoles(address(newPool)); deal(address(sourceETH), address(newPool), type(uint256).max); @@ -539,17 +543,19 @@ contract OnRamp_forwardFromRouter is OnRampSetup { // Add TokenPool to OnRamp s_tokenAdminRegistry.setPool(sourceETH, address(newPool)); + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_destTokenPool); + // Allow chain in TokenPool TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destTokenPool), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_destToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - newPool.applyChainUpdates(chainUpdates); + newPool.applyChainUpdates(new uint64[](0), chainUpdates); Client.EVM2AnyMessage memory message = _generateSingleTokenMessage(address(sourceETH), 1000); @@ -809,7 +815,9 @@ contract OnRamp_withdrawFeeTokens is OnRampSetup { } } - function test_Fuzz_WithdrawFeeTokens_Success(uint256[5] memory amounts) public { + function test_Fuzz_WithdrawFeeTokens_Success( + uint256[5] memory amounts + ) public { vm.startPrank(OWNER); address[] memory feeTokens = new address[](amounts.length); for (uint256 i = 0; i < amounts.length; ++i) { diff --git a/contracts/src/v0.8/ccip/test/onRamp/OnRampSetup.t.sol b/contracts/src/v0.8/ccip/test/onRamp/OnRampSetup.t.sol index 541146bdaf..7ba22d9458 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/OnRampSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/OnRampSetup.t.sol @@ -105,7 +105,9 @@ contract OnRampSetup is FeeQuoterFeeSetup { ); } - function _generateDynamicOnRampConfig(address feeQuoter) internal pure returns (OnRamp.DynamicConfig memory) { + function _generateDynamicOnRampConfig( + address feeQuoter + ) internal pure returns (OnRamp.DynamicConfig memory) { return OnRamp.DynamicConfig({ feeQuoter: feeQuoter, reentrancyGuardEntered: false, @@ -116,7 +118,9 @@ contract OnRampSetup is FeeQuoterFeeSetup { } // Slicing is only available for calldata. So we have to build a new bytes array. - function _removeFirst4Bytes(bytes memory data) internal pure returns (bytes memory) { + function _removeFirst4Bytes( + bytes memory data + ) internal pure returns (bytes memory) { bytes memory result = new bytes(data.length - 4); for (uint256 i = 4; i < data.length; ++i) { result[i - 4] = data[i]; @@ -124,7 +128,9 @@ contract OnRampSetup is FeeQuoterFeeSetup { return result; } - function _generateDestChainConfigArgs(IRouter router) internal pure returns (OnRamp.DestChainConfigArgs[] memory) { + function _generateDestChainConfigArgs( + IRouter router + ) internal pure returns (OnRamp.DestChainConfigArgs[] memory) { OnRamp.DestChainConfigArgs[] memory destChainConfigs = new OnRamp.DestChainConfigArgs[](1); destChainConfigs[0] = OnRamp.DestChainConfigArgs({destChainSelector: DEST_CHAIN_SELECTOR, router: router, allowListEnabled: false}); diff --git a/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPool.lockOrBurn.t.sol similarity index 53% rename from contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol rename to contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPool.lockOrBurn.t.sol index b5967e74d1..44a8f2299a 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPool.lockOrBurn.t.sol @@ -1,41 +1,27 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {BurnFromMintTokenPool} from "../../pools/BurnFromMintTokenPool.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {BurnMintSetup} from "./BurnMintSetup.t.sol"; +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {BurnFromMintTokenPoolSetup} from "./BurnFromMintTokenPoolSetup.t.sol"; -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -contract BurnFromMintTokenPoolSetup is BurnMintSetup { - BurnFromMintTokenPool internal s_pool; - - function setUp() public virtual override { - BurnMintSetup.setUp(); - - s_pool = new BurnFromMintTokenPool(s_burnMintERC677, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - s_burnMintERC677.grantMintAndBurnRoles(address(s_pool)); - - _applyChainUpdates(address(s_pool)); - } -} +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { - function test_Setup_Success() public view { - assertEq(address(s_burnMintERC677), address(s_pool.getToken())); + function test_setup_Success() public view { + assertEq(address(s_burnMintERC20), address(s_pool.getToken())); assertEq(address(s_mockRMN), s_pool.getRmnProxy()); assertEq(false, s_pool.getAllowListEnabled()); - assertEq(type(uint256).max, s_burnMintERC677.allowance(address(s_pool), address(s_pool))); - assertEq("BurnFromMintTokenPool 1.5.0", s_pool.typeAndVersion()); + assertEq(type(uint256).max, s_burnMintERC20.allowance(address(s_pool), address(s_pool))); + assertEq("BurnFromMintTokenPool 1.5.1", s_pool.typeAndVersion()); } function test_PoolBurn_Success() public { uint256 burnAmount = 20_000e18; - deal(address(s_burnMintERC677), address(s_pool), burnAmount); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), burnAmount); + deal(address(s_burnMintERC20), address(s_pool), burnAmount); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), burnAmount); vm.startPrank(s_burnMintOnRamp); @@ -49,7 +35,7 @@ contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { emit TokenPool.Burned(address(s_burnMintOnRamp), burnAmount); bytes4 expectedSignature = bytes4(keccak256("burnFrom(address,uint256)")); - vm.expectCall(address(s_burnMintERC677), abi.encodeWithSelector(expectedSignature, address(s_pool), burnAmount)); + vm.expectCall(address(s_burnMintERC20), abi.encodeWithSelector(expectedSignature, address(s_pool), burnAmount)); s_pool.lockOrBurn( Pool.LockOrBurnInV1({ @@ -57,17 +43,17 @@ contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { receiver: bytes(""), amount: burnAmount, remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) + localToken: address(s_burnMintERC20) }) ); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), 0); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), 0); } // Should not burn tokens if cursed. function test_PoolBurnRevertNotHealthy_Revert() public { s_mockRMN.setGlobalCursed(true); - uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); + uint256 before = s_burnMintERC20.balanceOf(address(s_pool)); vm.startPrank(s_burnMintOnRamp); vm.expectRevert(TokenPool.CursedByRMN.selector); @@ -77,11 +63,11 @@ contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { receiver: bytes(""), amount: 1e5, remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) + localToken: address(s_burnMintERC20) }) ); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), before); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), before); } function test_ChainNotAllowed_Revert() public { @@ -92,7 +78,7 @@ contract BurnFromMintTokenPool_lockOrBurn is BurnFromMintTokenPoolSetup { originalSender: bytes(""), receiver: OWNER, amount: 1, - localToken: address(s_burnMintERC677), + localToken: address(s_burnMintERC20), remoteChainSelector: wrongChainSelector, sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, sourcePoolData: _generateSourceTokenData().extraData, diff --git a/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPoolSetup.t.sol new file mode 100644 index 0000000000..98de04ea3f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/BurnFromMintTokenPool/BurnFromMintTokenPoolSetup.t.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {BurnFromMintTokenPool} from "../../../pools/BurnFromMintTokenPool.sol"; +import {BurnMintSetup} from "../BurnMintTokenPool/BurnMintSetup.t.sol"; + +contract BurnFromMintTokenPoolSetup is BurnMintSetup { + BurnFromMintTokenPool internal s_pool; + + function setUp() public virtual override { + BurnMintSetup.setUp(); + + s_pool = new BurnFromMintTokenPool( + s_burnMintERC20, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + s_burnMintERC20.grantMintAndBurnRoles(address(s_pool)); + + _applyChainUpdates(address(s_pool)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol deleted file mode 100644 index 8a6d047380..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool.t.sol +++ /dev/null @@ -1,168 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {BurnMintTokenPool} from "../../pools/BurnMintTokenPool.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {BurnMintSetup} from "./BurnMintSetup.t.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -contract BurnMintTokenPoolSetup is BurnMintSetup { - BurnMintTokenPool internal s_pool; - - function setUp() public virtual override { - BurnMintSetup.setUp(); - - s_pool = new BurnMintTokenPool(s_burnMintERC677, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - s_burnMintERC677.grantMintAndBurnRoles(address(s_pool)); - - _applyChainUpdates(address(s_pool)); - } -} - -contract BurnMintTokenPool_lockOrBurn is BurnMintTokenPoolSetup { - function test_Setup_Success() public view { - assertEq(address(s_burnMintERC677), address(s_pool.getToken())); - assertEq(address(s_mockRMN), s_pool.getRmnProxy()); - assertEq(false, s_pool.getAllowListEnabled()); - assertEq("BurnMintTokenPool 1.5.0", s_pool.typeAndVersion()); - } - - function test_PoolBurn_Success() public { - uint256 burnAmount = 20_000e18; - - deal(address(s_burnMintERC677), address(s_pool), burnAmount); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), burnAmount); - - vm.startPrank(s_burnMintOnRamp); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(burnAmount); - - vm.expectEmit(); - emit IERC20.Transfer(address(s_pool), address(0), burnAmount); - - vm.expectEmit(); - emit TokenPool.Burned(address(s_burnMintOnRamp), burnAmount); - - bytes4 expectedSignature = bytes4(keccak256("burn(uint256)")); - vm.expectCall(address(s_burnMintERC677), abi.encodeWithSelector(expectedSignature, burnAmount)); - - s_pool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: bytes(""), - amount: burnAmount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) - }) - ); - - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), 0); - } - - // Should not burn tokens if cursed. - function test_PoolBurnRevertNotHealthy_Revert() public { - s_mockRMN.setGlobalCursed(true); - uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); - vm.startPrank(s_burnMintOnRamp); - - vm.expectRevert(TokenPool.CursedByRMN.selector); - s_pool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: bytes(""), - amount: 1e5, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) - }) - ); - - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), before); - } - - function test_ChainNotAllowed_Revert() public { - uint64 wrongChainSelector = 8838833; - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, wrongChainSelector)); - s_pool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: bytes(""), - amount: 1, - remoteChainSelector: wrongChainSelector, - localToken: address(s_burnMintERC677) - }) - ); - } -} - -contract BurnMintTokenPool_releaseOrMint is BurnMintTokenPoolSetup { - function test_PoolMint_Success() public { - uint256 amount = 1e19; - address receiver = makeAddr("receiver_address"); - - vm.startPrank(s_burnMintOffRamp); - - vm.expectEmit(); - emit IERC20.Transfer(address(0), receiver, amount); - - s_pool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: receiver, - amount: amount, - localToken: address(s_burnMintERC677), - remoteChainSelector: DEST_CHAIN_SELECTOR, - sourcePoolAddress: abi.encode(s_remoteBurnMintPool), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - - assertEq(s_burnMintERC677.balanceOf(receiver), amount); - } - - function test_PoolMintNotHealthy_Revert() public { - // Should not mint tokens if cursed. - s_mockRMN.setGlobalCursed(true); - uint256 before = s_burnMintERC677.balanceOf(OWNER); - vm.startPrank(s_burnMintOffRamp); - - vm.expectRevert(TokenPool.CursedByRMN.selector); - s_pool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: 1e5, - localToken: address(s_burnMintERC677), - remoteChainSelector: DEST_CHAIN_SELECTOR, - sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, - sourcePoolData: _generateSourceTokenData().extraData, - offchainTokenData: "" - }) - ); - - assertEq(s_burnMintERC677.balanceOf(OWNER), before); - } - - function test_ChainNotAllowed_Revert() public { - uint64 wrongChainSelector = 8838833; - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, wrongChainSelector)); - s_pool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: 1, - localToken: address(s_burnMintERC677), - remoteChainSelector: wrongChainSelector, - sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, - sourcePoolData: _generateSourceTokenData().extraData, - offchainTokenData: "" - }) - ); - } -} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintSetup.t.sol similarity index 57% rename from contracts/src/v0.8/ccip/test/pools/BurnMintSetup.t.sol rename to contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintSetup.t.sol index 220f6ca112..08c600db5a 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnMintSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintSetup.t.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {BurnMintTokenPool} from "../../pools/BurnMintTokenPool.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {RouterSetup} from "../router/RouterSetup.t.sol"; +import {BurnMintERC20} from "../../../../shared/token/ERC20/BurnMintERC20.sol"; +import {Router} from "../../../Router.sol"; +import {BurnMintTokenPool} from "../../../pools/BurnMintTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {RouterSetup} from "../../router/RouterSetup.t.sol"; contract BurnMintSetup is RouterSetup { - BurnMintERC677 internal s_burnMintERC677; + BurnMintERC20 internal s_burnMintERC20; address internal s_burnMintOffRamp = makeAddr("burn_mint_offRamp"); address internal s_burnMintOnRamp = makeAddr("burn_mint_onRamp"); @@ -18,21 +18,25 @@ contract BurnMintSetup is RouterSetup { function setUp() public virtual override { RouterSetup.setUp(); - s_burnMintERC677 = new BurnMintERC677("Chainlink Token", "LINK", 18, 0); + s_burnMintERC20 = new BurnMintERC20("Chainlink Token", "LINK", 18, 0, 0); } - function _applyChainUpdates(address pool) internal { - TokenPool.ChainUpdate[] memory chains = new TokenPool.ChainUpdate[](1); - chains[0] = TokenPool.ChainUpdate({ + function _applyChainUpdates( + address pool + ) internal { + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_remoteBurnMintPool); + + TokenPool.ChainUpdate[] memory chainsToAdd = new TokenPool.ChainUpdate[](1); + chainsToAdd[0] = TokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_remoteBurnMintPool), + remotePoolAddresses: remotePoolAddresses, remoteTokenAddress: abi.encode(s_remoteToken), - allowed: true, outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), inboundRateLimiterConfig: _getInboundRateLimiterConfig() }); - BurnMintTokenPool(pool).applyChainUpdates(chains); + BurnMintTokenPool(pool).applyChainUpdates(new uint64[](0), chainsToAdd); Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_burnMintOnRamp}); diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.lockOrBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.lockOrBurn.t.sol new file mode 100644 index 0000000000..e0bbffa991 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.lockOrBurn.t.sol @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {BurnMintTokenPool} from "../../../pools/BurnMintTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {BurnMintSetup} from "./BurnMintSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract BurnMintTokenPoolSetup is BurnMintSetup { + BurnMintTokenPool internal s_pool; + + function setUp() public virtual override { + BurnMintSetup.setUp(); + + s_pool = new BurnMintTokenPool( + s_burnMintERC20, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + s_burnMintERC20.grantMintAndBurnRoles(address(s_pool)); + + _applyChainUpdates(address(s_pool)); + } +} + +contract BurnMintTokenPool_lockOrBurn is BurnMintTokenPoolSetup { + function test_Setup_Success() public view { + assertEq(address(s_burnMintERC20), address(s_pool.getToken())); + assertEq(address(s_mockRMN), s_pool.getRmnProxy()); + assertEq(false, s_pool.getAllowListEnabled()); + assertEq("BurnMintTokenPool 1.5.1", s_pool.typeAndVersion()); + } + + function test_PoolBurn_Success() public { + uint256 burnAmount = 20_000e18; + + deal(address(s_burnMintERC20), address(s_pool), burnAmount); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), burnAmount); + + vm.startPrank(s_burnMintOnRamp); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(burnAmount); + + vm.expectEmit(); + emit IERC20.Transfer(address(s_pool), address(0), burnAmount); + + vm.expectEmit(); + emit TokenPool.Burned(address(s_burnMintOnRamp), burnAmount); + + bytes4 expectedSignature = bytes4(keccak256("burn(uint256)")); + vm.expectCall(address(s_burnMintERC20), abi.encodeWithSelector(expectedSignature, burnAmount)); + + s_pool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: bytes(""), + amount: burnAmount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_burnMintERC20) + }) + ); + + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), 0); + } + + // Should not burn tokens if cursed. + function test_PoolBurnRevertNotHealthy_Revert() public { + s_mockRMN.setGlobalCursed(true); + uint256 before = s_burnMintERC20.balanceOf(address(s_pool)); + vm.startPrank(s_burnMintOnRamp); + + vm.expectRevert(TokenPool.CursedByRMN.selector); + s_pool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: bytes(""), + amount: 1e5, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_burnMintERC20) + }) + ); + + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), before); + } + + function test_ChainNotAllowed_Revert() public { + uint64 wrongChainSelector = 8838833; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, wrongChainSelector)); + s_pool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: bytes(""), + amount: 1, + remoteChainSelector: wrongChainSelector, + localToken: address(s_burnMintERC20) + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.releaseOrMint.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.releaseOrMint.t.sol new file mode 100644 index 0000000000..e950b07988 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/BurnMintTokenPool/BurnMintTokenPool.releaseOrMint.t.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../libraries/Pool.sol"; +import {BurnMintTokenPool} from "../../../pools/BurnMintTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {BurnMintSetup} from "./BurnMintSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract BurnMintTokenPoolSetup is BurnMintSetup { + BurnMintTokenPool internal s_pool; + + function setUp() public virtual override { + BurnMintSetup.setUp(); + + s_pool = new BurnMintTokenPool( + s_burnMintERC20, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + s_burnMintERC20.grantMintAndBurnRoles(address(s_pool)); + + _applyChainUpdates(address(s_pool)); + } +} + +contract BurnMintTokenPool_releaseOrMint is BurnMintTokenPoolSetup { + function test_PoolMint_Success() public { + uint256 amount = 1e19; + address receiver = makeAddr("receiver_address"); + + vm.startPrank(s_burnMintOffRamp); + + vm.expectEmit(); + emit IERC20.Transfer(address(0), receiver, amount); + + s_pool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: receiver, + amount: amount, + localToken: address(s_burnMintERC20), + remoteChainSelector: DEST_CHAIN_SELECTOR, + sourcePoolAddress: abi.encode(s_remoteBurnMintPool), + sourcePoolData: "", + offchainTokenData: "" + }) + ); + + assertEq(s_burnMintERC20.balanceOf(receiver), amount); + } + + function test_PoolMintNotHealthy_Revert() public { + // Should not mint tokens if cursed. + s_mockRMN.setGlobalCursed(true); + uint256 before = s_burnMintERC20.balanceOf(OWNER); + vm.startPrank(s_burnMintOffRamp); + + vm.expectRevert(TokenPool.CursedByRMN.selector); + s_pool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: OWNER, + amount: 1e5, + localToken: address(s_burnMintERC20), + remoteChainSelector: DEST_CHAIN_SELECTOR, + sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, + sourcePoolData: _generateSourceTokenData().extraData, + offchainTokenData: "" + }) + ); + + assertEq(s_burnMintERC20.balanceOf(OWNER), before); + } + + function test_ChainNotAllowed_Revert() public { + uint64 wrongChainSelector = 8838833; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, wrongChainSelector)); + s_pool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: OWNER, + amount: 1, + localToken: address(s_burnMintERC20), + remoteChainSelector: wrongChainSelector, + sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, + sourcePoolData: _generateSourceTokenData().extraData, + offchainTokenData: "" + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnMintWithLockReleaseFlagTokenPool/BurnMintWithLockReleaseFlagTokenPool.lockOrBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnMintWithLockReleaseFlagTokenPool/BurnMintWithLockReleaseFlagTokenPool.lockOrBurn.t.sol new file mode 100644 index 0000000000..bb58afd254 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/BurnMintWithLockReleaseFlagTokenPool/BurnMintWithLockReleaseFlagTokenPool.lockOrBurn.t.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {BurnMintWithLockReleaseFlagTokenPool} from "../../../pools/USDC/BurnMintWithLockReleaseFlagTokenPool.sol"; + +import {LOCK_RELEASE_FLAG} from "../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {BurnMintSetup} from "../BurnMintTokenPool/BurnMintSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract BurnMintWithLockReleaseFlagTokenPoolSetup is BurnMintSetup { + BurnMintWithLockReleaseFlagTokenPool internal s_pool; + + function setUp() public virtual override { + BurnMintSetup.setUp(); + + s_pool = new BurnMintWithLockReleaseFlagTokenPool( + s_burnMintERC20, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + s_burnMintERC20.grantMintAndBurnRoles(address(s_pool)); + + _applyChainUpdates(address(s_pool)); + } +} + +contract BurnMintWithLockReleaseFlagTokenPool_lockOrBurn is BurnMintWithLockReleaseFlagTokenPoolSetup { + function test_LockOrBurn_CorrectReturnData_Success() public { + uint256 burnAmount = 20_000e18; + + deal(address(s_burnMintERC20), address(s_pool), burnAmount); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), burnAmount); + + vm.startPrank(s_burnMintOnRamp); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(burnAmount); + + vm.expectEmit(); + emit IERC20.Transfer(address(s_pool), address(0), burnAmount); + + vm.expectEmit(); + emit TokenPool.Burned(address(s_burnMintOnRamp), burnAmount); + + bytes4 expectedSignature = bytes4(keccak256("burn(uint256)")); + vm.expectCall(address(s_burnMintERC20), abi.encodeWithSelector(expectedSignature, burnAmount)); + + Pool.LockOrBurnOutV1 memory lockOrBurnOut = s_pool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: bytes(""), + amount: burnAmount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_burnMintERC20) + }) + ); + + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), 0); + + assertEq(bytes4(lockOrBurnOut.destPoolData), LOCK_RELEASE_FLAG); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintRebasingTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintRebasingTokenPool.t.sol deleted file mode 100644 index c88f030c56..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintRebasingTokenPool.t.sol +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; - -import {Pool} from "../../libraries/Pool.sol"; -import {BurnWithFromMintRebasingTokenPool} from "../../pools/BurnWithFromMintRebasingTokenPool.sol"; -import {BurnMintSetup} from "./BurnMintSetup.t.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {ERC20RebasingHelper} from "../helpers/ERC20RebasingHelper.sol"; - -contract BurnWithFromMintRebasingTokenPoolSetup is BurnMintSetup { - BurnWithFromMintRebasingTokenPool internal s_pool; - ERC20RebasingHelper internal s_rebasingToken; - - function setUp() public virtual override { - BurnMintSetup.setUp(); - - s_rebasingToken = new ERC20RebasingHelper(); - - s_pool = new BurnWithFromMintRebasingTokenPool( - IBurnMintERC20(address(s_rebasingToken)), new address[](0), address(s_mockRMN), address(s_sourceRouter) - ); - - _applyChainUpdates(address(s_pool)); - - deal(address(s_rebasingToken), OWNER, 1e18); - - vm.startPrank(s_burnMintOffRamp); - } -} - -contract BurnWithFromMintTokenPool_releaseOrMint is BurnWithFromMintRebasingTokenPoolSetup { - function test_Setup_Success() public view { - assertEq(address(s_rebasingToken), address(s_pool.getToken())); - assertEq(address(s_mockRMN), s_pool.getRmnProxy()); - assertEq(false, s_pool.getAllowListEnabled()); - assertEq(type(uint256).max, s_rebasingToken.allowance(address(s_pool), address(s_pool))); - assertEq("BurnWithFromMintRebasingTokenPool 1.5.0", s_pool.typeAndVersion()); - } - - function test_releaseOrMint_Success() public { - uint256 amount = 1000; - uint256 balancePre = s_rebasingToken.balanceOf(address(OWNER)); - - Pool.ReleaseOrMintOutV1 memory releaseOrMintOut = s_pool.releaseOrMint(_getReleaseOrMintIn(amount)); - - assertEq(amount, releaseOrMintOut.destinationAmount); - assertEq(balancePre + amount, s_rebasingToken.balanceOf(address(OWNER))); - } - - function testFuzz_releaseOrMint_rebasing_success(uint16 multiplierPercentage) public { - uint256 amount = 1000; - uint256 expectedAmount = amount * multiplierPercentage / 100; - s_rebasingToken.setMultiplierPercentage(multiplierPercentage); - - uint256 balancePre = s_rebasingToken.balanceOf(address(OWNER)); - - Pool.ReleaseOrMintOutV1 memory releaseOrMintOut = s_pool.releaseOrMint(_getReleaseOrMintIn(amount)); - - assertEq(expectedAmount, releaseOrMintOut.destinationAmount); - assertEq(balancePre + expectedAmount, s_rebasingToken.balanceOf(address(OWNER))); - } - - function test_releaseOrMint_NegativeMintAmount_reverts() public { - uint256 amount = 1000; - s_rebasingToken.setMintShouldBurn(true); - - vm.expectRevert(abi.encodeWithSelector(BurnWithFromMintRebasingTokenPool.NegativeMintAmount.selector, amount)); - - s_pool.releaseOrMint(_getReleaseOrMintIn(amount)); - } - - function _getReleaseOrMintIn(uint256 amount) internal view returns (Pool.ReleaseOrMintInV1 memory) { - return Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: amount, - localToken: address(s_rebasingToken), - remoteChainSelector: DEST_CHAIN_SELECTOR, - sourcePoolAddress: abi.encode(s_remoteBurnMintPool), - sourcePoolData: "", - offchainTokenData: "" - }); - } -} diff --git a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.lockOrBurn.t.sol similarity index 60% rename from contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol rename to contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.lockOrBurn.t.sol index 92e871708d..b96dcd78b5 100644 --- a/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.lockOrBurn.t.sol @@ -1,13 +1,13 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {BurnWithFromMintTokenPool} from "../../pools/BurnWithFromMintTokenPool.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {BurnMintSetup} from "./BurnMintSetup.t.sol"; +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {BurnWithFromMintTokenPool} from "../../../pools/BurnWithFromMintTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {BurnMintSetup} from "../BurnMintTokenPool/BurnMintSetup.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 BurnWithFromMintTokenPoolSetup is BurnMintSetup { BurnWithFromMintTokenPool internal s_pool; @@ -15,9 +15,10 @@ contract BurnWithFromMintTokenPoolSetup is BurnMintSetup { function setUp() public virtual override { BurnMintSetup.setUp(); - s_pool = - new BurnWithFromMintTokenPool(s_burnMintERC677, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - s_burnMintERC677.grantMintAndBurnRoles(address(s_pool)); + s_pool = new BurnWithFromMintTokenPool( + s_burnMintERC20, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + s_burnMintERC20.grantMintAndBurnRoles(address(s_pool)); _applyChainUpdates(address(s_pool)); } @@ -25,18 +26,18 @@ contract BurnWithFromMintTokenPoolSetup is BurnMintSetup { contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup { function test_Setup_Success() public view { - assertEq(address(s_burnMintERC677), address(s_pool.getToken())); + assertEq(address(s_burnMintERC20), address(s_pool.getToken())); assertEq(address(s_mockRMN), s_pool.getRmnProxy()); assertEq(false, s_pool.getAllowListEnabled()); - assertEq(type(uint256).max, s_burnMintERC677.allowance(address(s_pool), address(s_pool))); - assertEq("BurnWithFromMintTokenPool 1.5.0", s_pool.typeAndVersion()); + assertEq(type(uint256).max, s_burnMintERC20.allowance(address(s_pool), address(s_pool))); + assertEq("BurnWithFromMintTokenPool 1.5.1", s_pool.typeAndVersion()); } function test_PoolBurn_Success() public { uint256 burnAmount = 20_000e18; - deal(address(s_burnMintERC677), address(s_pool), burnAmount); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), burnAmount); + deal(address(s_burnMintERC20), address(s_pool), burnAmount); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), burnAmount); vm.startPrank(s_burnMintOnRamp); @@ -50,7 +51,7 @@ contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup emit TokenPool.Burned(address(s_burnMintOnRamp), burnAmount); bytes4 expectedSignature = bytes4(keccak256("burn(address,uint256)")); - vm.expectCall(address(s_burnMintERC677), abi.encodeWithSelector(expectedSignature, address(s_pool), burnAmount)); + vm.expectCall(address(s_burnMintERC20), abi.encodeWithSelector(expectedSignature, address(s_pool), burnAmount)); s_pool.lockOrBurn( Pool.LockOrBurnInV1({ @@ -58,17 +59,17 @@ contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup receiver: bytes(""), amount: burnAmount, remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) + localToken: address(s_burnMintERC20) }) ); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), 0); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), 0); } // Should not burn tokens if cursed. function test_PoolBurnRevertNotHealthy_Revert() public { s_mockRMN.setGlobalCursed(true); - uint256 before = s_burnMintERC677.balanceOf(address(s_pool)); + uint256 before = s_burnMintERC20.balanceOf(address(s_pool)); vm.startPrank(s_burnMintOnRamp); vm.expectRevert(TokenPool.CursedByRMN.selector); @@ -78,11 +79,11 @@ contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup receiver: bytes(""), amount: 1e5, remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_burnMintERC677) + localToken: address(s_burnMintERC20) }) ); - assertEq(s_burnMintERC677.balanceOf(address(s_pool)), before); + assertEq(s_burnMintERC20.balanceOf(address(s_pool)), before); } function test_ChainNotAllowed_Revert() public { @@ -93,7 +94,7 @@ contract BurnWithFromMintTokenPool_lockOrBurn is BurnWithFromMintTokenPoolSetup originalSender: bytes(""), receiver: OWNER, amount: 1, - localToken: address(s_burnMintERC677), + localToken: address(s_burnMintERC20), remoteChainSelector: wrongChainSelector, sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, sourcePoolData: _generateSourceTokenData().extraData, diff --git a/contracts/src/v0.8/ccip/test/pools/HybridLockReleaseUSDCTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/HybridLockReleaseUSDCTokenPool.t.sol deleted file mode 100644 index ddb8c29dc2..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/HybridLockReleaseUSDCTokenPool.t.sol +++ /dev/null @@ -1,884 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {ILiquidityContainer} from "../../../liquiditymanager/interfaces/ILiquidityContainer.sol"; -import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; -import {IPoolV1} from "../../interfaces/IPool.sol"; -import {ITokenMessenger} from "../../pools/USDC/ITokenMessenger.sol"; - -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {Internal} from "../../libraries/Internal.sol"; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; - -import {TokenPool} from "../../pools/TokenPool.sol"; -import {HybridLockReleaseUSDCTokenPool} from "../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; -import {USDCBridgeMigrator} from "../../pools/USDC/USDCBridgeMigrator.sol"; -import {USDCTokenPool} from "../../pools/USDC/USDCTokenPool.sol"; -import {BaseTest} from "../BaseTest.t.sol"; -import {MockE2EUSDCTransmitter} from "../mocks/MockE2EUSDCTransmitter.sol"; -import {MockUSDCTokenMessenger} from "../mocks/MockUSDCTokenMessenger.sol"; - -import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; - -contract USDCTokenPoolSetup is BaseTest { - IBurnMintERC20 internal s_token; - MockUSDCTokenMessenger internal s_mockUSDC; - MockE2EUSDCTransmitter internal s_mockUSDCTransmitter; - uint32 internal constant USDC_DEST_TOKEN_GAS = 150_000; - - struct USDCMessage { - uint32 version; - uint32 sourceDomain; - uint32 destinationDomain; - uint64 nonce; - bytes32 sender; - bytes32 recipient; - bytes32 destinationCaller; - bytes messageBody; - } - - uint32 internal constant SOURCE_DOMAIN_IDENTIFIER = 0x02020202; - uint32 internal constant DEST_DOMAIN_IDENTIFIER = 0; - - bytes32 internal constant SOURCE_CHAIN_TOKEN_SENDER = bytes32(uint256(uint160(0x01111111221))); - address internal constant SOURCE_CHAIN_USDC_POOL = address(0x23789765456789); - address internal constant DEST_CHAIN_USDC_POOL = address(0x987384873458734); - address internal constant DEST_CHAIN_USDC_TOKEN = address(0x23598918358198766); - - address internal s_routerAllowedOnRamp = address(3456); - address internal s_routerAllowedOffRamp = address(234); - Router internal s_router; - - HybridLockReleaseUSDCTokenPool internal s_usdcTokenPool; - HybridLockReleaseUSDCTokenPool internal s_usdcTokenPoolTransferLiquidity; - address[] internal s_allowedList; - - function setUp() public virtual override { - BaseTest.setUp(); - BurnMintERC677 usdcToken = new BurnMintERC677("LINK", "LNK", 18, 0); - s_token = usdcToken; - deal(address(s_token), OWNER, type(uint256).max); - setUpRamps(); - - s_mockUSDCTransmitter = new MockE2EUSDCTransmitter(0, DEST_DOMAIN_IDENTIFIER, address(s_token)); - s_mockUSDC = new MockUSDCTokenMessenger(0, address(s_mockUSDCTransmitter)); - - usdcToken.grantMintAndBurnRoles(address(s_mockUSDCTransmitter)); - - s_usdcTokenPool = - new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); - - s_usdcTokenPoolTransferLiquidity = - new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); - - usdcToken.grantMintAndBurnRoles(address(s_mockUSDC)); - usdcToken.grantMintAndBurnRoles(address(s_usdcTokenPool)); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - remoteTokenAddress: abi.encode(address(s_token)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - chainUpdates[1] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(DEST_CHAIN_USDC_POOL), - remoteTokenAddress: abi.encode(DEST_CHAIN_USDC_TOKEN), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_usdcTokenPool.applyChainUpdates(chainUpdates); - - USDCTokenPool.DomainUpdate[] memory domains = new USDCTokenPool.DomainUpdate[](1); - domains[0] = USDCTokenPool.DomainUpdate({ - destChainSelector: DEST_CHAIN_SELECTOR, - domainIdentifier: 9999, - allowedCaller: keccak256("allowedCaller"), - enabled: true - }); - - s_usdcTokenPool.setDomains(domains); - - vm.expectEmit(); - emit HybridLockReleaseUSDCTokenPool.LiquidityProviderSet(address(0), OWNER, DEST_CHAIN_SELECTOR); - - s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); - s_usdcTokenPool.setLiquidityProvider(SOURCE_CHAIN_SELECTOR, OWNER); - } - - function setUpRamps() internal { - s_router = new Router(address(s_token), address(s_mockRMN)); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_routerAllowedOnRamp}); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - address[] memory offRamps = new address[](1); - offRamps[0] = s_routerAllowedOffRamp; - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: offRamps[0]}); - - s_router.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); - } - - function _generateUSDCMessage(USDCMessage memory usdcMessage) internal pure returns (bytes memory) { - return abi.encodePacked( - usdcMessage.version, - usdcMessage.sourceDomain, - usdcMessage.destinationDomain, - usdcMessage.nonce, - usdcMessage.sender, - usdcMessage.recipient, - usdcMessage.destinationCaller, - usdcMessage.messageBody - ); - } -} - -contract HybridUSDCTokenPoolTests is USDCTokenPoolSetup { - function test_LockOrBurn_onLockReleaseMechanism_Success() public { - bytes32 receiver = bytes32(uint256(uint160(STRANGER))); - - // Mark the destination chain as supporting CCTP, so use L/R instead. - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = DEST_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - assertTrue( - s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), - "Lock/Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" - ); - - uint256 amount = 1e6; - - s_token.transfer(address(s_usdcTokenPool), amount); - - vm.startPrank(s_routerAllowedOnRamp); - - vm.expectEmit(); - emit TokenPool.Locked(s_routerAllowedOnRamp, amount); - - s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(receiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), amount, "Incorrect token amount in the tokenPool"); - } - - function test_MintOrRelease_OnLockReleaseMechanism_Success() public { - address recipient = address(1234); - - // Designate the SOURCE_CHAIN as not using native-USDC, and so the L/R mechanism must be used instead - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = SOURCE_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - assertTrue( - s_usdcTokenPool.shouldUseLockRelease(SOURCE_CHAIN_SELECTOR), - "Lock/Release mech not configured for incoming message from SOURCE_CHAIN_SELECTOR" - ); - - vm.startPrank(OWNER); - s_usdcTokenPool.setLiquidityProvider(SOURCE_CHAIN_SELECTOR, OWNER); - - // Add 1e12 liquidity so that there's enough to release - vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); - - s_token.approve(address(s_usdcTokenPool), type(uint256).max); - - uint256 liquidityAmount = 1e12; - s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, liquidityAmount); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - uint256 amount = 1e6; - - vm.startPrank(s_routerAllowedOffRamp); - - vm.expectEmit(); - emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); - - Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: abi.encode(s_usdcTokenPool.LOCK_RELEASE_FLAG()), - offchainTokenData: "" - }) - ); - - assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); - - // Simulate the off-ramp forwarding tokens to the recipient on destination chain - // s_token.transfer(recipient, amount); - - assertEq( - s_token.balanceOf(address(s_usdcTokenPool)), - liquidityAmount - amount, - "Incorrect remaining liquidity in TokenPool" - ); - assertEq(s_token.balanceOf(recipient), amount, "Tokens not transferred to recipient"); - } - - function test_LockOrBurn_PrimaryMechanism_Success() public { - bytes32 receiver = bytes32(uint256(uint160(STRANGER))); - uint256 amount = 1; - - vm.startPrank(OWNER); - - s_token.transfer(address(s_usdcTokenPool), amount); - - vm.startPrank(s_routerAllowedOnRamp); - - USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - - vm.expectEmit(); - emit ITokenMessenger.DepositForBurn( - s_mockUSDC.s_nonce(), - address(s_token), - amount, - address(s_usdcTokenPool), - receiver, - expectedDomain.domainIdentifier, - s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), - expectedDomain.allowedCaller - ); - - vm.expectEmit(); - emit TokenPool.Burned(s_routerAllowedOnRamp, amount); - - Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(receiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); - assertEq(s_mockUSDC.s_nonce() - 1, nonce); - } - - // https://etherscan.io/tx/0xac9f501fe0b76df1f07a22e1db30929fd12524bc7068d74012dff948632f0883 - function test_MintOrRelease_incomingMessageWithPrimaryMechanism() public { - bytes memory encodedUsdcMessage = - hex"000000000000000300000000000000000000127a00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58310000000000000000000000004af08f56978be7dce2d1be3c65c005b41e79401c000000000000000000000000000000000000000000000000000000002057ff7a0000000000000000000000003a23f943181408eac424116af7b7790c94cb97a50000000000000000000000000000000000000000000000000000000000000000000000000000008274119237535fd659626b090f87e365ff89ebc7096bb32e8b0e85f155626b73ae7c4bb2485c184b7cc3cf7909045487890b104efb62ae74a73e32901bdcec91df1bb9ee08ccb014fcbcfe77b74d1263fd4e0b0e8de05d6c9a5913554364abfd5ea768b222f50c715908183905d74044bb2b97527c7e70ae7983c443a603557cac3b1c000000000000000000000000000000000000000000000000000000000000"; - bytes memory attestation = bytes("attestation bytes"); - - uint32 nonce = 4730; - uint32 sourceDomain = 3; - uint256 amount = 100; - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - // The mocked receiver does not release the token to the pool, so we manually do it here - deal(address(s_token), address(s_usdcTokenPool), amount); - - bytes memory offchainTokenData = - abi.encode(USDCTokenPool.MessageAndAttestation({message: encodedUsdcMessage, attestation: attestation})); - - vm.expectCall( - address(s_mockUSDCTransmitter), - abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, encodedUsdcMessage, attestation) - ); - - vm.startPrank(s_routerAllowedOffRamp); - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: OWNER, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourceTokenData.extraData, - offchainTokenData: offchainTokenData - }) - ); - } - - function test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() public { - // Test Enabling the LR mechanism and sending an outgoing message - test_LockOrBurn_PrimaryMechanism_Success(); - - // Disable the LR mechanism so that primary CCTP is used and then attempt to send a message - uint64[] memory destChainRemoves = new uint64[](1); - destChainRemoves[0] = DEST_CHAIN_SELECTOR; - - vm.startPrank(OWNER); - - vm.expectEmit(); - emit HybridLockReleaseUSDCTokenPool.LockReleaseDisabled(DEST_CHAIN_SELECTOR); - - s_usdcTokenPool.updateChainSelectorMechanisms(destChainRemoves, new uint64[](0)); - - // Send an outgoing message - test_LockOrBurn_PrimaryMechanism_Success(); - } - - function test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() public { - test_MintOrRelease_OnLockReleaseMechanism_Success(); - - // Disable the LR mechanism so that primary CCTP is used and then attempt to send a message - uint64[] memory destChainRemoves = new uint64[](1); - destChainRemoves[0] = SOURCE_CHAIN_SELECTOR; - - vm.startPrank(OWNER); - - vm.expectEmit(); - emit HybridLockReleaseUSDCTokenPool.LockReleaseDisabled(SOURCE_CHAIN_SELECTOR); - - s_usdcTokenPool.updateChainSelectorMechanisms(destChainRemoves, new uint64[](0)); - - vm.expectEmit(); - emit HybridLockReleaseUSDCTokenPool.LiquidityProviderSet(OWNER, OWNER, SOURCE_CHAIN_SELECTOR); - - s_usdcTokenPool.setLiquidityProvider(SOURCE_CHAIN_SELECTOR, OWNER); - - // Test incoming on the primary mechanism after disable LR, simulating Circle's new support for CCTP on - // DEST_CHAIN_SELECTOR - test_MintOrRelease_incomingMessageWithPrimaryMechanism(); - } - - function test_LockOrBurn_WhileMigrationPause_Revert() public { - // Create a fake migration proposal - s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); - - assertEq(s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), DEST_CHAIN_SELECTOR); - - bytes32 receiver = bytes32(uint256(uint160(STRANGER))); - - // Mark the destination chain as supporting CCTP, so use L/R instead. - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = DEST_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - assertTrue( - s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), - "Lock Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" - ); - - uint256 amount = 1e6; - - s_token.transfer(address(s_usdcTokenPool), amount); - - vm.startPrank(s_routerAllowedOnRamp); - - // Expect the lockOrBurn to fail because a pending CCTP-Migration has paused outgoing messages on CCIP - vm.expectRevert( - abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, DEST_CHAIN_SELECTOR) - ); - - s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(receiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } - - function test_ReleaseOrMint_WhileMigrationPause_Revert() public { - address recipient = address(1234); - - // Designate the SOURCE_CHAIN as not using native-USDC, and so the L/R mechanism must be used instead - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = SOURCE_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - assertTrue( - s_usdcTokenPool.shouldUseLockRelease(SOURCE_CHAIN_SELECTOR), - "Lock/Release mech not configured for incoming message from SOURCE_CHAIN_SELECTOR" - ); - - vm.startPrank(OWNER); - - vm.expectEmit(); - emit USDCBridgeMigrator.CCTPMigrationProposed(SOURCE_CHAIN_SELECTOR); - - // Propose the migration to CCTP - s_usdcTokenPool.proposeCCTPMigration(SOURCE_CHAIN_SELECTOR); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - bytes memory sourcePoolDataLockRelease = abi.encode(s_usdcTokenPool.LOCK_RELEASE_FLAG()); - - uint256 amount = 1e6; - - vm.startPrank(s_routerAllowedOffRamp); - - // Expect revert because the lane is paused and no incoming messages should be allowed - vm.expectRevert( - abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, SOURCE_CHAIN_SELECTOR) - ); - - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourcePoolDataLockRelease, - offchainTokenData: "" - }) - ); - } - - function test_transferLiquidity_Success() public { - // Set as the OWNER so we can provide liquidity - vm.startPrank(OWNER); - - s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); - s_token.approve(address(s_usdcTokenPool), type(uint256).max); - - uint256 liquidityAmount = 1e9; - - // Provide some liquidity to the pool - s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, liquidityAmount); - - // Set the new token pool as the rebalancer - s_usdcTokenPool.transferOwnership(address(s_usdcTokenPoolTransferLiquidity)); - - vm.expectEmit(); - emit ILiquidityContainer.LiquidityRemoved(address(s_usdcTokenPoolTransferLiquidity), liquidityAmount); - - vm.expectEmit(); - emit HybridLockReleaseUSDCTokenPool.LiquidityTransferred( - address(s_usdcTokenPool), DEST_CHAIN_SELECTOR, liquidityAmount - ); - - s_usdcTokenPoolTransferLiquidity.transferLiquidity(address(s_usdcTokenPool), DEST_CHAIN_SELECTOR); - - assertEq( - s_usdcTokenPool.owner(), - address(s_usdcTokenPoolTransferLiquidity), - "Ownership of the old pool should be transferred to the new pool" - ); - - assertEq( - s_usdcTokenPoolTransferLiquidity.getLockedTokensForChain(DEST_CHAIN_SELECTOR), - liquidityAmount, - "Tokens locked for dest chain doesn't match expected amount in storage" - ); - - assertEq( - s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), - 0, - "Tokens locked for dest chain in old token pool doesn't match expected amount in storage" - ); - - assertEq( - s_token.balanceOf(address(s_usdcTokenPoolTransferLiquidity)), - liquidityAmount, - "Liquidity amount of tokens should be new in new pool, but aren't" - ); - - assertEq( - s_token.balanceOf(address(s_usdcTokenPool)), - 0, - "Liquidity amount of tokens should be zero in old pool, but aren't" - ); - } - - function test_cannotTransferLiquidityDuringPendingMigration_Revert() public { - // Set as the OWNER so we can provide liquidity - vm.startPrank(OWNER); - - s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); - s_token.approve(address(s_usdcTokenPool), type(uint256).max); - - uint256 liquidityAmount = 1e9; - - // Provide some liquidity to the pool - s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, liquidityAmount); - - // Set the new token pool as the rebalancer - s_usdcTokenPool.transferOwnership(address(s_usdcTokenPoolTransferLiquidity)); - - s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); - - vm.expectRevert( - abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, DEST_CHAIN_SELECTOR) - ); - - s_usdcTokenPoolTransferLiquidity.transferLiquidity(address(s_usdcTokenPool), DEST_CHAIN_SELECTOR); - } -} - -contract HybridUSDCTokenPoolMigrationTests is HybridUSDCTokenPoolTests { - function test_lockOrBurn_then_BurnInCCTPMigration_Success() public { - bytes32 receiver = bytes32(uint256(uint160(STRANGER))); - address CIRCLE = makeAddr("CIRCLE CCTP Migrator"); - - // Mark the destination chain as supporting CCTP, so use L/R instead. - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = DEST_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - assertTrue( - s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), - "Lock/Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" - ); - - uint256 amount = 1e6; - - s_token.transfer(address(s_usdcTokenPool), amount); - - vm.startPrank(s_routerAllowedOnRamp); - - vm.expectEmit(); - emit TokenPool.Locked(s_routerAllowedOnRamp, amount); - - s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(receiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - // Ensure that the tokens are properly locked - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), amount, "Incorrect token amount in the tokenPool"); - - assertEq( - s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), - amount, - "Internal locked token accounting is incorrect" - ); - - vm.startPrank(OWNER); - - vm.expectEmit(); - emit USDCBridgeMigrator.CircleMigratorAddressSet(CIRCLE); - - s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); - - vm.expectEmit(); - emit USDCBridgeMigrator.CCTPMigrationProposed(DEST_CHAIN_SELECTOR); - - // Propose the migration to CCTP - s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); - - assertEq( - s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), - DEST_CHAIN_SELECTOR, - "Current proposed chain migration does not match expected for DEST_CHAIN_SELECTOR" - ); - - // Impersonate the set circle address and execute the proposal - vm.startPrank(CIRCLE); - - vm.expectEmit(); - emit USDCBridgeMigrator.CCTPMigrationExecuted(DEST_CHAIN_SELECTOR, amount); - - // Ensure the call to the burn function is properly - vm.expectCall(address(s_token), abi.encodeWithSelector(bytes4(keccak256("burn(uint256)")), amount)); - - s_usdcTokenPool.burnLockedUSDC(); - - // Assert that the tokens were actually burned - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens were not burned out of the tokenPool"); - - // Ensure the proposal slot was cleared and there's no tokens locked for the destination chain anymore - assertEq(s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), 0, "Proposal Slot should be empty"); - assertEq( - s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), - 0, - "No tokens should be locked for DEST_CHAIN_SELECTOR after CCTP-approved burn" - ); - - assertFalse( - s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), "Lock/Release mech should be disabled after a burn" - ); - - test_LockOrBurn_PrimaryMechanism_Success(); - } - - function test_cancelExistingCCTPMigrationProposal() public { - vm.startPrank(OWNER); - - vm.expectEmit(); - emit USDCBridgeMigrator.CCTPMigrationProposed(DEST_CHAIN_SELECTOR); - - s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); - - assertEq( - s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), - DEST_CHAIN_SELECTOR, - "migration proposal should exist, but doesn't" - ); - - vm.expectEmit(); - emit USDCBridgeMigrator.CCTPMigrationCancelled(DEST_CHAIN_SELECTOR); - - s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); - - assertEq( - s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), - 0, - "migration proposal exists, but shouldn't after being cancelled" - ); - - vm.expectRevert(USDCBridgeMigrator.NoExistingMigrationProposal.selector); - s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); - } - - function test_burnLockedUSDC_invalidPermissions_Revert() public { - address CIRCLE = makeAddr("CIRCLE"); - - vm.startPrank(OWNER); - - // Set the circle migrator address for later, but don't start pranking as it yet - s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); - - vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.onlyCircle.selector)); - - // Should fail because only Circle can call this function - s_usdcTokenPool.burnLockedUSDC(); - - vm.startPrank(CIRCLE); - - vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.ExistingMigrationProposal.selector)); - s_usdcTokenPool.burnLockedUSDC(); - } - - function test_cannotModifyLiquidityWithoutPermissions_Revert() public { - address randomAddr = makeAddr("RANDOM"); - - vm.startPrank(randomAddr); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, randomAddr)); - - // Revert because there's insufficient permissions for the DEST_CHAIN_SELECTOR to provide liquidity - s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, 1e6); - } - - function test_cannotCancelANonExistentMigrationProposal() public { - vm.expectRevert(USDCBridgeMigrator.NoExistingMigrationProposal.selector); - - // Proposal to migrate doesn't exist, and so the chain selector is zero, and therefore should revert - s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); - } - - function test_unstickManualTxAfterMigration_destChain_Success() public { - address recipient = address(1234); - // Test the edge case where a tx is stuck in the manual tx queue and the destination chain is the one that - // should process is after a migration. I.E the message will have the Lock-Release flag set in the OffChainData, - // which should tell it to use the lock-release mechanism with the tokens provided. - - // We want the released amount to be 1e6, so to simulate the workflow, we sent those tokens to the contract as - // liquidity - uint256 amount = 1e6; - // Add 1e12 liquidity so that there's enough to release - vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); - - s_token.approve(address(s_usdcTokenPool), type(uint256).max); - s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, amount); - - // By Default, the source chain will be indicated as use-CCTP so we need to change that. We create a message - // that will use the Lock-Release flag in the offchain data to indicate that the tokens should be released - // instead of minted since there's no attestation for us to use. - - vm.startPrank(s_routerAllowedOffRamp); - - vm.expectEmit(); - emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: abi.encode(s_usdcTokenPool.LOCK_RELEASE_FLAG()), - offchainTokenData: "" - }) - ); - - // By this point, the tx should have executed, with the Lock-Release taking over, and being forwaded to the - // recipient - - assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens should be transferred out of the pool"); - assertEq(s_token.balanceOf(recipient), amount, "Tokens should be transferred to the recipient"); - - // We also want to check that the system uses CCTP Burn/Mint for all other messages that don't have that flag - // which after a migration will mean all new messages. - - // The message should fail without an error because it failed to decode a non-existent attestation which would - // revert without an error - vm.expectRevert(); - - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function test_unstickManualTxAfterMigration_homeChain_Success() public { - address CIRCLE = makeAddr("CIRCLE"); - address recipient = address(1234); - - // Mark the destination chain as supporting CCTP, so use L/R instead. - uint64[] memory destChainAdds = new uint64[](1); - destChainAdds[0] = DEST_CHAIN_SELECTOR; - - s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); - - // Test the edge case where a tx is stuck in the manual tx queue and the source chain (mainnet) needs unsticking - // In this test we want 1e6 worth of tokens to be stuck, so first we provide liquidity to the pool >1e6 - - uint256 amount = 1e6; - // Add 1e12 liquidity so that there's enough to release - vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); - - s_token.approve(address(s_usdcTokenPool), type(uint256).max); - - // I picked 3x the amount to be stuck so that we can have enough to release with a buffer - s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, amount * 3); - - // At this point in the process, the router will lock new messages, so we want to simulate excluding tokens - // stuck coming back from the destination, to the home chain. This way they can be released and not minted - // since there's no corresponding attestation to use for minting. - vm.startPrank(OWNER); - - // Exclude the tokens from being burned and check for the event - vm.expectEmit(); - emit USDCBridgeMigrator.TokensExcludedFromBurn(SOURCE_CHAIN_SELECTOR, amount, (amount * 3) - amount); - - s_usdcTokenPool.excludeTokensFromBurn(SOURCE_CHAIN_SELECTOR, amount); - - assertEq( - s_usdcTokenPool.getLockedTokensForChain(SOURCE_CHAIN_SELECTOR), - (amount * 3), - "Tokens locked minus ones excluded from the burn should be 2e6" - ); - - assertEq( - s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), - 1e6, - "1e6 tokens should be excluded from the burn" - ); - - s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); - - s_usdcTokenPool.proposeCCTPMigration(SOURCE_CHAIN_SELECTOR); - - vm.startPrank(CIRCLE); - - s_usdcTokenPool.burnLockedUSDC(); - - assertEq( - s_usdcTokenPool.getLockedTokensForChain(SOURCE_CHAIN_SELECTOR), 0, "All tokens should be burned out of the pool" - ); - - assertEq( - s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), - 1e6, - "There should still be 1e6 tokens excluded from the burn" - ); - - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 1e6, "All tokens minus the excluded should be in the pool"); - - // Now that the burn is successful, we can release the tokens that were excluded from the burn - vm.startPrank(s_routerAllowedOffRamp); - - vm.expectEmit(); - emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: abi.encode(s_usdcTokenPool.LOCK_RELEASE_FLAG()), - offchainTokenData: "" - }) - ); - - assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); - assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens should be transferred out of the pool"); - assertEq(s_token.balanceOf(recipient), amount, "Tokens should be transferred to the recipient"); - assertEq( - s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), - 0, - "All tokens should be released from the exclusion list" - ); - - // We also want to check that the system uses CCTP Burn/Mint for all other messages that don't have that flag - test_MintOrRelease_incomingMessageWithPrimaryMechanism(); - } -} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol deleted file mode 100644 index ed8a1cf31f..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool.t.sol +++ /dev/null @@ -1,430 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IPoolV1} from "../../interfaces/IPool.sol"; - -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {LockReleaseTokenPool} from "../../pools/LockReleaseTokenPool.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; -import {IERC165} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; -import {RouterSetup} from "../router/RouterSetup.t.sol"; - -contract LockReleaseTokenPoolSetup is RouterSetup { - IERC20 internal s_token; - LockReleaseTokenPool internal s_lockReleaseTokenPool; - LockReleaseTokenPool internal s_lockReleaseTokenPoolWithAllowList; - address[] internal s_allowedList; - - address internal s_allowedOnRamp = address(123); - address internal s_allowedOffRamp = address(234); - - address internal s_destPoolAddress = address(2736782345); - address internal s_sourcePoolAddress = address(53852352095); - - function setUp() public virtual override { - RouterSetup.setUp(); - s_token = new BurnMintERC677("LINK", "LNK", 18, 0); - deal(address(s_token), OWNER, type(uint256).max); - s_lockReleaseTokenPool = - new LockReleaseTokenPool(s_token, new address[](0), address(s_mockRMN), true, address(s_sourceRouter)); - - s_allowedList.push(USER_1); - s_allowedList.push(DUMMY_CONTRACT_ADDRESS); - s_lockReleaseTokenPoolWithAllowList = - new LockReleaseTokenPool(s_token, s_allowedList, address(s_mockRMN), true, address(s_sourceRouter)); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_destPoolAddress), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_lockReleaseTokenPool.applyChainUpdates(chainUpdate); - s_lockReleaseTokenPoolWithAllowList.applyChainUpdates(chainUpdate); - s_lockReleaseTokenPool.setRebalancer(OWNER); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_allowedOnRamp}); - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: s_allowedOffRamp}); - s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); - } -} - -contract LockReleaseTokenPool_setRebalancer is LockReleaseTokenPoolSetup { - function test_SetRebalancer_Success() public { - assertEq(address(s_lockReleaseTokenPool.getRebalancer()), OWNER); - s_lockReleaseTokenPool.setRebalancer(STRANGER); - assertEq(address(s_lockReleaseTokenPool.getRebalancer()), STRANGER); - } - - function test_SetRebalancer_Revert() public { - vm.startPrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - s_lockReleaseTokenPool.setRebalancer(STRANGER); - } -} - -contract LockReleaseTokenPool_lockOrBurn is LockReleaseTokenPoolSetup { - function test_Fuzz_LockOrBurnNoAllowList_Success(uint256 amount) public { - amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); - vm.startPrank(s_allowedOnRamp); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - vm.expectEmit(); - emit TokenPool.Locked(s_allowedOnRamp, amount); - - s_lockReleaseTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: STRANGER, - receiver: bytes(""), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } - - function test_LockOrBurnWithAllowList_Success() public { - uint256 amount = 100; - vm.startPrank(s_allowedOnRamp); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - vm.expectEmit(); - emit TokenPool.Locked(s_allowedOnRamp, amount); - - s_lockReleaseTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: s_allowedList[0], - receiver: bytes(""), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - vm.expectEmit(); - emit TokenPool.Locked(s_allowedOnRamp, amount); - - s_lockReleaseTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: s_allowedList[1], - receiver: bytes(""), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } - - function test_LockOrBurnWithAllowList_Revert() public { - vm.startPrank(s_allowedOnRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.SenderNotAllowed.selector, STRANGER)); - - s_lockReleaseTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: STRANGER, - receiver: bytes(""), - amount: 100, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } - - function test_PoolBurnRevertNotHealthy_Revert() public { - // Should not burn tokens if cursed. - s_mockRMN.setGlobalCursed(true); - uint256 before = s_token.balanceOf(address(s_lockReleaseTokenPoolWithAllowList)); - - vm.startPrank(s_allowedOnRamp); - vm.expectRevert(TokenPool.CursedByRMN.selector); - - s_lockReleaseTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: s_allowedList[0], - receiver: bytes(""), - amount: 1e5, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - assertEq(s_token.balanceOf(address(s_lockReleaseTokenPoolWithAllowList)), before); - } -} - -contract LockReleaseTokenPool_releaseOrMint is LockReleaseTokenPoolSetup { - function setUp() public virtual override { - LockReleaseTokenPoolSetup.setUp(); - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(s_sourcePoolAddress), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_lockReleaseTokenPool.applyChainUpdates(chainUpdate); - s_lockReleaseTokenPoolWithAllowList.applyChainUpdates(chainUpdate); - } - - function test_ReleaseOrMint_Success() public { - vm.startPrank(s_allowedOffRamp); - - uint256 amount = 100; - deal(address(s_token), address(s_lockReleaseTokenPool), amount); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - vm.expectEmit(); - emit TokenPool.Released(s_allowedOffRamp, OWNER, amount); - - s_lockReleaseTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: abi.encode(s_sourcePoolAddress), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function test_Fuzz_ReleaseOrMint_Success(address recipient, uint256 amount) public { - // Since the owner already has tokens this would break the checks - vm.assume(recipient != OWNER); - vm.assume(recipient != address(0)); - vm.assume(recipient != address(s_token)); - - // Makes sure the pool always has enough funds - deal(address(s_token), address(s_lockReleaseTokenPool), amount); - vm.startPrank(s_allowedOffRamp); - - uint256 capacity = _getInboundRateLimiterConfig().capacity; - // Determine if we hit the rate limit or the txs should succeed. - if (amount > capacity) { - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.TokenMaxCapacityExceeded.selector, capacity, amount, address(s_token)) - ); - } else { - // Only rate limit if the amount is >0 - if (amount > 0) { - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - } - - vm.expectEmit(); - emit TokenPool.Released(s_allowedOffRamp, recipient, amount); - } - - s_lockReleaseTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: abi.encode(s_sourcePoolAddress), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function test_ChainNotAllowed_Revert() public { - address notAllowedRemotePoolAddress = address(1); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(notAllowedRemotePoolAddress), - remoteTokenAddress: abi.encode(address(2)), - allowed: false, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}) - }); - - s_lockReleaseTokenPool.applyChainUpdates(chainUpdate); - - vm.startPrank(s_allowedOffRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, SOURCE_CHAIN_SELECTOR)); - s_lockReleaseTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: 1e5, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: abi.encode(s_sourcePoolAddress), - sourcePoolData: "", - offchainTokenData: "" - }) - ); - } - - function test_PoolMintNotHealthy_Revert() public { - // Should not mint tokens if cursed. - s_mockRMN.setGlobalCursed(true); - uint256 before = s_token.balanceOf(OWNER); - vm.startPrank(s_allowedOffRamp); - vm.expectRevert(TokenPool.CursedByRMN.selector); - s_lockReleaseTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: bytes(""), - receiver: OWNER, - amount: 1e5, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, - sourcePoolData: _generateSourceTokenData().extraData, - offchainTokenData: "" - }) - ); - - assertEq(s_token.balanceOf(OWNER), before); - } -} - -contract LockReleaseTokenPool_canAcceptLiquidity is LockReleaseTokenPoolSetup { - function test_CanAcceptLiquidity_Success() public { - assertEq(true, s_lockReleaseTokenPool.canAcceptLiquidity()); - - s_lockReleaseTokenPool = - new LockReleaseTokenPool(s_token, new address[](0), address(s_mockRMN), false, address(s_sourceRouter)); - assertEq(false, s_lockReleaseTokenPool.canAcceptLiquidity()); - } -} - -contract LockReleaseTokenPool_provideLiquidity is LockReleaseTokenPoolSetup { - function test_Fuzz_ProvideLiquidity_Success(uint256 amount) public { - uint256 balancePre = s_token.balanceOf(OWNER); - s_token.approve(address(s_lockReleaseTokenPool), amount); - - s_lockReleaseTokenPool.provideLiquidity(amount); - - assertEq(s_token.balanceOf(OWNER), balancePre - amount); - assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), amount); - } - - // Reverts - - function test_Unauthorized_Revert() public { - vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); - - s_lockReleaseTokenPool.provideLiquidity(1); - } - - function test_Fuzz_ExceedsAllowance(uint256 amount) public { - vm.assume(amount > 0); - vm.expectRevert("ERC20: insufficient allowance"); - s_lockReleaseTokenPool.provideLiquidity(amount); - } - - function test_LiquidityNotAccepted_Revert() public { - s_lockReleaseTokenPool = - new LockReleaseTokenPool(s_token, new address[](0), address(s_mockRMN), false, address(s_sourceRouter)); - - vm.expectRevert(LockReleaseTokenPool.LiquidityNotAccepted.selector); - s_lockReleaseTokenPool.provideLiquidity(1); - } -} - -contract LockReleaseTokenPool_withdrawalLiquidity is LockReleaseTokenPoolSetup { - function test_Fuzz_WithdrawalLiquidity_Success(uint256 amount) public { - uint256 balancePre = s_token.balanceOf(OWNER); - s_token.approve(address(s_lockReleaseTokenPool), amount); - s_lockReleaseTokenPool.provideLiquidity(amount); - - s_lockReleaseTokenPool.withdrawLiquidity(amount); - - assertEq(s_token.balanceOf(OWNER), balancePre); - } - - // Reverts - - function test_Unauthorized_Revert() public { - vm.startPrank(STRANGER); - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); - - s_lockReleaseTokenPool.withdrawLiquidity(1); - } - - function test_InsufficientLiquidity_Revert() public { - uint256 maxUint256 = 2 ** 256 - 1; - s_token.approve(address(s_lockReleaseTokenPool), maxUint256); - s_lockReleaseTokenPool.provideLiquidity(maxUint256); - - vm.startPrank(address(s_lockReleaseTokenPool)); - s_token.transfer(OWNER, maxUint256); - vm.startPrank(OWNER); - - vm.expectRevert(LockReleaseTokenPool.InsufficientLiquidity.selector); - s_lockReleaseTokenPool.withdrawLiquidity(1); - } -} - -contract LockReleaseTokenPool_transferLiquidity is LockReleaseTokenPoolSetup { - LockReleaseTokenPool internal s_oldLockReleaseTokenPool; - uint256 internal s_amount = 100000; - - function setUp() public virtual override { - super.setUp(); - - s_oldLockReleaseTokenPool = - new LockReleaseTokenPool(s_token, new address[](0), address(s_mockRMN), true, address(s_sourceRouter)); - - deal(address(s_token), address(s_oldLockReleaseTokenPool), s_amount); - } - - function test_transferLiquidity_Success() public { - uint256 balancePre = s_token.balanceOf(address(s_lockReleaseTokenPool)); - - s_oldLockReleaseTokenPool.setRebalancer(address(s_lockReleaseTokenPool)); - - vm.expectEmit(); - emit LockReleaseTokenPool.LiquidityTransferred(address(s_oldLockReleaseTokenPool), s_amount); - - s_lockReleaseTokenPool.transferLiquidity(address(s_oldLockReleaseTokenPool), s_amount); - - assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), balancePre + s_amount); - } - - function test_transferLiquidity_transferTooMuch_Revert() public { - uint256 balancePre = s_token.balanceOf(address(s_lockReleaseTokenPool)); - - s_oldLockReleaseTokenPool.setRebalancer(address(s_lockReleaseTokenPool)); - - vm.expectRevert(LockReleaseTokenPool.InsufficientLiquidity.selector); - s_lockReleaseTokenPool.transferLiquidity(address(s_oldLockReleaseTokenPool), s_amount + 1); - - assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), balancePre); - } -} - -contract LockReleaseTokenPool_supportsInterface is LockReleaseTokenPoolSetup { - function test_SupportsInterface_Success() public view { - assertTrue(s_lockReleaseTokenPool.supportsInterface(type(IPoolV1).interfaceId)); - assertTrue(s_lockReleaseTokenPool.supportsInterface(type(IERC165).interfaceId)); - } -} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.canAcceptLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.canAcceptLiquidity.t.sol new file mode 100644 index 0000000000..63b6e0bc35 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.canAcceptLiquidity.t.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_canAcceptLiquidity is LockReleaseTokenPoolSetup { + function test_CanAcceptLiquidity_Success() public { + assertEq(true, s_lockReleaseTokenPool.canAcceptLiquidity()); + + s_lockReleaseTokenPool = new LockReleaseTokenPool( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), false, address(s_sourceRouter) + ); + assertEq(false, s_lockReleaseTokenPool.canAcceptLiquidity()); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.lockOrBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.lockOrBurn.t.sol new file mode 100644 index 0000000000..7c87fbcc95 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.lockOrBurn.t.sol @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_lockOrBurn is LockReleaseTokenPoolSetup { + function testFuzz_LockOrBurnNoAllowList_Success( + uint256 amount + ) public { + amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); + vm.startPrank(s_allowedOnRamp); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + vm.expectEmit(); + emit TokenPool.Locked(s_allowedOnRamp, amount); + + s_lockReleaseTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: STRANGER, + receiver: bytes(""), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } + + function test_LockOrBurnWithAllowList_Success() public { + uint256 amount = 100; + vm.startPrank(s_allowedOnRamp); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + vm.expectEmit(); + emit TokenPool.Locked(s_allowedOnRamp, amount); + + s_lockReleaseTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: s_allowedList[0], + receiver: bytes(""), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + vm.expectEmit(); + emit TokenPool.Locked(s_allowedOnRamp, amount); + + s_lockReleaseTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: s_allowedList[1], + receiver: bytes(""), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } + + function test_LockOrBurnWithAllowList_Revert() public { + vm.startPrank(s_allowedOnRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.SenderNotAllowed.selector, STRANGER)); + + s_lockReleaseTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: STRANGER, + receiver: bytes(""), + amount: 100, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } + + function test_PoolBurnRevertNotHealthy_Revert() public { + // Should not burn tokens if cursed. + s_mockRMN.setGlobalCursed(true); + uint256 before = s_token.balanceOf(address(s_lockReleaseTokenPoolWithAllowList)); + + vm.startPrank(s_allowedOnRamp); + vm.expectRevert(TokenPool.CursedByRMN.selector); + + s_lockReleaseTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: s_allowedList[0], + receiver: bytes(""), + amount: 1e5, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + assertEq(s_token.balanceOf(address(s_lockReleaseTokenPoolWithAllowList)), before); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.provideLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.provideLiquidity.t.sol new file mode 100644 index 0000000000..6ef52e8846 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.provideLiquidity.t.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_provideLiquidity is LockReleaseTokenPoolSetup { + function testFuzz_ProvideLiquidity_Success( + uint256 amount + ) public { + uint256 balancePre = s_token.balanceOf(OWNER); + s_token.approve(address(s_lockReleaseTokenPool), amount); + + s_lockReleaseTokenPool.provideLiquidity(amount); + + assertEq(s_token.balanceOf(OWNER), balancePre - amount); + assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), amount); + } + + // Reverts + + function test_Unauthorized_Revert() public { + vm.startPrank(STRANGER); + vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); + + s_lockReleaseTokenPool.provideLiquidity(1); + } + + function testFuzz_ExceedsAllowance( + uint256 amount + ) public { + vm.assume(amount > 0); + vm.expectRevert("ERC20: insufficient allowance"); + s_lockReleaseTokenPool.provideLiquidity(amount); + } + + function test_LiquidityNotAccepted_Revert() public { + s_lockReleaseTokenPool = new LockReleaseTokenPool( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), false, address(s_sourceRouter) + ); + + vm.expectRevert(LockReleaseTokenPool.LiquidityNotAccepted.selector); + s_lockReleaseTokenPool.provideLiquidity(1); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.releaseOrMint.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.releaseOrMint.t.sol new file mode 100644 index 0000000000..9a67f76644 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.releaseOrMint.t.sol @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_releaseOrMint is LockReleaseTokenPoolSetup { + function setUp() public virtual override { + LockReleaseTokenPoolSetup.setUp(); + + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_sourcePoolAddress); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + s_lockReleaseTokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + s_lockReleaseTokenPoolWithAllowList.applyChainUpdates(new uint64[](0), chainUpdate); + } + + function test_ReleaseOrMint_Success() public { + vm.startPrank(s_allowedOffRamp); + + uint256 amount = 100; + deal(address(s_token), address(s_lockReleaseTokenPool), amount); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + vm.expectEmit(); + emit TokenPool.Released(s_allowedOffRamp, OWNER, amount); + + s_lockReleaseTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: OWNER, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: abi.encode(s_sourcePoolAddress), + sourcePoolData: "", + offchainTokenData: "" + }) + ); + } + + function testFuzz_ReleaseOrMint_Success(address recipient, uint256 amount) public { + // Since the owner already has tokens this would break the checks + vm.assume(recipient != OWNER); + vm.assume(recipient != address(0)); + vm.assume(recipient != address(s_token)); + + // Makes sure the pool always has enough funds + deal(address(s_token), address(s_lockReleaseTokenPool), amount); + vm.startPrank(s_allowedOffRamp); + + uint256 capacity = _getInboundRateLimiterConfig().capacity; + // Determine if we hit the rate limit or the txs should succeed. + if (amount > capacity) { + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.TokenMaxCapacityExceeded.selector, capacity, amount, address(s_token)) + ); + } else { + // Only rate limit if the amount is >0 + if (amount > 0) { + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + } + + vm.expectEmit(); + emit TokenPool.Released(s_allowedOffRamp, recipient, amount); + } + + s_lockReleaseTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: abi.encode(s_sourcePoolAddress), + sourcePoolData: "", + offchainTokenData: "" + }) + ); + } + + function test_ChainNotAllowed_Revert() public { + uint64[] memory chainsToRemove = new uint64[](1); + chainsToRemove[0] = SOURCE_CHAIN_SELECTOR; + + s_lockReleaseTokenPool.applyChainUpdates(chainsToRemove, new TokenPool.ChainUpdate[](0)); + + vm.startPrank(s_allowedOffRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, SOURCE_CHAIN_SELECTOR)); + s_lockReleaseTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: OWNER, + amount: 1e5, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: abi.encode(s_sourcePoolAddress), + sourcePoolData: "", + offchainTokenData: "" + }) + ); + } + + function test_PoolMintNotHealthy_Revert() public { + // Should not mint tokens if cursed. + s_mockRMN.setGlobalCursed(true); + uint256 before = s_token.balanceOf(OWNER); + vm.startPrank(s_allowedOffRamp); + vm.expectRevert(TokenPool.CursedByRMN.selector); + s_lockReleaseTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: bytes(""), + receiver: OWNER, + amount: 1e5, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: _generateSourceTokenData().sourcePoolAddress, + sourcePoolData: _generateSourceTokenData().extraData, + offchainTokenData: "" + }) + ); + + assertEq(s_token.balanceOf(OWNER), before); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.setRebalancer.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.setRebalancer.t.sol new file mode 100644 index 0000000000..25286c1a37 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.setRebalancer.t.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_setRebalancer is LockReleaseTokenPoolSetup { + function test_SetRebalancer_Success() public { + assertEq(address(s_lockReleaseTokenPool.getRebalancer()), OWNER); + s_lockReleaseTokenPool.setRebalancer(STRANGER); + assertEq(address(s_lockReleaseTokenPool.getRebalancer()), STRANGER); + } + + function test_SetRebalancer_Revert() public { + vm.startPrank(STRANGER); + + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_lockReleaseTokenPool.setRebalancer(STRANGER); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.supportsInterface.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.supportsInterface.t.sol new file mode 100644 index 0000000000..9a08fc38c9 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.supportsInterface.t.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IPoolV1} from "../../../interfaces/IPool.sol"; + +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +import {IERC165} from "../../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; + +contract LockReleaseTokenPool_supportsInterface is LockReleaseTokenPoolSetup { + function test_SupportsInterface_Success() public view { + assertTrue(s_lockReleaseTokenPool.supportsInterface(type(IPoolV1).interfaceId)); + assertTrue(s_lockReleaseTokenPool.supportsInterface(type(IERC165).interfaceId)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.transferLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.transferLiquidity.t.sol new file mode 100644 index 0000000000..60b9c935bd --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.transferLiquidity.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_transferLiquidity is LockReleaseTokenPoolSetup { + LockReleaseTokenPool internal s_oldLockReleaseTokenPool; + uint256 internal s_amount = 100000; + + function setUp() public virtual override { + super.setUp(); + + s_oldLockReleaseTokenPool = new LockReleaseTokenPool( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + ); + + deal(address(s_token), address(s_oldLockReleaseTokenPool), s_amount); + } + + function test_transferLiquidity_Success() public { + uint256 balancePre = s_token.balanceOf(address(s_lockReleaseTokenPool)); + + s_oldLockReleaseTokenPool.setRebalancer(address(s_lockReleaseTokenPool)); + + vm.expectEmit(); + emit LockReleaseTokenPool.LiquidityTransferred(address(s_oldLockReleaseTokenPool), s_amount); + + s_lockReleaseTokenPool.transferLiquidity(address(s_oldLockReleaseTokenPool), s_amount); + + assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), balancePre + s_amount); + } + + function test_transferLiquidity_transferTooMuch_Revert() public { + uint256 balancePre = s_token.balanceOf(address(s_lockReleaseTokenPool)); + + s_oldLockReleaseTokenPool.setRebalancer(address(s_lockReleaseTokenPool)); + + vm.expectRevert(LockReleaseTokenPool.InsufficientLiquidity.selector); + s_lockReleaseTokenPool.transferLiquidity(address(s_oldLockReleaseTokenPool), s_amount + 1); + + assertEq(s_token.balanceOf(address(s_lockReleaseTokenPool)), balancePre); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.withdrawalLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.withdrawalLiquidity.t.sol new file mode 100644 index 0000000000..29b6ef6c7f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPool.withdrawalLiquidity.t.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {LockReleaseTokenPoolSetup} from "./LockReleaseTokenPoolSetup.t.sol"; + +contract LockReleaseTokenPool_withdrawalLiquidity is LockReleaseTokenPoolSetup { + function testFuzz_WithdrawalLiquidity_Success( + uint256 amount + ) public { + uint256 balancePre = s_token.balanceOf(OWNER); + s_token.approve(address(s_lockReleaseTokenPool), amount); + s_lockReleaseTokenPool.provideLiquidity(amount); + + s_lockReleaseTokenPool.withdrawLiquidity(amount); + + assertEq(s_token.balanceOf(OWNER), balancePre); + } + + // Reverts + function test_Unauthorized_Revert() public { + vm.startPrank(STRANGER); + vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); + + s_lockReleaseTokenPool.withdrawLiquidity(1); + } + + function test_InsufficientLiquidity_Revert() public { + uint256 maxUint256 = 2 ** 256 - 1; + s_token.approve(address(s_lockReleaseTokenPool), maxUint256); + s_lockReleaseTokenPool.provideLiquidity(maxUint256); + + vm.startPrank(address(s_lockReleaseTokenPool)); + s_token.transfer(OWNER, maxUint256); + vm.startPrank(OWNER); + + vm.expectRevert(LockReleaseTokenPool.InsufficientLiquidity.selector); + s_lockReleaseTokenPool.withdrawLiquidity(1); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPoolSetup.t.sol new file mode 100644 index 0000000000..44f380720f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/LockReleaseTokenPool/LockReleaseTokenPoolSetup.t.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../shared/token/ERC20/BurnMintERC20.sol"; +import {Router} from "../../../Router.sol"; +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {RouterSetup} from "../../router/RouterSetup.t.sol"; + +contract LockReleaseTokenPoolSetup is RouterSetup { + IERC20 internal s_token; + LockReleaseTokenPool internal s_lockReleaseTokenPool; + LockReleaseTokenPool internal s_lockReleaseTokenPoolWithAllowList; + address[] internal s_allowedList; + + address internal s_allowedOnRamp = address(123); + address internal s_allowedOffRamp = address(234); + + address internal s_destPoolAddress = address(2736782345); + address internal s_sourcePoolAddress = address(53852352095); + + function setUp() public virtual override { + RouterSetup.setUp(); + s_token = new BurnMintERC20("LINK", "LNK", 18, 0, 0); + deal(address(s_token), OWNER, type(uint256).max); + s_lockReleaseTokenPool = new LockReleaseTokenPool( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), true, address(s_sourceRouter) + ); + + s_allowedList.push(USER_1); + s_allowedList.push(OWNER); + s_lockReleaseTokenPoolWithAllowList = new LockReleaseTokenPool( + s_token, DEFAULT_TOKEN_DECIMALS, s_allowedList, address(s_mockRMN), true, address(s_sourceRouter) + ); + + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_destPoolAddress); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + s_lockReleaseTokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + s_lockReleaseTokenPoolWithAllowList.applyChainUpdates(new uint64[](0), chainUpdate); + s_lockReleaseTokenPool.setRebalancer(OWNER); + + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); + onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_allowedOnRamp}); + offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: s_allowedOffRamp}); + s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool.t.sol deleted file mode 100644 index 2c1bc0ed57..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool.t.sol +++ /dev/null @@ -1,783 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {TokenPoolHelper} from "../helpers/TokenPoolHelper.sol"; -import {RouterSetup} from "../router/RouterSetup.t.sol"; - -import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; - -contract TokenPoolSetup is RouterSetup { - IERC20 internal s_token; - TokenPoolHelper internal s_tokenPool; - - function setUp() public virtual override { - RouterSetup.setUp(); - s_token = new BurnMintERC677("LINK", "LNK", 18, 0); - deal(address(s_token), OWNER, type(uint256).max); - - s_tokenPool = new TokenPoolHelper(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - } -} - -contract TokenPool_constructor is TokenPoolSetup { - function test_immutableFields_Success() public view { - assertEq(address(s_token), address(s_tokenPool.getToken())); - assertEq(address(s_mockRMN), s_tokenPool.getRmnProxy()); - assertEq(false, s_tokenPool.getAllowListEnabled()); - assertEq(address(s_sourceRouter), s_tokenPool.getRouter()); - } - - // Reverts - function test_ZeroAddressNotAllowed_Revert() public { - vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); - - s_tokenPool = new TokenPoolHelper(IERC20(address(0)), new address[](0), address(s_mockRMN), address(s_sourceRouter)); - } -} - -contract TokenPool_getRemotePool is TokenPoolSetup { - function test_getRemotePool_Success() public { - uint64 chainSelector = 123124; - address remotePool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - - // Zero indicates nothing is set - assertEq(0, s_tokenPool.getRemotePool(chainSelector).length); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(remotePool), - remoteTokenAddress: abi.encode(remoteToken), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdates); - - assertEq(remotePool, abi.decode(s_tokenPool.getRemotePool(chainSelector), (address))); - } -} - -contract TokenPool_setRemotePool is TokenPoolSetup { - function test_setRemotePool_Success() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - // The new pool is a non-evm pool, as it doesn't fit in the normal 160 bits - bytes memory newPool = abi.encode(type(uint256).max); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdates); - - vm.expectEmit(); - emit TokenPool.RemotePoolSet(chainSelector, abi.encode(initialPool), newPool); - - s_tokenPool.setRemotePool(chainSelector, newPool); - - assertEq(keccak256(newPool), keccak256(s_tokenPool.getRemotePool(chainSelector))); - } - - // Reverts - - function test_setRemotePool_NonExistentChain_Reverts() public { - uint64 chainSelector = 123124; - bytes memory remotePool = abi.encode(makeAddr("remotePool")); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); - s_tokenPool.setRemotePool(chainSelector, remotePool); - } - - function test_setRemotePool_OnlyOwner_Reverts() public { - vm.startPrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - s_tokenPool.setRemotePool(123124, abi.encode(makeAddr("remotePool"))); - } -} - -contract TokenPool_applyChainUpdates is TokenPoolSetup { - function assertState(TokenPool.ChainUpdate[] memory chainUpdates) public view { - uint64[] memory chainSelectors = s_tokenPool.getSupportedChains(); - for (uint256 i = 0; i < chainUpdates.length; i++) { - assertEq(chainUpdates[i].remoteChainSelector, chainSelectors[i]); - } - - for (uint256 i = 0; i < chainUpdates.length; ++i) { - assertTrue(s_tokenPool.isSupportedChain(chainUpdates[i].remoteChainSelector)); - RateLimiter.TokenBucket memory bkt = - s_tokenPool.getCurrentOutboundRateLimiterState(chainUpdates[i].remoteChainSelector); - assertEq(bkt.capacity, chainUpdates[i].outboundRateLimiterConfig.capacity); - assertEq(bkt.rate, chainUpdates[i].outboundRateLimiterConfig.rate); - assertEq(bkt.isEnabled, chainUpdates[i].outboundRateLimiterConfig.isEnabled); - - bkt = s_tokenPool.getCurrentInboundRateLimiterState(chainUpdates[i].remoteChainSelector); - assertEq(bkt.capacity, chainUpdates[i].inboundRateLimiterConfig.capacity); - assertEq(bkt.rate, chainUpdates[i].inboundRateLimiterConfig.rate); - assertEq(bkt.isEnabled, chainUpdates[i].inboundRateLimiterConfig.isEnabled); - } - } - - function test_applyChainUpdates_Success() public { - RateLimiter.Config memory outboundRateLimit1 = RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}); - RateLimiter.Config memory inboundRateLimit1 = RateLimiter.Config({isEnabled: true, capacity: 100e29, rate: 1e19}); - RateLimiter.Config memory outboundRateLimit2 = RateLimiter.Config({isEnabled: true, capacity: 100e26, rate: 1e16}); - RateLimiter.Config memory inboundRateLimit2 = RateLimiter.Config({isEnabled: true, capacity: 100e27, rate: 1e17}); - - // EVM chain, which uses the 160 bit evm address space - uint64 evmChainSelector = 1; - bytes memory evmRemotePool = abi.encode(makeAddr("evm_remote_pool")); - bytes memory evmRemoteToken = abi.encode(makeAddr("evm_remote_token")); - - // Non EVM chain, which uses the full 256 bits - uint64 nonEvmChainSelector = type(uint64).max; - bytes memory nonEvmRemotePool = abi.encode(keccak256("non_evm_remote_pool")); - bytes memory nonEvmRemoteToken = abi.encode(keccak256("non_evm_remote_token")); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: evmChainSelector, - remotePoolAddress: evmRemotePool, - remoteTokenAddress: evmRemoteToken, - allowed: true, - outboundRateLimiterConfig: outboundRateLimit1, - inboundRateLimiterConfig: inboundRateLimit1 - }); - chainUpdates[1] = TokenPool.ChainUpdate({ - remoteChainSelector: nonEvmChainSelector, - remotePoolAddress: nonEvmRemotePool, - remoteTokenAddress: nonEvmRemoteToken, - allowed: true, - outboundRateLimiterConfig: outboundRateLimit2, - inboundRateLimiterConfig: inboundRateLimit2 - }); - - // Assert configuration is applied - vm.expectEmit(); - emit TokenPool.ChainAdded( - chainUpdates[0].remoteChainSelector, - chainUpdates[0].remoteTokenAddress, - chainUpdates[0].outboundRateLimiterConfig, - chainUpdates[0].inboundRateLimiterConfig - ); - vm.expectEmit(); - emit TokenPool.ChainAdded( - chainUpdates[1].remoteChainSelector, - chainUpdates[1].remoteTokenAddress, - chainUpdates[1].outboundRateLimiterConfig, - chainUpdates[1].inboundRateLimiterConfig - ); - s_tokenPool.applyChainUpdates(chainUpdates); - // on1: rateLimit1, on2: rateLimit2, off1: rateLimit1, off2: rateLimit3 - assertState(chainUpdates); - - // Removing an non-existent chain should revert - TokenPool.ChainUpdate[] memory chainRemoves = new TokenPool.ChainUpdate[](1); - uint64 strangerChainSelector = 120938; - chainRemoves[0] = TokenPool.ChainUpdate({ - remoteChainSelector: strangerChainSelector, - remotePoolAddress: evmRemotePool, - remoteTokenAddress: evmRemoteToken, - allowed: false, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}) - }); - vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, strangerChainSelector)); - s_tokenPool.applyChainUpdates(chainRemoves); - // State remains - assertState(chainUpdates); - - // Can remove a chain - chainRemoves[0].remoteChainSelector = evmChainSelector; - - vm.expectEmit(); - emit TokenPool.ChainRemoved(chainRemoves[0].remoteChainSelector); - - s_tokenPool.applyChainUpdates(chainRemoves); - - // State updated, only chain 2 remains - TokenPool.ChainUpdate[] memory singleChainConfigured = new TokenPool.ChainUpdate[](1); - singleChainConfigured[0] = chainUpdates[1]; - assertState(singleChainConfigured); - - // Cannot reset already configured ramp - vm.expectRevert( - abi.encodeWithSelector(TokenPool.ChainAlreadyExists.selector, singleChainConfigured[0].remoteChainSelector) - ); - s_tokenPool.applyChainUpdates(singleChainConfigured); - } - - // Reverts - - function test_applyChainUpdates_OnlyCallableByOwner_Revert() public { - vm.startPrank(STRANGER); - vm.expectRevert("Only callable by owner"); - s_tokenPool.applyChainUpdates(new TokenPool.ChainUpdate[](0)); - } - - function test_applyChainUpdates_ZeroAddressNotAllowed_Revert() public { - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, - remotePoolAddress: "", - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}) - }); - - vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, - remotePoolAddress: abi.encode(address(2)), - remoteTokenAddress: "", - allowed: true, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}) - }); - - vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); - s_tokenPool.applyChainUpdates(chainUpdates); - } - - function test_applyChainUpdates_DisabledNonZeroRateLimit_Revert() public { - RateLimiter.Config memory outboundRateLimit = RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}); - RateLimiter.Config memory inboundRateLimit = RateLimiter.Config({isEnabled: true, capacity: 100e22, rate: 1e12}); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: outboundRateLimit, - inboundRateLimiterConfig: inboundRateLimit - }); - - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].allowed = false; - chainUpdates[0].outboundRateLimiterConfig = RateLimiter.Config({isEnabled: false, capacity: 10, rate: 1}); - chainUpdates[0].inboundRateLimiterConfig = RateLimiter.Config({isEnabled: false, capacity: 10, rate: 1}); - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.DisabledNonZeroRateLimit.selector, chainUpdates[0].outboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - } - - function test_applyChainUpdates_NonExistentChain_Revert() public { - RateLimiter.Config memory outboundRateLimit = RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}); - RateLimiter.Config memory inboundRateLimit = RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: false, - outboundRateLimiterConfig: outboundRateLimit, - inboundRateLimiterConfig: inboundRateLimit - }); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainUpdates[0].remoteChainSelector)); - s_tokenPool.applyChainUpdates(chainUpdates); - } - - function test_applyChainUpdates_InvalidRateLimitRate_Revert() public { - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 0, rate: 0}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e22, rate: 1e12}) - }); - - // Outbound - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].outboundRateLimiterConfig.rate = 100; - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].outboundRateLimiterConfig.capacity = 100; - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].outboundRateLimiterConfig.capacity = 101; - - s_tokenPool.applyChainUpdates(chainUpdates); - - // Change the chain selector as adding the same one would revert - chainUpdates[0].remoteChainSelector = 2; - - // Inbound - - chainUpdates[0].inboundRateLimiterConfig.capacity = 0; - chainUpdates[0].inboundRateLimiterConfig.rate = 0; - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].inboundRateLimiterConfig.rate = 100; - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].inboundRateLimiterConfig.capacity = 100; - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) - ); - s_tokenPool.applyChainUpdates(chainUpdates); - - chainUpdates[0].inboundRateLimiterConfig.capacity = 101; - - s_tokenPool.applyChainUpdates(chainUpdates); - } -} - -contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { - uint64 internal s_remoteChainSelector; - - function setUp() public virtual override { - TokenPoolSetup.setUp(); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - s_remoteChainSelector = 123124; - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: s_remoteChainSelector, - remotePoolAddress: abi.encode(address(2)), - remoteTokenAddress: abi.encode(address(3)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdates); - } - - function test_Fuzz_SetChainRateLimiterConfig_Success(uint128 capacity, uint128 rate, uint32 newTime) public { - // Cap the lower bound to 4 so 4/2 is still >= 2 - vm.assume(capacity >= 4); - // Cap the lower bound to 2 so 2/2 is still >= 1 - rate = uint128(bound(rate, 2, capacity - 2)); - // Bucket updates only work on increasing time - newTime = uint32(bound(newTime, block.timestamp + 1, type(uint32).max)); - vm.warp(newTime); - - uint256 oldOutboundTokens = s_tokenPool.getCurrentOutboundRateLimiterState(s_remoteChainSelector).tokens; - uint256 oldInboundTokens = s_tokenPool.getCurrentInboundRateLimiterState(s_remoteChainSelector).tokens; - - RateLimiter.Config memory newOutboundConfig = RateLimiter.Config({isEnabled: true, capacity: capacity, rate: rate}); - RateLimiter.Config memory newInboundConfig = - RateLimiter.Config({isEnabled: true, capacity: capacity / 2, rate: rate / 2}); - - vm.expectEmit(); - emit RateLimiter.ConfigChanged(newOutboundConfig); - vm.expectEmit(); - emit RateLimiter.ConfigChanged(newInboundConfig); - vm.expectEmit(); - emit TokenPool.ChainConfigured(s_remoteChainSelector, newOutboundConfig, newInboundConfig); - - s_tokenPool.setChainRateLimiterConfig(s_remoteChainSelector, newOutboundConfig, newInboundConfig); - - uint256 expectedTokens = RateLimiter._min(newOutboundConfig.capacity, oldOutboundTokens); - - RateLimiter.TokenBucket memory bucket = s_tokenPool.getCurrentOutboundRateLimiterState(s_remoteChainSelector); - assertEq(bucket.capacity, newOutboundConfig.capacity); - assertEq(bucket.rate, newOutboundConfig.rate); - assertEq(bucket.tokens, expectedTokens); - assertEq(bucket.lastUpdated, newTime); - - expectedTokens = RateLimiter._min(newInboundConfig.capacity, oldInboundTokens); - - bucket = s_tokenPool.getCurrentInboundRateLimiterState(s_remoteChainSelector); - assertEq(bucket.capacity, newInboundConfig.capacity); - assertEq(bucket.rate, newInboundConfig.rate); - assertEq(bucket.tokens, expectedTokens); - assertEq(bucket.lastUpdated, newTime); - } - - // Reverts - - function test_OnlyOwnerOrRateLimitAdmin_Revert() public { - vm.startPrank(STRANGER); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); - s_tokenPool.setChainRateLimiterConfig( - s_remoteChainSelector, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() - ); - } - - function test_NonExistentChain_Revert() public { - uint64 wrongChainSelector = 9084102894; - - vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, wrongChainSelector)); - s_tokenPool.setChainRateLimiterConfig( - wrongChainSelector, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() - ); - } -} - -contract LockRelease_setRateLimitAdmin is TokenPoolSetup { - function test_SetRateLimitAdmin_Success() public { - assertEq(address(0), s_tokenPool.getRateLimitAdmin()); - s_tokenPool.setRateLimitAdmin(OWNER); - assertEq(OWNER, s_tokenPool.getRateLimitAdmin()); - } - - // Reverts - - function test_SetRateLimitAdmin_Revert() public { - vm.startPrank(STRANGER); - - vm.expectRevert("Only callable by owner"); - s_tokenPool.setRateLimitAdmin(STRANGER); - } -} - -contract TokenPool_onlyOnRamp is TokenPoolSetup { - function test_onlyOnRamp_Success() public { - uint64 chainSelector = 13377; - address onRamp = makeAddr("onRamp"); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: chainSelector, onRamp: onRamp}); - s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); - - vm.startPrank(onRamp); - - s_tokenPool.onlyOnRampModifier(chainSelector); - } - - function test_ChainNotAllowed_Revert() public { - uint64 chainSelector = 13377; - address onRamp = makeAddr("onRamp"); - - vm.startPrank(onRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); - s_tokenPool.onlyOnRampModifier(chainSelector); - - vm.startPrank(OWNER); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: chainSelector, onRamp: onRamp}); - s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); - - vm.startPrank(onRamp); - // Should succeed now that we've added the chain - s_tokenPool.onlyOnRampModifier(chainSelector); - - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: false, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}) - }); - - vm.startPrank(OWNER); - s_tokenPool.applyChainUpdates(chainUpdate); - - vm.startPrank(onRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); - s_tokenPool.onlyOffRampModifier(chainSelector); - } - - function test_CallerIsNotARampOnRouter_Revert() public { - uint64 chainSelector = 13377; - address onRamp = makeAddr("onRamp"); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - vm.startPrank(onRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, onRamp)); - - s_tokenPool.onlyOnRampModifier(chainSelector); - } -} - -contract TokenPool_onlyOffRamp is TokenPoolSetup { - function test_onlyOffRamp_Success() public { - uint64 chainSelector = 13377; - address offRamp = makeAddr("onRamp"); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: chainSelector, offRamp: offRamp}); - s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); - - vm.startPrank(offRamp); - - s_tokenPool.onlyOffRampModifier(chainSelector); - } - - function test_ChainNotAllowed_Revert() public { - uint64 chainSelector = 13377; - address offRamp = makeAddr("onRamp"); - - vm.startPrank(offRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); - s_tokenPool.onlyOffRampModifier(chainSelector); - - vm.startPrank(OWNER); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: chainSelector, offRamp: offRamp}); - s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); - - vm.startPrank(offRamp); - // Should succeed now that we've added the chain - s_tokenPool.onlyOffRampModifier(chainSelector); - - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: false, - outboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}), - inboundRateLimiterConfig: RateLimiter.Config({isEnabled: false, capacity: 0, rate: 0}) - }); - - vm.startPrank(OWNER); - s_tokenPool.applyChainUpdates(chainUpdate); - - vm.startPrank(offRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); - s_tokenPool.onlyOffRampModifier(chainSelector); - } - - function test_CallerIsNotARampOnRouter_Revert() public { - uint64 chainSelector = 13377; - address offRamp = makeAddr("offRamp"); - - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(chainUpdate); - - vm.startPrank(offRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, offRamp)); - - s_tokenPool.onlyOffRampModifier(chainSelector); - } -} - -contract TokenPoolWithAllowListSetup is TokenPoolSetup { - address[] internal s_allowedSenders; - - function setUp() public virtual override { - TokenPoolSetup.setUp(); - - s_allowedSenders.push(STRANGER); - s_allowedSenders.push(DUMMY_CONTRACT_ADDRESS); - - s_tokenPool = new TokenPoolHelper(s_token, s_allowedSenders, address(s_mockRMN), address(s_sourceRouter)); - } -} - -contract TokenPoolWithAllowList_getAllowListEnabled is TokenPoolWithAllowListSetup { - function test_GetAllowListEnabled_Success() public view { - assertTrue(s_tokenPool.getAllowListEnabled()); - } -} - -contract TokenPoolWithAllowList_setRouter is TokenPoolWithAllowListSetup { - function test_SetRouter_Success() public { - assertEq(address(s_sourceRouter), s_tokenPool.getRouter()); - - address newRouter = makeAddr("newRouter"); - - vm.expectEmit(); - emit TokenPool.RouterUpdated(address(s_sourceRouter), newRouter); - - s_tokenPool.setRouter(newRouter); - - assertEq(newRouter, s_tokenPool.getRouter()); - } -} - -contract TokenPoolWithAllowList_getAllowList is TokenPoolWithAllowListSetup { - function test_GetAllowList_Success() public view { - address[] memory setAddresses = s_tokenPool.getAllowList(); - assertEq(2, setAddresses.length); - assertEq(s_allowedSenders[0], setAddresses[0]); - assertEq(s_allowedSenders[1], setAddresses[1]); - } -} - -contract TokenPoolWithAllowList_applyAllowListUpdates is TokenPoolWithAllowListSetup { - function test_SetAllowList_Success() public { - address[] memory newAddresses = new address[](2); - newAddresses[0] = address(1); - newAddresses[1] = address(2); - - for (uint256 i = 0; i < 2; ++i) { - vm.expectEmit(); - emit TokenPool.AllowListAdd(newAddresses[i]); - } - - s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); - address[] memory setAddresses = s_tokenPool.getAllowList(); - - assertEq(s_allowedSenders[0], setAddresses[0]); - assertEq(s_allowedSenders[1], setAddresses[1]); - assertEq(address(1), setAddresses[2]); - assertEq(address(2), setAddresses[3]); - - // address(2) exists noop, add address(3), remove address(1) - newAddresses = new address[](2); - newAddresses[0] = address(2); - newAddresses[1] = address(3); - - address[] memory removeAddresses = new address[](1); - removeAddresses[0] = address(1); - - vm.expectEmit(); - emit TokenPool.AllowListRemove(address(1)); - - vm.expectEmit(); - emit TokenPool.AllowListAdd(address(3)); - - s_tokenPool.applyAllowListUpdates(removeAddresses, newAddresses); - setAddresses = s_tokenPool.getAllowList(); - - assertEq(s_allowedSenders[0], setAddresses[0]); - assertEq(s_allowedSenders[1], setAddresses[1]); - assertEq(address(2), setAddresses[2]); - assertEq(address(3), setAddresses[3]); - - // remove all from allowList - for (uint256 i = 0; i < setAddresses.length; ++i) { - vm.expectEmit(); - emit TokenPool.AllowListRemove(setAddresses[i]); - } - - s_tokenPool.applyAllowListUpdates(setAddresses, new address[](0)); - setAddresses = s_tokenPool.getAllowList(); - - assertEq(0, setAddresses.length); - } - - function test_SetAllowListSkipsZero_Success() public { - uint256 setAddressesLength = s_tokenPool.getAllowList().length; - - address[] memory newAddresses = new address[](1); - newAddresses[0] = address(0); - - s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); - address[] memory setAddresses = s_tokenPool.getAllowList(); - - assertEq(setAddresses.length, setAddressesLength); - } - - // Reverts - - function test_OnlyOwner_Revert() public { - vm.stopPrank(); - vm.expectRevert("Only callable by owner"); - address[] memory newAddresses = new address[](2); - s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); - } - - function test_AllowListNotEnabled_Revert() public { - s_tokenPool = new TokenPoolHelper(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); - - vm.expectRevert(TokenPool.AllowListNotEnabled.selector); - - s_tokenPool.applyAllowListUpdates(new address[](0), new address[](2)); - } -} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol new file mode 100644 index 0000000000..287ee796f6 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Router} from "../../../Router.sol"; +import {Pool} from "../../../libraries/Pool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_addRemotePool is TokenPoolSetup { + function test_addRemotePool_Success() public { + // Use a longer data type to ensure it also works for non-evm + bytes memory remotePool = abi.encode(makeAddr("non-evm-1"), makeAddr("non-evm-2")); + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit TokenPool.RemotePoolAdded(DEST_CHAIN_SELECTOR, remotePool); + + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePool); + + bytes[] memory remotePools = s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR); + + assertEq(remotePools.length, 2); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); + assertEq(remotePools[1], remotePool); + } + + function test_addRemotePool_MultipleActive() public { + bytes[] memory remotePools = new bytes[](3); + remotePools[0] = abi.encode(makeAddr("remotePool1")); + remotePools[1] = abi.encode(makeAddr("remotePool2")); + remotePools[2] = abi.encode(makeAddr("remotePool3")); + + address fakeOffRamp = makeAddr("fakeOffRamp"); + + vm.mockCall( + address(s_sourceRouter), abi.encodeCall(Router.isOffRamp, (DEST_CHAIN_SELECTOR, fakeOffRamp)), abi.encode(true) + ); + + vm.startPrank(fakeOffRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidSourcePoolAddress.selector, remotePools[0])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + + // There's already one pool setup through the test setup + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 1); + + vm.startPrank(OWNER); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePools[0]); + + vm.startPrank(fakeOffRamp); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + + // Adding an additional pool does not remove the previous one + vm.startPrank(OWNER); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePools[1]); + + // Both should now work + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 3); + vm.startPrank(fakeOffRamp); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[1])); + + // Adding a third pool, and removing the first one + vm.startPrank(OWNER); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePools[2]); + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 4); + s_tokenPool.removeRemotePool(DEST_CHAIN_SELECTOR, remotePools[0]); + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 3); + + // Only the last two should work + vm.startPrank(fakeOffRamp); + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidSourcePoolAddress.selector, remotePools[0])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[1])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[2])); + + // Removing the chain removes all associated pool hashes + vm.startPrank(OWNER); + + uint64[] memory chainSelectorsToRemove = new uint64[](1); + chainSelectorsToRemove[0] = DEST_CHAIN_SELECTOR; + s_tokenPool.applyChainUpdates(chainSelectorsToRemove, new TokenPool.ChainUpdate[](0)); + + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 0); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, DEST_CHAIN_SELECTOR)); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, DEST_CHAIN_SELECTOR)); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[1])); + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, DEST_CHAIN_SELECTOR)); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[2])); + + // Adding the chain back should NOT allow the previous pools to work again + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: abi.encode(s_initialRemoteToken), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + vm.startPrank(OWNER); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + + vm.startPrank(fakeOffRamp); + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidSourcePoolAddress.selector, remotePools[0])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[0])); + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidSourcePoolAddress.selector, remotePools[1])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[1])); + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidSourcePoolAddress.selector, remotePools[2])); + s_tokenPool.releaseOrMint(_getReleaseOrMintInV1(remotePools[2])); + } + + function _getReleaseOrMintInV1( + bytes memory sourcePoolAddress + ) internal view returns (Pool.ReleaseOrMintInV1 memory) { + return Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + remoteChainSelector: DEST_CHAIN_SELECTOR, + receiver: OWNER, + amount: 1000, + localToken: address(s_token), + sourcePoolAddress: sourcePoolAddress, + sourcePoolData: "", + offchainTokenData: "" + }); + } + + // Reverts + + function test_NonExistentChain_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + bytes memory remotePool = abi.encode(type(uint256).max); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); + + s_tokenPool.addRemotePool(chainSelector, remotePool); + } + + function test_ZeroLengthAddressNotAllowed_Revert() public { + bytes memory remotePool = ""; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ZeroAddressNotAllowed.selector)); + + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePool); + } + + function test_PoolAlreadyAdded_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + + bytes memory remotePool = abi.encode(type(uint256).max); + + vm.expectEmit(); + emit TokenPool.RemotePoolAdded(chainSelector, remotePool); + + s_tokenPool.addRemotePool(chainSelector, remotePool); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.PoolAlreadyAdded.selector, chainSelector, remotePool)); + + // Attempt to add the same pool again but revert + s_tokenPool.addRemotePool(chainSelector, remotePool); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyAllowListUpdates.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyAllowListUpdates.t.sol new file mode 100644 index 0000000000..9662944581 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyAllowListUpdates.t.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; + +import {TokenPoolWithAllowListSetup} from "./TokenPoolWithAllowListSetup.t.sol"; + +contract TokenPoolWithAllowList_applyAllowListUpdates is TokenPoolWithAllowListSetup { + function test_SetAllowList_Success() public { + address[] memory newAddresses = new address[](2); + newAddresses[0] = address(1); + newAddresses[1] = address(2); + + for (uint256 i = 0; i < 2; ++i) { + vm.expectEmit(); + emit TokenPool.AllowListAdd(newAddresses[i]); + } + + s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); + address[] memory setAddresses = s_tokenPool.getAllowList(); + + assertEq(s_allowedSenders[0], setAddresses[0]); + assertEq(s_allowedSenders[1], setAddresses[1]); + assertEq(address(1), setAddresses[2]); + assertEq(address(2), setAddresses[3]); + + // address(2) exists noop, add address(3), remove address(1) + newAddresses = new address[](2); + newAddresses[0] = address(2); + newAddresses[1] = address(3); + + address[] memory removeAddresses = new address[](1); + removeAddresses[0] = address(1); + + vm.expectEmit(); + emit TokenPool.AllowListRemove(address(1)); + + vm.expectEmit(); + emit TokenPool.AllowListAdd(address(3)); + + s_tokenPool.applyAllowListUpdates(removeAddresses, newAddresses); + setAddresses = s_tokenPool.getAllowList(); + + assertEq(s_allowedSenders[0], setAddresses[0]); + assertEq(s_allowedSenders[1], setAddresses[1]); + assertEq(address(2), setAddresses[2]); + assertEq(address(3), setAddresses[3]); + + // remove all from allowlist + for (uint256 i = 0; i < setAddresses.length; ++i) { + vm.expectEmit(); + emit TokenPool.AllowListRemove(setAddresses[i]); + } + + s_tokenPool.applyAllowListUpdates(setAddresses, new address[](0)); + setAddresses = s_tokenPool.getAllowList(); + + assertEq(0, setAddresses.length); + } + + function test_SetAllowListSkipsZero_Success() public { + uint256 setAddressesLength = s_tokenPool.getAllowList().length; + + address[] memory newAddresses = new address[](1); + newAddresses[0] = address(0); + + s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); + address[] memory setAddresses = s_tokenPool.getAllowList(); + + assertEq(setAddresses.length, setAddressesLength); + } + + // Reverts + + function test_OnlyOwner_Revert() public { + vm.stopPrank(); + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + address[] memory newAddresses = new address[](2); + s_tokenPool.applyAllowListUpdates(new address[](0), newAddresses); + } + + function test_AllowListNotEnabled_Revert() public { + s_tokenPool = new TokenPoolHelper( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + + vm.expectRevert(TokenPool.AllowListNotEnabled.selector); + + s_tokenPool.applyAllowListUpdates(new address[](0), new address[](2)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol new file mode 100644 index 0000000000..52fd5cd624 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol @@ -0,0 +1,314 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; +import {BurnMintERC677} from "../../../../shared/token/ERC677/BurnMintERC677.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; + +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {RouterSetup} from "../../router/RouterSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract TokenPool_applyChainUpdates is RouterSetup { + IERC20 internal s_token; + TokenPoolHelper internal s_tokenPool; + + function setUp() public virtual override { + RouterSetup.setUp(); + s_token = new BurnMintERC677("LINK", "LNK", 18, 0); + deal(address(s_token), OWNER, type(uint256).max); + + s_tokenPool = new TokenPoolHelper( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + } + + function assertState( + TokenPool.ChainUpdate[] memory chainUpdates + ) public view { + uint64[] memory chainSelectors = s_tokenPool.getSupportedChains(); + for (uint256 i = 0; i < chainUpdates.length; ++i) { + assertEq(chainUpdates[i].remoteChainSelector, chainSelectors[i], "Chain selector mismatch"); + } + + for (uint256 i = 0; i < chainUpdates.length; ++i) { + assertTrue(s_tokenPool.isSupportedChain(chainUpdates[i].remoteChainSelector)); + RateLimiter.TokenBucket memory bkt = + s_tokenPool.getCurrentOutboundRateLimiterState(chainUpdates[i].remoteChainSelector); + assertEq(bkt.capacity, chainUpdates[i].outboundRateLimiterConfig.capacity); + assertEq(bkt.rate, chainUpdates[i].outboundRateLimiterConfig.rate); + assertEq(bkt.isEnabled, chainUpdates[i].outboundRateLimiterConfig.isEnabled); + + bkt = s_tokenPool.getCurrentInboundRateLimiterState(chainUpdates[i].remoteChainSelector); + assertEq(bkt.capacity, chainUpdates[i].inboundRateLimiterConfig.capacity); + assertEq(bkt.rate, chainUpdates[i].inboundRateLimiterConfig.rate); + assertEq(bkt.isEnabled, chainUpdates[i].inboundRateLimiterConfig.isEnabled); + } + } + + function test_applyChainUpdates_Success() public { + RateLimiter.Config memory outboundRateLimit1 = RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}); + RateLimiter.Config memory inboundRateLimit1 = RateLimiter.Config({isEnabled: true, capacity: 100e29, rate: 1e19}); + RateLimiter.Config memory outboundRateLimit2 = RateLimiter.Config({isEnabled: true, capacity: 100e26, rate: 1e16}); + RateLimiter.Config memory inboundRateLimit2 = RateLimiter.Config({isEnabled: true, capacity: 100e27, rate: 1e17}); + + // EVM chain, which uses the 160 bit evm address space + uint64 evmChainSelector = 1789142; + bytes memory evmRemotePool = abi.encode(makeAddr("evm_remote_pool")); + bytes memory evmRemoteToken = abi.encode(makeAddr("evm_remote_token")); + + // Non EVM chain, which uses the full 256 bits + uint64 nonEvmChainSelector = type(uint64).max; + bytes memory nonEvmRemotePool = abi.encode(keccak256("non_evm_remote_pool")); + bytes memory nonEvmRemoteToken = abi.encode(keccak256("non_evm_remote_token")); + + bytes[] memory evmRemotePools = new bytes[](1); + evmRemotePools[0] = evmRemotePool; + + bytes[] memory nonEvmRemotePools = new bytes[](1); + nonEvmRemotePools[0] = nonEvmRemotePool; + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: evmChainSelector, + remotePoolAddresses: evmRemotePools, + remoteTokenAddress: evmRemoteToken, + outboundRateLimiterConfig: outboundRateLimit1, + inboundRateLimiterConfig: inboundRateLimit1 + }); + chainUpdates[1] = TokenPool.ChainUpdate({ + remoteChainSelector: nonEvmChainSelector, + remotePoolAddresses: nonEvmRemotePools, + remoteTokenAddress: nonEvmRemoteToken, + outboundRateLimiterConfig: outboundRateLimit2, + inboundRateLimiterConfig: inboundRateLimit2 + }); + + // Assert configuration is applied + vm.expectEmit(); + emit TokenPool.ChainAdded( + chainUpdates[0].remoteChainSelector, + chainUpdates[0].remoteTokenAddress, + chainUpdates[0].outboundRateLimiterConfig, + chainUpdates[0].inboundRateLimiterConfig + ); + vm.expectEmit(); + emit TokenPool.ChainAdded( + chainUpdates[1].remoteChainSelector, + chainUpdates[1].remoteTokenAddress, + chainUpdates[1].outboundRateLimiterConfig, + chainUpdates[1].inboundRateLimiterConfig + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + // on1: rateLimit1, on2: rateLimit2, off1: rateLimit1, off2: rateLimit3 + assertState(chainUpdates); + + // Removing an non-existent chain should revert + uint64 strangerChainSelector = 120938; + + uint64[] memory chainRemoves = new uint64[](1); + chainRemoves[0] = strangerChainSelector; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, strangerChainSelector)); + s_tokenPool.applyChainUpdates(chainRemoves, new TokenPool.ChainUpdate[](0)); + // State remains + assertState(chainUpdates); + + // Can remove a chain + chainRemoves[0] = evmChainSelector; + + vm.expectEmit(); + emit TokenPool.ChainRemoved(chainRemoves[0]); + + s_tokenPool.applyChainUpdates(chainRemoves, new TokenPool.ChainUpdate[](0)); + + // State updated, only chain 2 remains + TokenPool.ChainUpdate[] memory singleChainConfigured = new TokenPool.ChainUpdate[](1); + singleChainConfigured[0] = chainUpdates[1]; + assertState(singleChainConfigured); + + // Cannot reset already configured ramp + vm.expectRevert( + abi.encodeWithSelector(TokenPool.ChainAlreadyExists.selector, singleChainConfigured[0].remoteChainSelector) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), singleChainConfigured); + } + + function test_applyChainUpdates_UpdatesRemotePoolHashes() public { + assertEq(s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR).length, 0); + + uint64 selector1 = 789; + uint64 selector2 = 123; + uint64 selector3 = 456; + + bytes memory pool1 = abi.encode(makeAddr("pool1")); + bytes memory pool2 = abi.encode(makeAddr("pool2")); + bytes memory pool3 = abi.encode(makeAddr("pool3")); + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](3); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: selector1, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: pool1, + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + chainUpdates[1] = TokenPool.ChainUpdate({ + remoteChainSelector: selector2, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: pool2, + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + chainUpdates[2] = TokenPool.ChainUpdate({ + remoteChainSelector: selector3, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: pool3, + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + // This adds 3 for the first chain, 2 for the second, and 1 for the third for a total of 6. + for (uint256 i = 0; i < chainUpdates.length; ++i) { + for (uint256 j = i; j < chainUpdates.length; ++j) { + s_tokenPool.addRemotePool(chainUpdates[i].remoteChainSelector, abi.encode(i, j)); + } + assertEq(s_tokenPool.getRemotePools(chainUpdates[i].remoteChainSelector).length, 3 - i); + } + + // Removing a chain should remove all associated pool hashes + uint64[] memory chainRemoves = new uint64[](1); + chainRemoves[0] = selector1; + + s_tokenPool.applyChainUpdates(chainRemoves, new TokenPool.ChainUpdate[](0)); + + assertEq(s_tokenPool.getRemotePools(selector1).length, 0); + + chainRemoves[0] = selector2; + + s_tokenPool.applyChainUpdates(chainRemoves, new TokenPool.ChainUpdate[](0)); + + assertEq(s_tokenPool.getRemotePools(selector2).length, 0); + + // The above deletions should not have affected the third chain + assertEq(s_tokenPool.getRemotePools(selector3).length, 1); + } + + // Reverts + + function test_applyChainUpdates_OnlyCallableByOwner_Revert() public { + vm.startPrank(STRANGER); + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_tokenPool.applyChainUpdates(new uint64[](0), new TokenPool.ChainUpdate[](0)); + } + + function test_applyChainUpdates_ZeroAddressNotAllowed_Revert() public { + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = ""; + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: 1, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}), + inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}) + }); + + vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: 1, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: "", + outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}), + inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e18}) + }); + + vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + } + + function test_applyChainUpdates_NonExistentChain_Revert() public { + uint64[] memory chainRemoves = new uint64[](1); + chainRemoves[0] = 1; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainRemoves[0])); + s_tokenPool.applyChainUpdates(chainRemoves, new TokenPool.ChainUpdate[](0)); + } + + function test_applyChainUpdates_InvalidRateLimitRate_Revert() public { + uint64 unusedChainSelector = 2 ** 64 - 1; + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: unusedChainSelector, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 0, rate: 0}), + inboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 100e22, rate: 1e12}) + }); + + // Outbound + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].outboundRateLimiterConfig.rate = 100; + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].outboundRateLimiterConfig.capacity = 100; + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].outboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].outboundRateLimiterConfig.capacity = 101; + + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + // Change the chain selector as adding the same one would revert + chainUpdates[0].remoteChainSelector = unusedChainSelector - 1; + + // Inbound + + chainUpdates[0].inboundRateLimiterConfig.capacity = 0; + chainUpdates[0].inboundRateLimiterConfig.rate = 0; + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].inboundRateLimiterConfig.rate = 100; + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].inboundRateLimiterConfig.capacity = 100; + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.InvalidRateLimitRate.selector, chainUpdates[0].inboundRateLimiterConfig) + ); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + chainUpdates[0].inboundRateLimiterConfig.capacity = 101; + + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.calculateLocalAmount.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.calculateLocalAmount.t.sol new file mode 100644 index 0000000000..4262fac221 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.calculateLocalAmount.t.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +import {IERC20Metadata} from + "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; + +contract TokenPool_calculateLocalAmount is TokenPoolSetup { + function test_calculateLocalAmount() public view { + uint8 localDecimals = s_tokenPool.getTokenDecimals(); + uint256 remoteAmount = 123e18; + + // Zero decimals should return amount * 10^localDecimals + assertEq(s_tokenPool.calculateLocalAmount(remoteAmount, 0), remoteAmount * 10 ** localDecimals); + + // Equal decimals should return the same amount + assertEq(s_tokenPool.calculateLocalAmount(remoteAmount, localDecimals), remoteAmount); + + // Remote amount with more decimals should return less local amount + uint256 expectedAmount = remoteAmount; + for (uint8 remoteDecimals = localDecimals + 1; remoteDecimals < 36; ++remoteDecimals) { + expectedAmount /= 10; + assertEq(s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals), expectedAmount); + } + + // Remote amount with less decimals should return more local amount + expectedAmount = remoteAmount; + for (uint8 remoteDecimals = localDecimals - 1; remoteDecimals > 0; --remoteDecimals) { + expectedAmount *= 10; + assertEq(s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals), expectedAmount); + } + } + + // Reverts + + function test_calculateLocalAmount_RevertWhen_LowRemoteDecimalsOverflows() public { + uint8 remoteDecimals = 0; + uint8 localDecimals = 78; + uint256 remoteAmount = 1; + + vm.mockCall(address(s_token), abi.encodeWithSelector(IERC20Metadata.decimals.selector), abi.encode(localDecimals)); + + s_tokenPool = + new TokenPoolHelper(s_token, localDecimals, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + + vm.expectRevert( + abi.encodeWithSelector(TokenPool.OverflowDetected.selector, remoteDecimals, localDecimals, remoteAmount) + ); + + s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals); + } + + function test_calculateLocalAmount_RevertWhen_HighLocalDecimalsOverflows() public { + uint8 remoteDecimals = 18; + uint8 localDecimals = 18 + 78; + uint256 remoteAmount = 1; + + vm.mockCall(address(s_token), abi.encodeWithSelector(IERC20Metadata.decimals.selector), abi.encode(localDecimals)); + + s_tokenPool = + new TokenPoolHelper(s_token, localDecimals, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + + vm.expectRevert( + abi.encodeWithSelector(TokenPool.OverflowDetected.selector, remoteDecimals, localDecimals, remoteAmount) + ); + + s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals); + } + + function test_calculateLocalAmount_RevertWhen_HighRemoteDecimalsOverflows() public { + uint8 remoteDecimals = 18 + 78; + uint8 localDecimals = 18; + uint256 remoteAmount = 1; + + vm.expectRevert( + abi.encodeWithSelector(TokenPool.OverflowDetected.selector, remoteDecimals, localDecimals, remoteAmount) + ); + + s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals); + } + + function test_calculateLocalAmount_RevertWhen_HighAmountOverflows() public { + uint8 remoteDecimals = 18; + uint8 localDecimals = 18 + 28; + uint256 remoteAmount = 1e50; + + vm.mockCall(address(s_token), abi.encodeWithSelector(IERC20Metadata.decimals.selector), abi.encode(localDecimals)); + + s_tokenPool = + new TokenPoolHelper(s_token, localDecimals, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + + vm.expectRevert( + abi.encodeWithSelector(TokenPool.OverflowDetected.selector, remoteDecimals, localDecimals, remoteAmount) + ); + + s_tokenPool.calculateLocalAmount(remoteAmount, remoteDecimals); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.constructor.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.constructor.t.sol new file mode 100644 index 0000000000..4b643d66b9 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.constructor.t.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC20Metadata} from + "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; + +contract TokenPool_constructor is TokenPoolSetup { + function test_constructor() public view { + assertEq(address(s_token), address(s_tokenPool.getToken())); + assertEq(address(s_mockRMN), s_tokenPool.getRmnProxy()); + assertFalse(s_tokenPool.getAllowListEnabled()); + assertEq(address(s_sourceRouter), s_tokenPool.getRouter()); + assertEq(DEFAULT_TOKEN_DECIMALS, s_tokenPool.getTokenDecimals()); + } + + function test_constructor_DecimalCallFails() public { + uint8 decimals = 255; + + vm.mockCallRevert(address(s_token), abi.encodeWithSelector(IERC20Metadata.decimals.selector), "decimals fails"); + + s_tokenPool = new TokenPoolHelper(s_token, decimals, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + + assertEq(s_tokenPool.getTokenDecimals(), decimals); + } + + // Reverts + + function test_constructor_RevertWhen_ZeroAddressNotAllowed() public { + vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); + + s_tokenPool = new TokenPoolHelper( + IERC20(address(0)), DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + } + + function test_constructor_RevertWhen_InvalidDecimalArgs() public { + uint8 invalidDecimals = DEFAULT_TOKEN_DECIMALS + 1; + + vm.expectRevert( + abi.encodeWithSelector(TokenPool.InvalidDecimalArgs.selector, invalidDecimals, DEFAULT_TOKEN_DECIMALS) + ); + + s_tokenPool = + new TokenPoolHelper(s_token, invalidDecimals, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowList.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowList.t.sol new file mode 100644 index 0000000000..8d4256d347 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowList.t.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPoolWithAllowListSetup} from "./TokenPoolWithAllowListSetup.t.sol"; + +contract TokenPoolWithAllowList_getAllowList is TokenPoolWithAllowListSetup { + function test_GetAllowList_Success() public view { + address[] memory setAddresses = s_tokenPool.getAllowList(); + assertEq(2, setAddresses.length); + assertEq(s_allowedSenders[0], setAddresses[0]); + assertEq(s_allowedSenders[1], setAddresses[1]); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowListEnabled.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowListEnabled.t.sol new file mode 100644 index 0000000000..2a36a84699 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getAllowListEnabled.t.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPoolWithAllowListSetup} from "./TokenPoolWithAllowListSetup.t.sol"; + +contract TokenPoolWithAllowList_getAllowListEnabled is TokenPoolWithAllowListSetup { + function test_GetAllowListEnabled_Success() public view { + assertTrue(s_tokenPool.getAllowListEnabled()); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol new file mode 100644 index 0000000000..5e619aede4 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_getRemotePool is TokenPoolSetup { + function test_getRemotePools() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + bytes memory remotePool = abi.encode(makeAddr("remotePool")); + bytes memory remoteToken = abi.encode(makeAddr("remoteToken")); + + // Zero indicates nothing is set + assertEq(0, s_tokenPool.getRemotePools(chainSelector).length); + + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = remotePool; + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: chainSelector, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: remoteToken, + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + bytes[] memory remotePools = s_tokenPool.getRemotePools(chainSelector); + assertEq(1, remotePools.length); + assertEq(remotePool, remotePools[0]); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol new file mode 100644 index 0000000000..8df07a285f --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Router} from "../../../Router.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_onlyOffRamp is TokenPoolSetup { + function test_onlyOffRamp_Success() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + address offRamp = makeAddr("onRamp"); + + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); + offRampUpdates[0] = Router.OffRamp({sourceChainSelector: chainSelector, offRamp: offRamp}); + s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); + + vm.startPrank(offRamp); + + s_tokenPool.onlyOffRampModifier(chainSelector); + } + + function test_ChainNotAllowed_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + address offRamp = makeAddr("onRamp"); + + vm.startPrank(offRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); + s_tokenPool.onlyOffRampModifier(chainSelector); + + vm.startPrank(OWNER); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: chainSelector, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); + offRampUpdates[0] = Router.OffRamp({sourceChainSelector: chainSelector, offRamp: offRamp}); + s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); + + vm.startPrank(offRamp); + // Should succeed now that we've added the chain + s_tokenPool.onlyOffRampModifier(chainSelector); + + uint64[] memory chainsToRemove = new uint64[](1); + chainsToRemove[0] = chainSelector; + + vm.startPrank(OWNER); + s_tokenPool.applyChainUpdates(chainsToRemove, new TokenPool.ChainUpdate[](0)); + + vm.startPrank(offRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); + s_tokenPool.onlyOffRampModifier(chainSelector); + } + + function test_CallerIsNotARampOnRouter_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + address offRamp = makeAddr("offRamp"); + + vm.startPrank(offRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, offRamp)); + + s_tokenPool.onlyOffRampModifier(chainSelector); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol new file mode 100644 index 0000000000..be0c21e4c1 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Router} from "../../../Router.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_onlyOnRamp is TokenPoolSetup { + function test_onlyOnRamp_Success() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + address onRamp = makeAddr("onRamp"); + + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); + onRampUpdates[0] = Router.OnRamp({destChainSelector: chainSelector, onRamp: onRamp}); + s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); + + vm.startPrank(onRamp); + + s_tokenPool.onlyOnRampModifier(chainSelector); + } + + function test_ChainNotAllowed_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + address onRamp = makeAddr("onRamp"); + + vm.startPrank(onRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); + s_tokenPool.onlyOnRampModifier(chainSelector); + + vm.startPrank(OWNER); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: chainSelector, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); + onRampUpdates[0] = Router.OnRamp({destChainSelector: chainSelector, onRamp: onRamp}); + s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); + + vm.startPrank(onRamp); + // Should succeed now that we've added the chain + s_tokenPool.onlyOnRampModifier(chainSelector); + + uint64[] memory chainsToRemove = new uint64[](1); + chainsToRemove[0] = chainSelector; + + vm.startPrank(OWNER); + s_tokenPool.applyChainUpdates(chainsToRemove, new TokenPool.ChainUpdate[](0)); + + vm.startPrank(onRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.ChainNotAllowed.selector, chainSelector)); + s_tokenPool.onlyOffRampModifier(chainSelector); + } + + function test_CallerIsNotARampOnRouter_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + address onRamp = makeAddr("onRamp"); + + vm.startPrank(onRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, onRamp)); + + s_tokenPool.onlyOnRampModifier(chainSelector); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.parseRemoteDecimals.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.parseRemoteDecimals.t.sol new file mode 100644 index 0000000000..9817fe227e --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.parseRemoteDecimals.t.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_parseRemoteDecimals is TokenPoolSetup { + function test_parseRemoteDecimals() public view { + uint256 remoteDecimals = 12; + bytes memory encodedDecimals = abi.encode(remoteDecimals); + + assertEq(s_tokenPool.parseRemoteDecimals(encodedDecimals), remoteDecimals); + + assertEq(s_tokenPool.parseRemoteDecimals(s_tokenPool.encodeLocalDecimals()), s_tokenPool.getTokenDecimals()); + } + + function test_parseRemoteDecimals_NoDecimalsDefaultsToLocalDecimals() public view { + assertEq(s_tokenPool.parseRemoteDecimals(""), s_tokenPool.getTokenDecimals()); + } + + function test_parseRemoteDecimals_RevertWhen_InvalidRemoteChainDecimals_DigitTooLarge() public { + bytes memory encodedDecimals = abi.encode(uint256(256)); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidRemoteChainDecimals.selector, encodedDecimals)); + + s_tokenPool.parseRemoteDecimals(encodedDecimals); + } + + function test_parseRemoteDecimals_RevertWhen_InvalidRemoteChainDecimals_WrongType() public { + bytes memory encodedDecimals = abi.encode(uint256(256), "wrong type"); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidRemoteChainDecimals.selector, encodedDecimals)); + + s_tokenPool.parseRemoteDecimals(encodedDecimals); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol new file mode 100644 index 0000000000..2fa9ef1662 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_removeRemotePool is TokenPoolSetup { + function test_removeRemotePool_Success() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + // Use a longer data type to ensure it also works for non-evm + bytes memory remotePool = abi.encode(makeAddr("non-evm-1"), makeAddr("non-evm-2")); + + vm.expectEmit(); + emit TokenPool.RemotePoolAdded(chainSelector, remotePool); + + // Add the remote pool properly so that it can be removed + s_tokenPool.addRemotePool(chainSelector, remotePool); + + bytes[] memory remotePools = s_tokenPool.getRemotePools(chainSelector); + assertEq(remotePools.length, 2); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); + assertEq(remotePools[1], remotePool); + + vm.expectEmit(); + emit TokenPool.RemotePoolRemoved(chainSelector, remotePool); + + s_tokenPool.removeRemotePool(chainSelector, remotePool); + + remotePools = s_tokenPool.getRemotePools(chainSelector); + assertEq(remotePools.length, 1); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); + + // Assert that it can be added after it has been removed + s_tokenPool.addRemotePool(chainSelector, remotePool); + + remotePools = s_tokenPool.getRemotePools(chainSelector); + assertEq(remotePools.length, 2); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); + assertEq(remotePools[1], remotePool); + } + + // Reverts + + function test_NonExistentChain_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + bytes memory remotePool = abi.encode(type(uint256).max); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); + + s_tokenPool.removeRemotePool(chainSelector, remotePool); + } + + function test_InvalidRemotePoolForChain_Revert() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR; + bytes memory remotePool = abi.encode(type(uint256).max); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidRemotePoolForChain.selector, chainSelector, remotePool)); + + s_tokenPool.removeRemotePool(chainSelector, remotePool); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol new file mode 100644 index 0000000000..4dea9bf403 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { + function testFuzz_SetChainRateLimiterConfig_Success(uint128 capacity, uint128 rate, uint32 newTime) public { + // Cap the lower bound to 4 so 4/2 is still >= 2 + vm.assume(capacity >= 4); + // Cap the lower bound to 2 so 2/2 is still >= 1 + rate = uint128(bound(rate, 2, capacity - 2)); + // Bucket updates only work on increasing time + newTime = uint32(bound(newTime, block.timestamp + 1, type(uint32).max)); + vm.warp(newTime); + + uint256 oldOutboundTokens = s_tokenPool.getCurrentOutboundRateLimiterState(DEST_CHAIN_SELECTOR).tokens; + uint256 oldInboundTokens = s_tokenPool.getCurrentInboundRateLimiterState(DEST_CHAIN_SELECTOR).tokens; + + RateLimiter.Config memory newOutboundConfig = RateLimiter.Config({isEnabled: true, capacity: capacity, rate: rate}); + RateLimiter.Config memory newInboundConfig = + RateLimiter.Config({isEnabled: true, capacity: capacity / 2, rate: rate / 2}); + + vm.expectEmit(); + emit RateLimiter.ConfigChanged(newOutboundConfig); + vm.expectEmit(); + emit RateLimiter.ConfigChanged(newInboundConfig); + vm.expectEmit(); + emit TokenPool.ChainConfigured(DEST_CHAIN_SELECTOR, newOutboundConfig, newInboundConfig); + + s_tokenPool.setChainRateLimiterConfig(DEST_CHAIN_SELECTOR, newOutboundConfig, newInboundConfig); + + uint256 expectedTokens = RateLimiter._min(newOutboundConfig.capacity, oldOutboundTokens); + + RateLimiter.TokenBucket memory bucket = s_tokenPool.getCurrentOutboundRateLimiterState(DEST_CHAIN_SELECTOR); + assertEq(bucket.capacity, newOutboundConfig.capacity); + assertEq(bucket.rate, newOutboundConfig.rate); + assertEq(bucket.tokens, expectedTokens); + assertEq(bucket.lastUpdated, newTime); + + expectedTokens = RateLimiter._min(newInboundConfig.capacity, oldInboundTokens); + + bucket = s_tokenPool.getCurrentInboundRateLimiterState(DEST_CHAIN_SELECTOR); + assertEq(bucket.capacity, newInboundConfig.capacity); + assertEq(bucket.rate, newInboundConfig.rate); + assertEq(bucket.tokens, expectedTokens); + assertEq(bucket.lastUpdated, newTime); + } + + // Reverts + + function test_OnlyOwnerOrRateLimitAdmin_Revert() public { + vm.startPrank(STRANGER); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); + s_tokenPool.setChainRateLimiterConfig( + DEST_CHAIN_SELECTOR, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() + ); + } + + function test_NonExistentChain_Revert() public { + uint64 wrongChainSelector = 9084102894; + + vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, wrongChainSelector)); + s_tokenPool.setChainRateLimiterConfig( + wrongChainSelector, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRateLimitAdmin.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRateLimitAdmin.t.sol new file mode 100644 index 0000000000..7c57741cf4 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRateLimitAdmin.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPool_setRateLimitAdmin is TokenPoolSetup { + function test_SetRateLimitAdmin_Success() public { + assertEq(address(0), s_tokenPool.getRateLimitAdmin()); + vm.expectEmit(); + emit TokenPool.RateLimitAdminSet(OWNER); + s_tokenPool.setRateLimitAdmin(OWNER); + assertEq(OWNER, s_tokenPool.getRateLimitAdmin()); + } + + // Reverts + + function test_SetRateLimitAdmin_Revert() public { + vm.startPrank(STRANGER); + + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_tokenPool.setRateLimitAdmin(STRANGER); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRouter.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRouter.t.sol new file mode 100644 index 0000000000..4bf85f3af9 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRouter.t.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolWithAllowListSetup} from "./TokenPoolWithAllowListSetup.t.sol"; + +contract TokenPoolWithAllowList_setRouter is TokenPoolWithAllowListSetup { + function test_SetRouter_Success() public { + assertEq(address(s_sourceRouter), s_tokenPool.getRouter()); + + address newRouter = makeAddr("newRouter"); + + vm.expectEmit(); + emit TokenPool.RouterUpdated(address(s_sourceRouter), newRouter); + + s_tokenPool.setRouter(newRouter); + + assertEq(newRouter, s_tokenPool.getRouter()); + } + + // Reverts + + function test_ZeroAddressNotAllowed_Revert() public { + address newRouter = address(0); + + vm.expectRevert(TokenPool.ZeroAddressNotAllowed.selector); + + s_tokenPool.setRouter(newRouter); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol new file mode 100644 index 0000000000..e743b950c2 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../shared/token/ERC20/BurnMintERC20.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {RouterSetup} from "../../router/RouterSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract TokenPoolSetup is RouterSetup { + IERC20 internal s_token; + TokenPoolHelper internal s_tokenPool; + + address internal s_initialRemotePool = makeAddr("initialRemotePool"); + address internal s_initialRemoteToken = makeAddr("initialRemoteToken"); + + function setUp() public virtual override { + RouterSetup.setUp(); + s_token = new BurnMintERC20("LINK", "LNK", 18, 0, 0); + deal(address(s_token), OWNER, type(uint256).max); + + s_tokenPool = new TokenPoolHelper( + s_token, DEFAULT_TOKEN_DECIMALS, new address[](0), address(s_mockRMN), address(s_sourceRouter) + ); + + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = abi.encode(s_initialRemotePool); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: abi.encode(s_initialRemoteToken), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolWithAllowListSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolWithAllowListSetup.t.sol new file mode 100644 index 0000000000..478e899637 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolWithAllowListSetup.t.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; + +contract TokenPoolWithAllowListSetup is TokenPoolSetup { + address[] internal s_allowedSenders; + + function setUp() public virtual override { + TokenPoolSetup.setUp(); + + s_allowedSenders.push(STRANGER); + s_allowedSenders.push(OWNER); + + s_tokenPool = new TokenPoolHelper( + s_token, DEFAULT_TOKEN_DECIMALS, s_allowedSenders, address(s_mockRMN), address(s_sourceRouter) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.lockOrBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.lockOrBurn.t.sol new file mode 100644 index 0000000000..394357f213 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.lockOrBurn.t.sol @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {ITokenMessenger} from "../../../../pools/USDC/ITokenMessenger.sol"; + +import {Pool} from "../../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./HybridLockReleaseUSDCTokenPoolSetup.t.sol"; + +contract HybridLockReleaseUSDCTokenPool_lockOrBurn is HybridLockReleaseUSDCTokenPoolSetup { + function test_onLockReleaseMechanism_Success() public { + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + assertTrue( + s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), + "Lock/Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" + ); + + uint256 amount = 1e6; + + s_token.transfer(address(s_usdcTokenPool), amount); + + vm.startPrank(s_routerAllowedOnRamp); + + vm.expectEmit(); + emit TokenPool.Locked(s_routerAllowedOnRamp, amount); + + s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(receiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), amount, "Incorrect token amount in the tokenPool"); + } + + function test_PrimaryMechanism_Success() public { + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + uint256 amount = 1; + + vm.startPrank(OWNER); + + s_token.transfer(address(s_usdcTokenPool), amount); + + vm.startPrank(s_routerAllowedOnRamp); + + USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + + vm.expectEmit(); + emit ITokenMessenger.DepositForBurn( + s_mockUSDC.s_nonce(), + address(s_token), + amount, + address(s_usdcTokenPool), + receiver, + expectedDomain.domainIdentifier, + s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), + expectedDomain.allowedCaller + ); + + vm.expectEmit(); + emit TokenPool.Burned(s_routerAllowedOnRamp, amount); + + Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(receiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); + assertEq(s_mockUSDC.s_nonce() - 1, nonce); + } + + function test_onLockReleaseMechanism_thenSwitchToPrimary_Success() public { + // Test Enabling the LR mechanism and sending an outgoing message + test_PrimaryMechanism_Success(); + + // Disable the LR mechanism so that primary CCTP is used and then attempt to send a message + uint64[] memory destChainRemoves = new uint64[](1); + destChainRemoves[0] = DEST_CHAIN_SELECTOR; + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit HybridLockReleaseUSDCTokenPool.LockReleaseDisabled(DEST_CHAIN_SELECTOR); + + s_usdcTokenPool.updateChainSelectorMechanisms(destChainRemoves, new uint64[](0)); + + // Send an outgoing message + test_PrimaryMechanism_Success(); + } + + function test_WhileMigrationPause_Revert() public { + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + // Create a fake migration proposal + s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); + + assertEq(s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), DEST_CHAIN_SELECTOR); + + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + + assertTrue( + s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), + "Lock Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" + ); + + uint256 amount = 1e6; + + s_token.transfer(address(s_usdcTokenPool), amount); + + vm.startPrank(s_routerAllowedOnRamp); + + // Expect the lockOrBurn to fail because a pending CCTP-Migration has paused outgoing messages on CCIP + vm.expectRevert( + abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, DEST_CHAIN_SELECTOR) + ); + + s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(receiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.releaseOrMint.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.releaseOrMint.t.sol new file mode 100644 index 0000000000..ea3c581ea5 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.releaseOrMint.t.sol @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Internal} from "../../../../libraries/Internal.sol"; +import {Pool} from "../../../../libraries/Pool.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {LOCK_RELEASE_FLAG} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {MockE2EUSDCTransmitter} from "../../../mocks/MockE2EUSDCTransmitter.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./HybridLockReleaseUSDCTokenPoolSetup.t.sol"; + +contract HybridLockReleaseUSDCTokenPool_releaseOrMint is HybridLockReleaseUSDCTokenPoolSetup { + function test_OnLockReleaseMechanism_Success() public { + address recipient = address(1234); + + // Designate the SOURCE_CHAIN as not using native-USDC, and so the L/R mechanism must be used instead + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = SOURCE_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + assertTrue( + s_usdcTokenPool.shouldUseLockRelease(SOURCE_CHAIN_SELECTOR), + "Lock/Release mech not configured for incoming message from SOURCE_CHAIN_SELECTOR" + ); + + vm.startPrank(OWNER); + s_usdcTokenPool.setLiquidityProvider(SOURCE_CHAIN_SELECTOR, OWNER); + + // Add 1e12 liquidity so that there's enough to release + vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); + + s_token.approve(address(s_usdcTokenPool), type(uint256).max); + + uint256 liquidityAmount = 1e12; + s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, liquidityAmount); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + uint256 amount = 1e6; + + vm.startPrank(s_routerAllowedOffRamp); + + vm.expectEmit(); + emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); + + Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: abi.encode(LOCK_RELEASE_FLAG), + offchainTokenData: "" + }) + ); + + assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); + + // Simulate the off-ramp forwarding tokens to the recipient on destination chain + // s_token.transfer(recipient, amount); + + assertEq( + s_token.balanceOf(address(s_usdcTokenPool)), + liquidityAmount - amount, + "Incorrect remaining liquidity in TokenPool" + ); + assertEq(s_token.balanceOf(recipient), amount, "Tokens not transferred to recipient"); + } + + // https://etherscan.io/tx/0xac9f501fe0b76df1f07a22e1db30929fd12524bc7068d74012dff948632f0883 + function test_incomingMessageWithPrimaryMechanism() public { + bytes memory encodedUsdcMessage = + hex"000000000000000300000000000000000000127a00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58310000000000000000000000004af08f56978be7dce2d1be3c65c005b41e79401c000000000000000000000000000000000000000000000000000000002057ff7a0000000000000000000000003a23f943181408eac424116af7b7790c94cb97a50000000000000000000000000000000000000000000000000000000000000000000000000000008274119237535fd659626b090f87e365ff89ebc7096bb32e8b0e85f155626b73ae7c4bb2485c184b7cc3cf7909045487890b104efb62ae74a73e32901bdcec91df1bb9ee08ccb014fcbcfe77b74d1263fd4e0b0e8de05d6c9a5913554364abfd5ea768b222f50c715908183905d74044bb2b97527c7e70ae7983c443a603557cac3b1c000000000000000000000000000000000000000000000000000000000000"; + bytes memory attestation = bytes("attestation bytes"); + + uint32 nonce = 4730; + uint32 sourceDomain = 3; + uint256 amount = 100; + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + // The mocked receiver does not release the token to the pool, so we manually do it here + deal(address(s_token), address(s_usdcTokenPool), amount); + + bytes memory offchainTokenData = + abi.encode(USDCTokenPool.MessageAndAttestation({message: encodedUsdcMessage, attestation: attestation})); + + vm.expectCall( + address(s_mockUSDCTransmitter), + abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, encodedUsdcMessage, attestation) + ); + + vm.startPrank(s_routerAllowedOffRamp); + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: OWNER, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourceTokenData.extraData, + offchainTokenData: offchainTokenData + }) + ); + } + + function test_WhileMigrationPause_Revert() public { + address recipient = address(1234); + + // Designate the SOURCE_CHAIN as not using native-USDC, and so the L/R mechanism must be used instead + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = SOURCE_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + assertTrue( + s_usdcTokenPool.shouldUseLockRelease(SOURCE_CHAIN_SELECTOR), + "Lock/Release mech not configured for incoming message from SOURCE_CHAIN_SELECTOR" + ); + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit USDCBridgeMigrator.CCTPMigrationProposed(SOURCE_CHAIN_SELECTOR); + + // Propose the migration to CCTP + s_usdcTokenPool.proposeCCTPMigration(SOURCE_CHAIN_SELECTOR); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + bytes memory sourcePoolDataLockRelease = abi.encode(LOCK_RELEASE_FLAG); + + uint256 amount = 1e6; + + vm.startPrank(s_routerAllowedOffRamp); + + // Expect revert because the lane is paused and no incoming messages should be allowed + vm.expectRevert( + abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, SOURCE_CHAIN_SELECTOR) + ); + + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourcePoolDataLockRelease, + offchainTokenData: "" + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.transferLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.transferLiquidity.t.sol new file mode 100644 index 0000000000..4e5a45a143 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.transferLiquidity.t.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {ILiquidityContainer} from "../../../../../liquiditymanager/interfaces/ILiquidityContainer.sol"; + +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./HybridLockReleaseUSDCTokenPoolSetup.t.sol"; + +contract HybridLockReleaseUSDCTokenPool_TransferLiquidity is HybridLockReleaseUSDCTokenPoolSetup { + function test_transferLiquidity_Success() public { + // Set as the OWNER so we can provide liquidity + vm.startPrank(OWNER); + + s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); + s_token.approve(address(s_usdcTokenPool), type(uint256).max); + + uint256 liquidityAmount = 1e9; + + // Provide some liquidity to the pool + s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, liquidityAmount); + + // Set the new token pool as the rebalancer + s_usdcTokenPool.transferOwnership(address(s_usdcTokenPoolTransferLiquidity)); + + vm.expectEmit(); + emit ILiquidityContainer.LiquidityRemoved(address(s_usdcTokenPoolTransferLiquidity), liquidityAmount); + + vm.expectEmit(); + emit HybridLockReleaseUSDCTokenPool.LiquidityTransferred( + address(s_usdcTokenPool), DEST_CHAIN_SELECTOR, liquidityAmount + ); + + s_usdcTokenPoolTransferLiquidity.transferLiquidity(address(s_usdcTokenPool), DEST_CHAIN_SELECTOR); + + assertEq( + s_usdcTokenPool.owner(), + address(s_usdcTokenPoolTransferLiquidity), + "Ownership of the old pool should be transferred to the new pool" + ); + + assertEq( + s_usdcTokenPoolTransferLiquidity.getLockedTokensForChain(DEST_CHAIN_SELECTOR), + liquidityAmount, + "Tokens locked for dest chain doesn't match expected amount in storage" + ); + + assertEq( + s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), + 0, + "Tokens locked for dest chain in old token pool doesn't match expected amount in storage" + ); + + assertEq( + s_token.balanceOf(address(s_usdcTokenPoolTransferLiquidity)), + liquidityAmount, + "Liquidity amount of tokens should be new in new pool, but aren't" + ); + + assertEq( + s_token.balanceOf(address(s_usdcTokenPool)), + 0, + "Liquidity amount of tokens should be zero in old pool, but aren't" + ); + } + + function test_cannotTransferLiquidityDuringPendingMigration_Revert() public { + // Set as the OWNER so we can provide liquidity + vm.startPrank(OWNER); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); + s_token.approve(address(s_usdcTokenPool), type(uint256).max); + + uint256 liquidityAmount = 1e9; + + // Provide some liquidity to the pool + s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, liquidityAmount); + + // Set the new token pool as the rebalancer + s_usdcTokenPool.transferOwnership(address(s_usdcTokenPoolTransferLiquidity)); + + s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); + + vm.expectRevert( + abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, DEST_CHAIN_SELECTOR) + ); + + s_usdcTokenPoolTransferLiquidity.transferLiquidity(address(s_usdcTokenPool), DEST_CHAIN_SELECTOR); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol new file mode 100644 index 0000000000..9b318b782c --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {BurnMintERC677} from "../../../../../shared/token/ERC677/BurnMintERC677.sol"; + +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {USDCSetup} from "../USDCSetup.t.sol"; + +contract HybridLockReleaseUSDCTokenPoolSetup is USDCSetup { + HybridLockReleaseUSDCTokenPool internal s_usdcTokenPool; + HybridLockReleaseUSDCTokenPool internal s_usdcTokenPoolTransferLiquidity; + address[] internal s_allowedList; + + function setUp() public virtual override { + super.setUp(); + + s_usdcTokenPool = + new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); + + s_usdcTokenPoolTransferLiquidity = + new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); + + BurnMintERC677(address(s_token)).grantMintAndBurnRoles(address(s_usdcTokenPool)); + + _poolApplyChainUpdates(address(s_usdcTokenPool)); + + USDCTokenPool.DomainUpdate[] memory domains = new USDCTokenPool.DomainUpdate[](1); + domains[0] = USDCTokenPool.DomainUpdate({ + destChainSelector: DEST_CHAIN_SELECTOR, + domainIdentifier: 9999, + allowedCaller: keccak256("allowedCaller"), + enabled: true + }); + + s_usdcTokenPool.setDomains(domains); + + s_usdcTokenPool.setLiquidityProvider(DEST_CHAIN_SELECTOR, OWNER); + s_usdcTokenPool.setLiquidityProvider(SOURCE_CHAIN_SELECTOR, OWNER); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.burnLockedUSDC.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.burnLockedUSDC.t.sol new file mode 100644 index 0000000000..52ddb9dad4 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.burnLockedUSDC.t.sol @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Pool} from "../../../../libraries/Pool.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {HybridLockReleaseUSDCTokenPool_lockOrBurn} from + "../HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.lockOrBurn.t.sol"; + +contract USDCBridgeMigrator_BurnLockedUSDC is HybridLockReleaseUSDCTokenPool_lockOrBurn { + function test_lockOrBurn_then_BurnInCCTPMigration_Success() public { + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + address CIRCLE = makeAddr("CIRCLE CCTP Migrator"); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + assertTrue( + s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), + "Lock/Release mech not configured for outgoing message to DEST_CHAIN_SELECTOR" + ); + + uint256 amount = 1e6; + + s_token.transfer(address(s_usdcTokenPool), amount); + + vm.startPrank(s_routerAllowedOnRamp); + + vm.expectEmit(); + emit TokenPool.Locked(s_routerAllowedOnRamp, amount); + + s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(receiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + // Ensure that the tokens are properly locked + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), amount, "Incorrect token amount in the tokenPool"); + + assertEq( + s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), + amount, + "Internal locked token accounting is incorrect" + ); + + vm.startPrank(OWNER); + + vm.expectEmit(); + emit USDCBridgeMigrator.CircleMigratorAddressSet(CIRCLE); + + s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); + + vm.expectEmit(); + emit USDCBridgeMigrator.CCTPMigrationProposed(DEST_CHAIN_SELECTOR); + + // Propose the migration to CCTP + s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); + + assertEq( + s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), + DEST_CHAIN_SELECTOR, + "Current proposed chain migration does not match expected for DEST_CHAIN_SELECTOR" + ); + + // Impersonate the set circle address and execute the proposal + vm.startPrank(CIRCLE); + + vm.expectEmit(); + emit USDCBridgeMigrator.CCTPMigrationExecuted(DEST_CHAIN_SELECTOR, amount); + + // Ensure the call to the burn function is properly + vm.expectCall(address(s_token), abi.encodeWithSelector(bytes4(keccak256("burn(uint256)")), amount)); + + s_usdcTokenPool.burnLockedUSDC(); + + // Assert that the tokens were actually burned + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens were not burned out of the tokenPool"); + + // Ensure the proposal slot was cleared and there's no tokens locked for the destination chain anymore + assertEq(s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), 0, "Proposal Slot should be empty"); + assertEq( + s_usdcTokenPool.getLockedTokensForChain(DEST_CHAIN_SELECTOR), + 0, + "No tokens should be locked for DEST_CHAIN_SELECTOR after CCTP-approved burn" + ); + + assertFalse( + s_usdcTokenPool.shouldUseLockRelease(DEST_CHAIN_SELECTOR), "Lock/Release mech should be disabled after a burn" + ); + + test_PrimaryMechanism_Success(); + } + + function test_invalidPermissions_Revert() public { + address CIRCLE = makeAddr("CIRCLE"); + + vm.startPrank(OWNER); + + // Set the circle migrator address for later, but don't start pranking as it yet + s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); + + vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.onlyCircle.selector)); + + // Should fail because only Circle can call this function + s_usdcTokenPool.burnLockedUSDC(); + + vm.startPrank(CIRCLE); + + vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.NoMigrationProposalPending.selector)); + s_usdcTokenPool.burnLockedUSDC(); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.cancelMigrationProposal.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.cancelMigrationProposal.t.sol new file mode 100644 index 0000000000..f4f56cba3e --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.cancelMigrationProposal.t.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./USDCBridgeMigratorSetup.t.sol"; + +contract USDCBridgeMigrator_cancelMigrationProposal is HybridLockReleaseUSDCTokenPoolSetup { + function test_cancelExistingCCTPMigrationProposal_Success() public { + vm.startPrank(OWNER); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + vm.expectEmit(); + emit USDCBridgeMigrator.CCTPMigrationProposed(DEST_CHAIN_SELECTOR); + + s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); + + assertEq( + s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), + DEST_CHAIN_SELECTOR, + "migration proposal should exist, but doesn't" + ); + + vm.expectEmit(); + emit USDCBridgeMigrator.CCTPMigrationCancelled(DEST_CHAIN_SELECTOR); + + s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); + + assertEq( + s_usdcTokenPool.getCurrentProposedCCTPChainMigration(), + 0, + "migration proposal exists, but shouldn't after being cancelled" + ); + + vm.expectRevert(USDCBridgeMigrator.NoMigrationProposalPending.selector); + s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); + } + + function test_cannotCancelANonExistentMigrationProposal_Revert() public { + vm.expectRevert(USDCBridgeMigrator.NoMigrationProposalPending.selector); + + // Proposal to migrate doesn't exist, and so the chain selector is zero, and therefore should revert + s_usdcTokenPool.cancelExistingCCTPMigrationProposal(); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.excludeTokensFromBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.excludeTokensFromBurn.t.sol new file mode 100644 index 0000000000..855db7c5c6 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.excludeTokensFromBurn.t.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./USDCBridgeMigratorSetup.t.sol"; + +contract USDCBridgeMigrator_excludeTokensFromBurn is HybridLockReleaseUSDCTokenPoolSetup { + function test_excludeTokensWhenNoMigrationProposalPending_Revert() public { + vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.NoMigrationProposalPending.selector)); + + vm.startPrank(OWNER); + + s_usdcTokenPool.excludeTokensFromBurn(SOURCE_CHAIN_SELECTOR, 1e6); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.proposeMigration.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.proposeMigration.t.sol new file mode 100644 index 0000000000..b2668bde80 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.proposeMigration.t.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {HybridLockReleaseUSDCTokenPoolSetup} from "./USDCBridgeMigratorSetup.t.sol"; + +contract USDCBridgeMigrator_proposeMigration is HybridLockReleaseUSDCTokenPoolSetup { + function test_ChainNotUsingLockRelease_Revert() public { + vm.expectRevert(abi.encodeWithSelector(USDCBridgeMigrator.InvalidChainSelector.selector)); + + vm.startPrank(OWNER); + + s_usdcTokenPool.proposeCCTPMigration(0x98765); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.provideLiquidity.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.provideLiquidity.t.sol new file mode 100644 index 0000000000..88196d8779 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.provideLiquidity.t.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCBridgeMigrator_BurnLockedUSDC} from "./USDCBridgeMigrator.burnLockedUSDC.t.sol"; + +contract USDCBridgeMigrator_provideLiquidity is USDCBridgeMigrator_BurnLockedUSDC { + function test_cannotModifyLiquidityWithoutPermissions_Revert() public { + address randomAddr = makeAddr("RANDOM"); + + vm.startPrank(randomAddr); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, randomAddr)); + + // Revert because there's insufficient permissions for the DEST_CHAIN_SELECTOR to provide liquidity + s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, 1e6); + } + + function test_cannotProvideLiquidity_AfterMigration_Revert() public { + test_lockOrBurn_then_BurnInCCTPMigration_Success(); + + vm.startPrank(OWNER); + + vm.expectRevert( + abi.encodeWithSelector( + HybridLockReleaseUSDCTokenPool.TokenLockingNotAllowedAfterMigration.selector, DEST_CHAIN_SELECTOR + ) + ); + + s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, 1e6); + } + + function test_cannotProvideLiquidityWhenMigrationProposalPending_Revert() public { + vm.startPrank(OWNER); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + s_usdcTokenPool.proposeCCTPMigration(DEST_CHAIN_SELECTOR); + + vm.expectRevert( + abi.encodeWithSelector(HybridLockReleaseUSDCTokenPool.LanePausedForCCTPMigration.selector, DEST_CHAIN_SELECTOR) + ); + s_usdcTokenPool.provideLiquidity(DEST_CHAIN_SELECTOR, 1e6); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.releaseOrMint.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.releaseOrMint.t.sol new file mode 100644 index 0000000000..40569603e9 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.releaseOrMint.t.sol @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Internal} from "../../../../libraries/Internal.sol"; +import {Pool} from "../../../../libraries/Pool.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {LOCK_RELEASE_FLAG} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCBridgeMigrator} from "../../../../pools/USDC/USDCBridgeMigrator.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {HybridLockReleaseUSDCTokenPool_releaseOrMint} from + "../HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPool.releaseOrMint.t.sol"; + +contract USDCBridgeMigrator_releaseOrMint is HybridLockReleaseUSDCTokenPool_releaseOrMint { + function test_unstickManualTxAfterMigration_destChain_Success() public { + address recipient = address(1234); + // Test the edge case where a tx is stuck in the manual tx queue and the destination chain is the one that + // should process is after a migration. I.E the message will have the Lock-Release flag set in the OffChainData, + // which should tell it to use the lock-release mechanism with the tokens provided. + + // We want the released amount to be 1e6, so to simulate the workflow, we sent those tokens to the contract as + // liquidity + uint256 amount = 1e6; + // Add 1e12 liquidity so that there's enough to release + vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); + + s_token.approve(address(s_usdcTokenPool), type(uint256).max); + s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, amount); + + // By Default, the source chain will be indicated as use-CCTP so we need to change that. We create a message + // that will use the Lock-Release flag in the offchain data to indicate that the tokens should be released + // instead of minted since there's no attestation for us to use. + + vm.startPrank(s_routerAllowedOffRamp); + + vm.expectEmit(); + emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: abi.encode(LOCK_RELEASE_FLAG), + offchainTokenData: "" + }) + ); + + // By this point, the tx should have executed, with the Lock-Release taking over, and being forwaded to the + // recipient + + assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens should be transferred out of the pool"); + assertEq(s_token.balanceOf(recipient), amount, "Tokens should be transferred to the recipient"); + + // We also want to check that the system uses CCTP Burn/Mint for all other messages that don't have that flag + // which after a migration will mean all new messages. + + // The message should fail without an error because it failed to decode a non-existent attestation which would + // revert without an error + vm.expectRevert(); + + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: "", + offchainTokenData: "" + }) + ); + } + + function test_unstickManualTxAfterMigration_homeChain_Success() public { + address CIRCLE = makeAddr("CIRCLE"); + address recipient = address(1234); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = SOURCE_CHAIN_SELECTOR; + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + + // Test the edge case where a tx is stuck in the manual tx queue and the source chain (mainnet) needs unsticking + // In this test we want 1e6 worth of tokens to be stuck, so first we provide liquidity to the pool >1e6 + + uint256 amount = 1e6; + // Add 1e12 liquidity so that there's enough to release + vm.startPrank(s_usdcTokenPool.getLiquidityProvider(SOURCE_CHAIN_SELECTOR)); + + s_token.approve(address(s_usdcTokenPool), type(uint256).max); + + // I picked 3x the amount to be stuck so that we can have enough to release with a buffer + s_usdcTokenPool.provideLiquidity(SOURCE_CHAIN_SELECTOR, amount * 3); + + // At this point in the process, the router will lock new messages, so we want to simulate excluding tokens + // stuck coming back from the destination, to the home chain. This way they can be released and not minted + // since there's no corresponding attestation to use for minting. + vm.startPrank(OWNER); + + s_usdcTokenPool.proposeCCTPMigration(SOURCE_CHAIN_SELECTOR); + + // Exclude the tokens from being burned and check for the event + vm.expectEmit(); + emit USDCBridgeMigrator.TokensExcludedFromBurn(SOURCE_CHAIN_SELECTOR, amount, (amount * 3) - amount); + + s_usdcTokenPool.excludeTokensFromBurn(SOURCE_CHAIN_SELECTOR, amount); + + assertEq( + s_usdcTokenPool.getLockedTokensForChain(SOURCE_CHAIN_SELECTOR), + (amount * 3), + "Tokens locked minus ones excluded from the burn should be 2e6" + ); + + assertEq( + s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), + 1e6, + "1e6 tokens should be excluded from the burn" + ); + + s_usdcTokenPool.setCircleMigratorAddress(CIRCLE); + + vm.startPrank(CIRCLE); + + s_usdcTokenPool.burnLockedUSDC(); + + assertEq( + s_usdcTokenPool.getLockedTokensForChain(SOURCE_CHAIN_SELECTOR), 0, "All tokens should be burned out of the pool" + ); + + assertEq( + s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), + 1e6, + "There should still be 1e6 tokens excluded from the burn" + ); + + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 1e6, "All tokens minus the excluded should be in the pool"); + + // Now that the burn is successful, we can release the tokens that were excluded from the burn + vm.startPrank(s_routerAllowedOffRamp); + + vm.expectEmit(); + emit TokenPool.Released(s_routerAllowedOffRamp, recipient, amount); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + Pool.ReleaseOrMintOutV1 memory poolReturnDataV1 = s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: abi.encode(LOCK_RELEASE_FLAG), + offchainTokenData: "" + }) + ); + + assertEq(poolReturnDataV1.destinationAmount, amount, "destinationAmount and actual amount transferred differ"); + assertEq(s_token.balanceOf(address(s_usdcTokenPool)), 0, "Tokens should be transferred out of the pool"); + assertEq(s_token.balanceOf(recipient), amount, "Tokens should be transferred to the recipient"); + assertEq( + s_usdcTokenPool.getExcludedTokensByChain(SOURCE_CHAIN_SELECTOR), + 0, + "All tokens should be released from the exclusion list" + ); + + // We also want to check that the system uses CCTP Burn/Mint for all other messages that don't have that flag + test_incomingMessageWithPrimaryMechanism(); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.updateChainSelectorMechanism.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.updateChainSelectorMechanism.t.sol new file mode 100644 index 0000000000..9db74061a3 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigrator.updateChainSelectorMechanism.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; + +import {USDCBridgeMigrator_BurnLockedUSDC} from "./USDCBridgeMigrator.burnLockedUSDC.t.sol"; + +contract USDCBridgeMigrator_updateChainSelectorMechanism is USDCBridgeMigrator_BurnLockedUSDC { + function test_cannotRevertChainMechanism_afterMigration_Revert() public { + test_lockOrBurn_then_BurnInCCTPMigration_Success(); + + vm.startPrank(OWNER); + + // Mark the destination chain as supporting CCTP, so use L/R instead. + uint64[] memory destChainAdds = new uint64[](1); + destChainAdds[0] = DEST_CHAIN_SELECTOR; + + vm.expectRevert( + abi.encodeWithSelector( + HybridLockReleaseUSDCTokenPool.TokenLockingNotAllowedAfterMigration.selector, DEST_CHAIN_SELECTOR + ) + ); + + s_usdcTokenPool.updateChainSelectorMechanisms(new uint64[](0), destChainAdds); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigratorSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigratorSetup.t.sol new file mode 100644 index 0000000000..5a250fd16a --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCBridgeMigrator/USDCBridgeMigratorSetup.t.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; +import {USDCSetup} from "../USDCSetup.t.sol"; + +contract HybridLockReleaseUSDCTokenPoolSetup is USDCSetup { + HybridLockReleaseUSDCTokenPool internal s_usdcTokenPool; + HybridLockReleaseUSDCTokenPool internal s_usdcTokenPoolTransferLiquidity; + + function setUp() public virtual override { + super.setUp(); + + s_usdcTokenPool = + new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); + + s_usdcTokenPoolTransferLiquidity = + new HybridLockReleaseUSDCTokenPool(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCSetup.t.sol new file mode 100644 index 0000000000..9ec89b5258 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCSetup.t.sol @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IBurnMintERC20} from "../../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {BurnMintERC677} from "../../../../shared/token/ERC677/BurnMintERC677.sol"; +import {Router} from "../../../Router.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; + +import {BaseTest} from "../../BaseTest.t.sol"; +import {MockE2EUSDCTransmitter} from "../../mocks/MockE2EUSDCTransmitter.sol"; +import {MockUSDCTokenMessenger} from "../../mocks/MockUSDCTokenMessenger.sol"; + +contract USDCSetup is BaseTest { + struct USDCMessage { + uint32 version; + uint32 sourceDomain; + uint32 destinationDomain; + uint64 nonce; + bytes32 sender; + bytes32 recipient; + bytes32 destinationCaller; + bytes messageBody; + } + + uint32 internal constant USDC_DEST_TOKEN_GAS = 180_000; + uint32 internal constant SOURCE_DOMAIN_IDENTIFIER = 0x02020202; + uint32 internal constant DEST_DOMAIN_IDENTIFIER = 0; + + bytes32 internal constant SOURCE_CHAIN_TOKEN_SENDER = bytes32(uint256(uint160(0x01111111221))); + address internal constant SOURCE_CHAIN_USDC_POOL = address(0x23789765456789); + address internal constant DEST_CHAIN_USDC_POOL = address(0x987384873458734); + address internal constant DEST_CHAIN_USDC_TOKEN = address(0x23598918358198766); + + MockUSDCTokenMessenger internal s_mockUSDC; + MockE2EUSDCTransmitter internal s_mockUSDCTransmitter; + + address internal s_routerAllowedOnRamp = address(3456); + address internal s_routerAllowedOffRamp = address(234); + Router internal s_router; + + IBurnMintERC20 internal s_token; + + function setUp() public virtual override { + super.setUp(); + BurnMintERC677 usdcToken = new BurnMintERC677("USD Coin", "USDC", 6, 0); + s_token = usdcToken; + + deal(address(s_token), OWNER, type(uint256).max); + _setUpRamps(); + + s_mockUSDCTransmitter = new MockE2EUSDCTransmitter(0, DEST_DOMAIN_IDENTIFIER, address(s_token)); + s_mockUSDC = new MockUSDCTokenMessenger(0, address(s_mockUSDCTransmitter)); + + usdcToken.grantMintAndBurnRoles(address(s_mockUSDCTransmitter)); + usdcToken.grantMintAndBurnRoles(address(s_mockUSDC)); + } + + function _poolApplyChainUpdates( + address pool + ) internal { + bytes[] memory sourcePoolAddresses = new bytes[](1); + sourcePoolAddresses[0] = abi.encode(SOURCE_CHAIN_USDC_POOL); + + bytes[] memory destPoolAddresses = new bytes[](1); + destPoolAddresses[0] = abi.encode(DEST_CHAIN_USDC_POOL); + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + remotePoolAddresses: sourcePoolAddresses, + remoteTokenAddress: abi.encode(address(s_token)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + chainUpdates[1] = TokenPool.ChainUpdate({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + remotePoolAddresses: destPoolAddresses, + remoteTokenAddress: abi.encode(DEST_CHAIN_USDC_TOKEN), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + TokenPool(pool).applyChainUpdates(new uint64[](0), chainUpdates); + } + + function _setUpRamps() internal { + s_router = new Router(address(s_token), address(s_mockRMN)); + + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); + onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_routerAllowedOnRamp}); + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); + address[] memory offRamps = new address[](1); + offRamps[0] = s_routerAllowedOffRamp; + offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: offRamps[0]}); + + s_router.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); + } + + function _generateUSDCMessage( + USDCMessage memory usdcMessage + ) internal pure returns (bytes memory) { + return abi.encodePacked( + usdcMessage.version, + usdcMessage.sourceDomain, + usdcMessage.destinationDomain, + usdcMessage.nonce, + usdcMessage.sender, + usdcMessage.recipient, + usdcMessage.destinationCaller, + usdcMessage.messageBody + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.lockOrBurn.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.lockOrBurn.t.sol new file mode 100644 index 0000000000..03d328b8e8 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.lockOrBurn.t.sol @@ -0,0 +1,200 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {ITokenMessenger} from "../../../../pools/USDC/ITokenMessenger.sol"; + +import {Router} from "../../../../Router.sol"; +import {Pool} from "../../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {USDCTokenPoolSetup} from "./USDCTokenPoolSetup.t.sol"; + +contract USDCTokenPool_lockOrBurn is USDCTokenPoolSetup { + // Base test case, included for PR gas comparisons as fuzz tests are excluded from forge snapshot due to being flaky. + function test_LockOrBurn_Success() public { + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + uint256 amount = 1; + s_token.transfer(address(s_usdcTokenPool), amount); + vm.startPrank(s_routerAllowedOnRamp); + + USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + + vm.expectEmit(); + emit ITokenMessenger.DepositForBurn( + s_mockUSDC.s_nonce(), + address(s_token), + amount, + address(s_usdcTokenPool), + receiver, + expectedDomain.domainIdentifier, + s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), + expectedDomain.allowedCaller + ); + + vm.expectEmit(); + emit TokenPool.Burned(s_routerAllowedOnRamp, amount); + + Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(receiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); + assertEq(s_mockUSDC.s_nonce() - 1, nonce); + } + + function testFuzz_LockOrBurn_Success(bytes32 destinationReceiver, uint256 amount) public { + vm.assume(destinationReceiver != bytes32(0)); + amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); + s_token.transfer(address(s_usdcTokenPool), amount); + vm.startPrank(s_routerAllowedOnRamp); + + USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + + vm.expectEmit(); + emit ITokenMessenger.DepositForBurn( + s_mockUSDC.s_nonce(), + address(s_token), + amount, + address(s_usdcTokenPool), + destinationReceiver, + expectedDomain.domainIdentifier, + s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), + expectedDomain.allowedCaller + ); + + vm.expectEmit(); + emit TokenPool.Burned(s_routerAllowedOnRamp, amount); + + Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(destinationReceiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + + uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); + assertEq(s_mockUSDC.s_nonce() - 1, nonce); + assertEq(poolReturnDataV1.destTokenAddress, abi.encode(DEST_CHAIN_USDC_TOKEN)); + } + + function testFuzz_LockOrBurnWithAllowList_Success(bytes32 destinationReceiver, uint256 amount) public { + vm.assume(destinationReceiver != bytes32(0)); + amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); + s_token.transfer(address(s_usdcTokenPoolWithAllowList), amount); + vm.startPrank(s_routerAllowedOnRamp); + + USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPoolWithAllowList.getDomain(DEST_CHAIN_SELECTOR); + + vm.expectEmit(); + emit RateLimiter.TokensConsumed(amount); + vm.expectEmit(); + emit ITokenMessenger.DepositForBurn( + s_mockUSDC.s_nonce(), + address(s_token), + amount, + address(s_usdcTokenPoolWithAllowList), + destinationReceiver, + expectedDomain.domainIdentifier, + s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), + expectedDomain.allowedCaller + ); + vm.expectEmit(); + emit TokenPool.Burned(s_routerAllowedOnRamp, amount); + + Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: s_allowedList[0], + receiver: abi.encodePacked(destinationReceiver), + amount: amount, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); + assertEq(s_mockUSDC.s_nonce() - 1, nonce); + assertEq(poolReturnDataV1.destTokenAddress, abi.encode(DEST_CHAIN_USDC_TOKEN)); + } + + // Reverts + function test_UnknownDomain_Revert() public { + uint64 wrongDomain = DEST_CHAIN_SELECTOR + 1; + // We need to setup the wrong chainSelector so it reaches the domain check + Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); + onRampUpdates[0] = Router.OnRamp({destChainSelector: wrongDomain, onRamp: s_routerAllowedOnRamp}); + s_router.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: wrongDomain, + remotePoolAddresses: new bytes[](0), + remoteTokenAddress: abi.encode(address(2)), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + + s_usdcTokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + uint256 amount = 1000; + vm.startPrank(s_routerAllowedOnRamp); + deal(address(s_token), s_routerAllowedOnRamp, amount); + s_token.approve(address(s_usdcTokenPool), amount); + + vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.UnknownDomain.selector, wrongDomain)); + + s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(address(0)), + amount: amount, + remoteChainSelector: wrongDomain, + localToken: address(s_token) + }) + ); + } + + function test_CallerIsNotARampOnRouter_Revert() public { + vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, OWNER)); + + s_usdcTokenPool.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: OWNER, + receiver: abi.encodePacked(address(0)), + amount: 0, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } + + function test_LockOrBurnWithAllowList_Revert() public { + vm.startPrank(s_routerAllowedOnRamp); + + vm.expectRevert(abi.encodeWithSelector(TokenPool.SenderNotAllowed.selector, STRANGER)); + + s_usdcTokenPoolWithAllowList.lockOrBurn( + Pool.LockOrBurnInV1({ + originalSender: STRANGER, + receiver: abi.encodePacked(address(0)), + amount: 1000, + remoteChainSelector: DEST_CHAIN_SELECTOR, + localToken: address(s_token) + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.releaseOrMint.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.releaseOrMint.t.sol new file mode 100644 index 0000000000..4499c748a6 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.releaseOrMint.t.sol @@ -0,0 +1,215 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Internal} from "../../../../libraries/Internal.sol"; +import {Pool} from "../../../../libraries/Pool.sol"; +import {RateLimiter} from "../../../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../../../pools/TokenPool.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {MockE2EUSDCTransmitter} from "../../../mocks/MockE2EUSDCTransmitter.sol"; +import {USDCTokenPoolSetup} from "./USDCTokenPoolSetup.t.sol"; + +contract USDCTokenPool_releaseOrMint is USDCTokenPoolSetup { + // From https://github.com/circlefin/evm-cctp-contracts/blob/377c9bd813fb86a42d900ae4003599d82aef635a/src/messages/BurnMessage.sol#L57 + function _formatMessage( + uint32 _version, + bytes32 _burnToken, + bytes32 _mintRecipient, + uint256 _amount, + bytes32 _messageSender + ) internal pure returns (bytes memory) { + return abi.encodePacked(_version, _burnToken, _mintRecipient, _amount, _messageSender); + } + + function testFuzz_ReleaseOrMint_Success(address recipient, uint256 amount) public { + vm.assume(recipient != address(0) && recipient != address(s_token)); + amount = bound(amount, 0, _getInboundRateLimiterConfig().capacity); + + USDCMessage memory usdcMessage = USDCMessage({ + version: 0, + sourceDomain: SOURCE_DOMAIN_IDENTIFIER, + destinationDomain: DEST_DOMAIN_IDENTIFIER, + nonce: 0x060606060606, + sender: SOURCE_CHAIN_TOKEN_SENDER, + recipient: bytes32(uint256(uint160(recipient))), + destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), + messageBody: _formatMessage( + 0, + bytes32(uint256(uint160(address(s_token)))), + bytes32(uint256(uint160(recipient))), + amount, + bytes32(uint256(uint160(OWNER))) + ) + }); + + bytes memory message = _generateUSDCMessage(usdcMessage); + bytes memory attestation = bytes("attestation bytes"); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode( + USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: SOURCE_DOMAIN_IDENTIFIER}) + ), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + bytes memory offchainTokenData = + abi.encode(USDCTokenPool.MessageAndAttestation({message: message, attestation: attestation})); + + // The mocked receiver does not release the token to the pool, so we manually do it here + deal(address(s_token), address(s_usdcTokenPool), amount); + + vm.expectEmit(); + emit TokenPool.Minted(s_routerAllowedOffRamp, recipient, amount); + + vm.expectCall( + address(s_mockUSDCTransmitter), + abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, message, attestation) + ); + + vm.startPrank(s_routerAllowedOffRamp); + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourceTokenData.extraData, + offchainTokenData: offchainTokenData + }) + ); + } + + // https://etherscan.io/tx/0xac9f501fe0b76df1f07a22e1db30929fd12524bc7068d74012dff948632f0883 + function test_ReleaseOrMintRealTx_Success() public { + bytes memory encodedUsdcMessage = + hex"000000000000000300000000000000000000127a00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58310000000000000000000000004af08f56978be7dce2d1be3c65c005b41e79401c000000000000000000000000000000000000000000000000000000002057ff7a0000000000000000000000003a23f943181408eac424116af7b7790c94cb97a50000000000000000000000000000000000000000000000000000000000000000000000000000008274119237535fd659626b090f87e365ff89ebc7096bb32e8b0e85f155626b73ae7c4bb2485c184b7cc3cf7909045487890b104efb62ae74a73e32901bdcec91df1bb9ee08ccb014fcbcfe77b74d1263fd4e0b0e8de05d6c9a5913554364abfd5ea768b222f50c715908183905d74044bb2b97527c7e70ae7983c443a603557cac3b1c000000000000000000000000000000000000000000000000000000000000"; + bytes memory attestation = bytes("attestation bytes"); + + uint32 nonce = 4730; + uint32 sourceDomain = 3; + uint256 amount = 100; + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + // The mocked receiver does not release the token to the pool, so we manually do it here + deal(address(s_token), address(s_usdcTokenPool), amount); + + bytes memory offchainTokenData = + abi.encode(USDCTokenPool.MessageAndAttestation({message: encodedUsdcMessage, attestation: attestation})); + + vm.expectCall( + address(s_mockUSDCTransmitter), + abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, encodedUsdcMessage, attestation) + ); + + vm.startPrank(s_routerAllowedOffRamp); + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: OWNER, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourceTokenData.extraData, + offchainTokenData: offchainTokenData + }) + ); + } + + // Reverts + function test_UnlockingUSDCFailed_Revert() public { + vm.startPrank(s_routerAllowedOffRamp); + s_mockUSDCTransmitter.setShouldSucceed(false); + + uint256 amount = 13255235235; + + USDCMessage memory usdcMessage = USDCMessage({ + version: 0, + sourceDomain: SOURCE_DOMAIN_IDENTIFIER, + destinationDomain: DEST_DOMAIN_IDENTIFIER, + nonce: 0x060606060606, + sender: SOURCE_CHAIN_TOKEN_SENDER, + recipient: bytes32(uint256(uint160(address(s_mockUSDC)))), + destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), + messageBody: _formatMessage( + 0, + bytes32(uint256(uint160(address(s_token)))), + bytes32(uint256(uint160(OWNER))), + amount, + bytes32(uint256(uint160(OWNER))) + ) + }); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode( + USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: SOURCE_DOMAIN_IDENTIFIER}) + ), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + bytes memory offchainTokenData = abi.encode( + USDCTokenPool.MessageAndAttestation({message: _generateUSDCMessage(usdcMessage), attestation: bytes("")}) + ); + + vm.expectRevert(USDCTokenPool.UnlockingUSDCFailed.selector); + + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: OWNER, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourceTokenData.extraData, + offchainTokenData: offchainTokenData + }) + ); + } + + function test_TokenMaxCapacityExceeded_Revert() public { + uint256 capacity = _getInboundRateLimiterConfig().capacity; + uint256 amount = 10 * capacity; + address recipient = address(1); + vm.startPrank(s_routerAllowedOffRamp); + + Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ + sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), + destTokenAddress: abi.encode(address(s_usdcTokenPool)), + extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), + destGasAmount: USDC_DEST_TOKEN_GAS + }); + + bytes memory offchainTokenData = + abi.encode(USDCTokenPool.MessageAndAttestation({message: bytes(""), attestation: bytes("")})); + + vm.expectRevert( + abi.encodeWithSelector(RateLimiter.TokenMaxCapacityExceeded.selector, capacity, amount, address(s_token)) + ); + + s_usdcTokenPool.releaseOrMint( + Pool.ReleaseOrMintInV1({ + originalSender: abi.encode(OWNER), + receiver: recipient, + amount: amount, + localToken: address(s_token), + remoteChainSelector: SOURCE_CHAIN_SELECTOR, + sourcePoolAddress: sourceTokenData.sourcePoolAddress, + sourcePoolData: sourceTokenData.extraData, + offchainTokenData: offchainTokenData + }) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.setDomains.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.setDomains.t.sol new file mode 100644 index 0000000000..7fcb75fdf3 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.setDomains.t.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Ownable2Step} from "../../../../../shared/access/Ownable2Step.sol"; +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {USDCTokenPoolSetup} from "./USDCTokenPoolSetup.t.sol"; + +contract USDCTokenPool_setDomains is USDCTokenPoolSetup { + mapping(uint64 destChainSelector => USDCTokenPool.Domain domain) private s_chainToDomain; + + // Setting lower fuzz run as 256 runs was causing differing gas results in snapshot. + /// forge-config: default.fuzz.runs = 32 + /// forge-config: ccip.fuzz.runs = 32 + function testFuzz_SetDomains_Success( + bytes32[5] calldata allowedCallers, + uint32[5] calldata domainIdentifiers, + uint64[5] calldata destChainSelectors + ) public { + uint256 numberOfDomains = allowedCallers.length; + USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](numberOfDomains); + for (uint256 i = 0; i < numberOfDomains; ++i) { + vm.assume(allowedCallers[i] != bytes32(0) && domainIdentifiers[i] != 0 && destChainSelectors[i] != 0); + + domainUpdates[i] = USDCTokenPool.DomainUpdate({ + allowedCaller: allowedCallers[i], + domainIdentifier: domainIdentifiers[i], + destChainSelector: destChainSelectors[i], + enabled: true + }); + + s_chainToDomain[destChainSelectors[i]] = + USDCTokenPool.Domain({domainIdentifier: domainIdentifiers[i], allowedCaller: allowedCallers[i], enabled: true}); + } + + vm.expectEmit(); + emit USDCTokenPool.DomainsSet(domainUpdates); + + s_usdcTokenPool.setDomains(domainUpdates); + + for (uint256 i = 0; i < numberOfDomains; ++i) { + USDCTokenPool.Domain memory expected = s_chainToDomain[destChainSelectors[i]]; + USDCTokenPool.Domain memory got = s_usdcTokenPool.getDomain(destChainSelectors[i]); + assertEq(got.allowedCaller, expected.allowedCaller); + assertEq(got.domainIdentifier, expected.domainIdentifier); + } + } + + // Reverts + + function test_OnlyOwner_Revert() public { + USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](0); + + vm.startPrank(STRANGER); + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + + s_usdcTokenPool.setDomains(domainUpdates); + } + + function test_InvalidDomain_Revert() public { + bytes32 validCaller = bytes32(uint256(25)); + // Ensure valid domain works + USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](1); + domainUpdates[0] = USDCTokenPool.DomainUpdate({ + allowedCaller: validCaller, + domainIdentifier: 0, // ensures 0 is valid, as this is eth mainnet + destChainSelector: 45690, + enabled: true + }); + + s_usdcTokenPool.setDomains(domainUpdates); + + // Make update invalid on allowedCaller + domainUpdates[0].allowedCaller = bytes32(0); + vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidDomain.selector, domainUpdates[0])); + + s_usdcTokenPool.setDomains(domainUpdates); + + // Make valid again + domainUpdates[0].allowedCaller = validCaller; + + // Make invalid on destChainSelector + domainUpdates[0].destChainSelector = 0; + vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidDomain.selector, domainUpdates[0])); + + s_usdcTokenPool.setDomains(domainUpdates); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.supportsInterface.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.supportsInterface.t.sol new file mode 100644 index 0000000000..05ac5f0813 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.supportsInterface.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IPoolV1} from "../../../../interfaces/IPool.sol"; +import {USDCTokenPoolSetup} from "./USDCTokenPoolSetup.t.sol"; + +import {IERC165} from "../../../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; + +contract USDCTokenPool_supportsInterface is USDCTokenPoolSetup { + function test_SupportsInterface_Success() public view { + assertTrue(s_usdcTokenPool.supportsInterface(type(IPoolV1).interfaceId)); + assertTrue(s_usdcTokenPool.supportsInterface(type(IERC165).interfaceId)); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.validateMessage.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.validateMessage.t.sol new file mode 100644 index 0000000000..975368c38b --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPool.validateMessage.t.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {USDCTokenPoolSetup} from "./USDCTokenPoolSetup.t.sol"; + +contract USDCTokenPool__validateMessage is USDCTokenPoolSetup { + function testFuzz_ValidateMessage_Success(uint32 sourceDomain, uint64 nonce) public { + vm.pauseGasMetering(); + USDCMessage memory usdcMessage = USDCMessage({ + version: 0, + sourceDomain: sourceDomain, + destinationDomain: DEST_DOMAIN_IDENTIFIER, + nonce: nonce, + sender: SOURCE_CHAIN_TOKEN_SENDER, + recipient: bytes32(uint256(299999)), + destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), + messageBody: bytes("") + }); + + bytes memory encodedUsdcMessage = _generateUSDCMessage(usdcMessage); + + vm.resumeGasMetering(); + s_usdcTokenPool.validateMessage( + encodedUsdcMessage, USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain}) + ); + } + + // Reverts + + function test_ValidateInvalidMessage_Revert() public { + USDCMessage memory usdcMessage = USDCMessage({ + version: 0, + sourceDomain: 1553252, + destinationDomain: DEST_DOMAIN_IDENTIFIER, + nonce: 387289284924, + sender: SOURCE_CHAIN_TOKEN_SENDER, + recipient: bytes32(uint256(92398429395823)), + destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), + messageBody: bytes("") + }); + + USDCTokenPool.SourceTokenDataPayload memory sourceTokenData = + USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: usdcMessage.sourceDomain}); + + bytes memory encodedUsdcMessage = _generateUSDCMessage(usdcMessage); + + s_usdcTokenPool.validateMessage(encodedUsdcMessage, sourceTokenData); + + uint32 expectedSourceDomain = usdcMessage.sourceDomain + 1; + + vm.expectRevert( + abi.encodeWithSelector(USDCTokenPool.InvalidSourceDomain.selector, expectedSourceDomain, usdcMessage.sourceDomain) + ); + s_usdcTokenPool.validateMessage( + encodedUsdcMessage, + USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: expectedSourceDomain}) + ); + + uint64 expectedNonce = usdcMessage.nonce + 1; + + vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidNonce.selector, expectedNonce, usdcMessage.nonce)); + s_usdcTokenPool.validateMessage( + encodedUsdcMessage, + USDCTokenPool.SourceTokenDataPayload({nonce: expectedNonce, sourceDomain: usdcMessage.sourceDomain}) + ); + + usdcMessage.destinationDomain = DEST_DOMAIN_IDENTIFIER + 1; + vm.expectRevert( + abi.encodeWithSelector( + USDCTokenPool.InvalidDestinationDomain.selector, DEST_DOMAIN_IDENTIFIER, usdcMessage.destinationDomain + ) + ); + + s_usdcTokenPool.validateMessage( + _generateUSDCMessage(usdcMessage), + USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: usdcMessage.sourceDomain}) + ); + usdcMessage.destinationDomain = DEST_DOMAIN_IDENTIFIER; + + uint32 wrongVersion = usdcMessage.version + 1; + + usdcMessage.version = wrongVersion; + encodedUsdcMessage = _generateUSDCMessage(usdcMessage); + + vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidMessageVersion.selector, wrongVersion)); + s_usdcTokenPool.validateMessage(encodedUsdcMessage, sourceTokenData); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPoolSetup.t.sol new file mode 100644 index 0000000000..bc6108926b --- /dev/null +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPool/USDCTokenPoolSetup.t.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; +import {USDCTokenPoolHelper} from "../../../helpers/USDCTokenPoolHelper.sol"; +import {USDCSetup} from "../USDCSetup.t.sol"; + +contract USDCTokenPoolSetup is USDCSetup { + USDCTokenPoolHelper internal s_usdcTokenPool; + USDCTokenPoolHelper internal s_usdcTokenPoolWithAllowList; + address[] internal s_allowedList; + + function setUp() public virtual override { + super.setUp(); + + s_usdcTokenPool = + new USDCTokenPoolHelper(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); + + s_allowedList.push(USER_1); + s_usdcTokenPoolWithAllowList = + new USDCTokenPoolHelper(s_mockUSDC, s_token, s_allowedList, address(s_mockRMN), address(s_router)); + + _poolApplyChainUpdates(address(s_usdcTokenPool)); + _poolApplyChainUpdates(address(s_usdcTokenPoolWithAllowList)); + + USDCTokenPool.DomainUpdate[] memory domains = new USDCTokenPool.DomainUpdate[](1); + domains[0] = USDCTokenPool.DomainUpdate({ + destChainSelector: DEST_CHAIN_SELECTOR, + domainIdentifier: 9999, + allowedCaller: keccak256("allowedCaller"), + enabled: true + }); + + s_usdcTokenPool.setDomains(domains); + s_usdcTokenPoolWithAllowList.setDomains(domains); + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol deleted file mode 100644 index b71094a310..0000000000 --- a/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol +++ /dev/null @@ -1,700 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; -import {IPoolV1} from "../../interfaces/IPool.sol"; -import {ITokenMessenger} from "../../pools/USDC/ITokenMessenger.sol"; - -import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {Router} from "../../Router.sol"; -import {Internal} from "../../libraries/Internal.sol"; -import {Pool} from "../../libraries/Pool.sol"; -import {RateLimiter} from "../../libraries/RateLimiter.sol"; -import {TokenPool} from "../../pools/TokenPool.sol"; -import {USDCTokenPool} from "../../pools/USDC/USDCTokenPool.sol"; -import {BaseTest} from "../BaseTest.t.sol"; -import {USDCTokenPoolHelper} from "../helpers/USDCTokenPoolHelper.sol"; -import {MockE2EUSDCTransmitter} from "../mocks/MockE2EUSDCTransmitter.sol"; -import {MockUSDCTokenMessenger} from "../mocks/MockUSDCTokenMessenger.sol"; - -import {IERC165} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/IERC165.sol"; - -contract USDCTokenPoolSetup is BaseTest { - IBurnMintERC20 internal s_token; - MockUSDCTokenMessenger internal s_mockUSDC; - MockE2EUSDCTransmitter internal s_mockUSDCTransmitter; - uint32 internal constant USDC_DEST_TOKEN_GAS = 150_000; - - struct USDCMessage { - uint32 version; - uint32 sourceDomain; - uint32 destinationDomain; - uint64 nonce; - bytes32 sender; - bytes32 recipient; - bytes32 destinationCaller; - bytes messageBody; - } - - uint32 internal constant SOURCE_DOMAIN_IDENTIFIER = 0x02020202; - uint32 internal constant DEST_DOMAIN_IDENTIFIER = 0; - - bytes32 internal constant SOURCE_CHAIN_TOKEN_SENDER = bytes32(uint256(uint160(0x01111111221))); - address internal constant SOURCE_CHAIN_USDC_POOL = address(0x23789765456789); - address internal constant DEST_CHAIN_USDC_POOL = address(0x987384873458734); - address internal constant DEST_CHAIN_USDC_TOKEN = address(0x23598918358198766); - - address internal s_routerAllowedOnRamp = address(3456); - address internal s_routerAllowedOffRamp = address(234); - Router internal s_router; - - USDCTokenPoolHelper internal s_usdcTokenPool; - USDCTokenPoolHelper internal s_usdcTokenPoolWithAllowList; - address[] internal s_allowedList; - - function setUp() public virtual override { - BaseTest.setUp(); - BurnMintERC677 usdcToken = new BurnMintERC677("LINK", "LNK", 18, 0); - s_token = usdcToken; - deal(address(s_token), OWNER, type(uint256).max); - _setUpRamps(); - - s_mockUSDCTransmitter = new MockE2EUSDCTransmitter(0, DEST_DOMAIN_IDENTIFIER, address(s_token)); - s_mockUSDC = new MockUSDCTokenMessenger(0, address(s_mockUSDCTransmitter)); - - usdcToken.grantMintAndBurnRoles(address(s_mockUSDCTransmitter)); - - s_usdcTokenPool = - new USDCTokenPoolHelper(s_mockUSDC, s_token, new address[](0), address(s_mockRMN), address(s_router)); - usdcToken.grantMintAndBurnRoles(address(s_mockUSDC)); - - s_allowedList.push(USER_1); - s_usdcTokenPoolWithAllowList = - new USDCTokenPoolHelper(s_mockUSDC, s_token, s_allowedList, address(s_mockRMN), address(s_router)); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](2); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - remoteTokenAddress: abi.encode(address(s_token)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - chainUpdates[1] = TokenPool.ChainUpdate({ - remoteChainSelector: DEST_CHAIN_SELECTOR, - remotePoolAddress: abi.encode(DEST_CHAIN_USDC_POOL), - remoteTokenAddress: abi.encode(DEST_CHAIN_USDC_TOKEN), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_usdcTokenPool.applyChainUpdates(chainUpdates); - s_usdcTokenPoolWithAllowList.applyChainUpdates(chainUpdates); - - USDCTokenPool.DomainUpdate[] memory domains = new USDCTokenPool.DomainUpdate[](1); - domains[0] = USDCTokenPool.DomainUpdate({ - destChainSelector: DEST_CHAIN_SELECTOR, - domainIdentifier: 9999, - allowedCaller: keccak256("allowedCaller"), - enabled: true - }); - - s_usdcTokenPool.setDomains(domains); - s_usdcTokenPoolWithAllowList.setDomains(domains); - } - - function _setUpRamps() internal { - s_router = new Router(address(s_token), address(s_mockRMN)); - - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: DEST_CHAIN_SELECTOR, onRamp: s_routerAllowedOnRamp}); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); - address[] memory offRamps = new address[](1); - offRamps[0] = s_routerAllowedOffRamp; - offRampUpdates[0] = Router.OffRamp({sourceChainSelector: SOURCE_CHAIN_SELECTOR, offRamp: offRamps[0]}); - - s_router.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), offRampUpdates); - } - - function _generateUSDCMessage(USDCMessage memory usdcMessage) internal pure returns (bytes memory) { - return abi.encodePacked( - usdcMessage.version, - usdcMessage.sourceDomain, - usdcMessage.destinationDomain, - usdcMessage.nonce, - usdcMessage.sender, - usdcMessage.recipient, - usdcMessage.destinationCaller, - usdcMessage.messageBody - ); - } -} - -contract USDCTokenPool_lockOrBurn is USDCTokenPoolSetup { - // Base test case, included for PR gas comparisons as fuzz tests are excluded from forge snapshot due to being flaky. - function test_LockOrBurn_Success() public { - bytes32 receiver = bytes32(uint256(uint160(STRANGER))); - uint256 amount = 1; - s_token.transfer(address(s_usdcTokenPool), amount); - vm.startPrank(s_routerAllowedOnRamp); - - USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - - vm.expectEmit(); - emit ITokenMessenger.DepositForBurn( - s_mockUSDC.s_nonce(), - address(s_token), - amount, - address(s_usdcTokenPool), - receiver, - expectedDomain.domainIdentifier, - s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), - expectedDomain.allowedCaller - ); - - vm.expectEmit(); - emit TokenPool.Burned(s_routerAllowedOnRamp, amount); - - Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(receiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); - assertEq(s_mockUSDC.s_nonce() - 1, nonce); - } - - function test_Fuzz_LockOrBurn_Success(bytes32 destinationReceiver, uint256 amount) public { - vm.assume(destinationReceiver != bytes32(0)); - amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); - s_token.transfer(address(s_usdcTokenPool), amount); - vm.startPrank(s_routerAllowedOnRamp); - - USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_SELECTOR); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - - vm.expectEmit(); - emit ITokenMessenger.DepositForBurn( - s_mockUSDC.s_nonce(), - address(s_token), - amount, - address(s_usdcTokenPool), - destinationReceiver, - expectedDomain.domainIdentifier, - s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), - expectedDomain.allowedCaller - ); - - vm.expectEmit(); - emit TokenPool.Burned(s_routerAllowedOnRamp, amount); - - Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(destinationReceiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - - uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); - assertEq(s_mockUSDC.s_nonce() - 1, nonce); - assertEq(poolReturnDataV1.destTokenAddress, abi.encode(DEST_CHAIN_USDC_TOKEN)); - } - - function test_Fuzz_LockOrBurnWithAllowList_Success(bytes32 destinationReceiver, uint256 amount) public { - vm.assume(destinationReceiver != bytes32(0)); - amount = bound(amount, 1, _getOutboundRateLimiterConfig().capacity); - s_token.transfer(address(s_usdcTokenPoolWithAllowList), amount); - vm.startPrank(s_routerAllowedOnRamp); - - USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPoolWithAllowList.getDomain(DEST_CHAIN_SELECTOR); - - vm.expectEmit(); - emit RateLimiter.TokensConsumed(amount); - vm.expectEmit(); - emit ITokenMessenger.DepositForBurn( - s_mockUSDC.s_nonce(), - address(s_token), - amount, - address(s_usdcTokenPoolWithAllowList), - destinationReceiver, - expectedDomain.domainIdentifier, - s_mockUSDC.DESTINATION_TOKEN_MESSENGER(), - expectedDomain.allowedCaller - ); - vm.expectEmit(); - emit TokenPool.Burned(s_routerAllowedOnRamp, amount); - - Pool.LockOrBurnOutV1 memory poolReturnDataV1 = s_usdcTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: s_allowedList[0], - receiver: abi.encodePacked(destinationReceiver), - amount: amount, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - uint64 nonce = abi.decode(poolReturnDataV1.destPoolData, (uint64)); - assertEq(s_mockUSDC.s_nonce() - 1, nonce); - assertEq(poolReturnDataV1.destTokenAddress, abi.encode(DEST_CHAIN_USDC_TOKEN)); - } - - // Reverts - function test_UnknownDomain_Revert() public { - uint64 wrongDomain = DEST_CHAIN_SELECTOR + 1; - // We need to setup the wrong chainSelector so it reaches the domain check - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); - onRampUpdates[0] = Router.OnRamp({destChainSelector: wrongDomain, onRamp: s_routerAllowedOnRamp}); - s_router.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: wrongDomain, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - allowed: true, - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - - s_usdcTokenPool.applyChainUpdates(chainUpdates); - - uint256 amount = 1000; - vm.startPrank(s_routerAllowedOnRamp); - deal(address(s_token), s_routerAllowedOnRamp, amount); - s_token.approve(address(s_usdcTokenPool), amount); - - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.UnknownDomain.selector, wrongDomain)); - - s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(address(0)), - amount: amount, - remoteChainSelector: wrongDomain, - localToken: address(s_token) - }) - ); - } - - function test_CallerIsNotARampOnRouter_Revert() public { - vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, OWNER)); - - s_usdcTokenPool.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: OWNER, - receiver: abi.encodePacked(address(0)), - amount: 0, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } - - function test_LockOrBurnWithAllowList_Revert() public { - vm.startPrank(s_routerAllowedOnRamp); - - vm.expectRevert(abi.encodeWithSelector(TokenPool.SenderNotAllowed.selector, STRANGER)); - - s_usdcTokenPoolWithAllowList.lockOrBurn( - Pool.LockOrBurnInV1({ - originalSender: STRANGER, - receiver: abi.encodePacked(address(0)), - amount: 1000, - remoteChainSelector: DEST_CHAIN_SELECTOR, - localToken: address(s_token) - }) - ); - } -} - -contract USDCTokenPool_releaseOrMint is USDCTokenPoolSetup { - // From https://github.com/circlefin/evm-cctp-contracts/blob/377c9bd813fb86a42d900ae4003599d82aef635a/src/messages/BurnMessage.sol#L57 - function _formatMessage( - uint32 _version, - bytes32 _burnToken, - bytes32 _mintRecipient, - uint256 _amount, - bytes32 _messageSender - ) internal pure returns (bytes memory) { - return abi.encodePacked(_version, _burnToken, _mintRecipient, _amount, _messageSender); - } - - function test_Fuzz_ReleaseOrMint_Success(address recipient, uint256 amount) public { - vm.assume(recipient != address(0) && recipient != address(s_token)); - amount = bound(amount, 0, _getInboundRateLimiterConfig().capacity); - - USDCMessage memory usdcMessage = USDCMessage({ - version: 0, - sourceDomain: SOURCE_DOMAIN_IDENTIFIER, - destinationDomain: DEST_DOMAIN_IDENTIFIER, - nonce: 0x060606060606, - sender: SOURCE_CHAIN_TOKEN_SENDER, - recipient: bytes32(uint256(uint160(recipient))), - destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), - messageBody: _formatMessage( - 0, - bytes32(uint256(uint160(address(s_token)))), - bytes32(uint256(uint160(recipient))), - amount, - bytes32(uint256(uint160(OWNER))) - ) - }); - - bytes memory message = _generateUSDCMessage(usdcMessage); - bytes memory attestation = bytes("attestation bytes"); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode( - USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: SOURCE_DOMAIN_IDENTIFIER}) - ), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - bytes memory offchainTokenData = - abi.encode(USDCTokenPool.MessageAndAttestation({message: message, attestation: attestation})); - - // The mocked receiver does not release the token to the pool, so we manually do it here - deal(address(s_token), address(s_usdcTokenPool), amount); - - vm.expectEmit(); - emit TokenPool.Minted(s_routerAllowedOffRamp, recipient, amount); - - vm.expectCall( - address(s_mockUSDCTransmitter), - abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, message, attestation) - ); - - vm.startPrank(s_routerAllowedOffRamp); - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourceTokenData.extraData, - offchainTokenData: offchainTokenData - }) - ); - } - - // https://etherscan.io/tx/0xac9f501fe0b76df1f07a22e1db30929fd12524bc7068d74012dff948632f0883 - function test_ReleaseOrMintRealTx_Success() public { - bytes memory encodedUsdcMessage = - hex"000000000000000300000000000000000000127a00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af3155000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58310000000000000000000000004af08f56978be7dce2d1be3c65c005b41e79401c000000000000000000000000000000000000000000000000000000002057ff7a0000000000000000000000003a23f943181408eac424116af7b7790c94cb97a50000000000000000000000000000000000000000000000000000000000000000000000000000008274119237535fd659626b090f87e365ff89ebc7096bb32e8b0e85f155626b73ae7c4bb2485c184b7cc3cf7909045487890b104efb62ae74a73e32901bdcec91df1bb9ee08ccb014fcbcfe77b74d1263fd4e0b0e8de05d6c9a5913554364abfd5ea768b222f50c715908183905d74044bb2b97527c7e70ae7983c443a603557cac3b1c000000000000000000000000000000000000000000000000000000000000"; - bytes memory attestation = bytes("attestation bytes"); - - uint32 nonce = 4730; - uint32 sourceDomain = 3; - uint256 amount = 100; - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - // The mocked receiver does not release the token to the pool, so we manually do it here - deal(address(s_token), address(s_usdcTokenPool), amount); - - bytes memory offchainTokenData = - abi.encode(USDCTokenPool.MessageAndAttestation({message: encodedUsdcMessage, attestation: attestation})); - - vm.expectCall( - address(s_mockUSDCTransmitter), - abi.encodeWithSelector(MockE2EUSDCTransmitter.receiveMessage.selector, encodedUsdcMessage, attestation) - ); - - vm.startPrank(s_routerAllowedOffRamp); - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: OWNER, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourceTokenData.extraData, - offchainTokenData: offchainTokenData - }) - ); - } - - // Reverts - function test_UnlockingUSDCFailed_Revert() public { - vm.startPrank(s_routerAllowedOffRamp); - s_mockUSDCTransmitter.setShouldSucceed(false); - - uint256 amount = 13255235235; - - USDCMessage memory usdcMessage = USDCMessage({ - version: 0, - sourceDomain: SOURCE_DOMAIN_IDENTIFIER, - destinationDomain: DEST_DOMAIN_IDENTIFIER, - nonce: 0x060606060606, - sender: SOURCE_CHAIN_TOKEN_SENDER, - recipient: bytes32(uint256(uint160(address(s_mockUSDC)))), - destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), - messageBody: _formatMessage( - 0, - bytes32(uint256(uint160(address(s_token)))), - bytes32(uint256(uint160(OWNER))), - amount, - bytes32(uint256(uint160(OWNER))) - ) - }); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode( - USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: SOURCE_DOMAIN_IDENTIFIER}) - ), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - bytes memory offchainTokenData = abi.encode( - USDCTokenPool.MessageAndAttestation({message: _generateUSDCMessage(usdcMessage), attestation: bytes("")}) - ); - - vm.expectRevert(USDCTokenPool.UnlockingUSDCFailed.selector); - - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: OWNER, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourceTokenData.extraData, - offchainTokenData: offchainTokenData - }) - ); - } - - function test_TokenMaxCapacityExceeded_Revert() public { - uint256 capacity = _getInboundRateLimiterConfig().capacity; - uint256 amount = 10 * capacity; - address recipient = address(1); - vm.startPrank(s_routerAllowedOffRamp); - - Internal.SourceTokenData memory sourceTokenData = Internal.SourceTokenData({ - sourcePoolAddress: abi.encode(SOURCE_CHAIN_USDC_POOL), - destTokenAddress: abi.encode(address(s_usdcTokenPool)), - extraData: abi.encode(USDCTokenPool.SourceTokenDataPayload({nonce: 1, sourceDomain: SOURCE_DOMAIN_IDENTIFIER})), - destGasAmount: USDC_DEST_TOKEN_GAS - }); - - bytes memory offchainTokenData = - abi.encode(USDCTokenPool.MessageAndAttestation({message: bytes(""), attestation: bytes("")})); - - vm.expectRevert( - abi.encodeWithSelector(RateLimiter.TokenMaxCapacityExceeded.selector, capacity, amount, address(s_token)) - ); - - s_usdcTokenPool.releaseOrMint( - Pool.ReleaseOrMintInV1({ - originalSender: abi.encode(OWNER), - receiver: recipient, - amount: amount, - localToken: address(s_token), - remoteChainSelector: SOURCE_CHAIN_SELECTOR, - sourcePoolAddress: sourceTokenData.sourcePoolAddress, - sourcePoolData: sourceTokenData.extraData, - offchainTokenData: offchainTokenData - }) - ); - } -} - -contract USDCTokenPool_supportsInterface is USDCTokenPoolSetup { - function test_SupportsInterface_Success() public view { - assertTrue(s_usdcTokenPool.supportsInterface(type(IPoolV1).interfaceId)); - assertTrue(s_usdcTokenPool.supportsInterface(type(IERC165).interfaceId)); - } -} - -contract USDCTokenPool_setDomains is USDCTokenPoolSetup { - mapping(uint64 destChainSelector => USDCTokenPool.Domain domain) private s_chainToDomain; - - // Setting lower fuzz run as 256 runs was causing differing gas results in snapshot. - /// forge-config: default.fuzz.runs = 32 - /// forge-config: ccip.fuzz.runs = 32 - function test_Fuzz_SetDomains_Success( - bytes32[5] calldata allowedCallers, - uint32[5] calldata domainIdentifiers, - uint64[5] calldata destChainSelectors - ) public { - uint256 numberOfDomains = allowedCallers.length; - USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](numberOfDomains); - for (uint256 i = 0; i < numberOfDomains; ++i) { - vm.assume(allowedCallers[i] != bytes32(0) && domainIdentifiers[i] != 0 && destChainSelectors[i] != 0); - - domainUpdates[i] = USDCTokenPool.DomainUpdate({ - allowedCaller: allowedCallers[i], - domainIdentifier: domainIdentifiers[i], - destChainSelector: destChainSelectors[i], - enabled: true - }); - - s_chainToDomain[destChainSelectors[i]] = - USDCTokenPool.Domain({domainIdentifier: domainIdentifiers[i], allowedCaller: allowedCallers[i], enabled: true}); - } - - vm.expectEmit(); - emit USDCTokenPool.DomainsSet(domainUpdates); - - s_usdcTokenPool.setDomains(domainUpdates); - - for (uint256 i = 0; i < numberOfDomains; ++i) { - USDCTokenPool.Domain memory expected = s_chainToDomain[destChainSelectors[i]]; - USDCTokenPool.Domain memory got = s_usdcTokenPool.getDomain(destChainSelectors[i]); - assertEq(got.allowedCaller, expected.allowedCaller); - assertEq(got.domainIdentifier, expected.domainIdentifier); - } - } - - // Reverts - - function test_OnlyOwner_Revert() public { - USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](0); - - vm.startPrank(STRANGER); - vm.expectRevert("Only callable by owner"); - - s_usdcTokenPool.setDomains(domainUpdates); - } - - function test_InvalidDomain_Revert() public { - bytes32 validCaller = bytes32(uint256(25)); - // Ensure valid domain works - USDCTokenPool.DomainUpdate[] memory domainUpdates = new USDCTokenPool.DomainUpdate[](1); - domainUpdates[0] = USDCTokenPool.DomainUpdate({ - allowedCaller: validCaller, - domainIdentifier: 0, // ensures 0 is valid, as this is eth mainnet - destChainSelector: 45690, - enabled: true - }); - - s_usdcTokenPool.setDomains(domainUpdates); - - // Make update invalid on allowedCaller - domainUpdates[0].allowedCaller = bytes32(0); - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidDomain.selector, domainUpdates[0])); - - s_usdcTokenPool.setDomains(domainUpdates); - - // Make valid again - domainUpdates[0].allowedCaller = validCaller; - - // Make invalid on destChainSelector - domainUpdates[0].destChainSelector = 0; - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidDomain.selector, domainUpdates[0])); - - s_usdcTokenPool.setDomains(domainUpdates); - } -} - -contract USDCTokenPool__validateMessage is USDCTokenPoolSetup { - function test_Fuzz_ValidateMessage_Success(uint32 sourceDomain, uint64 nonce) public { - vm.pauseGasMetering(); - USDCMessage memory usdcMessage = USDCMessage({ - version: 0, - sourceDomain: sourceDomain, - destinationDomain: DEST_DOMAIN_IDENTIFIER, - nonce: nonce, - sender: SOURCE_CHAIN_TOKEN_SENDER, - recipient: bytes32(uint256(299999)), - destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), - messageBody: bytes("") - }); - - bytes memory encodedUsdcMessage = _generateUSDCMessage(usdcMessage); - - vm.resumeGasMetering(); - s_usdcTokenPool.validateMessage( - encodedUsdcMessage, USDCTokenPool.SourceTokenDataPayload({nonce: nonce, sourceDomain: sourceDomain}) - ); - } - - // Reverts - - function test_ValidateInvalidMessage_Revert() public { - USDCMessage memory usdcMessage = USDCMessage({ - version: 0, - sourceDomain: 1553252, - destinationDomain: DEST_DOMAIN_IDENTIFIER, - nonce: 387289284924, - sender: SOURCE_CHAIN_TOKEN_SENDER, - recipient: bytes32(uint256(92398429395823)), - destinationCaller: bytes32(uint256(uint160(address(s_usdcTokenPool)))), - messageBody: bytes("") - }); - - USDCTokenPool.SourceTokenDataPayload memory sourceTokenData = - USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: usdcMessage.sourceDomain}); - - bytes memory encodedUsdcMessage = _generateUSDCMessage(usdcMessage); - - s_usdcTokenPool.validateMessage(encodedUsdcMessage, sourceTokenData); - - uint32 expectedSourceDomain = usdcMessage.sourceDomain + 1; - - vm.expectRevert( - abi.encodeWithSelector(USDCTokenPool.InvalidSourceDomain.selector, expectedSourceDomain, usdcMessage.sourceDomain) - ); - s_usdcTokenPool.validateMessage( - encodedUsdcMessage, - USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: expectedSourceDomain}) - ); - - uint64 expectedNonce = usdcMessage.nonce + 1; - - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidNonce.selector, expectedNonce, usdcMessage.nonce)); - s_usdcTokenPool.validateMessage( - encodedUsdcMessage, - USDCTokenPool.SourceTokenDataPayload({nonce: expectedNonce, sourceDomain: usdcMessage.sourceDomain}) - ); - - usdcMessage.destinationDomain = DEST_DOMAIN_IDENTIFIER + 1; - vm.expectRevert( - abi.encodeWithSelector( - USDCTokenPool.InvalidDestinationDomain.selector, DEST_DOMAIN_IDENTIFIER, usdcMessage.destinationDomain - ) - ); - - s_usdcTokenPool.validateMessage( - _generateUSDCMessage(usdcMessage), - USDCTokenPool.SourceTokenDataPayload({nonce: usdcMessage.nonce, sourceDomain: usdcMessage.sourceDomain}) - ); - usdcMessage.destinationDomain = DEST_DOMAIN_IDENTIFIER; - - uint32 wrongVersion = usdcMessage.version + 1; - - usdcMessage.version = wrongVersion; - encodedUsdcMessage = _generateUSDCMessage(usdcMessage); - - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidMessageVersion.selector, wrongVersion)); - s_usdcTokenPool.validateMessage(encodedUsdcMessage, sourceTokenData); - } -} diff --git a/contracts/src/v0.8/ccip/test/rmn/RMNRemoteSetup.t.sol b/contracts/src/v0.8/ccip/test/rmn/RMNRemoteSetup.t.sol index ad25abcf1a..131dfec7cb 100644 --- a/contracts/src/v0.8/ccip/test/rmn/RMNRemoteSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/rmn/RMNRemoteSetup.t.sol @@ -36,7 +36,9 @@ contract RMNRemoteSetup is BaseTest { /// @notice sets up a list of signers with strictly increasing onchain public keys /// @dev signers do not have to be in order when configured, but they do when generating signatures /// rather than sort signers every time, we do it once here and store the sorted list - function _setupSigners(uint256 numSigners) internal { + function _setupSigners( + uint256 numSigners + ) internal { // remove any existing config while (s_signerWallets.length > 0) { s_signerWallets.pop(); @@ -123,7 +125,9 @@ contract RMNRemoteSetup is BaseTest { } /// @notice bubble sort on a storage array of wallets - function _sort(Vm.Wallet[] storage wallets) private { + function _sort( + Vm.Wallet[] storage wallets + ) private { bool swapped; for (uint256 i = 1; i < wallets.length; i++) { swapped = false; diff --git a/contracts/src/v0.8/ccip/test/router/Router.t.sol b/contracts/src/v0.8/ccip/test/router/Router.t.sol index 95d3c2f293..2163f807d0 100644 --- a/contracts/src/v0.8/ccip/test/router/Router.t.sol +++ b/contracts/src/v0.8/ccip/test/router/Router.t.sol @@ -313,7 +313,9 @@ contract Router_ccipSend is EVM2EVMOnRampSetup { s_sourceRouter.ccipSend(wrongChain, message); } - function test_Fuzz_UnsupportedFeeToken_Reverts(address wrongFeeToken) public { + function test_Fuzz_UnsupportedFeeToken_Reverts( + address wrongFeeToken + ) public { // We have three fee tokens set, all others should revert. vm.assume(address(s_sourceFeeToken) != wrongFeeToken); vm.assume(address(s_sourceRouter.getWrappedNative()) != wrongFeeToken); @@ -327,7 +329,9 @@ contract Router_ccipSend is EVM2EVMOnRampSetup { s_sourceRouter.ccipSend(DEST_CHAIN_SELECTOR, message); } - function test_Fuzz_UnsupportedToken_Reverts(address wrongToken) public { + function test_Fuzz_UnsupportedToken_Reverts( + address wrongToken + ) public { for (uint256 i = 0; i < s_sourceTokens.length; ++i) { vm.assume(address(s_sourceTokens[i]) != wrongToken); } @@ -399,7 +403,9 @@ contract Router_applyRampUpdates is RouterSetup { s_receiver = new MaybeRevertMessageReceiver(false); } - function _assertOffRampRouteSucceeds(Router.OffRamp memory offRamp) internal { + function _assertOffRampRouteSucceeds( + Router.OffRamp memory offRamp + ) internal { vm.startPrank(offRamp.offRamp); Client.Any2EVMMessage memory message = _generateReceiverMessage(offRamp.sourceChainSelector); @@ -407,7 +413,9 @@ contract Router_applyRampUpdates is RouterSetup { s_sourceRouter.routeMessage(message, GAS_FOR_CALL_EXACT_CHECK, 100_000, address(s_receiver)); } - function _assertOffRampRouteReverts(Router.OffRamp memory offRamp) internal { + function _assertOffRampRouteReverts( + Router.OffRamp memory offRamp + ) internal { vm.startPrank(offRamp.offRamp); vm.expectRevert(IRouter.OnlyOffRamp.selector); @@ -416,7 +424,9 @@ contract Router_applyRampUpdates is RouterSetup { ); } - function test_Fuzz_OffRampUpdates(address[20] memory offRampsInput) public { + function test_Fuzz_OffRampUpdates( + address[20] memory offRampsInput + ) public { Router.OffRamp[] memory offRamps = new Router.OffRamp[](20); for (uint256 i = 0; i < offRampsInput.length; ++i) { @@ -595,7 +605,9 @@ contract Router_applyRampUpdates is RouterSetup { } } - function test_Fuzz_OnRampUpdates(Router.OnRamp[] memory onRamps) public { + function test_Fuzz_OnRampUpdates( + Router.OnRamp[] memory onRamps + ) public { // Test adding onRamps for (uint256 i = 0; i < onRamps.length; ++i) { vm.expectEmit(); @@ -668,7 +680,9 @@ contract Router_applyRampUpdates is RouterSetup { } contract Router_setWrappedNative is EVM2EVMOnRampSetup { - function test_Fuzz_SetWrappedNative_Success(address wrappedNative) public { + function test_Fuzz_SetWrappedNative_Success( + address wrappedNative + ) public { s_sourceRouter.setWrappedNative(wrappedNative); assertEq(wrappedNative, s_sourceRouter.getWrappedNative()); } @@ -694,7 +708,9 @@ contract Router_routeMessage is EVM2EVMOffRampSetup { vm.startPrank(address(s_offRamp)); } - function _generateManualGasLimit(uint256 callDataLength) internal view returns (uint256) { + function _generateManualGasLimit( + uint256 callDataLength + ) internal view returns (uint256) { return ((gasleft() - 2 * (16 * callDataLength + GAS_FOR_CALL_EXACT_CHECK)) * 62) / 64; } @@ -796,7 +812,9 @@ contract Router_routeMessage is EVM2EVMOffRampSetup { assertGt(gasUsed, 3_000); } - function test_Fuzz_ExecutionEvent_Success(bytes calldata error) public { + function test_Fuzz_ExecutionEvent_Success( + bytes calldata error + ) public { Client.Any2EVMMessage memory message = _generateReceiverMessage(SOURCE_CHAIN_SELECTOR); s_reverting_receiver.setErr(error); diff --git a/contracts/src/v0.8/ccip/test/router/RouterSetup.t.sol b/contracts/src/v0.8/ccip/test/router/RouterSetup.t.sol index 7297721baa..f4c1114bf2 100644 --- a/contracts/src/v0.8/ccip/test/router/RouterSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/router/RouterSetup.t.sol @@ -26,7 +26,9 @@ contract RouterSetup is BaseTest { } } - function _generateReceiverMessage(uint64 chainSelector) internal pure returns (Client.Any2EVMMessage memory) { + function _generateReceiverMessage( + uint64 chainSelector + ) internal pure returns (Client.Any2EVMMessage memory) { Client.EVMTokenAmount[] memory ta = new Client.EVMTokenAmount[](0); return Client.Any2EVMMessage({ messageId: bytes32("a"), diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/BurnMintERC20Setup.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/BurnMintERC20Setup.t.sol new file mode 100644 index 0000000000..098d5e4601 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/BurnMintERC20Setup.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BaseTest} from "../../BaseTest.t.sol"; + +contract BurnMintERC20Setup is BaseTest { + FactoryBurnMintERC20 internal s_burnMintERC20; + + address internal s_mockPool = makeAddr("s_mockPool"); + uint256 internal s_amount = 1e18; + + address internal s_alice; + + function setUp() public virtual override { + BaseTest.setUp(); + + s_alice = makeAddr("alice"); + + s_burnMintERC20 = new FactoryBurnMintERC20("Chainlink Token", "LINK", 18, 1e27, 0, s_alice); + + // Set s_mockPool to be a burner and minter + s_burnMintERC20.grantMintAndBurnRoles(s_mockPool); + deal(address(s_burnMintERC20), OWNER, s_amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.approve.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.approve.t.sol new file mode 100644 index 0000000000..9ba6da0186 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.approve.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_approve is BurnMintERC20Setup { + function test_Approve_Success() public { + uint256 balancePre = s_burnMintERC20.balanceOf(STRANGER); + uint256 sendingAmount = s_amount / 2; + + s_burnMintERC20.approve(STRANGER, sendingAmount); + + changePrank(STRANGER); + + s_burnMintERC20.transferFrom(OWNER, STRANGER, sendingAmount); + + assertEq(sendingAmount + balancePre, s_burnMintERC20.balanceOf(STRANGER)); + } + + // Reverts + + function test_InvalidAddress_Reverts() public { + vm.expectRevert(); + + s_burnMintERC20.approve(address(s_burnMintERC20), s_amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burn.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burn.t.sol new file mode 100644 index 0000000000..5f6e7ee4d0 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burn.t.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_burn is BurnMintERC20Setup { + function test_BasicBurn_Success() public { + s_burnMintERC20.grantBurnRole(OWNER); + deal(address(s_burnMintERC20), OWNER, s_amount); + + vm.expectEmit(); + emit IERC20.Transfer(OWNER, address(0), s_amount); + + s_burnMintERC20.burn(s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Revert + + function test_SenderNotBurner_Reverts() public { + vm.expectRevert(abi.encodeWithSelector(FactoryBurnMintERC20.SenderNotBurner.selector, OWNER)); + + s_burnMintERC20.burnFrom(STRANGER, s_amount); + } + + function test_ExceedsBalance_Reverts() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burn(s_amount * 2); + } + + function test_BurnFromZeroAddress_Reverts() public { + s_burnMintERC20.grantBurnRole(address(0)); + changePrank(address(0)); + + vm.expectRevert("ERC20: burn from the zero address"); + + s_burnMintERC20.burn(0); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFrom.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFrom.t.sol new file mode 100644 index 0000000000..e2dcaf2856 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFrom.t.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_burnFrom is BurnMintERC20Setup { + function setUp() public virtual override { + BurnMintERC20Setup.setUp(); + } + + function test_BurnFrom_Success() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + + changePrank(s_mockPool); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Reverts + + function test_SenderNotBurner_Reverts() public { + vm.expectRevert(abi.encodeWithSelector(FactoryBurnMintERC20.SenderNotBurner.selector, OWNER)); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + } + + function test_InsufficientAllowance_Reverts() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: insufficient allowance"); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + } + + function test_ExceedsBalance_Reverts() public { + s_burnMintERC20.approve(s_mockPool, s_amount * 2); + + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burnFrom(OWNER, s_amount * 2); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFromAlias.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFromAlias.t.sol new file mode 100644 index 0000000000..0d46f1d54a --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.burnFromAlias.t.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_burnFromAlias is BurnMintERC20Setup { + function setUp() public virtual override { + BurnMintERC20Setup.setUp(); + } + + function test_BurnFrom_Success() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + + changePrank(s_mockPool); + + s_burnMintERC20.burn(OWNER, s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Reverts + + function test_SenderNotBurner_Reverts() public { + vm.expectRevert(abi.encodeWithSelector(FactoryBurnMintERC20.SenderNotBurner.selector, OWNER)); + + s_burnMintERC20.burn(OWNER, s_amount); + } + + function test_InsufficientAllowance_Reverts() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: insufficient allowance"); + + s_burnMintERC20.burn(OWNER, s_amount); + } + + function test_ExceedsBalance_Reverts() public { + s_burnMintERC20.approve(s_mockPool, s_amount * 2); + + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burn(OWNER, s_amount * 2); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.constructor.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.constructor.t.sol new file mode 100644 index 0000000000..f1ee0866ab --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.constructor.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_constructor is BurnMintERC20Setup { + function test_Constructor_Success() public { + string memory name = "Chainlink token v2"; + string memory symbol = "LINK2"; + uint8 decimals = 19; + uint256 maxSupply = 1e33; + + s_burnMintERC20 = new FactoryBurnMintERC20(name, symbol, decimals, maxSupply, 1e18, s_alice); + + assertEq(name, s_burnMintERC20.name()); + assertEq(symbol, s_burnMintERC20.symbol()); + assertEq(decimals, s_burnMintERC20.decimals()); + assertEq(maxSupply, s_burnMintERC20.maxSupply()); + + assertTrue(s_burnMintERC20.isMinter(s_alice)); + assertTrue(s_burnMintERC20.isBurner(s_alice)); + assertEq(s_burnMintERC20.balanceOf(s_alice), 1e18); + assertEq(s_burnMintERC20.totalSupply(), 1e18); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.decreaseApproval.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.decreaseApproval.t.sol new file mode 100644 index 0000000000..aa621a998e --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.decreaseApproval.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_decreaseApproval is BurnMintERC20Setup { + function test_DecreaseApproval_Success() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + uint256 allowance = s_burnMintERC20.allowance(OWNER, s_mockPool); + assertEq(allowance, s_amount); + s_burnMintERC20.decreaseApproval(s_mockPool, s_amount); + assertEq(s_burnMintERC20.allowance(OWNER, s_mockPool), allowance - s_amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.getCCIPAdmin.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.getCCIPAdmin.t.sol new file mode 100644 index 0000000000..fc6a81a712 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.getCCIPAdmin.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_getCCIPAdmin is BurnMintERC20Setup { + function test_getCCIPAdmin_Success() public view { + assertEq(s_alice, s_burnMintERC20.getCCIPAdmin()); + } + + function test_setCCIPAdmin_Success() public { + address newAdmin = makeAddr("newAdmin"); + + vm.expectEmit(); + emit FactoryBurnMintERC20.CCIPAdminTransferred(s_alice, newAdmin); + + s_burnMintERC20.setCCIPAdmin(newAdmin); + + assertEq(newAdmin, s_burnMintERC20.getCCIPAdmin()); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantMintAndBurnRoles.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantMintAndBurnRoles.t.sol new file mode 100644 index 0000000000..aaa967edc1 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantMintAndBurnRoles.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_grantMintAndBurnRoles is BurnMintERC20Setup { + function test_GrantMintAndBurnRoles_Success() public { + assertFalse(s_burnMintERC20.isMinter(STRANGER)); + assertFalse(s_burnMintERC20.isBurner(STRANGER)); + + vm.expectEmit(); + emit FactoryBurnMintERC20.MintAccessGranted(STRANGER); + vm.expectEmit(); + emit FactoryBurnMintERC20.BurnAccessGranted(STRANGER); + + s_burnMintERC20.grantMintAndBurnRoles(STRANGER); + + assertTrue(s_burnMintERC20.isMinter(STRANGER)); + assertTrue(s_burnMintERC20.isBurner(STRANGER)); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantRole.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantRole.t.sol new file mode 100644 index 0000000000..a06b52ac33 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.grantRole.t.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_grantRole is BurnMintERC20Setup { + function test_GrantMintAccess_Success() public { + assertFalse(s_burnMintERC20.isMinter(STRANGER)); + + vm.expectEmit(); + emit FactoryBurnMintERC20.MintAccessGranted(STRANGER); + + s_burnMintERC20.grantMintAndBurnRoles(STRANGER); + + assertTrue(s_burnMintERC20.isMinter(STRANGER)); + + vm.expectEmit(); + emit FactoryBurnMintERC20.MintAccessRevoked(STRANGER); + + s_burnMintERC20.revokeMintRole(STRANGER); + + assertFalse(s_burnMintERC20.isMinter(STRANGER)); + } + + function test_GrantBurnAccess_Success() public { + assertFalse(s_burnMintERC20.isBurner(STRANGER)); + + vm.expectEmit(); + emit FactoryBurnMintERC20.BurnAccessGranted(STRANGER); + + s_burnMintERC20.grantBurnRole(STRANGER); + + assertTrue(s_burnMintERC20.isBurner(STRANGER)); + + vm.expectEmit(); + emit FactoryBurnMintERC20.BurnAccessRevoked(STRANGER); + + s_burnMintERC20.revokeBurnRole(STRANGER); + + assertFalse(s_burnMintERC20.isBurner(STRANGER)); + } + + function test_GrantMany_Success() public { + // Since alice was already granted mint and burn roles in the setup, we will revoke them + // and then grant them again for the purposes of the test + s_burnMintERC20.revokeMintRole(s_alice); + s_burnMintERC20.revokeBurnRole(s_alice); + + uint256 numberOfPools = 10; + address[] memory permissionedAddresses = new address[](numberOfPools + 1); + permissionedAddresses[0] = s_mockPool; + + for (uint160 i = 0; i < numberOfPools; ++i) { + permissionedAddresses[i + 1] = address(i); + s_burnMintERC20.grantMintAndBurnRoles(address(i)); + } + + assertEq(permissionedAddresses, s_burnMintERC20.getBurners()); + assertEq(permissionedAddresses, s_burnMintERC20.getMinters()); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.increaseApproval.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.increaseApproval.t.sol new file mode 100644 index 0000000000..e93cc2a71e --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.increaseApproval.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_increaseApproval is BurnMintERC20Setup { + function test_IncreaseApproval_Success() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + uint256 allowance = s_burnMintERC20.allowance(OWNER, s_mockPool); + assertEq(allowance, s_amount); + s_burnMintERC20.increaseApproval(s_mockPool, s_amount); + assertEq(s_burnMintERC20.allowance(OWNER, s_mockPool), allowance + s_amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.mint.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.mint.t.sol new file mode 100644 index 0000000000..b22783a3c7 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.mint.t.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_mint is BurnMintERC20Setup { + function test_BasicMint_Success() public { + uint256 balancePre = s_burnMintERC20.balanceOf(OWNER); + + s_burnMintERC20.grantMintAndBurnRoles(OWNER); + + vm.expectEmit(); + emit IERC20.Transfer(address(0), OWNER, s_amount); + + s_burnMintERC20.mint(OWNER, s_amount); + + assertEq(balancePre + s_amount, s_burnMintERC20.balanceOf(OWNER)); + } + + // Revert + + function test_SenderNotMinter_Reverts() public { + vm.expectRevert(abi.encodeWithSelector(FactoryBurnMintERC20.SenderNotMinter.selector, OWNER)); + s_burnMintERC20.mint(STRANGER, 1e18); + } + + function test_MaxSupplyExceeded_Reverts() public { + changePrank(s_mockPool); + + // Mint max supply + s_burnMintERC20.mint(OWNER, s_burnMintERC20.maxSupply()); + + vm.expectRevert( + abi.encodeWithSelector(FactoryBurnMintERC20.MaxSupplyExceeded.selector, s_burnMintERC20.maxSupply() + 1) + ); + + // Attempt to mint 1 more than max supply + s_burnMintERC20.mint(OWNER, 1); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.supportsInterface.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.supportsInterface.t.sol new file mode 100644 index 0000000000..bdf3c3e7ae --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.supportsInterface.t.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {IBurnMintERC20} from "../../../../shared/token/ERC20/IBurnMintERC20.sol"; +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC165} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_supportsInterface is BurnMintERC20Setup { + function test_SupportsInterface_Success() public view { + assertTrue(s_burnMintERC20.supportsInterface(type(IERC20).interfaceId)); + assertTrue(s_burnMintERC20.supportsInterface(type(IBurnMintERC20).interfaceId)); + assertTrue(s_burnMintERC20.supportsInterface(type(IERC165).interfaceId)); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.transfer.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.transfer.t.sol new file mode 100644 index 0000000000..333d50d333 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20/FactoryBurnMintERC20.transfer.t.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract FactoryBurnMintERC20_transfer is BurnMintERC20Setup { + function test_Transfer_Success() public { + uint256 balancePre = s_burnMintERC20.balanceOf(STRANGER); + uint256 sendingAmount = s_amount / 2; + + s_burnMintERC20.transfer(STRANGER, sendingAmount); + + assertEq(sendingAmount + balancePre, s_burnMintERC20.balanceOf(STRANGER)); + } + + // Reverts + + function test_InvalidAddress_Reverts() public { + vm.expectRevert(); + + s_burnMintERC20.transfer(address(s_burnMintERC20), s_amount); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/RegistryModuleOwnerCustom.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/RegistryModuleOwnerCustom.t.sol index dfb599bd30..cf40fb62d2 100644 --- a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/RegistryModuleOwnerCustom.t.sol +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/RegistryModuleOwnerCustom.t.sol @@ -8,6 +8,7 @@ import {RegistryModuleOwnerCustom} from "../../tokenAdminRegistry/RegistryModule import {TokenAdminRegistry} from "../../tokenAdminRegistry/TokenAdminRegistry.sol"; import {BurnMintERC677Helper} from "../helpers/BurnMintERC677Helper.sol"; +import {AccessControl} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/access/AccessControl.sol"; import {Test} from "forge-std/Test.sol"; contract RegistryModuleOwnerCustomSetup is Test { @@ -102,3 +103,54 @@ contract RegistryModuleOwnerCustom_registerAdminViaOwner is RegistryModuleOwnerC s_registryModuleOwnerCustom.registerAdminViaOwner(s_token); } } + +contract AccessController is AccessControl { + constructor( + address admin + ) { + _grantRole(DEFAULT_ADMIN_ROLE, admin); + } +} + +contract RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin is RegistryModuleOwnerCustomSetup { + function setUp() public override { + super.setUp(); + + s_token = address(new AccessController(OWNER)); + } + + function test_registerAccessControlDefaultAdmin_Success() public { + assertEq(s_tokenAdminRegistry.getTokenConfig(s_token).administrator, address(0)); + + bytes32 defaultAdminRole = AccessController(s_token).DEFAULT_ADMIN_ROLE(); + + vm.expectCall(address(s_token), abi.encodeWithSelector(AccessControl.hasRole.selector, defaultAdminRole, OWNER), 1); + vm.expectCall( + address(s_tokenAdminRegistry), + abi.encodeWithSelector(TokenAdminRegistry.proposeAdministrator.selector, s_token, OWNER), + 1 + ); + + vm.expectEmit(); + emit RegistryModuleOwnerCustom.AdministratorRegistered(s_token, OWNER); + + s_registryModuleOwnerCustom.registerAccessControlDefaultAdmin(s_token); + + assertEq(s_tokenAdminRegistry.getTokenConfig(s_token).pendingAdministrator, OWNER); + } + + function test_registerAccessControlDefaultAdmin_Revert() public { + bytes32 defaultAdminRole = AccessController(s_token).DEFAULT_ADMIN_ROLE(); + + address wrongSender = makeAddr("Not_expected_owner"); + vm.startPrank(wrongSender); + + vm.expectRevert( + abi.encodeWithSelector( + RegistryModuleOwnerCustom.RequiredRoleNotFound.selector, wrongSender, defaultAdminRole, s_token + ) + ); + + s_registryModuleOwnerCustom.registerAccessControlDefaultAdmin(s_token); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry.t.sol index ada0369045..a5c2487478 100644 --- a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry.t.sol +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry.t.sol @@ -99,7 +99,9 @@ contract TokenAdminRegistry_setPool is TokenAdminRegistrySetup { } contract TokenAdminRegistry_getAllConfiguredTokens is TokenAdminRegistrySetup { - function test_Fuzz_getAllConfiguredTokens_Success(uint8 numberOfTokens) public { + function test_Fuzz_getAllConfiguredTokens_Success( + uint8 numberOfTokens + ) public { TokenAdminRegistry cleanTokenAdminRegistry = new TokenAdminRegistry(); for (uint160 i = 0; i < numberOfTokens; ++i) { cleanTokenAdminRegistry.proposeAdministrator(address(i), address(i + 1000)); diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry/TokenAdminRegistrySetup.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry/TokenAdminRegistrySetup.t.sol new file mode 100644 index 0000000000..b3ca4a5053 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenAdminRegistry/TokenAdminRegistrySetup.t.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +import {TokenSetup} from "../../TokenSetup.t.sol"; + +contract TokenAdminRegistrySetup is TokenSetup { + address internal s_registryModule = makeAddr("registryModule"); + + function setUp() public virtual override { + TokenSetup.setUp(); + + s_tokenAdminRegistry.addRegistryModule(s_registryModule); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.constructor.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.constructor.t.sol new file mode 100644 index 0000000000..fbba0ccbb0 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.constructor.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {ITokenAdminRegistry} from "../../../interfaces/ITokenAdminRegistry.sol"; + +import {RegistryModuleOwnerCustom} from "../../../tokenAdminRegistry/RegistryModuleOwnerCustom.sol"; +import {TokenPoolFactory} from "../../../tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol"; + +import {Create2} from "../../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; +import {TokenPoolFactorySetup} from "./TokenPoolFactorySetup.t.sol"; + +contract TokenPoolFactory_constructor is TokenPoolFactorySetup { + using Create2 for bytes32; + + function test_constructor_Revert() public { + // Revert cause the tokenAdminRegistry is address(0) + vm.expectRevert(TokenPoolFactory.InvalidZeroAddress.selector); + new TokenPoolFactory(ITokenAdminRegistry(address(0)), RegistryModuleOwnerCustom(address(0)), address(0), address(0)); + + new TokenPoolFactory( + ITokenAdminRegistry(address(0xdeadbeef)), + RegistryModuleOwnerCustom(address(0xdeadbeef)), + address(0xdeadbeef), + address(0xdeadbeef) + ); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.createTokenPool.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.createTokenPool.t.sol new file mode 100644 index 0000000000..301e26173b --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.createTokenPool.t.sol @@ -0,0 +1,606 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IBurnMintERC20} from "../../../../shared/token/ERC20/IBurnMintERC20.sol"; +import {IOwner} from "../../../interfaces/IOwner.sol"; + +import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; + +import {Router} from "../../../Router.sol"; +import {RateLimiter} from "../../../libraries/RateLimiter.sol"; +import {BurnFromMintTokenPool} from "../../../pools/BurnFromMintTokenPool.sol"; +import {BurnMintTokenPool} from "../../../pools/BurnMintTokenPool.sol"; +import {LockReleaseTokenPool} from "../../../pools/LockReleaseTokenPool.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; +import {RegistryModuleOwnerCustom} from "../../../tokenAdminRegistry/RegistryModuleOwnerCustom.sol"; +import {TokenAdminRegistry} from "../../../tokenAdminRegistry/TokenAdminRegistry.sol"; +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {TokenPoolFactory} from "../../../tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol"; +import {TokenPoolFactorySetup} from "./TokenPoolFactorySetup.t.sol"; + +import {IERC20Metadata} from + "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; +import {Create2} from "../../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; + +contract TokenPoolFactory_createTokenPool is TokenPoolFactorySetup { + using Create2 for bytes32; + + uint8 private constant LOCAL_TOKEN_DECIMALS = 18; + uint8 private constant REMOTE_TOKEN_DECIMALS = 6; + + address internal s_burnMintOffRamp = makeAddr("burn_mint_offRamp"); + + function setUp() public override { + TokenPoolFactorySetup.setUp(); + + Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); + offRampUpdates[0] = Router.OffRamp({sourceChainSelector: DEST_CHAIN_SELECTOR, offRamp: s_burnMintOffRamp}); + s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); + } + + function test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() public { + vm.startPrank(OWNER); + + bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); + + address predictedTokenAddress = + Create2.computeAddress(dynamicSalt, keccak256(s_tokenInitCode), address(s_tokenPoolFactory)); + + // Create the constructor params for the predicted pool + bytes memory poolCreationParams = + abi.encode(predictedTokenAddress, LOCAL_TOKEN_DECIMALS, new address[](0), s_rmnProxy, s_sourceRouter); + + // Predict the address of the pool before we make the tx by using the init code and the params + bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, poolCreationParams); + + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(s_tokenPoolFactory)); + + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + new TokenPoolFactory.RemoteTokenPoolInfo[](0), LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertNotEq(address(0), tokenAddress, "Token Address should not be 0"); + assertNotEq(address(0), poolAddress, "Pool Address should not be 0"); + + assertEq(predictedTokenAddress, tokenAddress, "Token Address should have been predicted"); + assertEq(predictedPoolAddress, poolAddress, "Pool Address should have been predicted"); + + s_tokenAdminRegistry.acceptAdminRole(tokenAddress); + Ownable2Step(tokenAddress).acceptOwnership(); + Ownable2Step(poolAddress).acceptOwnership(); + + assertEq(poolAddress, s_tokenAdminRegistry.getPool(tokenAddress), "Token Pool should be set"); + assertEq(IOwner(tokenAddress).owner(), OWNER, "Token should be owned by the owner"); + assertEq(IOwner(poolAddress).owner(), OWNER, "Token should be owned by the owner"); + } + + function test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() public { + vm.startPrank(OWNER); + bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); + + // We have to create a new factory, registry module, and token admin registry to simulate the other chain + TokenAdminRegistry newTokenAdminRegistry = new TokenAdminRegistry(); + RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); + + // We want to deploy a new factory and Owner Module. + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); + + newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); + + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( + address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy), LOCAL_TOKEN_DECIMALS + ); + + // Create an array of remote pools where nothing exists yet, but we want to predict the address for + // the new pool and token on DEST_CHAIN_SELECTOR + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token + // on the remote chain + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + "", // remotePoolAddress + type(BurnMintTokenPool).creationCode, // remotePoolInitCode + remoteChainConfig, // remoteChainConfig + TokenPoolFactory.PoolType.BURN_MINT, // poolType + "", // remoteTokenAddress + s_tokenInitCode, // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) + ); + + // Predict the address of the token and pool on the DESTINATION chain + address predictedTokenAddress = dynamicSalt.computeAddress(keccak256(s_tokenInitCode), address(newTokenPoolFactory)); + + // Since the remote chain information was provided, we should be able to get the information from the newly + // deployed token pool using the available getter functions + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + remoteTokenPools, // No existing remote pools + LOCAL_TOKEN_DECIMALS, // 18 decimal token + s_tokenInitCode, // Token Init Code + s_poolInitCode, // Pool Init Code + FAKE_SALT // Salt + ); + + // Ensure that the remote Token was set to the one we predicted + assertEq( + abi.encode(predictedTokenAddress), + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + "Token Address should have been predicted" + ); + + { + // Create the constructor params for the predicted pool + // The predictedTokenAddress is NOT abi-encoded since the raw evm-address + // is used in the constructor params + bytes memory predictedPoolCreationParams = + abi.encode(predictedTokenAddress, LOCAL_TOKEN_DECIMALS, new address[](0), s_rmnProxy, address(s_destRouter)); + + // Take the init code and concat the destination params to it, the initCode shouldn't change + bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, predictedPoolCreationParams); + + // Predict the address of the pool on the DESTINATION chain + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); + + // Assert that the address set for the remote pool is the same as the predicted address + assertEq( + abi.encode(predictedPoolAddress), + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + "Pool Address should have been predicted" + ); + } + + // On the new token pool factory, representing a destination chain, + // deploy a new token and a new pool + (address newTokenAddress, address newPoolAddress) = newTokenPoolFactory.deployTokenAndTokenPool( + new TokenPoolFactory.RemoteTokenPoolInfo[](0), LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertEq( + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + abi.encode(newPoolAddress), + "New Pool Address should have been deployed correctly" + ); + + assertEq( + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + abi.encode(newTokenAddress), + "New Token Address should have been deployed correctly" + ); + + // Check that the token pool has the correct permissions + vm.startPrank(poolAddress); + IBurnMintERC20(tokenAddress).mint(poolAddress, 1e18); + + assertEq(1e18, IBurnMintERC20(tokenAddress).balanceOf(poolAddress), "Balance should be 1e18"); + + IBurnMintERC20(tokenAddress).burn(1e18); + assertEq(0, IBurnMintERC20(tokenAddress).balanceOf(poolAddress), "Balance should be 0"); + + vm.stopPrank(); + + assertEq(s_tokenAdminRegistry.getPool(tokenAddress), poolAddress, "Token Pool should be set"); + + // Check the token admin registry for config + TokenAdminRegistry.TokenConfig memory tokenConfig = s_tokenAdminRegistry.getTokenConfig(tokenAddress); + assertEq(tokenConfig.administrator, address(s_tokenPoolFactory), "Administrator should be set"); + assertEq(tokenConfig.pendingAdministrator, OWNER, "Pending Administrator should be 0"); + assertEq(tokenConfig.tokenPool, poolAddress, "Pool Address should be set"); + + // Accept Ownership of the token, pool, and adminRegistry + vm.startPrank(OWNER); + s_tokenAdminRegistry.acceptAdminRole(tokenAddress); + assertEq(s_tokenAdminRegistry.getTokenConfig(tokenAddress).administrator, OWNER, "Administrator should be set"); + assertEq( + s_tokenAdminRegistry.getTokenConfig(tokenAddress).pendingAdministrator, address(0), "Administrator should be set" + ); + + Ownable2Step(tokenAddress).acceptOwnership(); + Ownable2Step(poolAddress).acceptOwnership(); + + assertEq(IOwner(tokenAddress).owner(), OWNER, "Token should be controlled by the OWNER"); + assertEq(IOwner(poolAddress).owner(), OWNER, "Pool should be controlled by the OWNER"); + } + + function test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() public { + vm.startPrank(OWNER); + bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); + + FactoryBurnMintERC20 newRemoteToken = + new FactoryBurnMintERC20("TestToken", "TT", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); + + // We have to create a new factory, registry module, and token admin registry to simulate the other chain + TokenAdminRegistry newTokenAdminRegistry = new TokenAdminRegistry(); + RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); + + // We want to deploy a new factory and Owner Module. + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); + + newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); + + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( + address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy), LOCAL_TOKEN_DECIMALS + ); + + // Create an array of remote pools where nothing exists yet, but we want to predict the address for + // the new pool and token on DEST_CHAIN_SELECTOR + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token + // on the remote chain + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + "", // remotePoolAddress + type(BurnMintTokenPool).creationCode, // remotePoolInitCode + remoteChainConfig, // remoteChainConfig + TokenPoolFactory.PoolType.BURN_MINT, // poolType + abi.encode(address(newRemoteToken)), // remoteTokenAddress + s_tokenInitCode, // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) // rateLimiterConfig + ); + + // Since the remote chain information was provided, we should be able to get the information from the newly + // deployed token pool using the available getter functions + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + remoteTokenPools, LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertEq(address(TokenPool(poolAddress).getToken()), tokenAddress, "Token Address should have been set locally"); + + // Ensure that the remote Token was set to the one we predicted + assertEq( + abi.encode(address(newRemoteToken)), + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + "Token Address should have been predicted" + ); + + // Create the constructor params for the predicted pool + // The predictedTokenAddress is NOT abi-encoded since the raw evm-address + // is used in the constructor params + bytes memory predictedPoolCreationParams = + abi.encode(address(newRemoteToken), LOCAL_TOKEN_DECIMALS, new address[](0), s_rmnProxy, address(s_destRouter)); + + // Take the init code and concat the destination params to it, the initCode shouldn't change + bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, predictedPoolCreationParams); + + // Predict the address of the pool on the DESTINATION chain + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); + + // Assert that the address set for the remote pool is the same as the predicted address + assertEq( + abi.encode(predictedPoolAddress), + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + "Pool Address should have been predicted" + ); + + // On the new token pool factory, representing a destination chain, + // deploy a new token and a new pool + address newPoolAddress = newTokenPoolFactory.deployTokenPoolWithExistingToken( + address(newRemoteToken), + LOCAL_TOKEN_DECIMALS, + new TokenPoolFactory.RemoteTokenPoolInfo[](0), + s_poolInitCode, + FAKE_SALT, + TokenPoolFactory.PoolType.BURN_MINT + ); + + assertEq( + abi.encode(newRemoteToken), + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + "Remote Token Address should have been set correctly" + ); + + assertEq( + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + abi.encode(newPoolAddress), + "New Pool Address should have been deployed correctly" + ); + } + + function test_createTokenPool_WithRemoteTokenAndRemotePool_Success() public { + vm.startPrank(OWNER); + + bytes memory RANDOM_TOKEN_ADDRESS = abi.encode(makeAddr("RANDOM_TOKEN")); + bytes memory RANDOM_POOL_ADDRESS = abi.encode(makeAddr("RANDOM_POOL")); + + // Create an array of remote pools with some fake addresses + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + RANDOM_POOL_ADDRESS, // remotePoolAddress + type(BurnMintTokenPool).creationCode, // remotePoolInitCode + TokenPoolFactory.RemoteChainConfig(address(0), address(0), address(0), 0), // remoteChainConfig + TokenPoolFactory.PoolType.BURN_MINT, // poolType + RANDOM_TOKEN_ADDRESS, // remoteTokenAddress + "", // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) // rateLimiterConfig + ); + + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + remoteTokenPools, LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertNotEq(address(0), tokenAddress, "Token Address should not be 0"); + assertNotEq(address(0), poolAddress, "Pool Address should not be 0"); + + s_tokenAdminRegistry.acceptAdminRole(tokenAddress); + Ownable2Step(tokenAddress).acceptOwnership(); + Ownable2Step(poolAddress).acceptOwnership(); + + assertEq( + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + RANDOM_TOKEN_ADDRESS, + "Remote Token Address should have been set" + ); + + assertEq( + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + RANDOM_POOL_ADDRESS, + "Remote Pool Address should have been set" + ); + + assertEq(poolAddress, s_tokenAdminRegistry.getPool(tokenAddress), "Token Pool should be set"); + + assertEq(IOwner(tokenAddress).owner(), OWNER, "Token should be owned by the owner"); + + assertEq(IOwner(poolAddress).owner(), OWNER, "Token should be owned by the owner"); + } + + function test_createTokenPoolLockRelease_ExistingToken_predict_Success() public { + vm.startPrank(OWNER); + + // We have to create a new factory, registry module, and token admin registry to simulate the other chain + TokenAdminRegistry newTokenAdminRegistry = new TokenAdminRegistry(); + RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); + + // We want to deploy a new factory and Owner Module. + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); + + newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); + + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( + address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy), LOCAL_TOKEN_DECIMALS + ); + + FactoryBurnMintERC20 newLocalToken = + new FactoryBurnMintERC20("TestToken", "TEST", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); + + FactoryBurnMintERC20 newRemoteToken = + new FactoryBurnMintERC20("TestToken", "TEST", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); + + // Create an array of remote pools where nothing exists yet, but we want to predict the address for + // the new pool and token on DEST_CHAIN_SELECTOR + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token + // on the remote chain + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + "", // remotePoolAddress + type(LockReleaseTokenPool).creationCode, // remotePoolInitCode + remoteChainConfig, // remoteChainConfig + TokenPoolFactory.PoolType.LOCK_RELEASE, // poolType + abi.encode(address(newRemoteToken)), // remoteTokenAddress + s_tokenInitCode, // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) + ); + + // Since the remote chain information was provided, we should be able to get the information from the newly + // deployed token pool using the available getter functions + address poolAddress = s_tokenPoolFactory.deployTokenPoolWithExistingToken( + address(newLocalToken), + LOCAL_TOKEN_DECIMALS, + remoteTokenPools, + type(LockReleaseTokenPool).creationCode, + FAKE_SALT, + TokenPoolFactory.PoolType.LOCK_RELEASE + ); + + // Check that the pool was correctly deployed on the local chain first + + // Accept the ownership which was transferred + Ownable2Step(poolAddress).acceptOwnership(); + + // Ensure that the remote Token was set to the one we predicted + assertEq( + address(LockReleaseTokenPool(poolAddress).getToken()), + address(newLocalToken), + "Token Address should have been set" + ); + + LockReleaseTokenPool(poolAddress).setRebalancer(OWNER); + assertEq(OWNER, LockReleaseTokenPool(poolAddress).getRebalancer(), "Rebalancer should be set"); + + // Deploy the Lock-Release Token Pool on the destination chain with the existing remote token + (address newPoolAddress) = newTokenPoolFactory.deployTokenPoolWithExistingToken( + address(newRemoteToken), + LOCAL_TOKEN_DECIMALS, + new TokenPoolFactory.RemoteTokenPoolInfo[](0), // No existing remote pools + type(LockReleaseTokenPool).creationCode, // Pool Init Code + FAKE_SALT, // Salt + TokenPoolFactory.PoolType.LOCK_RELEASE + ); + + assertEq( + LockReleaseTokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + abi.encode(newPoolAddress), + "New Pool Address should have been deployed correctly" + ); + + assertEq( + LockReleaseTokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + abi.encode(address(newRemoteToken)), + "New Token Address should have been deployed correctly" + ); + + assertEq( + address(LockReleaseTokenPool(newPoolAddress).getToken()), + address(newRemoteToken), + "New Remote Token should be set correctly" + ); + } + + function test_createTokenPool_BurnFromMintTokenPool_Success() public { + vm.startPrank(OWNER); + + bytes memory RANDOM_TOKEN_ADDRESS = abi.encode(makeAddr("RANDOM_TOKEN")); + bytes memory RANDOM_POOL_ADDRESS = abi.encode(makeAddr("RANDOM_POOL")); + + // Create an array of remote pools with some fake addresses + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + RANDOM_POOL_ADDRESS, // remotePoolAddress + type(BurnFromMintTokenPool).creationCode, // remotePoolInitCode + TokenPoolFactory.RemoteChainConfig(address(0), address(0), address(0), 0), // remoteChainConfig + TokenPoolFactory.PoolType.BURN_MINT, // poolType + RANDOM_TOKEN_ADDRESS, // remoteTokenAddress + "", // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) // rateLimiterConfig + ); + + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + remoteTokenPools, LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertNotEq(address(0), tokenAddress, "Token Address should not be 0"); + assertNotEq(address(0), poolAddress, "Pool Address should not be 0"); + + s_tokenAdminRegistry.acceptAdminRole(tokenAddress); + Ownable2Step(tokenAddress).acceptOwnership(); + Ownable2Step(poolAddress).acceptOwnership(); + + assertEq( + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + RANDOM_TOKEN_ADDRESS, + "Remote Token Address should have been set" + ); + + assertEq( + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + RANDOM_POOL_ADDRESS, + "Remote Pool Address should have been set" + ); + + assertEq(poolAddress, s_tokenAdminRegistry.getPool(tokenAddress), "Token Pool should be set"); + + assertEq(IOwner(tokenAddress).owner(), OWNER, "Token should be owned by the owner"); + + assertEq(IOwner(poolAddress).owner(), OWNER, "Token should be owned by the owner"); + } + + function test_createTokenPool_RemoteTokenHasDifferentDecimals_Success() public { + vm.startPrank(OWNER); + bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); + + // Deploy the "remote" token which has a different decimal value than the local token + FactoryBurnMintERC20 newRemoteToken = + new FactoryBurnMintERC20("TestToken", "TT", 6, type(uint256).max, PREMINT_AMOUNT, OWNER); + + // We have to create a new factory, registry module, and token admin registry to simulate the other chain + TokenAdminRegistry newTokenAdminRegistry = new TokenAdminRegistry(); + RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); + + // We want to deploy a new factory and Owner Module. + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); + + newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); + + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( + address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy), REMOTE_TOKEN_DECIMALS + ); + + // Create an array of remote pools where nothing exists yet, but we want to predict the address for + // the new pool and token on DEST_CHAIN_SELECTOR + TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); + + // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token + // on the remote chain + remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( + DEST_CHAIN_SELECTOR, // remoteChainSelector + "", // remotePoolAddress + type(BurnMintTokenPool).creationCode, // remotePoolInitCode + remoteChainConfig, // remoteChainConfig + TokenPoolFactory.PoolType.BURN_MINT, // poolType + abi.encode(address(newRemoteToken)), // remoteTokenAddress + s_tokenInitCode, // remoteTokenInitCode + RateLimiter.Config(false, 0, 0) // rateLimiterConfig + ); + + // Since the remote chain information was provided, we should be able to get the information from the newly + // deployed token pool using the available getter functions + (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( + remoteTokenPools, LOCAL_TOKEN_DECIMALS, s_tokenInitCode, s_poolInitCode, FAKE_SALT + ); + + assertEq(address(TokenPool(poolAddress).getToken()), tokenAddress, "Token Address should have been set locally"); + + // Ensure that the remote Token was set to the one we predicted + assertEq( + abi.encode(address(newRemoteToken)), + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + "Token Address should have been predicted" + ); + + // Create the constructor params for the predicted pool + // The predictedTokenAddress is NOT abi-encoded since the raw evm-address + // is used in the constructor params + bytes memory predictedPoolCreationParams = + abi.encode(address(newRemoteToken), REMOTE_TOKEN_DECIMALS, new address[](0), s_rmnProxy, address(s_destRouter)); + + // Take the init code and concat the destination params to it, the initCode shouldn't change + bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, predictedPoolCreationParams); + + // Predict the address of the pool on the DESTINATION chain + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); + + // Assert that the address set for the remote pool is the same as the predicted address + assertEq( + abi.encode(predictedPoolAddress), + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + "Pool Address should have been predicted" + ); + + // On the new token pool factory, representing a destination chain, + // deploy a new token and a new pool + address newPoolAddress = newTokenPoolFactory.deployTokenPoolWithExistingToken( + address(newRemoteToken), + REMOTE_TOKEN_DECIMALS, + new TokenPoolFactory.RemoteTokenPoolInfo[](0), + s_poolInitCode, + FAKE_SALT, + TokenPoolFactory.PoolType.BURN_MINT + ); + + assertEq( + abi.encode(newRemoteToken), + TokenPool(poolAddress).getRemoteToken(DEST_CHAIN_SELECTOR), + "Remote Token Address should have been set correctly" + ); + + assertEq( + TokenPool(poolAddress).getRemotePools(DEST_CHAIN_SELECTOR)[0], + abi.encode(newPoolAddress), + "New Pool Address should have been deployed correctly" + ); + + assertEq(TokenPool(poolAddress).getTokenDecimals(), LOCAL_TOKEN_DECIMALS, "Local token pool should use 18 decimals"); + + // Assert the local token has 18 decimals + assertEq(IERC20Metadata(tokenAddress).decimals(), LOCAL_TOKEN_DECIMALS, "Token Decimals should be 18"); + + // Check configs on the remote pool and remote token decimals + assertEq(TokenPool(newPoolAddress).getTokenDecimals(), REMOTE_TOKEN_DECIMALS, "Token Decimals should be 6"); + assertEq(address(TokenPool(newPoolAddress).getToken()), address(newRemoteToken), "Token Address should be set"); + assertEq(IERC20Metadata(newRemoteToken).decimals(), REMOTE_TOKEN_DECIMALS, "Token Decimals should be 6"); + } +} diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactorySetup.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactorySetup.t.sol new file mode 100644 index 0000000000..9f78ceb943 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactorySetup.t.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {Create2} from "../../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; +import {BurnMintTokenPool} from "../../../pools/BurnMintTokenPool.sol"; +import {RegistryModuleOwnerCustom} from "../../../tokenAdminRegistry/RegistryModuleOwnerCustom.sol"; +import {FactoryBurnMintERC20} from "../../../tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol"; +import {TokenPoolFactory} from "../../../tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol"; +import {TokenAdminRegistrySetup} from "../TokenAdminRegistry/TokenAdminRegistrySetup.t.sol"; + +contract TokenPoolFactorySetup is TokenAdminRegistrySetup { + using Create2 for bytes32; + + TokenPoolFactory internal s_tokenPoolFactory; + RegistryModuleOwnerCustom internal s_registryModuleOwnerCustom; + + bytes internal s_poolInitCode; + bytes internal s_poolInitArgs; + + bytes32 internal constant FAKE_SALT = keccak256(abi.encode("FAKE_SALT")); + + address internal s_rmnProxy = address(0x1234); + + bytes internal s_tokenCreationParams; + bytes internal s_tokenInitCode; + + uint256 public constant PREMINT_AMOUNT = 100 ether; + + function setUp() public virtual override { + TokenAdminRegistrySetup.setUp(); + + s_registryModuleOwnerCustom = new RegistryModuleOwnerCustom(address(s_tokenAdminRegistry)); + s_tokenAdminRegistry.addRegistryModule(address(s_registryModuleOwnerCustom)); + + s_tokenPoolFactory = + new TokenPoolFactory(s_tokenAdminRegistry, s_registryModuleOwnerCustom, s_rmnProxy, address(s_sourceRouter)); + + // Create Init Code for BurnMintERC20 TestToken with 18 decimals and supply cap of max uint256 value + s_tokenCreationParams = abi.encode("TestToken", "TT", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); + + s_tokenInitCode = abi.encodePacked(type(FactoryBurnMintERC20).creationCode, s_tokenCreationParams); + + s_poolInitCode = type(BurnMintTokenPool).creationCode; + + // Create Init Args for BurnMintTokenPool with no allowlist minus the token address + address[] memory allowlist = new address[](1); + allowlist[0] = OWNER; + s_poolInitArgs = abi.encode(allowlist, address(0x1234), s_sourceRouter); + } +} diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol index a794d68c9e..4392fa8c56 100644 --- a/contracts/src/v0.8/ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol @@ -6,18 +6,23 @@ import {IGetCCIPAdmin} from "../interfaces/IGetCCIPAdmin.sol"; import {IOwner} from "../interfaces/IOwner.sol"; import {ITokenAdminRegistry} from "../interfaces/ITokenAdminRegistry.sol"; +import {AccessControl} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/access/AccessControl.sol"; + contract RegistryModuleOwnerCustom is ITypeAndVersion { error CanOnlySelfRegister(address admin, address token); + error RequiredRoleNotFound(address msgSender, bytes32 role, address token); error AddressZero(); event AdministratorRegistered(address indexed token, address indexed administrator); - string public constant override typeAndVersion = "RegistryModuleOwnerCustom 1.5.0"; + string public constant override typeAndVersion = "RegistryModuleOwnerCustom 1.6.0"; // The TokenAdminRegistry contract ITokenAdminRegistry internal immutable i_tokenAdminRegistry; - constructor(address tokenAdminRegistry) { + constructor( + address tokenAdminRegistry + ) { if (tokenAdminRegistry == address(0)) { revert AddressZero(); } @@ -27,17 +32,35 @@ contract RegistryModuleOwnerCustom is ITypeAndVersion { /// @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 { + function registerAdminViaGetCCIPAdmin( + address token + ) external { _registerAdmin(token, IGetCCIPAdmin(token).getCCIPAdmin()); } /// @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 { + function registerAdminViaOwner( + address token + ) external { _registerAdmin(token, IOwner(token).owner()); } + /// @notice Registers the admin of the token using OZ's AccessControl DEFAULT_ADMIN_ROLE. + /// @param token The token to register the admin for. + /// @dev The caller must have the DEFAULT_ADMIN_ROLE as defined by the contract itself. + function registerAccessControlDefaultAdmin( + address token + ) external { + bytes32 defaultAdminRole = AccessControl(token).DEFAULT_ADMIN_ROLE(); + if (!AccessControl(token).hasRole(defaultAdminRole, msg.sender)) { + revert RequiredRoleNotFound(msg.sender, defaultAdminRole, token); + } + + _registerAdmin(token, msg.sender); + } + /// @notice Registers the admin of the token to msg.sender given that the /// admin is equal to msg.sender. /// @param token The token to register the admin for. diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenAdminRegistry.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenAdminRegistry.sol index fd995ca96a..fbe821ebc7 100644 --- a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenAdminRegistry.sol +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenAdminRegistry.sol @@ -50,7 +50,9 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea /// @notice Returns all pools for the given tokens. /// @dev Will return address(0) for tokens that do not have a pool. - function getPools(address[] calldata tokens) external view returns (address[] memory) { + function getPools( + address[] calldata tokens + ) external view returns (address[] memory) { address[] memory pools = new address[](tokens.length); for (uint256 i = 0; i < tokens.length; ++i) { pools[i] = s_tokenConfig[tokens[i]].tokenPool; @@ -59,14 +61,18 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea } /// @inheritdoc ITokenAdminRegistry - function getPool(address token) external view returns (address) { + function getPool( + address token + ) external view returns (address) { return s_tokenConfig[token].tokenPool; } /// @notice Returns the configuration for a token. /// @param token The token to get the configuration for. /// @return config The configuration for the token. - function getTokenConfig(address token) external view returns (TokenConfig memory) { + function getTokenConfig( + address token + ) external view returns (TokenConfig memory) { return s_tokenConfig[token]; } @@ -136,7 +142,9 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea /// @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 { + function acceptAdminRole( + address localToken + ) external { TokenConfig storage config = s_tokenConfig[localToken]; if (config.pendingAdministrator != msg.sender) { revert OnlyPendingAdministrator(msg.sender, localToken); @@ -187,13 +195,17 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea /// @notice Checks if an address is a registry module. /// @param module The address to check. /// @return True if the address is a registry module, false otherwise. - function isRegistryModule(address module) public view returns (bool) { + function isRegistryModule( + address module + ) public view returns (bool) { return s_registryModules.contains(module); } /// @notice Adds a new registry module to the list of allowed modules. /// @param module The module to add. - function addRegistryModule(address module) external onlyOwner { + function addRegistryModule( + address module + ) external onlyOwner { if (s_registryModules.add(module)) { emit RegistryModuleAdded(module); } @@ -201,7 +213,9 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea /// @notice Removes a registry module from the list of allowed modules. /// @param module The module to remove. - function removeRegistryModule(address module) external onlyOwner { + function removeRegistryModule( + address module + ) external onlyOwner { if (s_registryModules.remove(module)) { emit RegistryModuleRemoved(module); } @@ -212,7 +226,9 @@ contract TokenAdminRegistry is ITokenAdminRegistry, ITypeAndVersion, OwnerIsCrea // ================================================================ /// @notice Checks if an address is the administrator of the given token. - modifier onlyTokenAdmin(address token) { + modifier onlyTokenAdmin( + address token + ) { if (s_tokenConfig[token].administrator != msg.sender) { revert OnlyAdministrator(msg.sender, token); } diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol new file mode 100644 index 0000000000..6fdba0f9b1 --- /dev/null +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol @@ -0,0 +1,290 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {IGetCCIPAdmin} from "../../../ccip/interfaces/IGetCCIPAdmin.sol"; +import {IOwnable} from "../../../shared/interfaces/IOwnable.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {Ownable2StepMsgSender} from "../../../shared/access/Ownable2StepMsgSender.sol"; + +import {ERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {ERC20Burnable} from + "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/ERC20Burnable.sol"; +import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; +import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; + +/// @notice A basic ERC20 compatible token contract with burn and minting roles. +/// @dev The constructor has been modified to support the deployment pattern used by a factory contract. +/// @dev The total supply can be limited during deployment. +contract FactoryBurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Burnable, Ownable2StepMsgSender { + using EnumerableSet for EnumerableSet.AddressSet; + + error SenderNotMinter(address sender); + error SenderNotBurner(address sender); + error MaxSupplyExceeded(uint256 supplyAfterMint); + + event MintAccessGranted(address minter); + event BurnAccessGranted(address burner); + event MintAccessRevoked(address minter); + event BurnAccessRevoked(address burner); + event CCIPAdminTransferred(address indexed previousAdmin, address indexed newAdmin); + + /// @dev The number of decimals for the token + uint8 internal immutable i_decimals; + + /// @dev The maximum supply of the token, 0 if unlimited + uint256 internal immutable i_maxSupply; + + /// @dev the CCIPAdmin can be used to register with the CCIP token admin registry, but has no other special powers, + /// and can only be transferred by the owner. + address internal s_ccipAdmin; + + /// @dev the allowed minter addresses + EnumerableSet.AddressSet internal s_minters; + /// @dev the allowed burner addresses + EnumerableSet.AddressSet internal s_burners; + + /// @dev the underscores in parameter names are used to suppress compiler warnings about shadowing ERC20 functions + constructor( + string memory name, + string memory symbol, + uint8 decimals_, + uint256 maxSupply_, + uint256 preMint, + address newOwner + ) ERC20(name, symbol) { + i_decimals = decimals_; + i_maxSupply = maxSupply_; + + s_ccipAdmin = newOwner; + + // Mint the initial supply to the new Owner, saving gas by not calling if the mint amount is zero + if (preMint != 0) _mint(newOwner, preMint); + + // Grant the deployer the minter and burner roles. This contract is expected to be deployed by a factory + // contract that will transfer ownership to the correct address after deployment, so granting minting and burning + // privileges here saves gas by not requiring two transactions. + grantMintRole(newOwner); + grantBurnRole(newOwner); + } + + /// @inheritdoc IERC165 + function supportsInterface( + bytes4 interfaceId + ) public pure virtual override returns (bool) { + return interfaceId == type(IERC20).interfaceId || interfaceId == type(IBurnMintERC20).interfaceId + || interfaceId == type(IERC165).interfaceId || interfaceId == type(IOwnable).interfaceId + || interfaceId == type(IGetCCIPAdmin).interfaceId; + } + + // ================================================================ + // │ ERC20 │ + // ================================================================ + + /// @dev Returns the number of decimals used in its user representation. + function decimals() public view virtual override returns (uint8) { + return i_decimals; + } + + /// @dev Returns the max supply of the token, 0 if unlimited. + function maxSupply() public view virtual returns (uint256) { + return i_maxSupply; + } + + /// @dev Uses OZ ERC20 _transfer to disallow sending to address(0). + /// @dev Disallows sending to address(this) + function _transfer(address from, address to, uint256 amount) internal virtual override validAddress(to) { + super._transfer(from, to, amount); + } + + /// @dev Uses OZ ERC20 _approve to disallow approving for address(0). + /// @dev Disallows approving for address(this) + function _approve(address owner, address spender, uint256 amount) internal virtual override validAddress(spender) { + super._approve(owner, spender, amount); + } + + /// @dev Exists to be backwards compatible with the older naming convention. + /// @param spender the account being approved to spend on the users' behalf. + /// @param subtractedValue the amount being removed from the approval. + /// @return success Bool to return if the approval was successfully decreased. + function decreaseApproval(address spender, uint256 subtractedValue) external returns (bool success) { + return decreaseAllowance(spender, subtractedValue); + } + + /// @dev Exists to be backwards compatible with the older naming convention. + /// @param spender the account being approved to spend on the users' behalf. + /// @param addedValue the amount being added to the approval. + function increaseApproval(address spender, uint256 addedValue) external { + increaseAllowance(spender, addedValue); + } + + // ================================================================ + // │ Burning & minting │ + // ================================================================ + + /// @inheritdoc ERC20Burnable + /// @dev Uses OZ ERC20 _burn to disallow burning from address(0). + /// @dev Decreases the total supply. + function burn( + uint256 amount + ) public override(IBurnMintERC20, ERC20Burnable) onlyBurner { + super.burn(amount); + } + + /// @inheritdoc IBurnMintERC20 + /// @dev Alias for BurnFrom for compatibility with the older naming convention. + /// @dev Uses burnFrom for all validation & logic. + function burn(address account, uint256 amount) public virtual override { + burnFrom(account, amount); + } + + /// @inheritdoc ERC20Burnable + /// @dev Uses OZ ERC20 _burn to disallow burning from address(0). + /// @dev Decreases the total supply. + function burnFrom(address account, uint256 amount) public override(IBurnMintERC20, ERC20Burnable) onlyBurner { + super.burnFrom(account, amount); + } + + /// @inheritdoc IBurnMintERC20 + /// @dev Uses OZ ERC20 _mint to disallow minting to address(0). + /// @dev Disallows minting to address(this) + /// @dev Increases the total supply. + function mint(address account, uint256 amount) external override onlyMinter validAddress(account) { + if (i_maxSupply != 0 && totalSupply() + amount > i_maxSupply) revert MaxSupplyExceeded(totalSupply() + amount); + + _mint(account, amount); + } + + // ================================================================ + // │ Roles │ + // ================================================================ + + /// @notice grants both mint and burn roles to `burnAndMinter`. + /// @dev calls public functions so this function does not require + /// access controls. This is handled in the inner functions. + function grantMintAndBurnRoles( + address burnAndMinter + ) external { + grantMintRole(burnAndMinter); + grantBurnRole(burnAndMinter); + } + + /// @notice Grants mint role to the given address. + /// @dev only the owner can call this function. + function grantMintRole( + address minter + ) public onlyOwner { + if (s_minters.add(minter)) { + emit MintAccessGranted(minter); + } + } + + /// @notice Grants burn role to the given address. + /// @dev only the owner can call this function. + /// @param burner the address to grant the burner role to + function grantBurnRole( + address burner + ) public onlyOwner { + if (s_burners.add(burner)) { + emit BurnAccessGranted(burner); + } + } + + /// @notice Revokes mint role for the given address. + /// @dev only the owner can call this function. + /// @param minter the address to revoke the mint role from. + function revokeMintRole( + address minter + ) external onlyOwner { + if (s_minters.remove(minter)) { + emit MintAccessRevoked(minter); + } + } + + /// @notice Revokes burn role from the given address. + /// @dev only the owner can call this function + /// @param burner the address to revoke the burner role from + function revokeBurnRole( + address burner + ) external onlyOwner { + if (s_burners.remove(burner)) { + emit BurnAccessRevoked(burner); + } + } + + /// @notice Returns all permissioned minters + function getMinters() external view returns (address[] memory) { + return s_minters.values(); + } + + /// @notice Returns all permissioned burners + function getBurners() external view returns (address[] memory) { + return s_burners.values(); + } + + /// @notice Returns the current CCIPAdmin + function getCCIPAdmin() external view returns (address) { + return s_ccipAdmin; + } + + /// @notice Transfers the CCIPAdmin role to a new address + /// @dev only the owner can call this function, NOT the current ccipAdmin, and 1-step ownership transfer is used. + /// @param newAdmin The address to transfer the CCIPAdmin role to. Setting to address(0) is a valid way to revoke + /// the role + function setCCIPAdmin( + address newAdmin + ) public onlyOwner { + address currentAdmin = s_ccipAdmin; + + s_ccipAdmin = newAdmin; + + emit CCIPAdminTransferred(currentAdmin, newAdmin); + } + + // ================================================================ + // │ Access │ + // ================================================================ + + /// @notice Checks whether a given address is a minter for this token. + /// @return true if the address is allowed to mint. + function isMinter( + address minter + ) public view returns (bool) { + return s_minters.contains(minter); + } + + /// @notice Checks whether a given address is a burner for this token. + /// @return true if the address is allowed to burn. + function isBurner( + address burner + ) public view returns (bool) { + return s_burners.contains(burner); + } + + /// @notice Checks whether the msg.sender is a permissioned minter for this token + /// @dev Reverts with a SenderNotMinter if the check fails + modifier onlyMinter() { + if (!isMinter(msg.sender)) revert SenderNotMinter(msg.sender); + _; + } + + /// @notice Checks whether the msg.sender is a permissioned burner for this token + /// @dev Reverts with a SenderNotBurner if the check fails + modifier onlyBurner() { + if (!isBurner(msg.sender)) revert SenderNotBurner(msg.sender); + _; + } + + /// @notice Check if recipient is valid (not this contract address). + /// @param recipient the account we transfer/approve to. + /// @dev Reverts with an empty revert to be compatible with the existing link token when + /// the recipient is this contract address. + modifier validAddress( + address recipient + ) virtual { + // solhint-disable-next-line reason-string, gas-custom-errors + if (recipient == address(this)) revert(); + _; + } +} diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol new file mode 100644 index 0000000000..94beff704a --- /dev/null +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol @@ -0,0 +1,310 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity 0.8.24; + +import {IOwnable} from "../../../shared/interfaces/IOwnable.sol"; +import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol"; +import {ITokenAdminRegistry} from "../../interfaces/ITokenAdminRegistry.sol"; + +import {RateLimiter} from "../../libraries/RateLimiter.sol"; +import {TokenPool} from "../../pools/TokenPool.sol"; +import {RegistryModuleOwnerCustom} from "../RegistryModuleOwnerCustom.sol"; +import {FactoryBurnMintERC20} from "./FactoryBurnMintERC20.sol"; + +import {Create2} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; + +/// @notice A contract for deploying new tokens and token pools, and configuring them with the token admin registry +/// @dev At the end of the transaction, the ownership transfer process will begin, but the user must accept the +/// ownership transfer in a separate transaction. +/// @dev The address prediction mechanism is only capable of deploying and predicting addresses for EVM based chains. +/// adding compatibility for other chains will require additional offchain computation. +contract TokenPoolFactory is ITypeAndVersion { + using Create2 for bytes32; + + event RemoteChainConfigUpdated(uint64 indexed remoteChainSelector, RemoteChainConfig remoteChainConfig); + + error InvalidZeroAddress(); + + /// @notice The type of pool to deploy. Types may be expanded in future versions + enum PoolType { + BURN_MINT, + LOCK_RELEASE + } + + /// @dev This struct will only ever exist in memory and as calldata, and therefore does not need to be efficiently packed for storage. The struct is used to pass information to the create2 address generation function. + struct RemoteTokenPoolInfo { + uint64 remoteChainSelector; // The CCIP specific selector for the remote chain + bytes remotePoolAddress; // The address of the remote pool to either deploy or use as is. If empty, address + // will be predicted + bytes remotePoolInitCode; // Remote pool creation code if it needs to be deployed, without constructor params + // appended to the end. + RemoteChainConfig remoteChainConfig; // The addresses of the remote RMNProxy, Router, factory, and token + // decimals which are needed for determining the remote address + PoolType poolType; // The type of pool to deploy, either Burn/Mint or Lock/Release + bytes remoteTokenAddress; // EVM address for remote token. If empty, the address will be predicted + bytes remoteTokenInitCode; // The init code to be deployed on the remote chain and includes constructor params + RateLimiter.Config rateLimiterConfig; // Token Pool rate limit. Values will be applied on incoming an outgoing messages + } + + // solhint-disable-next-line gas-struct-packing + struct RemoteChainConfig { + address remotePoolFactory; // The factory contract on the remote chain which will make the deployment + address remoteRouter; // The router on the remote chain + address remoteRMNProxy; // The RMNProxy contract on the remote chain + uint8 remoteTokenDecimals; // The number of decimals for the token on the remote chain + } + + string public constant typeAndVersion = "TokenPoolFactory 1.5.1"; + + ITokenAdminRegistry private immutable i_tokenAdminRegistry; + RegistryModuleOwnerCustom private immutable i_registryModuleOwnerCustom; + + address private immutable i_rmnProxy; + address private immutable i_ccipRouter; + + /// @notice Construct the TokenPoolFactory + /// @param tokenAdminRegistry The address of the token admin registry + /// @param tokenAdminModule The address of the token admin module which can register the token via ownership module + /// @param rmnProxy The address of the RMNProxy contract token pools will be deployed with + /// @param ccipRouter The address of the CCIPRouter contract token pools will be deployed with + constructor( + ITokenAdminRegistry tokenAdminRegistry, + RegistryModuleOwnerCustom tokenAdminModule, + address rmnProxy, + address ccipRouter + ) { + if ( + address(tokenAdminRegistry) == address(0) || address(tokenAdminModule) == address(0) || rmnProxy == address(0) + || ccipRouter == address(0) + ) revert InvalidZeroAddress(); + + i_tokenAdminRegistry = ITokenAdminRegistry(tokenAdminRegistry); + i_registryModuleOwnerCustom = RegistryModuleOwnerCustom(tokenAdminModule); + i_rmnProxy = rmnProxy; + i_ccipRouter = ccipRouter; + } + + // ================================================================ + // │ Top-Level Deployment │ + // ================================================================ + + /// @notice Deploys a token and token pool with the given token information and configures it with remote token pools + /// @dev The token and token pool are deployed in the same transaction, and the token pool is configured with the + /// remote token pools. The token pool is then set in the token admin registry. Ownership of the everything is transferred + /// to the msg.sender, but must be accepted in a separate transaction due to 2-step ownership transfer. + /// @param remoteTokenPools An array of remote token pools info to be used in the pool's applyChainUpdates function + /// or to be predicted if the pool has not been deployed yet on the remote chain + /// @param localTokenDecimals The amount of decimals to be used in the new token. Since decimals() is not part of the + /// the ERC20 standard, and thus cannot be certain to exist, the amount must be supplied via user input. + /// @param tokenInitCode The creation code for the token, which includes the constructor parameters already appended + /// @param tokenPoolInitCode The creation code for the token pool, without the constructor parameters appended + /// @param salt The salt to be used in the create2 deployment of the token and token pool to ensure a unique address + /// @return token The address of the token that was deployed + /// @return pool The address of the token pool that was deployed + function deployTokenAndTokenPool( + RemoteTokenPoolInfo[] calldata remoteTokenPools, + uint8 localTokenDecimals, + bytes memory tokenInitCode, + bytes calldata tokenPoolInitCode, + bytes32 salt + ) external returns (address, address) { + // Ensure a unique deployment between senders even if the same input parameter is used to prevent + // DOS/front running attacks + salt = keccak256(abi.encodePacked(salt, msg.sender)); + + // Deploy the token. The constructor parameters are already provided in the tokenInitCode + address token = Create2.deploy(0, salt, tokenInitCode); + + // Deploy the token pool + address pool = + _createTokenPool(token, localTokenDecimals, remoteTokenPools, tokenPoolInitCode, salt, PoolType.BURN_MINT); + + // Grant the mint and burn roles to the pool for the token + FactoryBurnMintERC20(token).grantMintAndBurnRoles(pool); + + // Set the token pool for token in the token admin registry since this contract is the token and pool owner + _setTokenPoolInTokenAdminRegistry(token, pool); + + // Begin the 2 step ownership transfer of the newly deployed token to the msg.sender + IOwnable(token).transferOwnership(msg.sender); + + return (token, pool); + } + + /// @notice Deploys a token pool with an existing ERC20 token + /// @dev Since the token already exists, this contract is not the owner and therefore cannot configure the + /// token pool in the token admin registry in the same transaction. The user must invoke the calls to the + /// tokenAdminRegistry manually + /// @dev since the token already exists, the owner must grant the mint and burn roles to the pool manually + /// @param token The address of the existing token to be used in the token pool + /// @param localTokenDecimals The amount of decimals used in the existing token. Since decimals() is not part of the + /// the ERC20 standard, and thus cannot be certain to exist, the amount must be supplied via user input. + /// @param remoteTokenPools An array of remote token pools info to be used in the pool's applyChainUpdates function + /// @param tokenPoolInitCode The creation code for the token pool + /// @param salt The salt to be used in the create2 deployment of the token pool + /// @return poolAddress The address of the token pool that was deployed + function deployTokenPoolWithExistingToken( + address token, + uint8 localTokenDecimals, + RemoteTokenPoolInfo[] calldata remoteTokenPools, + bytes calldata tokenPoolInitCode, + bytes32 salt, + PoolType poolType + ) external returns (address poolAddress) { + // Ensure a unique deployment between senders even if the same input parameter is used to prevent + // DOS/front running attacks + salt = keccak256(abi.encodePacked(salt, msg.sender)); + + // create the token pool and return the address + return _createTokenPool(token, localTokenDecimals, remoteTokenPools, tokenPoolInitCode, salt, poolType); + } + + // ================================================================ + // │ Pool Deployment/Configuration │ + // ================================================================ + + /// @notice Deploys a token pool with the given token information and remote token pools + /// @param token The token to be used in the token pool + /// @param remoteTokenPools An array of remote token pools info to be used in the pool's applyChainUpdates function + /// @param tokenPoolInitCode The creation code for the token pool + /// @param salt The salt to be used in the create2 deployment of the token pool + /// @return poolAddress The address of the token pool that was deployed + function _createTokenPool( + address token, + uint8 localTokenDecimals, + RemoteTokenPoolInfo[] calldata remoteTokenPools, + bytes calldata tokenPoolInitCode, + bytes32 salt, + PoolType poolType + ) private returns (address) { + // Create an array of chain updates to apply to the token pool + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](remoteTokenPools.length); + + RemoteTokenPoolInfo memory remoteTokenPool; + for (uint256 i = 0; i < remoteTokenPools.length; ++i) { + remoteTokenPool = remoteTokenPools[i]; + + // If the user provides an empty byte string, indicated no token has already been deployed, + // then the address of the token needs to be predicted. Otherwise the address provided will be used. + if (remoteTokenPool.remoteTokenAddress.length == 0) { + // The user must provide the initCode for the remote token, so its address can be predicted correctly. It's + // provided in the remoteTokenInitCode field for the remoteTokenPool + remoteTokenPool.remoteTokenAddress = abi.encode( + salt.computeAddress( + keccak256(remoteTokenPool.remoteTokenInitCode), remoteTokenPool.remoteChainConfig.remotePoolFactory + ) + ); + } + + // If the user provides an empty byte string parameter, indicating the pool has not been deployed yet, + // the address of the pool should be predicted. Otherwise use the provided address. + if (remoteTokenPool.remotePoolAddress.length == 0) { + // Address is predicted based on the init code hash and the deployer, so the hash must first be computed + // using the initCode and a concatenated set of constructor parameters. + bytes32 remotePoolInitcodeHash = _generatePoolInitcodeHash( + remoteTokenPool.remotePoolInitCode, + remoteTokenPool.remoteChainConfig, + abi.decode(remoteTokenPool.remoteTokenAddress, (address)), + remoteTokenPool.poolType + ); + + // Abi encode the computed remote address so it can be used as bytes in the chain update + remoteTokenPool.remotePoolAddress = + abi.encode(salt.computeAddress(remotePoolInitcodeHash, remoteTokenPool.remoteChainConfig.remotePoolFactory)); + } + + bytes[] memory remotePoolAddresses = new bytes[](1); + remotePoolAddresses[0] = remoteTokenPool.remotePoolAddress; + + chainUpdates[i] = TokenPool.ChainUpdate({ + remoteChainSelector: remoteTokenPool.remoteChainSelector, + remotePoolAddresses: remotePoolAddresses, + remoteTokenAddress: remoteTokenPool.remoteTokenAddress, + outboundRateLimiterConfig: remoteTokenPool.rateLimiterConfig, + inboundRateLimiterConfig: remoteTokenPool.rateLimiterConfig + }); + } + + // Construct the initArgs for the token pool using the immutable contracts for CCIP on the local chain + bytes memory tokenPoolInitArgs; + if (poolType == PoolType.BURN_MINT) { + tokenPoolInitArgs = abi.encode(token, localTokenDecimals, new address[](0), i_rmnProxy, i_ccipRouter); + } else if (poolType == PoolType.LOCK_RELEASE) { + // Lock/Release pools have an additional boolean constructor parameter that must be accounted for, acceptLiquidity, + // which is set to true by default in this case. Users wishing to set it to false must deploy the pool manually. + tokenPoolInitArgs = abi.encode(token, localTokenDecimals, new address[](0), i_rmnProxy, true, i_ccipRouter); + } + + // Construct the deployment code from the initCode and the initArgs and then deploy + address poolAddress = Create2.deploy(0, salt, abi.encodePacked(tokenPoolInitCode, tokenPoolInitArgs)); + + // Apply the chain updates to the token pool + TokenPool(poolAddress).applyChainUpdates(new uint64[](0), chainUpdates); + + // Begin the 2 step ownership transfer of the token pool to the msg.sender. + IOwnable(poolAddress).transferOwnership(address(msg.sender)); // 2 step ownership transfer + + return poolAddress; + } + + /// @notice Generates the hash of the init code the pool will be deployed with + /// @dev The init code hash is used with Create2 to predict the address of the pool on the remote chain + /// @dev ABI-encoding limitations prevent arbitrary constructor parameters from being used, so pool type must be + /// restricted to those with known types in the constructor. This function should be updated if new pool types are needed. + /// @param initCode The init code of the pool + /// @param remoteChainConfig The remote chain config for the pool + /// @param remoteTokenAddress The address of the remote token + /// @param poolType The type of pool to deploy + /// @return bytes32 hash of the init code to be used in the deterministic address calculation + function _generatePoolInitcodeHash( + bytes memory initCode, + RemoteChainConfig memory remoteChainConfig, + address remoteTokenAddress, + PoolType poolType + ) private pure returns (bytes32) { + if (poolType == PoolType.BURN_MINT) { + return keccak256( + abi.encodePacked( + initCode, + // constructor(address token, uint8 localTokenDecimals, address[] allowlist, address rmnProxy, address router) + abi.encode( + remoteTokenAddress, + remoteChainConfig.remoteTokenDecimals, + new address[](0), + remoteChainConfig.remoteRMNProxy, + remoteChainConfig.remoteRouter + ) + ) + ); + } else { + // if poolType is PoolType.LOCK_RELEASE, but may be expanded in future versions + return keccak256( + abi.encodePacked( + initCode, + // constructor(address token, uint8 localTokenDecimals, address[] allowList, address rmnProxy, bool acceptLiquidity, address router) + abi.encode( + remoteTokenAddress, + remoteChainConfig.remoteTokenDecimals, + new address[](0), + remoteChainConfig.remoteRMNProxy, + true, + remoteChainConfig.remoteRouter + ) + ) + ); + } + } + + /// @notice Sets the token pool address in the token admin registry for a newly deployed token pool. + /// @dev this function should only be called when the token is deployed by this contract as well, otherwise + /// the token pool will not be able to be set in the token admin registry, and this function will revert. + /// @param token The address of the token to set the pool for + /// @param pool The address of the pool to set in the token admin registry + function _setTokenPoolInTokenAdminRegistry(address token, address pool) private { + i_registryModuleOwnerCustom.registerAdminViaOwner(token); + i_tokenAdminRegistry.acceptAdminRole(token); + i_tokenAdminRegistry.setPool(token, pool); + + // Begin the 2 admin transfer process which must be accepted in a separate tx. + i_tokenAdminRegistry.transferAdminRole(token, msg.sender); + } +} diff --git a/contracts/src/v0.8/liquiditymanager/test/LiquidityManager.t.sol b/contracts/src/v0.8/liquiditymanager/test/LiquidityManager.t.sol index 73c9ba7445..3a97e866a1 100644 --- a/contracts/src/v0.8/liquiditymanager/test/LiquidityManager.t.sol +++ b/contracts/src/v0.8/liquiditymanager/test/LiquidityManager.t.sol @@ -57,7 +57,7 @@ contract LiquidityManagerSetup is LiquidityManagerBaseTest { LiquidityManagerBaseTest.setUp(); s_bridgeAdapter = new MockL1BridgeAdapter(s_l1Token, false); - s_lockReleaseTokenPool = new LockReleaseTokenPool(s_l1Token, new address[](0), address(1), true, address(123)); + s_lockReleaseTokenPool = new LockReleaseTokenPool(s_l1Token, 18, new address[](0), address(1), true, address(123)); s_liquidityManager = new LiquidityManagerHelper( s_l1Token, i_localChainSelector, @@ -71,6 +71,7 @@ contract LiquidityManagerSetup is LiquidityManagerBaseTest { s_wethBridgeAdapter = new MockL1BridgeAdapter(IERC20(address(s_l1Weth)), true); s_wethLockReleaseTokenPool = new LockReleaseTokenPool( IERC20(address(s_l1Weth)), + 18, new address[](0), address(1), true, @@ -272,6 +273,7 @@ contract LiquidityManager_rebalanceLiquidity is LiquidityManagerSetup { MockL1BridgeAdapter remoteBridgeAdapter = new MockL1BridgeAdapter(s_l2Token, false); LockReleaseTokenPool remotePool = new LockReleaseTokenPool( s_l2Token, + 18, new address[](0), address(1), true, @@ -401,6 +403,7 @@ contract LiquidityManager_rebalanceLiquidity is LiquidityManagerSetup { MockL1BridgeAdapter remoteBridgeAdapter = new MockL1BridgeAdapter(s_l2Token, false); LockReleaseTokenPool remotePool = new LockReleaseTokenPool( s_l2Token, + 18, new address[](0), address(1), true, @@ -522,6 +525,7 @@ contract LiquidityManager_rebalanceLiquidity is LiquidityManagerSetup { MockL1BridgeAdapter remoteBridgeAdapter = new MockL1BridgeAdapter(IERC20(address(s_l2Weth)), true); LockReleaseTokenPool remotePool = new LockReleaseTokenPool( IERC20(address(s_l2Weth)), + 18, new address[](0), address(1), true, @@ -817,6 +821,7 @@ contract LiquidityManager_setLocalLiquidityContainer is LiquidityManagerSetup { function test_setLocalLiquidityContainerSuccess() external { LockReleaseTokenPool newPool = new LockReleaseTokenPool( s_l1Token, + 18, new address[](0), address(1), true, diff --git a/contracts/src/v0.8/shared/access/AuthorizedCallers.sol b/contracts/src/v0.8/shared/access/AuthorizedCallers.sol index 93102d1a97..8c54d7bac8 100644 --- a/contracts/src/v0.8/shared/access/AuthorizedCallers.sol +++ b/contracts/src/v0.8/shared/access/AuthorizedCallers.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BUSL-1.1 -pragma solidity ^0.8.0; +pragma solidity ^0.8.4; import {OwnerIsCreator} from "./OwnerIsCreator.sol"; import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; diff --git a/contracts/src/v0.8/shared/access/Ownable2Step.sol b/contracts/src/v0.8/shared/access/Ownable2Step.sol new file mode 100644 index 0000000000..5eac576072 --- /dev/null +++ b/contracts/src/v0.8/shared/access/Ownable2Step.sol @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {IOwnable} from "../interfaces/IOwnable.sol"; + +/// @notice A minimal contract that implements 2-step ownership transfer and nothing more. It's made to be minimal +/// to reduce the impact of the bytecode size on any contract that inherits from it. +contract Ownable2Step is IOwnable { + /// @notice The pending owner is the address to which ownership may be transferred. + address private s_pendingOwner; + /// @notice The owner is the current owner of the contract. + /// @dev The owner is the second storage variable so any implementing contract could pack other state with it + /// instead of the much less used s_pendingOwner. + address private s_owner; + + error OwnerCannotBeZero(); + error MustBeProposedOwner(); + error CannotTransferToSelf(); + error OnlyCallableByOwner(); + + event OwnershipTransferRequested(address indexed from, address indexed to); + event OwnershipTransferred(address indexed from, address indexed to); + + constructor(address newOwner, address pendingOwner) { + if (newOwner == address(0)) { + revert OwnerCannotBeZero(); + } + + s_owner = newOwner; + if (pendingOwner != address(0)) { + _transferOwnership(pendingOwner); + } + } + + /// @notice Get the current owner + function owner() public view override returns (address) { + return s_owner; + } + + /// @notice Allows an owner to begin transferring ownership to a new address. The new owner needs to call + /// `acceptOwnership` to accept the transfer before any permissions are changed. + /// @param to The address to which ownership will be transferred. + function transferOwnership(address to) public override onlyOwner { + _transferOwnership(to); + } + + /// @notice validate, transfer ownership, and emit relevant events + /// @param to The address to which ownership will be transferred. + function _transferOwnership(address to) private { + if (to == msg.sender) { + revert CannotTransferToSelf(); + } + + s_pendingOwner = to; + + emit OwnershipTransferRequested(s_owner, to); + } + + /// @notice Allows an ownership transfer to be completed by the recipient. + function acceptOwnership() external override { + if (msg.sender != s_pendingOwner) { + revert MustBeProposedOwner(); + } + + address oldOwner = s_owner; + s_owner = msg.sender; + s_pendingOwner = address(0); + + emit OwnershipTransferred(oldOwner, msg.sender); + } + + /// @notice validate access + function _validateOwnership() internal view { + if (msg.sender != s_owner) { + revert OnlyCallableByOwner(); + } + } + + /// @notice Reverts if called by anyone other than the contract owner. + modifier onlyOwner() { + _validateOwnership(); + _; + } +} diff --git a/contracts/src/v0.8/shared/access/Ownable2StepMsgSender.sol b/contracts/src/v0.8/shared/access/Ownable2StepMsgSender.sol new file mode 100644 index 0000000000..b3de785a70 --- /dev/null +++ b/contracts/src/v0.8/shared/access/Ownable2StepMsgSender.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {Ownable2Step} from "./Ownable2Step.sol"; + +/// @notice Sets the msg.sender to be the owner of the contract and does not set a pending owner. +contract Ownable2StepMsgSender is Ownable2Step { + constructor() Ownable2Step(msg.sender, address(0)) {} +} diff --git a/contracts/src/v0.8/shared/test/BaseTest.t.sol b/contracts/src/v0.8/shared/test/BaseTest.t.sol index 4d8ef60eb2..b2e9afcd35 100644 --- a/contracts/src/v0.8/shared/test/BaseTest.t.sol +++ b/contracts/src/v0.8/shared/test/BaseTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity 0.8.24; import "forge-std/Test.sol"; diff --git a/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol b/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol index 34ae6848a4..54f74fbf16 100644 --- a/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol +++ b/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity 0.8.24; import {AuthorizedCallers} from "../../access/AuthorizedCallers.sol"; import {BaseTest} from "../BaseTest.t.sol"; diff --git a/contracts/src/v0.8/shared/test/access/Ownable2Step.t.sol b/contracts/src/v0.8/shared/test/access/Ownable2Step.t.sol new file mode 100644 index 0000000000..0421d647c5 --- /dev/null +++ b/contracts/src/v0.8/shared/test/access/Ownable2Step.t.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BaseTest} from "../BaseTest.t.sol"; +import {Ownable2Step} from "../../access/Ownable2Step.sol"; + +contract Ownable2Step_setup is BaseTest { + Ownable2StepHelper internal s_ownable2Step; + + function setUp() public override { + super.setUp(); + s_ownable2Step = new Ownable2StepHelper(OWNER, address(0)); + } +} + +contract Ownable2Step_constructor is Ownable2Step_setup { + function test_constructor_success() public view { + assertEq(OWNER, s_ownable2Step.owner()); + } + + function test_constructor_OwnerCannotBeZero_reverts() public { + vm.expectRevert(Ownable2Step.OwnerCannotBeZero.selector); + new Ownable2Step(address(0), address(0)); + } +} + +contract Ownable2Step_transferOwnership is Ownable2Step_setup { + function test_transferOwnership_success() public { + vm.expectEmit(); + emit Ownable2Step.OwnershipTransferRequested(OWNER, STRANGER); + + s_ownable2Step.transferOwnership(STRANGER); + + assertTrue(STRANGER != s_ownable2Step.owner()); + + vm.startPrank(STRANGER); + s_ownable2Step.acceptOwnership(); + } + + function test_transferOwnership_CannotTransferToSelf_reverts() public { + vm.expectRevert(Ownable2Step.CannotTransferToSelf.selector); + s_ownable2Step.transferOwnership(OWNER); + } +} + +contract Ownable2Step_acceptOwnership is Ownable2Step_setup { + function test_acceptOwnership_success() public { + s_ownable2Step.transferOwnership(STRANGER); + + assertTrue(STRANGER != s_ownable2Step.owner()); + + vm.startPrank(STRANGER); + + vm.expectEmit(); + emit Ownable2Step.OwnershipTransferred(OWNER, STRANGER); + + s_ownable2Step.acceptOwnership(); + + assertEq(STRANGER, s_ownable2Step.owner()); + } + + function test_acceptOwnership_MustBeProposedOwner_reverts() public { + vm.expectRevert(Ownable2Step.MustBeProposedOwner.selector); + s_ownable2Step.acceptOwnership(); + } +} + +contract Ownable2StepHelper is Ownable2Step { + constructor(address newOwner, address pendingOwner) Ownable2Step(newOwner, pendingOwner) {} + + function validateOwnership() external view { + _validateOwnership(); + } +} + +contract Ownable2Step_onlyOwner is Ownable2Step_setup { + function test_onlyOwner_success() public view { + s_ownable2Step.validateOwnership(); + } + + function test_onlyOwner_OnlyCallableByOwner_reverts() public { + vm.stopPrank(); + + vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); + s_ownable2Step.validateOwnership(); + } +} diff --git a/contracts/src/v0.8/shared/test/call/CallWithExactGas.t.sol b/contracts/src/v0.8/shared/test/call/CallWithExactGas.t.sol index 3623cb8b12..b432de58a5 100644 --- a/contracts/src/v0.8/shared/test/call/CallWithExactGas.t.sol +++ b/contracts/src/v0.8/shared/test/call/CallWithExactGas.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity 0.8.24; import {CallWithExactGas} from "../../call/CallWithExactGas.sol"; import {CallWithExactGasHelper} from "./CallWithExactGasHelper.sol"; diff --git a/contracts/src/v0.8/shared/test/call/CallWithExactGasHelper.sol b/contracts/src/v0.8/shared/test/call/CallWithExactGasHelper.sol index 932315639b..0ba8602e08 100644 --- a/contracts/src/v0.8/shared/test/call/CallWithExactGasHelper.sol +++ b/contracts/src/v0.8/shared/test/call/CallWithExactGasHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.4; import {CallWithExactGas} from "../../call/CallWithExactGas.sol"; diff --git a/contracts/src/v0.8/shared/test/enumerable/EnumerableMapAddresses.t.sol b/contracts/src/v0.8/shared/test/enumerable/EnumerableMapAddresses.t.sol index 097e79e372..689657105e 100644 --- a/contracts/src/v0.8/shared/test/enumerable/EnumerableMapAddresses.t.sol +++ b/contracts/src/v0.8/shared/test/enumerable/EnumerableMapAddresses.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity 0.8.24; import {BaseTest} from "../BaseTest.t.sol"; import {EnumerableMapAddresses} from "../../enumerable/EnumerableMapAddresses.sol"; diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.approve.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.approve.t.sol new file mode 100644 index 0000000000..d328eec843 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.approve.t.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; + +contract BurnMintERC20_approve is BurnMintERC20Setup { + function test_approve() public { + uint256 balancePre = s_burnMintERC20.balanceOf(STRANGER); + uint256 sendingAmount = s_amount / 2; + + s_burnMintERC20.approve(STRANGER, sendingAmount); + + uint256 ownerBalancePre = s_burnMintERC20.balanceOf(OWNER); + + changePrank(STRANGER); + + s_burnMintERC20.transferFrom(OWNER, STRANGER, sendingAmount); + + assertEq(sendingAmount + balancePre, s_burnMintERC20.balanceOf(STRANGER)); + assertEq(ownerBalancePre - sendingAmount, s_burnMintERC20.balanceOf(OWNER)); + } + + // Reverts + + function test_approve_RevertWhen_InvalidAddress() public { + vm.expectRevert(abi.encodeWithSelector(BurnMintERC20.InvalidRecipient.selector, address(s_burnMintERC20))); + + s_burnMintERC20.approve(address(s_burnMintERC20), s_amount); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burn.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burn.t.sol new file mode 100644 index 0000000000..75fa6e7337 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burn.t.sol @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {IERC20} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {Strings} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Strings.sol"; + +contract BurnMintERC20_burn is BurnMintERC20Setup { + function test_BasicBurn() public { + s_burnMintERC20.grantRole(s_burnMintERC20.BURNER_ROLE(), OWNER); + deal(address(s_burnMintERC20), OWNER, s_amount); + + vm.expectEmit(); + emit IERC20.Transfer(OWNER, address(0), s_amount); + + s_burnMintERC20.burn(s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Revert + + function test_burn_RevertWhen_SenderNotBurner() public { + // OZ Access Control v4.8.3 inherited by BurnMintERC20 does not use custom errors, but the revert message is still useful + // and should be checked + vm.expectRevert( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(OWNER), + " is missing role ", + Strings.toHexString(uint256(s_burnMintERC20.BURNER_ROLE()), 32) + ) + ); + + s_burnMintERC20.burnFrom(STRANGER, s_amount); + } + + function test_burn_RevertWhen_ExceedsBalance() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burn(s_amount * 2); + } + + function test_burn_RevertWhen_BurnFromZeroAddress() public { + s_burnMintERC20.grantRole(s_burnMintERC20.BURNER_ROLE(), address(0)); + changePrank(address(0)); + + vm.expectRevert("ERC20: burn from the zero address"); + + s_burnMintERC20.burn(0); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFrom.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFrom.t.sol new file mode 100644 index 0000000000..b32d42a86e --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFrom.t.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {Strings} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Strings.sol"; + +contract BurnMintERC20_burnFrom is BurnMintERC20Setup { + function setUp() public virtual override { + BurnMintERC20Setup.setUp(); + } + + function test_BurnFrom() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + + changePrank(s_mockPool); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Reverts + + function test_burnFrom_RevertWhen_SenderNotBurner() public { + // OZ Access Control v4.8.3 inherited by BurnMintERC20 does not use custom errors, but the revert message is still useful + // and should be checked + vm.expectRevert( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(OWNER), + " is missing role ", + Strings.toHexString(uint256(s_burnMintERC20.BURNER_ROLE()), 32) + ) + ); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + } + + function test_burnFrom_RevertWhen_InsufficientAllowance() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: insufficient allowance"); + + s_burnMintERC20.burnFrom(OWNER, s_amount); + } + + function test_burnFrom_RevertWhen_ExceedsBalance() public { + s_burnMintERC20.approve(s_mockPool, s_amount * 2); + + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burnFrom(OWNER, s_amount * 2); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFromAlias.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFromAlias.t.sol new file mode 100644 index 0000000000..d619968b8f --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.burnFromAlias.t.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {Strings} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Strings.sol"; + +contract BurnMintERC20_burnFromAlias is BurnMintERC20Setup { + function setUp() public virtual override { + BurnMintERC20Setup.setUp(); + } + + function test_burn() public { + s_burnMintERC20.approve(s_mockPool, s_amount); + + changePrank(s_mockPool); + + s_burnMintERC20.burn(OWNER, s_amount); + + assertEq(0, s_burnMintERC20.balanceOf(OWNER)); + } + + // Reverts + + function test_burn_RevertWhen_SenderNotBurner() public { + // OZ Access Control v4.8.3 inherited by BurnMintERC20 does not use custom errors, but the revert message is still useful + // and should be checked + vm.expectRevert( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(OWNER), + " is missing role ", + Strings.toHexString(uint256(s_burnMintERC20.BURNER_ROLE()), 32) + ) + ); + + s_burnMintERC20.burn(OWNER, s_amount); + } + + function test_burn_RevertWhen_InsufficientAllowance() public { + changePrank(s_mockPool); + + vm.expectRevert("ERC20: insufficient allowance"); + + s_burnMintERC20.burn(OWNER, s_amount); + } + + function test_burn_RevertWhen_ExceedsBalance() public { + s_burnMintERC20.approve(s_mockPool, s_amount * 2); + + changePrank(s_mockPool); + + vm.expectRevert("ERC20: burn amount exceeds balance"); + + s_burnMintERC20.burn(OWNER, s_amount * 2); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.ccipGetAdmin.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.ccipGetAdmin.t.sol new file mode 100644 index 0000000000..25b9fa8f2d --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.ccipGetAdmin.t.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +contract BurnMintERC20_getCCIPAdmin is BurnMintERC20Setup { + function test_getCCIPAdmin() public view { + assertEq(OWNER, s_burnMintERC20.getCCIPAdmin()); + } + + function test_setCCIPAdmin() public { + address newAdmin = makeAddr("newAdmin"); + + vm.expectEmit(); + emit BurnMintERC20.CCIPAdminTransferred(OWNER, newAdmin); + + s_burnMintERC20.setCCIPAdmin(newAdmin); + + assertEq(newAdmin, s_burnMintERC20.getCCIPAdmin()); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.constructor.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.constructor.t.sol new file mode 100644 index 0000000000..b5de63b9b3 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.constructor.t.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; + +contract BurnMintERC20_constructor is BurnMintERC20Setup { + function test_Constructor() public { + vm.startPrank(s_alice); + + string memory name = "Chainlink token v2"; + string memory symbol = "LINK2"; + uint8 decimals = 19; + uint256 maxSupply = 1e33; + + s_burnMintERC20 = new BurnMintERC20(name, symbol, decimals, maxSupply, 1e18); + + assertEq(name, s_burnMintERC20.name()); + assertEq(symbol, s_burnMintERC20.symbol()); + assertEq(decimals, s_burnMintERC20.decimals()); + assertEq(maxSupply, s_burnMintERC20.maxSupply()); + + assertTrue(s_burnMintERC20.hasRole(s_burnMintERC20.DEFAULT_ADMIN_ROLE(), s_alice)); + assertEq(s_burnMintERC20.balanceOf(s_alice), 1e18); + assertEq(s_burnMintERC20.totalSupply(), 1e18); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.grantMintAndBurnRoles.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.grantMintAndBurnRoles.t.sol new file mode 100644 index 0000000000..7a31d2aa07 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.grantMintAndBurnRoles.t.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {IAccessControl} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/access/IAccessControl.sol"; + +contract BurnMintERC20_grantMintAndBurnRoles is BurnMintERC20Setup { + function test_GrantMintAndBurnRoles() public { + assertFalse(s_burnMintERC20.hasRole(s_burnMintERC20.MINTER_ROLE(), STRANGER)); + assertFalse(s_burnMintERC20.hasRole(s_burnMintERC20.BURNER_ROLE(), STRANGER)); + + vm.expectEmit(); + emit IAccessControl.RoleGranted(s_burnMintERC20.MINTER_ROLE(), STRANGER, OWNER); + vm.expectEmit(); + emit IAccessControl.RoleGranted(s_burnMintERC20.BURNER_ROLE(), STRANGER, OWNER); + + s_burnMintERC20.grantMintAndBurnRoles(STRANGER); + + assertTrue(s_burnMintERC20.hasRole(s_burnMintERC20.MINTER_ROLE(), STRANGER)); + assertTrue(s_burnMintERC20.hasRole(s_burnMintERC20.BURNER_ROLE(), STRANGER)); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.mint.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.mint.t.sol new file mode 100644 index 0000000000..fd97b80fa6 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.mint.t.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {IERC20} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {Strings} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/Strings.sol"; + +contract BurnMintERC20_mint is BurnMintERC20Setup { + function test_mint() public { + uint256 balancePre = s_burnMintERC20.balanceOf(OWNER); + + s_burnMintERC20.grantMintAndBurnRoles(OWNER); + + vm.expectEmit(); + emit IERC20.Transfer(address(0), OWNER, s_amount); + + s_burnMintERC20.mint(OWNER, s_amount); + + assertEq(balancePre + s_amount, s_burnMintERC20.balanceOf(OWNER)); + } + + // Revert + + function test_mint_RevertWhen_SenderNotMinter() public { + vm.startPrank(STRANGER); + + // OZ Access Control v4.8.3 inherited by BurnMintERC20 does not use custom errors, but the revert message is still useful + // and should be checked + vm.expectRevert( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(STRANGER), + " is missing role ", + Strings.toHexString(uint256(s_burnMintERC20.MINTER_ROLE()), 32) + ) + ); + + s_burnMintERC20.mint(STRANGER, 1e18); + } + + function test_mint_RevertWhen_MaxSupplyExceeded() public { + changePrank(s_mockPool); + + // Mint max supply + s_burnMintERC20.mint(OWNER, s_burnMintERC20.maxSupply()); + + vm.expectRevert(abi.encodeWithSelector(BurnMintERC20.MaxSupplyExceeded.selector, s_burnMintERC20.maxSupply() + 1)); + + // Attempt to mint 1 more than max supply + s_burnMintERC20.mint(OWNER, 1); + } + + function test_mint_RevertWhen_InvalidRecipient() public { + s_burnMintERC20.grantMintAndBurnRoles(OWNER); + + vm.expectRevert(abi.encodeWithSelector(BurnMintERC20.InvalidRecipient.selector, address(s_burnMintERC20))); + s_burnMintERC20.mint(address(s_burnMintERC20), 1e18); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.supportsInterface.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.supportsInterface.t.sol new file mode 100644 index 0000000000..aa495d047e --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.supportsInterface.t.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {IBurnMintERC20} from "../../../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; + +import {IERC20} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {IERC165} from "../../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; + +contract BurnMintERC20_supportsInterface is BurnMintERC20Setup { + function test_SupportsInterface() public view { + assertTrue(s_burnMintERC20.supportsInterface(type(IERC20).interfaceId)); + assertTrue(s_burnMintERC20.supportsInterface(type(IBurnMintERC20).interfaceId)); + assertTrue(s_burnMintERC20.supportsInterface(type(IERC165).interfaceId)); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.transfer.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.transfer.t.sol new file mode 100644 index 0000000000..6d21e50747 --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20.transfer.t.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20Setup} from "./BurnMintERC20Setup.t.sol"; +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; + +contract BurnMintERC20_transfer is BurnMintERC20Setup { + function test_transfer() public { + uint256 balancePre = s_burnMintERC20.balanceOf(STRANGER); + uint256 sendingAmount = s_amount / 2; + + s_burnMintERC20.transfer(STRANGER, sendingAmount); + + assertEq(sendingAmount + balancePre, s_burnMintERC20.balanceOf(STRANGER)); + } + + // Reverts + + function test_transfer_RevertWhen_InvalidAddress() public { + vm.expectRevert(abi.encodeWithSelector(BurnMintERC20.InvalidRecipient.selector, address(s_burnMintERC20))); + + s_burnMintERC20.transfer(address(s_burnMintERC20), s_amount); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20Setup.t.sol b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20Setup.t.sol new file mode 100644 index 0000000000..4ba1bd410e --- /dev/null +++ b/contracts/src/v0.8/shared/test/token/ERC20/BurnMintERC20/BurnMintERC20Setup.t.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +import {BurnMintERC20} from "../../../../token/ERC20/BurnMintERC20.sol"; +import {BaseTest} from "../../../BaseTest.t.sol"; + +contract BurnMintERC20Setup is BaseTest { + BurnMintERC20 internal s_burnMintERC20; + + address internal s_mockPool = makeAddr("s_mockPool"); + uint256 internal s_amount = 1e18; + + address internal s_alice; + + function setUp() public virtual override { + BaseTest.setUp(); + + s_alice = makeAddr("alice"); + + s_burnMintERC20 = new BurnMintERC20("Chainlink Token", "LINK", 18, 1e27, 0); + + // Set s_mockPool to be a burner and minter + s_burnMintERC20.grantMintAndBurnRoles(s_mockPool); + deal(address(s_burnMintERC20), OWNER, s_amount); + } +} diff --git a/contracts/src/v0.8/shared/test/token/ERC677/BurnMintERC677.t.sol b/contracts/src/v0.8/shared/test/token/ERC677/BurnMintERC677.t.sol index 2815f99256..a778a1ada2 100644 --- a/contracts/src/v0.8/shared/test/token/ERC677/BurnMintERC677.t.sol +++ b/contracts/src/v0.8/shared/test/token/ERC677/BurnMintERC677.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity 0.8.24; import {IBurnMintERC20} from "../../../token/ERC20/IBurnMintERC20.sol"; import {IERC677} from "../../../token/ERC677/IERC677.sol"; diff --git a/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol b/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol new file mode 100644 index 0000000000..946a6623b4 --- /dev/null +++ b/contracts/src/v0.8/shared/token/ERC20/BurnMintERC20.sol @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {IGetCCIPAdmin} from "../../../ccip/interfaces/IGetCCIPAdmin.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; + +import {AccessControl} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/access/AccessControl.sol"; +import {IAccessControl} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/access/IAccessControl.sol"; +import {ERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20.sol"; +import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {ERC20Burnable} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/ERC20Burnable.sol"; +import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; + +/// @notice A basic ERC20 compatible token contract with burn and minting roles. +/// @dev The total supply can be limited during deployment. +/// @dev This contract has not been audited and is not yet approved for production use. +contract BurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Burnable, AccessControl { + error MaxSupplyExceeded(uint256 supplyAfterMint); + error InvalidRecipient(address recipient); + + event CCIPAdminTransferred(address indexed previousAdmin, address indexed newAdmin); + + /// @dev The number of decimals for the token + uint8 internal immutable i_decimals; + + /// @dev The maximum supply of the token, 0 if unlimited + uint256 internal immutable i_maxSupply; + + /// @dev the CCIPAdmin can be used to register with the CCIP token admin registry, but has no other special powers, + /// and can only be transferred by the owner. + address internal s_ccipAdmin; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); + + /// @dev the underscores in parameter names are used to suppress compiler warnings about shadowing ERC20 functions + constructor( + string memory name, + string memory symbol, + uint8 decimals_, + uint256 maxSupply_, + uint256 preMint + ) ERC20(name, symbol) { + i_decimals = decimals_; + i_maxSupply = maxSupply_; + + s_ccipAdmin = msg.sender; + + // Mint the initial supply to the new Owner, saving gas by not calling if the mint amount is zero + if (preMint != 0) _mint(msg.sender, preMint); + + // Set up the owner as the initial minter and burner + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + } + + /// @inheritdoc IERC165 + function supportsInterface(bytes4 interfaceId) public pure virtual override(AccessControl, IERC165) returns (bool) { + return + interfaceId == type(IERC20).interfaceId || + interfaceId == type(IBurnMintERC20).interfaceId || + interfaceId == type(IERC165).interfaceId || + interfaceId == type(IAccessControl).interfaceId || + interfaceId == type(IGetCCIPAdmin).interfaceId; + } + + // ================================================================ + // │ ERC20 │ + // ================================================================ + + /// @dev Returns the number of decimals used in its user representation. + function decimals() public view virtual override returns (uint8) { + return i_decimals; + } + + /// @dev Returns the max supply of the token, 0 if unlimited. + function maxSupply() public view virtual returns (uint256) { + return i_maxSupply; + } + + /// @dev Uses OZ ERC20 _transfer to disallow sending to address(0). + /// @dev Disallows sending to address(this) + function _transfer(address from, address to, uint256 amount) internal virtual override { + if (to == address(this)) revert InvalidRecipient(to); + + super._transfer(from, to, amount); + } + + /// @dev Uses OZ ERC20 _approve to disallow approving for address(0). + /// @dev Disallows approving for address(this) + function _approve(address owner, address spender, uint256 amount) internal virtual override { + if (spender == address(this)) revert InvalidRecipient(spender); + + super._approve(owner, spender, amount); + } + + // ================================================================ + // │ Burning & minting │ + // ================================================================ + + /// @inheritdoc ERC20Burnable + /// @dev Uses OZ ERC20 _burn to disallow burning from address(0). + /// @dev Decreases the total supply. + function burn(uint256 amount) public override(IBurnMintERC20, ERC20Burnable) onlyRole(BURNER_ROLE) { + super.burn(amount); + } + + /// @inheritdoc IBurnMintERC20 + /// @dev Alias for BurnFrom for compatibility with the older naming convention. + /// @dev Uses burnFrom for all validation & logic. + function burn(address account, uint256 amount) public virtual override { + burnFrom(account, amount); + } + + /// @inheritdoc ERC20Burnable + /// @dev Uses OZ ERC20 _burn to disallow burning from address(0). + /// @dev Decreases the total supply. + function burnFrom( + address account, + uint256 amount + ) public override(IBurnMintERC20, ERC20Burnable) onlyRole(BURNER_ROLE) { + super.burnFrom(account, amount); + } + + /// @inheritdoc IBurnMintERC20 + /// @dev Uses OZ ERC20 _mint to disallow minting to address(0). + /// @dev Disallows minting to address(this) + /// @dev Increases the total supply. + function mint(address account, uint256 amount) external override onlyRole(MINTER_ROLE) { + if (account == address(this)) revert InvalidRecipient(account); + if (i_maxSupply != 0 && totalSupply() + amount > i_maxSupply) revert MaxSupplyExceeded(totalSupply() + amount); + + _mint(account, amount); + } + + // ================================================================ + // │ Roles │ + // ================================================================ + + /// @notice grants both mint and burn roles to `burnAndMinter`. + /// @dev calls public functions so this function does not require + /// access controls. This is handled in the inner functions. + function grantMintAndBurnRoles(address burnAndMinter) external { + grantRole(MINTER_ROLE, burnAndMinter); + grantRole(BURNER_ROLE, burnAndMinter); + } + + /// @notice Returns the current CCIPAdmin + function getCCIPAdmin() external view returns (address) { + return s_ccipAdmin; + } + + /// @notice Transfers the CCIPAdmin role to a new address + /// @dev only the owner can call this function, NOT the current ccipAdmin, and 1-step ownership transfer is used. + /// @param newAdmin The address to transfer the CCIPAdmin role to. Setting to address(0) is a valid way to revoke + /// the role + function setCCIPAdmin(address newAdmin) public onlyRole(DEFAULT_ADMIN_ROLE) { + address currentAdmin = s_ccipAdmin; + + s_ccipAdmin = newAdmin; + + emit CCIPAdminTransferred(currentAdmin, newAdmin); + } +} diff --git a/contracts/src/v0.8/vendor/forge-std/src/Vm.sol b/contracts/src/v0.8/vendor/forge-std/src/Vm.sol index 6b1f2913cf..0f2dc50ff7 100644 --- a/contracts/src/v0.8/vendor/forge-std/src/Vm.sol +++ b/contracts/src/v0.8/vendor/forge-std/src/Vm.sol @@ -235,7 +235,7 @@ interface VmSafe { uint64 gasLimit; // The total gas used. uint64 gasTotalUsed; - // The amount of gas used for memory expansion. + // DEPRECATED: The amount of gas used for memory expansion. Ref: uint64 gasMemoryUsed; // The amount of gas refunded. int64 gasRefunded; @@ -243,6 +243,135 @@ interface VmSafe { uint64 gasRemaining; } + /// The result of the `stopDebugTraceRecording` call + struct DebugStep { + // The stack before executing the step of the run. + // stack\[0\] represents the top of the stack. + // and only stack data relevant to the opcode execution is contained. + uint256[] stack; + // The memory input data before executing the step of the run. + // only input data relevant to the opcode execution is contained. + // e.g. for MLOAD, it will have memory\[offset:offset+32\] copied here. + // the offset value can be get by the stack data. + bytes memoryInput; + // The opcode that was accessed. + uint8 opcode; + // The call depth of the step. + uint64 depth; + // Whether the call end up with out of gas error. + bool isOutOfGas; + // The contract address where the opcode is running + address contractAddr; + } + + // ======== Crypto ======== + + /// Derives a private key from the name, labels the account with that name, and returns the wallet. + function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); + + /// Generates a wallet from the private key and returns the wallet. + function createWallet(uint256 privateKey) external returns (Wallet memory wallet); + + /// Generates a wallet from the private key, labels the account with that name, and returns the wallet. + function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); + + /// Derive a private key from a provided mnenomic string (or mnenomic file path) + /// at the derivation path `m/44'/60'/0'/0/{index}`. + function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); + + /// Derive a private key from a provided mnenomic string (or mnenomic file path) + /// at `{derivationPath}{index}`. + function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) + external + pure + returns (uint256 privateKey); + + /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language + /// at the derivation path `m/44'/60'/0'/0/{index}`. + function deriveKey(string calldata mnemonic, uint32 index, string calldata language) + external + pure + returns (uint256 privateKey); + + /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language + /// at `{derivationPath}{index}`. + function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) + external + pure + returns (uint256 privateKey); + + /// Derives secp256r1 public key from the provided `privateKey`. + function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY); + + /// Adds a private key to the local forge wallet and returns the address. + function rememberKey(uint256 privateKey) external returns (address keyAddr); + + /// Derive a set number of wallets from a mnemonic at the derivation path `m/44'/60'/0'/0/{0..count}`. + /// + /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. + function rememberKeys(string calldata mnemonic, string calldata derivationPath, uint32 count) + external + returns (address[] memory keyAddrs); + + /// Derive a set number of wallets from a mnemonic in the specified language at the derivation path `m/44'/60'/0'/0/{0..count}`. + /// + /// The respective private keys are saved to the local forge wallet for later use and their addresses are returned. + function rememberKeys( + string calldata mnemonic, + string calldata derivationPath, + string calldata language, + uint32 count + ) external returns (address[] memory keyAddrs); + + /// Signs data with a `Wallet`. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + function signCompact(Wallet calldata wallet, bytes32 digest) external returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with `privateKey` using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + function signCompact(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + /// If `--sender` is provided, the signer with provided address is used, otherwise, + /// if exactly one signer is provided to the script, that signer is used. + /// Raises error if signer passed through `--sender` does not match any unlocked signers or + /// if `--sender` is not provided and not exactly one signer is passed to the script. + function signCompact(bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Returns a compact signature (`r`, `vs`) as per EIP-2098, where `vs` encodes both the + /// signature's `s` value, and the recovery id `v` in a single bytes32. + /// This format reduces the signature size from 65 to 64 bytes. + /// Raises error if none of the signers passed into the script have provided address. + function signCompact(address signer, bytes32 digest) external pure returns (bytes32 r, bytes32 vs); + + /// Signs `digest` with `privateKey` using the secp256r1 curve. + function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); + + /// Signs data with a `Wallet`. + function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with `privateKey` using the secp256k1 curve. + function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// If `--sender` is provided, the signer with provided address is used, otherwise, + /// if exactly one signer is provided to the script, that signer is used. + /// Raises error if signer passed through `--sender` does not match any unlocked signers or + /// if `--sender` is not provided and not exactly one signer is passed to the script. + function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + + /// Signs `digest` with signer provided to script using the secp256k1 curve. + /// Raises error if none of the signers passed into the script have provided address. + function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + // ======== Environment ======== /// Gets the environment variable `name` and parses it as `address`. @@ -447,10 +576,13 @@ interface VmSafe { /// Gets the nonce of an account. function getNonce(address account) external view returns (uint64 nonce); + /// Get the nonce of a `Wallet`. + function getNonce(Wallet calldata wallet) external returns (uint64 nonce); + /// Gets all the recorded logs. function getRecordedLogs() external returns (Log[] memory logs); - /// Gets the gas used in the last call. + /// Gets the gas used in the last call from the callee perspective. function lastCallGas() external view returns (Gas memory gas); /// Loads a storage slot from an address. @@ -465,28 +597,22 @@ interface VmSafe { /// Record all the transaction logs. function recordLogs() external; + /// Reset gas metering (i.e. gas usage is set to gas limit). + function resetGasMetering() external; + /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. function resumeGasMetering() external; /// Performs an Ethereum JSON-RPC request to the current fork URL. function rpc(string calldata method, string calldata params) external returns (bytes memory data); - /// Signs `digest` with `privateKey` using the secp256r1 curve. - function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); - - /// Signs `digest` with `privateKey` using the secp256k1 curve. - function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); - - /// Signs `digest` with signer provided to script using the secp256k1 curve. - /// If `--sender` is provided, the signer with provided address is used, otherwise, - /// if exactly one signer is provided to the script, that signer is used. - /// Raises error if signer passed through `--sender` does not match any unlocked signers or - /// if `--sender` is not provided and not exactly one signer is passed to the script. - function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + /// Performs an Ethereum JSON-RPC request to the given endpoint. + function rpc(string calldata urlOrAlias, string calldata method, string calldata params) + external + returns (bytes memory data); - /// Signs `digest` with signer provided to script using the secp256k1 curve. - /// Raises error if none of the signers passed into the script have provided address. - function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); + /// Records the debug trace during the run. + function startDebugTraceRecording() external; /// Starts recording all map SSTOREs for later retrieval. function startMappingRecording() external; @@ -495,6 +621,9 @@ interface VmSafe { /// along with the context of the calls function startStateDiffRecording() external; + /// Stop debug trace recording and returns the recorded debug trace. + function stopAndReturnDebugTraceRecording() external returns (DebugStep[] memory step); + /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session. function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses); @@ -520,6 +649,17 @@ interface VmSafe { /// `path` is relative to the project root. function createDir(string calldata path, bool recursive) external; + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + function deployCode(string calldata artifactPath) external returns (address deployedAddress); + + /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the + /// artifact in the form of :: where and parts are optional. + /// Additionally accepts abi-encoded constructor arguments. + function deployCode(string calldata artifactPath, bytes calldata constructorArgs) + external + returns (address deployedAddress); + /// Returns true if the given path points to an existing entity, else returns false. function exists(string calldata path) external returns (bool result); @@ -529,6 +669,12 @@ interface VmSafe { /// Given a path, query the file system to get information about a file, directory, etc. function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); + /// Gets the artifact path from code (aka. creation code). + function getArtifactPathByCode(bytes calldata code) external view returns (string memory path); + + /// Gets the artifact path from deployed code (aka. runtime code). + function getArtifactPathByDeployedCode(bytes calldata deployedCode) external view returns (string memory path); + /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the /// artifact in the form of :: where and parts are optional. function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); @@ -555,6 +701,9 @@ interface VmSafe { /// Prompts the user for a hidden string value in the terminal. function promptSecret(string calldata promptText) external returns (string memory input); + /// Prompts the user for hidden uint256 in the terminal (usually pk). + function promptSecretUint(string calldata promptText) external returns (uint256); + /// Prompts the user for uint256 in the terminal. function promptUint(string calldata promptText) external returns (uint256); @@ -624,10 +773,6 @@ interface VmSafe { // ======== JSON ======== - /// Checks if `key` exists in a JSON object - /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. - function keyExists(string calldata json, string calldata key) external view returns (bool); - /// Checks if `key` exists in a JSON object. function keyExistsJson(string calldata json, string calldata key) external view returns (bool); @@ -676,6 +821,24 @@ interface VmSafe { /// Parses a string of JSON data at `key` and coerces it to `string[]`. function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); + /// Parses a string of JSON data at `key` and coerces it to type array corresponding to `typeDescription`. + function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of JSON data and coerces it to type corresponding to `typeDescription`. + function parseJsonType(string calldata json, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of JSON data at `key` and coerces it to type corresponding to `typeDescription`. + function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + /// Parses a string of JSON data at `key` and coerces it to `uint256`. function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); @@ -742,6 +905,20 @@ interface VmSafe { /// Returns the stringified version of the specific JSON file up to that moment. function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); + /// See `serializeJson`. + function serializeJsonType(string calldata typeDescription, bytes calldata value) + external + pure + returns (string memory json); + + /// See `serializeJson`. + function serializeJsonType( + string calldata objectKey, + string calldata valueKey, + string calldata typeDescription, + bytes calldata value + ) external returns (string memory json); + /// See `serializeJson`. function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) external @@ -774,8 +951,15 @@ interface VmSafe { /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing. function writeJson(string calldata json, string calldata path, string calldata valueKey) external; + /// Checks if `key` exists in a JSON object + /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. + function keyExists(string calldata json, string calldata key) external view returns (bool); + // ======== Scripting ======== + /// Takes a signed transaction and broadcasts it to the network. + function broadcastRawTransaction(bytes calldata data) external; + /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain. /// Broadcasting address is determined by checking the following in order: /// 1. If `--sender` argument was provided, that address is used. @@ -791,6 +975,9 @@ interface VmSafe { /// provided as the sender that can later be signed and sent onchain. function broadcast(uint256 privateKey) external; + /// Returns addresses of available unlocked wallets in the script environment. + function getScriptWallets() external returns (address[] memory wallets); + /// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain. /// Broadcasting address is determined by checking the following in order: /// 1. If `--sender` argument was provided, that address is used. @@ -809,6 +996,9 @@ interface VmSafe { /// Stops collecting onchain transactions. function stopBroadcast() external; + /// Returns addresses of available unlocked wallets in the script environment. + function getWallets() external returns (address[] memory wallets); + // ======== String ======== /// Returns the index of the first occurrence of a `key` in an `input` string. @@ -1303,11 +1493,22 @@ interface VmSafe { /// If the condition is false, discard this run's fuzz inputs and generate new ones. function assume(bool condition) external pure; + /// Discard this run's fuzz inputs and generate new ones if next call reverted. + function assumeNoRevert() external pure; + /// Writes a breakpoint to jump to in the debugger. - function breakpoint(string calldata char) external; + function breakpoint(string calldata char) external pure; /// Writes a conditional breakpoint to jump to in the debugger. - function breakpoint(string calldata char, bool value) external; + function breakpoint(string calldata char, bool value) external pure; + + /// Returns the Foundry version. + /// Format: ++ + /// Sample output: 0.2.0+faa94c384+202407110019 + /// Note: Build timestamps may vary slightly across platforms due to separate CI jobs. + /// For reliable version comparisons, use YYYYMMDD0000 format (e.g., >= 202407110000) + /// to compare timestamps while ignoring minor time differences. + function getFoundryVersion() external view returns (string memory version); /// Returns the RPC url for the given alias. function rpcUrl(string calldata rpcAlias) external view returns (string memory json); @@ -1371,6 +1572,24 @@ interface VmSafe { /// Parses a string of TOML data at `key` and coerces it to `string[]`. function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory); + /// Parses a string of TOML data at `key` and coerces it to type array corresponding to `typeDescription`. + function parseTomlTypeArray(string calldata toml, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of TOML data and coerces it to type corresponding to `typeDescription`. + function parseTomlType(string calldata toml, string calldata typeDescription) + external + pure + returns (bytes memory); + + /// Parses a string of TOML data at `key` and coerces it to type corresponding to `typeDescription`. + function parseTomlType(string calldata toml, string calldata key, string calldata typeDescription) + external + pure + returns (bytes memory); + /// Parses a string of TOML data at `key` and coerces it to `uint256`. function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256); @@ -1404,57 +1623,57 @@ interface VmSafe { /// Compute the address a contract will be deployed at for a given deployer address and nonce. function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address); - /// Derives a private key from the name, labels the account with that name, and returns the wallet. - function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); + /// Utility cheatcode to copy storage of `from` contract to another `to` contract. + function copyStorage(address from, address to) external; - /// Generates a wallet from the private key and returns the wallet. - function createWallet(uint256 privateKey) external returns (Wallet memory wallet); + /// Returns ENS namehash for provided string. + function ensNamehash(string calldata name) external pure returns (bytes32); - /// Generates a wallet from the private key, labels the account with that name, and returns the wallet. - function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); + /// Gets the label for the specified address. + function getLabel(address account) external view returns (string memory currentLabel); - /// Derive a private key from a provided mnenomic string (or mnenomic file path) - /// at the derivation path `m/44'/60'/0'/0/{index}`. - function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); + /// Labels an address in call traces. + function label(address account, string calldata newLabel) external; - /// Derive a private key from a provided mnenomic string (or mnenomic file path) - /// at `{derivationPath}{index}`. - function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) - external - pure - returns (uint256 privateKey); + /// Pauses collection of call traces. Useful in cases when you want to skip tracing of + /// complex calls which are not useful for debugging. + function pauseTracing() external view; - /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language - /// at the derivation path `m/44'/60'/0'/0/{index}`. - function deriveKey(string calldata mnemonic, uint32 index, string calldata language) - external - pure - returns (uint256 privateKey); + /// Returns a random `address`. + function randomAddress() external returns (address); - /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language - /// at `{derivationPath}{index}`. - function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) - external - pure - returns (uint256 privateKey); + /// Returns a random `bool`. + function randomBool() external view returns (bool); - /// Returns ENS namehash for provided string. - function ensNamehash(string calldata name) external pure returns (bytes32); + /// Returns a random byte array value of the given length. + function randomBytes(uint256 len) external view returns (bytes memory); - /// Gets the label for the specified address. - function getLabel(address account) external view returns (string memory currentLabel); + /// Returns a random fixed-size byte array of length 4. + function randomBytes4() external view returns (bytes4); - /// Get a `Wallet`'s nonce. - function getNonce(Wallet calldata wallet) external returns (uint64 nonce); + /// Returns a random fixed-size byte array of length 8. + function randomBytes8() external view returns (bytes8); - /// Labels an address in call traces. - function label(address account, string calldata newLabel) external; + /// Returns a random `int256` value. + function randomInt() external view returns (int256); - /// Adds a private key to the local forge wallet and returns the address. - function rememberKey(uint256 privateKey) external returns (address keyAddr); + /// Returns a random `int256` value of given bits. + function randomInt(uint256 bits) external view returns (int256); - /// Signs data with a `Wallet`. - function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); + /// Returns a random uint256 value. + function randomUint() external returns (uint256); + + /// Returns random uint256 value between the provided range (=min..=max). + function randomUint(uint256 min, uint256 max) external returns (uint256); + + /// Returns a random `uint256` value of given bits. + function randomUint(uint256 bits) external view returns (uint256); + + /// Unpauses collection of call traces. + function resumeTracing() external view; + + /// Utility cheatcode to set arbitrary storage for given target address. + function setArbitraryStorage(address target) external; /// Encodes a `bytes` value to a base64url string. function toBase64URL(bytes calldata data) external pure returns (string memory); @@ -1494,6 +1713,9 @@ interface Vm is VmSafe { /// Clears all mocked calls. function clearMockedCalls() external; + /// Clones a source account code, state, balance and nonce to a target account and updates in-memory EVM state. + function cloneAccount(address source, address target) external; + /// Sets `block.coinbase`. function coinbase(address newCoinbase) external; @@ -1524,10 +1746,10 @@ interface Vm is VmSafe { /// Takes the snapshot ID to delete. /// Returns `true` if the snapshot was successfully deleted. /// Returns `false` if the snapshot does not exist. - function deleteSnapshot(uint256 snapshotId) external returns (bool success); + function deleteStateSnapshot(uint256 snapshotId) external returns (bool success); /// Removes _all_ snapshots previously created by `snapshot`. - function deleteSnapshots() external; + function deleteStateSnapshots() external; /// Sets `block.difficulty`. /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. @@ -1551,7 +1773,7 @@ interface Vm is VmSafe { /// Returns true if the account is marked as persistent. function isPersistent(address account) external view returns (bool persistent); - /// Load a genesis JSON file's `allocs` into the in-memory revm state. + /// Load a genesis JSON file's `allocs` into the in-memory EVM state. function loadAllocs(string calldata pathToAllocsJson) external; /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup @@ -1584,6 +1806,20 @@ interface Vm is VmSafe { /// Calldata match takes precedence over `msg.value` in case of ambiguity. function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; + /// Mocks multiple calls to an address, returning specified data for each call. + function mockCalls(address callee, bytes calldata data, bytes[] calldata returnData) external; + + /// Mocks multiple calls to an address with a specific `msg.value`, returning specified data for each call. + function mockCalls(address callee, uint256 msgValue, bytes calldata data, bytes[] calldata returnData) external; + + /// Whenever a call is made to `callee` with calldata `data`, this cheatcode instead calls + /// `target` with the same calldata. This functionality is similar to a delegate call made to + /// `target` contract from `callee`. + /// Can be used to substitute a call to a function with another implementation that captures + /// the primary logic of the original function but is easier to reason about. + /// If calldata is not a strict match then partial match by selector is attempted. + function mockFunction(address callee, address target, bytes calldata data) external; + /// Sets the *next* call's `msg.sender` to be the input address. function prank(address msgSender) external; @@ -1610,14 +1846,14 @@ interface Vm is VmSafe { /// Takes the snapshot ID to revert to. /// Returns `true` if the snapshot was successfully reverted. /// Returns `false` if the snapshot does not exist. - /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteSnapshot`. - function revertTo(uint256 snapshotId) external returns (bool success); + /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteStateSnapshot`. + function revertToState(uint256 snapshotId) external returns (bool success); /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots /// Takes the snapshot ID to revert to. /// Returns `true` if the snapshot was successfully reverted and deleted. /// Returns `false` if the snapshot does not exist. - function revertToAndDelete(uint256 snapshotId) external returns (bool success); + function revertToStateAndDelete(uint256 snapshotId) external returns (bool success); /// Revokes persistent status from the address, previously added via `makePersistent`. function revokePersistent(address account) external; @@ -1645,16 +1881,33 @@ interface Vm is VmSafe { /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. function selectFork(uint256 forkId) external; + /// Set blockhash for the current block. + /// It only sets the blockhash for blocks where `block.number - 256 <= number < block.number`. + function setBlockhash(uint256 blockNumber, bytes32 blockHash) external; + /// Sets the nonce of an account. Must be higher than the current nonce of the account. function setNonce(address account, uint64 newNonce) external; /// Sets the nonce of an account to an arbitrary value. function setNonceUnsafe(address account, uint64 newNonce) external; + /// Snapshot capture the gas usage of the last call by name from the callee perspective. + function snapshotGasLastCall(string calldata name) external returns (uint256 gasUsed); + + /// Snapshot capture the gas usage of the last call by name in a group from the callee perspective. + function snapshotGasLastCall(string calldata group, string calldata name) external returns (uint256 gasUsed); + /// Snapshot the current state of the evm. /// Returns the ID of the snapshot that was created. - /// To revert a snapshot use `revertTo`. - function snapshot() external returns (uint256 snapshotId); + /// To revert a snapshot use `revertToState`. + function snapshotState() external returns (uint256 snapshotId); + + /// Snapshot capture an arbitrary numerical value by name. + /// The group name is derived from the contract name. + function snapshotValue(string calldata name, uint256 value) external; + + /// Snapshot capture an arbitrary numerical value by name in a group. + function snapshotValue(string calldata group, string calldata name, uint256 value) external; /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called. function startPrank(address msgSender) external; @@ -1662,9 +1915,26 @@ interface Vm is VmSafe { /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. function startPrank(address msgSender, address txOrigin) external; + /// Start a snapshot capture of the current gas usage by name. + /// The group name is derived from the contract name. + function startSnapshotGas(string calldata name) external; + + /// Start a snapshot capture of the current gas usage by name in a group. + function startSnapshotGas(string calldata group, string calldata name) external; + /// Resets subsequent calls' `msg.sender` to be `address(this)`. function stopPrank() external; + /// Stop the snapshot capture of the current gas by latest snapshot name, capturing the gas used since the start. + function stopSnapshotGas() external returns (uint256 gasUsed); + + /// Stop the snapshot capture of the current gas usage by name, capturing the gas used since the start. + /// The group name is derived from the contract name. + function stopSnapshotGas(string calldata name) external returns (uint256 gasUsed); + + /// Stop the snapshot capture of the current gas usage by name in a group, capturing the gas used since the start. + function stopSnapshotGas(string calldata group, string calldata name) external returns (uint256 gasUsed); + /// Stores a value to an address' storage slot. function store(address target, bytes32 slot, bytes32 value) external; @@ -1680,6 +1950,21 @@ interface Vm is VmSafe { /// Sets `block.timestamp`. function warp(uint256 newTimestamp) external; + /// `deleteSnapshot` is being deprecated in favor of `deleteStateSnapshot`. It will be removed in future versions. + function deleteSnapshot(uint256 snapshotId) external returns (bool success); + + /// `deleteSnapshots` is being deprecated in favor of `deleteStateSnapshots`. It will be removed in future versions. + function deleteSnapshots() external; + + /// `revertToAndDelete` is being deprecated in favor of `revertToStateAndDelete`. It will be removed in future versions. + function revertToAndDelete(uint256 snapshotId) external returns (bool success); + + /// `revertTo` is being deprecated in favor of `revertToState`. It will be removed in future versions. + function revertTo(uint256 snapshotId) external returns (bool success); + + /// `snapshot` is being deprecated in favor of `snapshotState`. It will be removed in future versions. + function snapshot() external returns (uint256 snapshotId); + // ======== Testing ======== /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. @@ -1708,6 +1993,30 @@ interface Vm is VmSafe { /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata. function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; + /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). + /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). + function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) + external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmitAnonymous( + bool checkTopic0, + bool checkTopic1, + bool checkTopic2, + bool checkTopic3, + bool checkData, + address emitter + ) external; + + /// Prepare an expected anonymous log with all topic and data checks enabled. + /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if + /// logs were emitted in the expected order with the expected topics and data. + function expectEmitAnonymous() external; + + /// Same as the previous method, but also checks supplied address against emitting contract. + function expectEmitAnonymous(address emitter) external; + /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). /// Call this function, then emit an event, then call a function. Internally after the call, we check if /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). @@ -1725,15 +2034,30 @@ interface Vm is VmSafe { /// Same as the previous method, but also checks supplied address against emitting contract. function expectEmit(address emitter) external; + /// Expects an error on next call that starts with the revert data. + function expectPartialRevert(bytes4 revertData) external; + + /// Expects an error on next call to reverter address, that starts with the revert data. + function expectPartialRevert(bytes4 revertData, address reverter) external; + /// Expects an error on next call with any revert data. function expectRevert() external; - /// Expects an error on next call that starts with the revert data. + /// Expects an error on next call that exactly matches the revert data. function expectRevert(bytes4 revertData) external; /// Expects an error on next call that exactly matches the revert data. function expectRevert(bytes calldata revertData) external; + /// Expects an error with any revert data on next call to reverter address. + function expectRevert(address reverter) external; + + /// Expects an error from reverter address on next call, with any revert data. + function expectRevert(bytes4 revertData, address reverter) external; + + /// Expects an error from reverter address on next call, that exactly matches the revert data. + function expectRevert(bytes calldata revertData, address reverter) external; + /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. function expectSafeMemory(uint64 min, uint64 max) external; @@ -1743,9 +2067,12 @@ interface Vm is VmSafe { /// to the set. function expectSafeMemoryCall(uint64 min, uint64 max) external; - /// Marks a test as skipped. Must be called at the top of the test. + /// Marks a test as skipped. Must be called at the top level of a test. function skip(bool skipTest) external; + /// Marks a test as skipped with a reason. Must be called at the top level of a test. + function skip(bool skipTest, string calldata reason) external; + /// Stops all safe memory expectation in the current subcontext. function stopExpectSafeMemory() external; } diff --git a/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol b/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol new file mode 100644 index 0000000000..fe0a6edd56 --- /dev/null +++ b/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v5.0.0) (utils/Create2.sol) + +pragma solidity ^0.8.20; + +import {Errors} from "./Errors.sol"; + +/** + * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. + * `CREATE2` can be used to compute in advance the address where a smart + * contract will be deployed, which allows for interesting new mechanisms known + * as 'counterfactual interactions'. + * + * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more + * information. + */ +library Create2 { + /** + * @dev There's no code to deploy. + */ + error Create2EmptyBytecode(); + + /** + * @dev Deploys a contract using `CREATE2`. The address where the contract + * will be deployed can be known in advance via {computeAddress}. + * + * The bytecode for a contract can be obtained from Solidity with + * `type(contractName).creationCode`. + * + * Requirements: + * + * - `bytecode` must not be empty. + * - `salt` must have not been used for `bytecode` already. + * - the factory must have a balance of at least `amount`. + * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. + */ + function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { + if (address(this).balance < amount) { + revert Errors.InsufficientBalance(address(this).balance, amount); + } + if (bytecode.length == 0) { + revert Create2EmptyBytecode(); + } + assembly ("memory-safe") { + addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) + // if no address was created, and returndata is not empty, bubble revert + if and(iszero(addr), not(iszero(returndatasize()))) { + let p := mload(0x40) + returndatacopy(p, 0, returndatasize()) + revert(p, returndatasize()) + } + } + if (addr == address(0)) { + revert Errors.FailedDeployment(); + } + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the + * `bytecodeHash` or `salt` will result in a new destination address. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { + return computeAddress(salt, bytecodeHash, address(this)); + } + + /** + * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at + * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. + */ + function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { + assembly ("memory-safe") { + let ptr := mload(0x40) // Get free memory pointer + + // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | + // |-------------------|---------------------------------------------------------------------------| + // | bytecodeHash | CCCCCCCCCCCCC...CC | + // | salt | BBBBBBBBBBBBB...BB | + // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | + // | 0xFF | FF | + // |-------------------|---------------------------------------------------------------------------| + // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | + // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | + + mstore(add(ptr, 0x40), bytecodeHash) + mstore(add(ptr, 0x20), salt) + mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes + let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff + mstore8(start, 0xff) + addr := and(keccak256(start, 85), 0xffffffffffffffffffffffffffffffffffffffff) + } + } +} \ No newline at end of file diff --git a/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Errors.sol b/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Errors.sol new file mode 100644 index 0000000000..cb8833b46e --- /dev/null +++ b/contracts/src/v0.8/vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Errors.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.20; + +/** + * @dev Collection of common custom errors used in multiple contracts + * + * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. + * It is recommended to avoid relying on the error API for critical functionality. + */ +library Errors { + /** + * @dev The ETH balance of the account is not enough to perform the operation. + */ + error InsufficientBalance(uint256 balance, uint256 needed); + + /** + * @dev A call to an address target failed. The target may have reverted. + */ + error FailedCall(); + + /** + * @dev The deployment failed. + */ + error FailedDeployment(); + + /** + * @dev A necessary precompile is missing. + */ + error MissingPrecompile(address); +} \ No newline at end of file diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index 7a21a3841c..f92a79e203 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -263,9 +263,11 @@ var aStar = ClientErrors{ } var mantle = ClientErrors{ - InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`), - Fatal: regexp.MustCompile(`(: |^)'*invalid sender`), - NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`), + InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`), + Fatal: regexp.MustCompile(`(: |^)'*invalid sender`), + NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`), + ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)'*replacement transaction underpriced`), + TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)'*already known`), } var hederaFatal = regexp.MustCompile(`(: |^)(execution reverted)(:|$) | ^Transaction gas limit '(\d+)' exceeds block gas limit '(\d+)' | ^Transaction gas limit provided '(\d+)' is insufficient of intrinsic gas required '(\d+)' | ^Oversized data:|status INVALID_SIGNATURE`) diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index e6d2f2d08b..c8483972c8 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -110,6 +110,7 @@ func Test_Eth_Errors(t *testing.T) { {"gas price too low", false, "Arbitrum"}, {"client error replacement underpriced", true, "tomlConfig"}, {"", false, "tomlConfig"}, + {"failed to forward tx to sequencer, please try again. Error message: 'replacement transaction underpriced'", true, "Mantle"}, } for _, test := range tests { @@ -142,6 +143,7 @@ func Test_Eth_Errors(t *testing.T) { {"ErrorObject { code: ServerError(3), message: \\\"known transaction. transaction with hash 0xf016…ad63 is already in the system\\\", data: Some(RawValue(\\\"0x\\\")) }", true, "zkSync"}, {"client error transaction already in mempool", true, "tomlConfig"}, {"alreadyknown", true, "Gnosis"}, + {"failed to forward tx to sequencer, please try again. Error message: 'already known'", true, "Mantle"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) diff --git a/core/chains/evm/config/toml/defaults/Avalanche_Fuji.toml b/core/chains/evm/config/toml/defaults/Avalanche_Fuji.toml index 5ba2e3cdc7..03f67180b9 100644 --- a/core/chains/evm/config/toml/defaults/Avalanche_Fuji.toml +++ b/core/chains/evm/config/toml/defaults/Avalanche_Fuji.toml @@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2 NoNewFinalizedHeadsThreshold = '1m' [GasEstimator] -PriceDefault = '25 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' +PriceDefault = '1 gwei' [GasEstimator.BlockHistory] BlockHistorySize = 24 diff --git a/core/chains/evm/config/toml/defaults/Avalanche_Mainnet.toml b/core/chains/evm/config/toml/defaults/Avalanche_Mainnet.toml index e7813842b4..0d96561bcc 100644 --- a/core/chains/evm/config/toml/defaults/Avalanche_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Avalanche_Mainnet.toml @@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2 NoNewFinalizedHeadsThreshold = '1m' [GasEstimator] -PriceDefault = '25 gwei' -PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' +PriceDefault = '1 gwei' [GasEstimator.BlockHistory] # Average block time of 2s diff --git a/core/chains/evm/config/toml/defaults/BOB_Mainnet.toml b/core/chains/evm/config/toml/defaults/BOB_Mainnet.toml index 5197c88e76..9644c69198 100644 --- a/core/chains/evm/config/toml/defaults/BOB_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/BOB_Mainnet.toml @@ -1,13 +1,13 @@ ChainID = '60808' # OP stack https://docs.gobob.xyz/learn/introduction/stack-overview#rollup-layer ChainType = 'optimismBedrock' -# finality_depth was: ~850 -FinalityDepth = 900 +# FinalityDepth in mainnet showed more than 3k +FinalityDepth = 3150 # block_time was: 2s, adding 1 second buffer LogPollInterval = '3s' -# finality_depth * block_time / 60 secs = ~30 min (finality time) -NoNewFinalizedHeadsThreshold = '35m' +# finality_depth * block_time / 60 secs = ~105 min (finality time) +NoNewFinalizedHeadsThreshold = '110m' FinalityTagEnabled = true diff --git a/core/chains/evm/config/toml/defaults/BOB_Testnet.toml b/core/chains/evm/config/toml/defaults/BOB_Testnet.toml index 85abf5f560..f0d20f8c96 100644 --- a/core/chains/evm/config/toml/defaults/BOB_Testnet.toml +++ b/core/chains/evm/config/toml/defaults/BOB_Testnet.toml @@ -1,13 +1,13 @@ ChainID = '808813' # OP stack https://docs.gobob.xyz/learn/introduction/stack-overview#rollup-layer ChainType = 'optimismBedrock' -# finality_depth was: ~850 -FinalityDepth = 900 +# FinalityDepth in mainnet showed more than 3k +FinalityDepth = 3150 # block_time was: 2s, adding 1 second buffer LogPollInterval = '3s' -# finality_depth * block_time / 60 secs = ~30 min (finality time) -NoNewFinalizedHeadsThreshold = '35m' +# finality_depth * block_time / 60 secs = ~105 min (finality time) +NoNewFinalizedHeadsThreshold = '110m' FinalityTagEnabled = true diff --git a/core/chains/evm/config/toml/defaults/Bitlayer_Mainnet.toml b/core/chains/evm/config/toml/defaults/Bitlayer_Mainnet.toml new file mode 100644 index 0000000000..9c68d1d932 --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Bitlayer_Mainnet.toml @@ -0,0 +1,11 @@ +ChainID = '200901' +FinalityTagEnabled = false +FinalityDepth = 21 # confirmed with Bitlayer team and recommended by docs: https://docs.bitlayer.org/docs/Learn/BitlayerNetwork/AboutFinality/#about-finality-at-stage-bitlayer-pos-bitlayer-mainnet-v1 + +[GasEstimator] +Mode = 'FeeHistory' +EIP1559DynamicFees = false +PriceMax = '1 gwei' # DS&A recommended value +PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei +PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax +FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax \ No newline at end of file diff --git a/core/chains/evm/config/toml/defaults/Bitlayer_Testnet.toml b/core/chains/evm/config/toml/defaults/Bitlayer_Testnet.toml new file mode 100644 index 0000000000..0abba07420 --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Bitlayer_Testnet.toml @@ -0,0 +1,11 @@ +ChainID = '200810' +FinalityTagEnabled = false +FinalityDepth = 21 # confirmed with Bitlayer team and recommended by docs: https://docs.bitlayer.org/docs/Learn/BitlayerNetwork/AboutFinality/#about-finality-at-stage-bitlayer-pos-bitlayer-mainnet-v1 + +[GasEstimator] +Mode='FeeHistory' +EIP1559DynamicFees = false +PriceMax = '1 gwei' # DS&A recommended value +PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei +PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax +FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax \ No newline at end of file diff --git a/core/chains/evm/config/toml/defaults/Mantle_Mainnet.toml b/core/chains/evm/config/toml/defaults/Mantle_Mainnet.toml new file mode 100644 index 0000000000..23d5168a7e --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Mantle_Mainnet.toml @@ -0,0 +1,33 @@ +ChainID = '5000' +FinalityTagEnabled = true +FinalityDepth = 1200 +ChainType = 'optimismBedrock' +LogPollInterval = '2s' +MinIncomingConfirmations = 1 +NoNewFinalizedHeadsThreshold = '40m0s' + +[HeadTracker] +HistoryDepth = 1250 + +[GasEstimator] +PriceMax = '120 gwei' +# Limit values are high as Mantle's GasPrice is in native token (MNT) instead of ETH. Their proprietary TokenRatio parameter is used to adjust fees +LimitDefault = 80_000_000_000 +LimitMax = 100_000_000_000 +BumpMin = '100 wei' +BumpThreshold = 60 +EIP1559DynamicFees = true +FeeCapDefault = '120 gwei' +# Mantle recommends setting Priority Fee to 0 in their docs linked here: https://docs-v2.mantle.xyz/devs/concepts/tx-fee/eip-1559#application-of-eip-1559-in-mantle-v2-tectonic +TipCapDefault = '0 wei' +TipCapMin = '0 wei' + +[GasEstimator.BlockHistory] +# Default is 24, which leads to bumpy gas prices. In CCIP +# we want to smooth out the gas prices, so we increase the sample size. +BlockHistorySize = 200 +# The formula for FeeCap is (current block base fee * (1.125 ^ EIP1559FeeCapBufferBlocks) + tipcap) +# where tipcap is managed by the block history estimators. In the context of CCIP, +# the gas price is relayed to other changes for quotes so we want accurate/avg not pessimistic values. +# So we set this to zero so FeeCap = baseFee + tipcap. +EIP1559FeeCapBufferBlocks = 0 \ No newline at end of file diff --git a/core/chains/evm/config/toml/defaults/Mantle_Sepolia.toml b/core/chains/evm/config/toml/defaults/Mantle_Sepolia.toml index 45fbfc5e0d..705f91142f 100644 --- a/core/chains/evm/config/toml/defaults/Mantle_Sepolia.toml +++ b/core/chains/evm/config/toml/defaults/Mantle_Sepolia.toml @@ -1,23 +1,34 @@ ChainID = '5003' -ChainType = 'optimismBedrock' -# FT and FD are both present here because the dev effort rely only on FinalityTagEnabled are still in progress. -# We expect to be able to rely only on FinalityTagEnabled=true in the short future. -# https://chainlink-core.slack.com/archives/C05CS33N08N/p1715102940763339?thread_ts=1715102478.537529&cid=C05CS33N08N -FinalityDepth = 1200 FinalityTagEnabled = true +FinalityDepth = 1200 +ChainType = 'optimismBedrock' LogPollInterval = '2s' -NoNewHeadsThreshold = '0' MinIncomingConfirmations = 1 +NoNewFinalizedHeadsThreshold = '60m0s' [HeadTracker] -HistoryDepth = 600 +HistoryDepth = 1250 [GasEstimator] -Mode = 'L2Suggested' -PriceMax = '200 gwei' -LimitDefault = 100000000 -FeeCapDefault = '200 gwei' +PriceMax = '120 gwei' +# Limit values are high as Mantle's GasPrice is in native token (MNT) instead of ETH. Their proprietary TokenRatio parameter is used to adjust fees +LimitDefault = 80000000000 +LimitMax = 100000000000 +BumpMin = '100 wei' +BumpPercent = 20 +BumpThreshold = 60 +EIP1559DynamicFees = true +FeeCapDefault = '120 gwei' +# Mantle reccomends setting Priority Fee to 0 in their docs linked here: https://docs-v2.mantle.xyz/devs/concepts/tx-fee/eip-1559#application-of-eip-1559-in-mantle-v2-tectonic +TipCapDefault = '0 wei' +TipCapMin = '0 wei' [GasEstimator.BlockHistory] +# Default is 24, which leads to bumpy gas prices. In CCIP +# we want to smooth out the gas prices, so we increase the sample size. BlockHistorySize = 200 +# The formula for FeeCap is (current block base fee * (1.125 ^ EIP1559FeeCapBufferBlocks) + tipcap) +# where tipcap is managed by the block history estimators. In the context of CCIP, +# the gas price is relayed to other changes for quotes so we want accurate/avg not pessimistic values. +# So we set this to zero so FeeCap = baseFee + tipcap. EIP1559FeeCapBufferBlocks = 0 \ No newline at end of file diff --git a/core/gethwrappers/ccip/generated/burn_from_mint_token_pool/burn_from_mint_token_pool.go b/core/gethwrappers/ccip/generated/burn_from_mint_token_pool/burn_from_mint_token_pool.go index 1553ba62b0..def5c4bc25 100644 --- a/core/gethwrappers/ccip/generated/burn_from_mint_token_pool/burn_from_mint_token_pool.go +++ b/core/gethwrappers/ccip/generated/burn_from_mint_token_pool/burn_from_mint_token_pool.go @@ -74,23 +74,22 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig } var BurnFromMintTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b506040516200450b3803806200450b8339810160408190526200003491620008c0565b8383838333806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c2816200018f565b5050506001600160a01b0384161580620000e357506001600160a01b038116155b80620000f657506001600160a01b038216155b1562000115576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c05262000168576040805160008152602081019091526200016890846200023a565b5062000185925050506001600160a01b0385163060001962000397565b5050505062000afc565b336001600160a01b03821603620001e95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c0516200025b576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002e65760008382815181106200027f576200027f620009d0565b60209081029190910101519050620002996002826200047d565b15620002dc576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016200025e565b5060005b8151811015620003925760008282815181106200030b576200030b620009d0565b6020026020010151905060006001600160a01b0316816001600160a01b03160362000337575062000389565b620003446002826200049d565b1562000387576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620002ea565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015620003e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200040f9190620009e6565b6200041b919062000a16565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091529192506200047791869190620004b416565b50505050565b600062000494836001600160a01b03841662000585565b90505b92915050565b600062000494836001600160a01b03841662000689565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000503906001600160a01b038516908490620006db565b80519091501562000392578080602001905181019062000524919062000a2c565b620003925760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000086565b600081815260018301602052604081205480156200067e576000620005ac60018362000a57565b8554909150600090620005c29060019062000a57565b90508082146200062e576000866000018281548110620005e657620005e6620009d0565b90600052602060002001549050808760000184815481106200060c576200060c620009d0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000642576200064262000a6d565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000497565b600091505062000497565b6000818152600183016020526040812054620006d25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000497565b50600062000497565b6060620006ec8484600085620006f4565b949350505050565b606082471015620007575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000086565b600080866001600160a01b0316858760405162000775919062000aa9565b60006040518083038185875af1925050503d8060008114620007b4576040519150601f19603f3d011682016040523d82523d6000602084013e620007b9565b606091505b509092509050620007cd87838387620007d8565b979650505050505050565b606083156200084c57825160000362000844576001600160a01b0385163b620008445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000086565b5081620006ec565b620006ec8383815115620008635781518083602001fd5b8060405162461bcd60e51b815260040162000086919062000ac7565b6001600160a01b03811681146200089557600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b8051620008bb816200087f565b919050565b60008060008060808587031215620008d757600080fd5b8451620008e4816200087f565b602086810151919550906001600160401b03808211156200090457600080fd5b818801915088601f8301126200091957600080fd5b8151818111156200092e576200092e62000898565b8060051b604051601f19603f8301168101818110858211171562000956576200095662000898565b60405291825284820192508381018501918b8311156200097557600080fd5b938501935b828510156200099e576200098e85620008ae565b845293850193928501926200097a565b809850505050505050620009b560408601620008ae565b9150620009c560608601620008ae565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620009f957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000497576200049762000a00565b60006020828403121562000a3f57600080fd5b8151801515811462000a5057600080fd5b9392505050565b8181038181111562000497576200049762000a00565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000aa057818101518382015260200162000a86565b50506000910152565b6000825162000abd81846020870162000a83565b9190910192915050565b602081526000825180602084015262000ae881604085016020870162000a83565b601f01601f19169190910160400192915050565b60805160a05160c05161399262000b79600039600081816104dd01528181611777015261215b0152600081816104b7015281816115a80152611a2d0152600081816102390152818161028e015281816106e0015281816114c80152818161194d01528181611b45015281816120f1015261234601526139926000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80639a4575b9116100ee578063c4bffe2b11610097578063db6327dc11610071578063db6327dc146104a2578063dc0bd971146104b5578063e0351e13146104db578063f2fde38b1461050157600080fd5b8063c4bffe2b14610467578063c75eea9c1461047c578063cf7401f31461048f57600080fd5b8063b0f479a1116100c8578063b0f479a114610423578063b794658014610441578063c0d786551461045457600080fd5b80639a4575b91461037f578063a7cd63b71461039f578063af58d59f146103b457600080fd5b806354c8a4f31161015b57806379ba50971161013557806379ba5097146103335780637d54534e1461033b5780638926f54f1461034e5780638da5cb5b1461036157600080fd5b806354c8a4f3146102ed5780636d3d1a581461030257806378a010b21461032057600080fd5b806321df0da71161018c57806321df0da714610237578063240028e81461027e57806339077537146102cb57600080fd5b806301ffc9a7146101b35780630a2fd493146101db578063181f5a77146101fb575b600080fd5b6101c66101c1366004612ae9565b610514565b60405190151581526020015b60405180910390f35b6101ee6101e9366004612b48565b6105f9565b6040516101d29190612bc7565b6101ee6040518060400160405280601b81526020017f4275726e46726f6d4d696e74546f6b656e506f6f6c20312e352e30000000000081525081565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d2565b6101c661028c366004612c07565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b6102de6102d9366004612c24565b6106a9565b604051905181526020016101d2565b6103006102fb366004612cac565b61082f565b005b60085473ffffffffffffffffffffffffffffffffffffffff16610259565b61030061032e366004612d18565b6108aa565b610300610a1e565b610300610349366004612c07565b610b1b565b6101c661035c366004612b48565b610b6a565b60005473ffffffffffffffffffffffffffffffffffffffff16610259565b61039261038d366004612d9b565b610b81565b6040516101d29190612dd6565b6103a7610c28565b6040516101d29190612e36565b6103c76103c2366004612b48565b610c39565b6040516101d2919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610259565b6101ee61044f366004612b48565b610d0e565b610300610462366004612c07565b610d39565b61046f610e14565b6040516101d29190612e90565b6103c761048a366004612b48565b610ecc565b61030061049d366004612ff8565b610f9e565b6103006104b036600461303d565b611027565b7f0000000000000000000000000000000000000000000000000000000000000000610259565b7f00000000000000000000000000000000000000000000000000000000000000006101c6565b61030061050f366004612c07565b6114ad565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf0000000000000000000000000000000000000000000000000000000014806105a757507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b806105f357507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b67ffffffffffffffff811660009081526007602052604090206004018054606091906106249061307f565b80601f01602080910402602001604051908101604052809291908181526020018280546106509061307f565b801561069d5780601f106106725761010080835404028352916020019161069d565b820191906000526020600020905b81548152906001019060200180831161068057829003601f168201915b50505050509050919050565b6040805160208101909152600081526106c96106c48361317d565b6114c1565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f196107156060850160408601612c07565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260608501356024820152604401600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b506107ae925050506060830160408401612c07565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0846060013560405161081091815260200190565b60405180910390a3506040805160208101909152606090910135815290565b6108376116f2565b6108a48484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061177592505050565b50505050565b6108b26116f2565b6108bb83610b6a565b610902576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b67ffffffffffffffff8316600090815260076020526040812060040180546109299061307f565b80601f01602080910402602001604051908101604052809291908181526020018280546109559061307f565b80156109a25780601f10610977576101008083540402835291602001916109a2565b820191906000526020600020905b81548152906001019060200180831161098557829003601f168201915b5050505067ffffffffffffffff86166000908152600760205260409020919250506004016109d18385836132c2565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610a10939291906133dc565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108f9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b236116f2565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006105f3600567ffffffffffffffff841661192b565b6040805180820190915260608082526020820152610ba6610ba183613440565b611946565b610bb38260600135611b10565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610c0d84602001602081019061044f9190612b48565b81526040805160208181019092526000815291015292915050565b6060610c346002611bb9565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260039091015480841660608301529190910490911660808201526105f390611bc6565b67ffffffffffffffff811660009081526007602052604090206005018054606091906106249061307f565b610d416116f2565b73ffffffffffffffffffffffffffffffffffffffff8116610d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b60606000610e226005611bb9565b90506000815167ffffffffffffffff811115610e4057610e40612ed2565b604051908082528060200260200182016040528015610e69578160200160208202803683370190505b50905060005b8251811015610ec557828181518110610e8a57610e8a6134e2565b6020026020010151828281518110610ea457610ea46134e2565b67ffffffffffffffff90921660209283029190910190910152600101610e6f565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526105f390611bc6565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610fde575060005473ffffffffffffffffffffffffffffffffffffffff163314155b15611017576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b611022838383611c78565b505050565b61102f6116f2565b60005b8181101561102257600083838381811061104e5761104e6134e2565b90506020028101906110609190613511565b6110699061354f565b905061107e8160800151826020015115611d62565b6110918160a00151826020015115611d62565b80602001511561138d5780516110b39060059067ffffffffffffffff16611e9b565b6110f85780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f9565b604081015151158061110d5750606081015151155b15611144576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c179091169615150295909517909855908101519401519381169316909102919091176003820155915190919060048201906113259082613603565b506060820151600582019061133a9082613603565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c29550611380949392919061371d565b60405180910390a16114a4565b80516113a59060059067ffffffffffffffff16611ea7565b6113ea5780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f9565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906114536004830182612a9b565b611461600583016000612a9b565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b50600101611032565b6114b56116f2565b6114be81611eb3565b50565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146115565760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f9565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611604573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162891906137b6565b1561165f576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61166c8160200151611fa8565b600061167b82602001516105f9565b905080516000148061169f575080805190602001208260a001518051906020012014155b156116dc578160a001516040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016108f99190612bc7565b6116ee826020015183606001516120ce565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611773576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108f9565b565b7f00000000000000000000000000000000000000000000000000000000000000006117cc576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82518110156118625760008382815181106117ec576117ec6134e2565b6020026020010151905061180a81600261211590919063ffffffff16565b156118595760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016117cf565b5060005b8151811015611022576000828281518110611883576118836134e2565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118c75750611923565b6118d2600282612137565b156119215760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611866565b600081815260018301602052604081205415155b9392505050565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146119db5760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f9565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aad91906137b6565b15611ae4576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611af18160400151612159565b611afe81602001516121d8565b6114be81602001518260600151612326565b6040517f79cc6790000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906379cc679090604401600060405180830381600087803b158015611b9e57600080fd5b505af1158015611bb2573d6000803e3d6000fd5b5050505050565b6060600061193f8361236a565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152611c5482606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642611c389190613802565b85608001516fffffffffffffffffffffffffffffffff166123c5565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b611c8183610b6a565b611cc3576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016108f9565b611cce826000611d62565b67ffffffffffffffff83166000908152600760205260409020611cf190836123ef565b611cfc816000611d62565b67ffffffffffffffff83166000908152600760205260409020611d2290600201826123ef565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051611d5593929190613815565b60405180910390a1505050565b815115611e295781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580611db8575060408201516fffffffffffffffffffffffffffffffff16155b15611df157816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016108f99190613898565b80156116ee576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580611e62575060208201516fffffffffffffffffffffffffffffffff1615155b156116ee57816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016108f99190613898565b600061193f8383612591565b600061193f83836125e0565b3373ffffffffffffffffffffffffffffffffffffffff821603611f32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108f9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b611fb181610b6a565b611ff3576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f9565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa158015612072573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209691906137b6565b6114be576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b67ffffffffffffffff821660009081526007602052604090206116ee90600201827f00000000000000000000000000000000000000000000000000000000000000006126d3565b600061193f8373ffffffffffffffffffffffffffffffffffffffff84166125e0565b600061193f8373ffffffffffffffffffffffffffffffffffffffff8416612591565b7f0000000000000000000000000000000000000000000000000000000000000000156114be5761218a600282612a56565b6114be576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016108f9565b6121e181610b6a565b612223576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f9565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa15801561229c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c091906138d4565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114be576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b67ffffffffffffffff821660009081526007602052604090206116ee90827f00000000000000000000000000000000000000000000000000000000000000006126d3565b60608160000180548060200260200160405190810160405280929190818152602001828054801561069d57602002820191906000526020600020905b8154815260200190600101908083116123a65750505050509050919050565b60006123e4856123d584866138f1565b6123df9087613908565b612a85565b90505b949350505050565b815460009061241890700100000000000000000000000000000000900463ffffffff1642613802565b905080156124ba5760018301548354612460916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166123c5565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546124e0916fffffffffffffffffffffffffffffffff9081169116612a85565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990611d55908490613898565b60008181526001830160205260408120546125d8575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f3565b5060006105f3565b600081815260018301602052604081205480156126c9576000612604600183613802565b855490915060009061261890600190613802565b905080821461267d576000866000018281548110612638576126386134e2565b906000526020600020015490508087600001848154811061265b5761265b6134e2565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061268e5761268e61391b565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f3565b60009150506105f3565b825474010000000000000000000000000000000000000000900460ff1615806126fa575081155b1561270457505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061274a90700100000000000000000000000000000000900463ffffffff1642613802565b9050801561280a578183111561278c576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546127c69083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166123c5565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156128c15773ffffffffffffffffffffffffffffffffffffffff8416612869576040517ff94ebcd100000000000000000000000000000000000000000000000000000000815260048101839052602481018690526044016108f9565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff851660448201526064016108f9565b848310156129d45760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169060009082906129059082613802565b61290f878a613802565b6129199190613908565b612923919061394a565b905073ffffffffffffffffffffffffffffffffffffffff861661297c576040517f15279c0800000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016108f9565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff871660448201526064016108f9565b6129de8584613802565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561193f565b6000818310612a94578161193f565b5090919050565b508054612aa79061307f565b6000825580601f10612ab7575050565b601f0160209004906000526020600020908101906114be91905b80821115612ae55760008155600101612ad1565b5090565b600060208284031215612afb57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461193f57600080fd5b803567ffffffffffffffff81168114612b4357600080fd5b919050565b600060208284031215612b5a57600080fd5b61193f82612b2b565b6000815180845260005b81811015612b8957602081850181015186830182015201612b6d565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061193f6020830184612b63565b73ffffffffffffffffffffffffffffffffffffffff811681146114be57600080fd5b8035612b4381612bda565b600060208284031215612c1957600080fd5b813561193f81612bda565b600060208284031215612c3657600080fd5b813567ffffffffffffffff811115612c4d57600080fd5b8201610100818503121561193f57600080fd5b60008083601f840112612c7257600080fd5b50813567ffffffffffffffff811115612c8a57600080fd5b6020830191508360208260051b8501011115612ca557600080fd5b9250929050565b60008060008060408587031215612cc257600080fd5b843567ffffffffffffffff80821115612cda57600080fd5b612ce688838901612c60565b90965094506020870135915080821115612cff57600080fd5b50612d0c87828801612c60565b95989497509550505050565b600080600060408486031215612d2d57600080fd5b612d3684612b2b565b9250602084013567ffffffffffffffff80821115612d5357600080fd5b818601915086601f830112612d6757600080fd5b813581811115612d7657600080fd5b876020828501011115612d8857600080fd5b6020830194508093505050509250925092565b600060208284031215612dad57600080fd5b813567ffffffffffffffff811115612dc457600080fd5b820160a0818503121561193f57600080fd5b602081526000825160406020840152612df26060840182612b63565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612e2d8282612b63565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e8457835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612e52565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e8457835167ffffffffffffffff1683529284019291840191600101612eac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff81118282101715612f2557612f25612ed2565b60405290565b60405160c0810167ffffffffffffffff81118282101715612f2557612f25612ed2565b80151581146114be57600080fd5b8035612b4381612f4e565b80356fffffffffffffffffffffffffffffffff81168114612b4357600080fd5b600060608284031215612f9957600080fd5b6040516060810181811067ffffffffffffffff82111715612fbc57612fbc612ed2565b6040529050808235612fcd81612f4e565b8152612fdb60208401612f67565b6020820152612fec60408401612f67565b60408201525092915050565b600080600060e0848603121561300d57600080fd5b61301684612b2b565b92506130258560208601612f87565b91506130348560808601612f87565b90509250925092565b6000806020838503121561305057600080fd5b823567ffffffffffffffff81111561306757600080fd5b61307385828601612c60565b90969095509350505050565b600181811c9082168061309357607f821691505b6020821081036130cc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082601f8301126130e357600080fd5b813567ffffffffffffffff808211156130fe576130fe612ed2565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561314457613144612ed2565b8160405283815286602085880101111561315d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000610100823603121561319057600080fd5b613198612f01565b823567ffffffffffffffff808211156131b057600080fd5b6131bc368387016130d2565b83526131ca60208601612b2b565b60208401526131db60408601612bfc565b6040840152606085013560608401526131f660808601612bfc565b608084015260a085013591508082111561320f57600080fd5b61321b368387016130d2565b60a084015260c085013591508082111561323457600080fd5b613240368387016130d2565b60c084015260e085013591508082111561325957600080fd5b50613266368286016130d2565b60e08301525092915050565b601f821115611022576000816000526020600020601f850160051c8101602086101561329b5750805b601f850160051c820191505b818110156132ba578281556001016132a7565b505050505050565b67ffffffffffffffff8311156132da576132da612ed2565b6132ee836132e8835461307f565b83613272565b6000601f841160018114613340576000851561330a5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611bb2565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561338f578685013582556020948501946001909201910161336f565b50868210156133ca577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b6040815260006133ef6040830186612b63565b82810360208401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050949350505050565b600060a0823603121561345257600080fd5b60405160a0810167ffffffffffffffff828210818311171561347657613476612ed2565b81604052843591508082111561348b57600080fd5b50613498368286016130d2565b8252506134a760208401612b2b565b602082015260408301356134ba81612bda565b60408201526060838101359082015260808301356134d781612bda565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec183360301811261354557600080fd5b9190910192915050565b6000610140823603121561356257600080fd5b61356a612f2b565b61357383612b2b565b815261358160208401612f5c565b6020820152604083013567ffffffffffffffff808211156135a157600080fd5b6135ad368387016130d2565b604084015260608501359150808211156135c657600080fd5b506135d3368286016130d2565b6060830152506135e63660808501612f87565b60808201526135f83660e08501612f87565b60a082015292915050565b815167ffffffffffffffff81111561361d5761361d612ed2565b6136318161362b845461307f565b84613272565b602080601f831160018114613684576000841561364e5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556132ba565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156136d1578886015182559484019460019091019084016136b2565b508582101561370d57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff8716835280602084015261374181840187612b63565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff908116606087015290870151166080850152915061377f9050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612e2d565b6000602082840312156137c857600080fd5b815161193f81612f4e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156105f3576105f36137d3565b67ffffffffffffffff8416815260e0810161386160208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c08301526123e7565b606081016105f382848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b6000602082840312156138e657600080fd5b815161193f81612bda565b80820281158282048414176105f3576105f36137d3565b808201808211156105f3576105f36137d3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600082613980577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"localTokenDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162004c6338038062004c63833981016040819052620000359162000918565b8484848484336000816200005c57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200008f576200008f8162000206565b50506001600160a01b0385161580620000af57506001600160a01b038116155b80620000c257506001600160a01b038216155b15620000e1576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000151575060408051601f3d908101601f191682019092526200014e9181019062000a3a565b60015b1562000192578060ff168560ff161462000190576040516332ad3e0760e11b815260ff8087166004830152821660248201526044015b60405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001dc57604080516000815260208101909152620001dc908462000280565b50620001fb935050506001600160a01b038716905030600019620003dd565b505050505062000b84565b336001600160a01b038216036200023057604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e051620002a1576040516335f4a7b360e01b815260040160405180910390fd5b60005b82518110156200032c576000838281518110620002c557620002c562000a58565b60209081029190910101519050620002df600282620004c3565b1562000322576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101620002a4565b5060005b8151811015620003d857600082828151811062000351576200035162000a58565b6020026020010151905060006001600160a01b0316816001600160a01b0316036200037d5750620003cf565b6200038a600282620004e3565b15620003cd576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010162000330565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000455919062000a6e565b62000461919062000a9e565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620004bd91869190620004fa16565b50505050565b6000620004da836001600160a01b038416620005cb565b90505b92915050565b6000620004da836001600160a01b038416620006cf565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000549906001600160a01b03851690849062000721565b805190915015620003d857808060200190518101906200056a919062000ab4565b620003d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000187565b60008181526001830160205260408120548015620006c4576000620005f260018362000adf565b8554909150600090620006089060019062000adf565b9050808214620006745760008660000182815481106200062c576200062c62000a58565b906000526020600020015490508087600001848154811062000652576200065262000a58565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000688576200068862000af5565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620004dd565b6000915050620004dd565b60008181526001830160205260408120546200071857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620004dd565b506000620004dd565b60606200073284846000856200073a565b949350505050565b6060824710156200079d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000187565b600080866001600160a01b03168587604051620007bb919062000b31565b60006040518083038185875af1925050503d8060008114620007fa576040519150601f19603f3d011682016040523d82523d6000602084013e620007ff565b606091505b50909250905062000813878383876200081e565b979650505050505050565b60608315620008925782516000036200088a576001600160a01b0385163b6200088a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000187565b508162000732565b620007328383815115620008a95781518083602001fd5b8060405162461bcd60e51b815260040162000187919062000b4f565b6001600160a01b0381168114620008db57600080fd5b50565b805160ff81168114620008f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b8051620008f081620008c5565b600080600080600060a086880312156200093157600080fd5b85516200093e81620008c5565b945060206200094f878201620008de565b60408801519095506001600160401b03808211156200096d57600080fd5b818901915089601f8301126200098257600080fd5b815181811115620009975762000997620008f5565b8060051b604051601f19603f83011681018181108582111715620009bf57620009bf620008f5565b60405291825284820192508381018501918c831115620009de57600080fd5b938501935b8285101562000a0757620009f7856200090b565b84529385019392850192620009e3565b80985050505050505062000a1e606087016200090b565b915062000a2e608087016200090b565b90509295509295909350565b60006020828403121562000a4d57600080fd5b620004da82620008de565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562000a8157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620004dd57620004dd62000a88565b60006020828403121562000ac757600080fd5b8151801515811462000ad857600080fd5b9392505050565b81810381811115620004dd57620004dd62000a88565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000b2857818101518382015260200162000b0e565b50506000910152565b6000825162000b4581846020870162000b0b565b9190910192915050565b602081526000825180602084015262000b7081604085016020870162000b0b565b601f01601f19169190910160400192915050565b60805160a05160c05160e05161402e62000c356000396000818161054f01528181611d8201526127d30152600081816105290152818161189f015261206e0152600081816102e001528181610ba901528181611a4801528181611b0201528181611b3601528181611b6901528181611bce01528181611c270152611cc90152600081816102470152818161029c01528181610708015281816121f10152818161276901526129be015261402e6000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80639a4575b911610104578063c0d78655116100a2578063dc0bd97111610071578063dc0bd97114610527578063e0351e131461054d578063e8a1da1714610573578063f2fde38b1461058657600080fd5b8063c0d78655146104d9578063c4bffe2b146104ec578063c75eea9c14610501578063cf7401f31461051457600080fd5b8063acfecf91116100de578063acfecf9114610426578063af58d59f14610439578063b0f479a1146104a8578063b7946580146104c657600080fd5b80639a4575b9146103d1578063a42a7b8b146103f1578063a7cd63b71461041157600080fd5b806354c8a4f31161017157806379ba50971161014b57806379ba5097146103855780637d54534e1461038d5780638926f54f146103a05780638da5cb5b146103b357600080fd5b806354c8a4f31461033f57806362ddd3c4146103545780636d3d1a581461036757600080fd5b8063240028e8116101ad578063240028e81461028c57806324f65ee7146102d9578063390775371461030a5780634c5ef0ed1461032c57600080fd5b806301ffc9a7146101d4578063181f5a77146101fc57806321df0da714610245575b600080fd5b6101e76101e236600461317e565b610599565b60405190151581526020015b60405180910390f35b6102386040518060400160405280601b81526020017f4275726e46726f6d4d696e74546f6b656e506f6f6c20312e352e31000000000081525081565b6040516101f39190613224565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b6101e761029a366004613259565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b61031d610318366004613276565b61067e565b604051905181526020016101f3565b6101e761033a3660046132cf565b61084d565b61035261034d36600461339e565b610897565b005b6103526103623660046132cf565b610912565b60095473ffffffffffffffffffffffffffffffffffffffff16610267565b6103526109af565b61035261039b366004613259565b610a7d565b6101e76103ae36600461340a565b610afe565b60015473ffffffffffffffffffffffffffffffffffffffff16610267565b6103e46103df366004613425565b610b15565b6040516101f39190613460565b6104046103ff36600461340a565b610bee565b6040516101f391906134b7565b610419610d59565b6040516101f39190613539565b6103526104343660046132cf565b610d6a565b61044c61044736600461340a565b610e82565b6040516101f3919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610267565b6102386104d436600461340a565b610f57565b6103526104e7366004613259565b611007565b6104f46110e2565b6040516101f39190613593565b61044c61050f36600461340a565b61119a565b61035261052236600461371b565b61126c565b7f0000000000000000000000000000000000000000000000000000000000000000610267565b7f00000000000000000000000000000000000000000000000000000000000000006101e7565b61035261058136600461339e565b6112f0565b610352610594366004613259565b611802565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061062c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061067857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60408051602081019091526000815261069682611816565b60006106ef60608401356106ea6106b060c0870187613760565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3a92505050565b611afe565b905073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f1961073d6060860160408701613259565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b1580156107aa57600080fd5b505af11580156107be573d6000803e3d6000fd5b506107d3925050506060840160408501613259565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f08360405161083191815260200190565b60405180910390a3604080516020810190915290815292915050565b600061088f83836040516108629291906137c5565b604080519182900390912067ffffffffffffffff8716600090815260076020529190912060050190611d12565b949350505050565b61089f611d2d565b61090c84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611d8092505050565b50505050565b61091a611d2d565b61092383610afe565b61096a576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b6109aa8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f3692505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a00576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a85611d2d565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b6000610678600567ffffffffffffffff8416611d12565b6040805180820190915260608082526020820152610b3282612030565b610b3f82606001356121bc565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610b998460200160208101906104d4919061340a565b8152602001610be66040805160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260609101604051602081830303815290604052905090565b905292915050565b67ffffffffffffffff8116600090815260076020526040812060609190610c179060050161225e565b90506000815167ffffffffffffffff811115610c3557610c356135d5565b604051908082528060200260200182016040528015610c6857816020015b6060815260200190600190039081610c535790505b50905060005b8251811015610d515760086000848381518110610c8d57610c8d6137d5565b602002602001015181526020019081526020016000208054610cae90613804565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda90613804565b8015610d275780601f10610cfc57610100808354040283529160200191610d27565b820191906000526020600020905b815481529060010190602001808311610d0a57829003601f168201915b5050505050828281518110610d3e57610d3e6137d5565b6020908102919091010152600101610c6e565b509392505050565b6060610d65600261225e565b905090565b610d72611d2d565b610d7b83610afe565b610dbd576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610961565b610dfd8282604051610dd09291906137c5565b604080519182900390912067ffffffffffffffff861660009081526007602052919091206005019061226b565b610e39578282826040517f74f23c7c000000000000000000000000000000000000000000000000000000008152600401610961939291906138a0565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d768383604051610e759291906138c4565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261067890612277565b67ffffffffffffffff81166000908152600760205260409020600401805460609190610f8290613804565b80601f0160208091040260200160405190810160405280929190818152602001828054610fae90613804565b8015610ffb5780601f10610fd057610100808354040283529160200191610ffb565b820191906000526020600020905b815481529060010190602001808311610fde57829003601f168201915b50505050509050919050565b61100f611d2d565b73ffffffffffffffffffffffffffffffffffffffff811661105c576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006110f0600561225e565b90506000815167ffffffffffffffff81111561110e5761110e6135d5565b604051908082528060200260200182016040528015611137578160200160208202803683370190505b50905060005b825181101561119357828181518110611158576111586137d5565b6020026020010151828281518110611172576111726137d5565b67ffffffffffffffff9092166020928302919091019091015260010161113d565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261067890612277565b60095473ffffffffffffffffffffffffffffffffffffffff1633148015906112ac575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156112e5576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b6109aa838383612329565b6112f8611d2d565b60005b838110156114e5576000858583818110611317576113176137d5565b905060200201602081019061132c919061340a565b9050611343600567ffffffffffffffff831661226b565b611385576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b67ffffffffffffffff811660009081526007602052604081206113aa9060050161225e565b905060005b81518110156114165761140d8282815181106113cd576113cd6137d5565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050161226b90919063ffffffff16565b506001016113af565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff0000000000000000000000000000000000000000009081168255600182018390556002820180549091169055600381018290559061147f6004830182613111565b6005820160008181611491828261314b565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916945060200192506114d3915050565b60405180910390a150506001016112fb565b5060005b818110156117fb576000838383818110611505576115056137d5565b905060200281019061151791906138d8565b611520906139a4565b905061153181606001516000612413565b61154081608001516000612413565b80604001515160000361157f576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516115979060059067ffffffffffffffff16612550565b6115dc5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610961565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a90910299909316171790941695909517909255909202909117600382015590820151600482019061175f9082613b1b565b5060005b8260200151518110156117a35761179b83600001518460200151838151811061178e5761178e6137d5565b6020026020010151611f36565b600101611763565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c282600001518360400151846060015185608001516040516117e99493929190613c35565b60405180910390a150506001016114e9565b5050505050565b61180a611d2d565b6118138161255c565b50565b61182961029a60a0830160808401613259565b6118885761183d60a0820160808301613259565b6040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610961565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6118d4604084016020850161340a565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015611945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119699190613cce565b156119a0576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b86119b3604083016020840161340a565b612620565b6119d86119cb604083016020840161340a565b61033a60a0840184613760565b611a1d576119e960a0820182613760565b6040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016109619291906138c4565b611813611a30604083016020840161340a565b8260600135612746565b60008151600003611a6c57507f0000000000000000000000000000000000000000000000000000000000000000919050565b8151602014611aa957816040517f953576f70000000000000000000000000000000000000000000000000000000081526004016109619190613224565b600082806020019051810190611abf9190613ceb565b905060ff81111561067857826040517f953576f70000000000000000000000000000000000000000000000000000000081526004016109619190613224565b60007f000000000000000000000000000000000000000000000000000000000000000060ff168260ff1603611b34575081610678565b7f000000000000000000000000000000000000000000000000000000000000000060ff168260ff161115611c1f576000611b8e7f000000000000000000000000000000000000000000000000000000000000000084613d33565b9050604d8160ff161115611c02576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610961565b611c0d81600a613e6c565b611c179085613e7b565b915050610678565b6000611c4b837f0000000000000000000000000000000000000000000000000000000000000000613d33565b9050604d8160ff161180611c925750611c6581600a613e6c565b611c8f907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613e7b565b84115b15611cfd576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610961565b611d0881600a613e6c565b61088f9085613eb6565b600081815260018301602052604081205415155b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d7e576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f0000000000000000000000000000000000000000000000000000000000000000611dd7576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611e6d576000838281518110611df757611df76137d5565b60200260200101519050611e1581600261278d90919063ffffffff16565b15611e645760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611dda565b5060005b81518110156109aa576000828281518110611e8e57611e8e6137d5565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ed25750611f2e565b611edd6002826127af565b15611f2c5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611e71565b8051600003611f71576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff8416600090815260079092526040909120611fa39060050182612550565b611fdd5782826040517f393b8ad2000000000000000000000000000000000000000000000000000000008152600401610961929190613ecd565b6000818152600860205260409020611ff58382613b1b565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea83604051610e759190613224565b61204361029a60a0830160808401613259565b6120575761183d60a0820160808301613259565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6120a3604084016020850161340a565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015612114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121389190613cce565b1561216f576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6121876121826060830160408401613259565b6127d1565b61219f61219a604083016020840161340a565b612850565b6118136121b2604083016020840161340a565b826060013561299e565b6040517f79cc6790000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906379cc679090604401600060405180830381600087803b15801561224a57600080fd5b505af11580156117fb573d6000803e3d6000fd5b60606000611d26836129e2565b6000611d268383612a3d565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915261230582606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426122e99190613ef0565b85608001516fffffffffffffffffffffffffffffffff16612b30565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61233283610afe565b612374576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610961565b61237f826000612413565b67ffffffffffffffff831660009081526007602052604090206123a29083612b58565b6123ad816000612413565b67ffffffffffffffff831660009081526007602052604090206123d39060020182612b58565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b83838360405161240693929190613f03565b60405180910390a1505050565b8151156124de5781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612469575060408201516fffffffffffffffffffffffffffffffff16155b156124a257816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016109619190613f86565b80156124da576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580612517575060208201516fffffffffffffffffffffffffffffffff1615155b156124da57816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016109619190613f86565b6000611d268383612cfa565b3373ffffffffffffffffffffffffffffffffffffffff8216036125ab576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61262981610afe565b61266b576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa1580156126ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270e9190613cce565b611813576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b67ffffffffffffffff821660009081526007602052604090206124da90600201827f0000000000000000000000000000000000000000000000000000000000000000612d49565b6000611d268373ffffffffffffffffffffffffffffffffffffffff8416612a3d565b6000611d268373ffffffffffffffffffffffffffffffffffffffff8416612cfa565b7f000000000000000000000000000000000000000000000000000000000000000015611813576128026002826130cc565b611813576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610961565b61285981610afe565b61289b576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa158015612914573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129389190613fc2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611813576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b67ffffffffffffffff821660009081526007602052604090206124da90827f0000000000000000000000000000000000000000000000000000000000000000612d49565b606081600001805480602002602001604051908101604052809291908181526020018280548015610ffb57602002820191906000526020600020905b815481526020019060010190808311612a1e5750505050509050919050565b60008181526001830160205260408120548015612b26576000612a61600183613ef0565b8554909150600090612a7590600190613ef0565b9050808214612ada576000866000018281548110612a9557612a956137d5565b9060005260206000200154905080876000018481548110612ab857612ab86137d5565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612aeb57612aeb613fdf565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610678565b6000915050610678565b6000612b4f85612b408486613eb6565b612b4a908761400e565b6130fb565b95945050505050565b8154600090612b8190700100000000000000000000000000000000900463ffffffff1642613ef0565b90508015612c235760018301548354612bc9916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612b30565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354612c49916fffffffffffffffffffffffffffffffff90811691166130fb565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990612406908490613f86565b6000818152600183016020526040812054612d4157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610678565b506000610678565b825474010000000000000000000000000000000000000000900460ff161580612d70575081155b15612d7a57505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612dc090700100000000000000000000000000000000900463ffffffff1642613ef0565b90508015612e805781831115612e02576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612e3c9083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612b30565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612f375773ffffffffffffffffffffffffffffffffffffffff8416612edf576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610961565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610961565b8483101561304a5760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290612f7b9082613ef0565b612f85878a613ef0565b612f8f919061400e565b612f999190613e7b565b905073ffffffffffffffffffffffffffffffffffffffff8616612ff2576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610961565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610961565b6130548584613ef0565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611d26565b600081831061310a5781611d26565b5090919050565b50805461311d90613804565b6000825580601f1061312d575050565b601f0160209004906000526020600020908101906118139190613165565b508054600082559060005260206000209081019061181391905b5b8082111561317a5760008155600101613166565b5090565b60006020828403121561319057600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d2657600080fd5b6000815180845260005b818110156131e6576020818501810151868301820152016131ca565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611d2660208301846131c0565b73ffffffffffffffffffffffffffffffffffffffff8116811461181357600080fd5b60006020828403121561326b57600080fd5b8135611d2681613237565b60006020828403121561328857600080fd5b813567ffffffffffffffff81111561329f57600080fd5b82016101008185031215611d2657600080fd5b803567ffffffffffffffff811681146132ca57600080fd5b919050565b6000806000604084860312156132e457600080fd5b6132ed846132b2565b9250602084013567ffffffffffffffff8082111561330a57600080fd5b818601915086601f83011261331e57600080fd5b81358181111561332d57600080fd5b87602082850101111561333f57600080fd5b6020830194508093505050509250925092565b60008083601f84011261336457600080fd5b50813567ffffffffffffffff81111561337c57600080fd5b6020830191508360208260051b850101111561339757600080fd5b9250929050565b600080600080604085870312156133b457600080fd5b843567ffffffffffffffff808211156133cc57600080fd5b6133d888838901613352565b909650945060208701359150808211156133f157600080fd5b506133fe87828801613352565b95989497509550505050565b60006020828403121561341c57600080fd5b611d26826132b2565b60006020828403121561343757600080fd5b813567ffffffffffffffff81111561344e57600080fd5b820160a08185031215611d2657600080fd5b60208152600082516040602084015261347c60608401826131c0565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b4f82826131c0565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561352c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261351a8583516131c0565b945092850192908501906001016134e0565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358757835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101613555565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358757835167ffffffffffffffff16835292840192918401916001016135af565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613627576136276135d5565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613674576136746135d5565b604052919050565b801515811461181357600080fd5b80356fffffffffffffffffffffffffffffffff811681146132ca57600080fd5b6000606082840312156136bc57600080fd5b6040516060810181811067ffffffffffffffff821117156136df576136df6135d5565b60405290508082356136f08161367c565b81526136fe6020840161368a565b602082015261370f6040840161368a565b60408201525092915050565b600080600060e0848603121561373057600080fd5b613739846132b2565b925061374885602086016136aa565b915061375785608086016136aa565b90509250925092565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261379557600080fd5b83018035915067ffffffffffffffff8211156137b057600080fd5b60200191503681900382131561339757600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061381857607f821691505b602082108103613851577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b67ffffffffffffffff84168152604060208201526000612b4f604083018486613857565b60208152600061088f602083018486613857565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261390c57600080fd5b9190910192915050565b600082601f83011261392757600080fd5b813567ffffffffffffffff811115613941576139416135d5565b61397260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161362d565b81815284602083860101111561398757600080fd5b816020850160208301376000918101602001919091529392505050565b600061012082360312156139b757600080fd5b6139bf613604565b6139c8836132b2565b815260208084013567ffffffffffffffff808211156139e657600080fd5b9085019036601f8301126139f957600080fd5b813581811115613a0b57613a0b6135d5565b8060051b613a1a85820161362d565b9182528381018501918581019036841115613a3457600080fd5b86860192505b83831015613a7057823585811115613a525760008081fd5b613a603689838a0101613916565b8352509186019190860190613a3a565b8087890152505050506040860135925080831115613a8d57600080fd5b5050613a9b36828601613916565b604083015250613aae36606085016136aa565b6060820152613ac03660c085016136aa565b608082015292915050565b601f8211156109aa576000816000526020600020601f850160051c81016020861015613af45750805b601f850160051c820191505b81811015613b1357828155600101613b00565b505050505050565b815167ffffffffffffffff811115613b3557613b356135d5565b613b4981613b438454613804565b84613acb565b602080601f831160018114613b9c5760008415613b665750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b13565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613be957888601518255948401946001909101908401613bca565b5085821015613c2557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152613c59818401876131c0565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff9081166060870152908701511660808501529150613c979050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612b4f565b600060208284031215613ce057600080fd5b8151611d268161367c565b600060208284031215613cfd57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff828116828216039081111561067857610678613d04565b600181815b80851115613da557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613d8b57613d8b613d04565b80851615613d9857918102915b93841c9390800290613d51565b509250929050565b600082613dbc57506001610678565b81613dc957506000610678565b8160018114613ddf5760028114613de957613e05565b6001915050610678565b60ff841115613dfa57613dfa613d04565b50506001821b610678565b5060208310610133831016604e8410600b8410161715613e28575081810a610678565b613e328383613d4c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613e6457613e64613d04565b029392505050565b6000611d2660ff841683613dad565b600082613eb1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b808202811582820484141761067857610678613d04565b67ffffffffffffffff8316815260406020820152600061088f60408301846131c0565b8181038181111561067857610678613d04565b67ffffffffffffffff8416815260e08101613f4f60208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c083015261088f565b6060810161067882848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600060208284031215613fd457600080fd5b8151611d2681613237565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8082018082111561067857610678613d0456fea164736f6c6343000818000a", } var BurnFromMintTokenPoolABI = BurnFromMintTokenPoolMetaData.ABI var BurnFromMintTokenPoolBin = BurnFromMintTokenPoolMetaData.Bin -func DeployBurnFromMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnFromMintTokenPool, error) { +func DeployBurnFromMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, localTokenDecimals uint8, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnFromMintTokenPool, error) { parsed, err := BurnFromMintTokenPoolMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -99,7 +98,7 @@ func DeployBurnFromMintTokenPool(auth *bind.TransactOpts, backend bind.ContractB return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnFromMintTokenPoolBin), backend, token, allowlist, rmnProxy, router) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnFromMintTokenPoolBin), backend, token, localTokenDecimals, allowlist, rmnProxy, router) if err != nil { return common.Address{}, nil, nil, err } @@ -332,26 +331,26 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) GetRateLimitAd return _BurnFromMintTokenPool.Contract.GetRateLimitAdmin(&_BurnFromMintTokenPool.CallOpts) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _BurnFromMintTokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _BurnFromMintTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnFromMintTokenPool.Contract.GetRemotePool(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnFromMintTokenPool.Contract.GetRemotePools(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnFromMintTokenPool.Contract.GetRemotePool(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnFromMintTokenPool.Contract.GetRemotePools(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector) } func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -464,6 +463,50 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) GetToken() (co return _BurnFromMintTokenPool.Contract.GetToken(&_BurnFromMintTokenPool.CallOpts) } +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _BurnFromMintTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _BurnFromMintTokenPool.Contract.GetTokenDecimals(&_BurnFromMintTokenPool.CallOpts) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _BurnFromMintTokenPool.Contract.GetTokenDecimals(&_BurnFromMintTokenPool.CallOpts) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _BurnFromMintTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnFromMintTokenPool.Contract.IsRemotePool(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnFromMintTokenPool.Contract.IsRemotePool(&_BurnFromMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnFromMintTokenPool *BurnFromMintTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _BurnFromMintTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -586,6 +629,18 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) AcceptOwne return _BurnFromMintTokenPool.Contract.AcceptOwnership(&_BurnFromMintTokenPool.TransactOpts) } +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.AddRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.AddRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _BurnFromMintTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -598,16 +653,16 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) ApplyAllow return _BurnFromMintTokenPool.Contract.ApplyAllowListUpdates(&_BurnFromMintTokenPool.TransactOpts, removes, adds) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnFromMintTokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnFromMintTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnFromMintTokenPool.TransactOpts, chains) +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnFromMintTokenPool.TransactOpts, chains) +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -634,6 +689,18 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) ReleaseOrM return _BurnFromMintTokenPool.Contract.ReleaseOrMint(&_BurnFromMintTokenPool.TransactOpts, releaseOrMintIn) } +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.RemoveRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnFromMintTokenPool.Contract.RemoveRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _BurnFromMintTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -658,18 +725,6 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) SetRateLim return _BurnFromMintTokenPool.Contract.SetRateLimitAdmin(&_BurnFromMintTokenPool.TransactOpts, rateLimitAdmin) } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnFromMintTokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnFromMintTokenPool.Contract.SetRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnFromMintTokenPool.Contract.SetRemotePool(&_BurnFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_BurnFromMintTokenPool *BurnFromMintTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _BurnFromMintTokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2066,6 +2121,123 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseOwnershipTrans return event, nil } +type BurnFromMintTokenPoolRateLimitAdminSetIterator struct { + Event *BurnFromMintTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnFromMintTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnFromMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnFromMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnFromMintTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *BurnFromMintTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnFromMintTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnFromMintTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _BurnFromMintTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &BurnFromMintTokenPoolRateLimitAdminSetIterator{contract: _BurnFromMintTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _BurnFromMintTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnFromMintTokenPoolRateLimitAdminSet) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*BurnFromMintTokenPoolRateLimitAdminSet, error) { + event := new(BurnFromMintTokenPoolRateLimitAdminSet) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type BurnFromMintTokenPoolReleasedIterator struct { Event *BurnFromMintTokenPoolReleased @@ -2203,8 +2375,136 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseReleased(log t return event, nil } -type BurnFromMintTokenPoolRemotePoolSetIterator struct { - Event *BurnFromMintTokenPoolRemotePoolSet +type BurnFromMintTokenPoolRemotePoolAddedIterator struct { + Event *BurnFromMintTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnFromMintTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnFromMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnFromMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnFromMintTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *BurnFromMintTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnFromMintTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &BurnFromMintTokenPoolRemotePoolAddedIterator{contract: _BurnFromMintTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnFromMintTokenPoolRemotePoolAdded) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*BurnFromMintTokenPoolRemotePoolAdded, error) { + event := new(BurnFromMintTokenPoolRemotePoolAdded) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type BurnFromMintTokenPoolRemotePoolRemovedIterator struct { + Event *BurnFromMintTokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2215,7 +2515,7 @@ type BurnFromMintTokenPoolRemotePoolSetIterator struct { fail error } -func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Next() bool { +func (it *BurnFromMintTokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2224,7 +2524,7 @@ func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BurnFromMintTokenPoolRemotePoolSet) + it.Event = new(BurnFromMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2239,7 +2539,7 @@ func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(BurnFromMintTokenPoolRemotePoolSet) + it.Event = new(BurnFromMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2254,44 +2554,43 @@ func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Error() error { +func (it *BurnFromMintTokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *BurnFromMintTokenPoolRemotePoolSetIterator) Close() error { +func (it *BurnFromMintTokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type BurnFromMintTokenPoolRemotePoolSet struct { +type BurnFromMintTokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolSetIterator, error) { +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &BurnFromMintTokenPoolRemotePoolSetIterator{contract: _BurnFromMintTokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &BurnFromMintTokenPoolRemotePoolRemovedIterator{contract: _BurnFromMintTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2301,8 +2600,8 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRemotePoolSet( select { case log := <-logs: - event := new(BurnFromMintTokenPoolRemotePoolSet) - if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(BurnFromMintTokenPoolRemotePoolRemoved) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2323,9 +2622,9 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) WatchRemotePoolSet( }), nil } -func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*BurnFromMintTokenPoolRemotePoolSet, error) { - event := new(BurnFromMintTokenPoolRemotePoolSet) - if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_BurnFromMintTokenPool *BurnFromMintTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*BurnFromMintTokenPoolRemotePoolRemoved, error) { + event := new(BurnFromMintTokenPoolRemotePoolRemoved) + if err := _BurnFromMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -2591,10 +2890,14 @@ func (_BurnFromMintTokenPool *BurnFromMintTokenPool) ParseLog(log types.Log) (ge return _BurnFromMintTokenPool.ParseOwnershipTransferRequested(log) case _BurnFromMintTokenPool.abi.Events["OwnershipTransferred"].ID: return _BurnFromMintTokenPool.ParseOwnershipTransferred(log) + case _BurnFromMintTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _BurnFromMintTokenPool.ParseRateLimitAdminSet(log) case _BurnFromMintTokenPool.abi.Events["Released"].ID: return _BurnFromMintTokenPool.ParseReleased(log) - case _BurnFromMintTokenPool.abi.Events["RemotePoolSet"].ID: - return _BurnFromMintTokenPool.ParseRemotePoolSet(log) + case _BurnFromMintTokenPool.abi.Events["RemotePoolAdded"].ID: + return _BurnFromMintTokenPool.ParseRemotePoolAdded(log) + case _BurnFromMintTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _BurnFromMintTokenPool.ParseRemotePoolRemoved(log) case _BurnFromMintTokenPool.abi.Events["RouterUpdated"].ID: return _BurnFromMintTokenPool.ParseRouterUpdated(log) case _BurnFromMintTokenPool.abi.Events["TokensConsumed"].ID: @@ -2649,12 +2952,20 @@ func (BurnFromMintTokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (BurnFromMintTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (BurnFromMintTokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (BurnFromMintTokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (BurnFromMintTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (BurnFromMintTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (BurnFromMintTokenPoolRouterUpdated) Topic() common.Hash { @@ -2680,7 +2991,7 @@ type BurnFromMintTokenPoolInterface interface { GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -2692,6 +3003,10 @@ type BurnFromMintTokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -2704,20 +3019,22 @@ type BurnFromMintTokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -2788,17 +3105,29 @@ type BurnFromMintTokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*BurnFromMintTokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnFromMintTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*BurnFromMintTokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*BurnFromMintTokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*BurnFromMintTokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*BurnFromMintTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnFromMintTokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnFromMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*BurnFromMintTokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*BurnFromMintTokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*BurnFromMintTokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generated/burn_mint_token_pool/burn_mint_token_pool.go b/core/gethwrappers/ccip/generated/burn_mint_token_pool/burn_mint_token_pool.go index 244f04596a..ecfad493c2 100644 --- a/core/gethwrappers/ccip/generated/burn_mint_token_pool/burn_mint_token_pool.go +++ b/core/gethwrappers/ccip/generated/burn_mint_token_pool/burn_mint_token_pool.go @@ -74,23 +74,22 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig } var BurnMintTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b50604051620040b3380380620040b383398101604081905262000034916200054c565b8383838333806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000176565b5050506001600160a01b0384161580620000e357506001600160a01b038116155b80620000f657506001600160a01b038216155b1562000115576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c052620001685760408051600081526020810190915262000168908462000221565b5050505050505050620006aa565b336001600160a01b03821603620001d05760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c05162000242576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002cd5760008382815181106200026657620002666200065c565b60209081029190910101519050620002806002826200037e565b15620002c3576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b5060010162000245565b5060005b815181101562000379576000828281518110620002f257620002f26200065c565b6020026020010151905060006001600160a01b0316816001600160a01b0316036200031e575062000370565b6200032b6002826200039e565b156200036e576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620002d1565b505050565b600062000395836001600160a01b038416620003b5565b90505b92915050565b600062000395836001600160a01b038416620004b9565b60008181526001830160205260408120548015620004ae576000620003dc60018362000672565b8554909150600090620003f29060019062000672565b90508082146200045e5760008660000182815481106200041657620004166200065c565b90600052602060002001549050808760000184815481106200043c576200043c6200065c565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000472576200047262000694565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000398565b600091505062000398565b6000818152600183016020526040812054620005025750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000398565b50600062000398565b6001600160a01b03811681146200052157600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b805162000547816200050b565b919050565b600080600080608085870312156200056357600080fd5b845162000570816200050b565b602086810151919550906001600160401b03808211156200059057600080fd5b818801915088601f830112620005a557600080fd5b815181811115620005ba57620005ba62000524565b8060051b604051601f19603f83011681018181108582111715620005e257620005e262000524565b60405291825284820192508381018501918b8311156200060157600080fd5b938501935b828510156200062a576200061a856200053a565b8452938501939285019262000606565b80985050505050505062000641604086016200053a565b915062000651606086016200053a565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b818103818111156200039857634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05161398c62000727600039600081816104dd0152818161177701526121550152600081816104b7015281816115a80152611a2d0152600081816102390152818161028e015281816106e0015281816114c80152818161194d01528181611b3f015281816120eb0152612340015261398c6000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80639a4575b9116100ee578063c4bffe2b11610097578063db6327dc11610071578063db6327dc146104a2578063dc0bd971146104b5578063e0351e13146104db578063f2fde38b1461050157600080fd5b8063c4bffe2b14610467578063c75eea9c1461047c578063cf7401f31461048f57600080fd5b8063b0f479a1116100c8578063b0f479a114610423578063b794658014610441578063c0d786551461045457600080fd5b80639a4575b91461037f578063a7cd63b71461039f578063af58d59f146103b457600080fd5b806354c8a4f31161015b57806379ba50971161013557806379ba5097146103335780637d54534e1461033b5780638926f54f1461034e5780638da5cb5b1461036157600080fd5b806354c8a4f3146102ed5780636d3d1a581461030257806378a010b21461032057600080fd5b806321df0da71161018c57806321df0da714610237578063240028e81461027e57806339077537146102cb57600080fd5b806301ffc9a7146101b35780630a2fd493146101db578063181f5a77146101fb575b600080fd5b6101c66101c1366004612ae3565b610514565b60405190151581526020015b60405180910390f35b6101ee6101e9366004612b42565b6105f9565b6040516101d29190612bc1565b6101ee6040518060400160405280601781526020017f4275726e4d696e74546f6b656e506f6f6c20312e352e3000000000000000000081525081565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d2565b6101c661028c366004612c01565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b6102de6102d9366004612c1e565b6106a9565b604051905181526020016101d2565b6103006102fb366004612ca6565b61082f565b005b60085473ffffffffffffffffffffffffffffffffffffffff16610259565b61030061032e366004612d12565b6108aa565b610300610a1e565b610300610349366004612c01565b610b1b565b6101c661035c366004612b42565b610b6a565b60005473ffffffffffffffffffffffffffffffffffffffff16610259565b61039261038d366004612d95565b610b81565b6040516101d29190612dd0565b6103a7610c28565b6040516101d29190612e30565b6103c76103c2366004612b42565b610c39565b6040516101d2919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610259565b6101ee61044f366004612b42565b610d0e565b610300610462366004612c01565b610d39565b61046f610e14565b6040516101d29190612e8a565b6103c761048a366004612b42565b610ecc565b61030061049d366004612ff2565b610f9e565b6103006104b0366004613037565b611027565b7f0000000000000000000000000000000000000000000000000000000000000000610259565b7f00000000000000000000000000000000000000000000000000000000000000006101c6565b61030061050f366004612c01565b6114ad565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf0000000000000000000000000000000000000000000000000000000014806105a757507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b806105f357507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b67ffffffffffffffff8116600090815260076020526040902060040180546060919061062490613079565b80601f016020809104026020016040519081016040528092919081815260200182805461065090613079565b801561069d5780601f106106725761010080835404028352916020019161069d565b820191906000526020600020905b81548152906001019060200180831161068057829003601f168201915b50505050509050919050565b6040805160208101909152600081526106c96106c483613177565b6114c1565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f196107156060850160408601612c01565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260608501356024820152604401600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b506107ae925050506060830160408401612c01565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0846060013560405161081091815260200190565b60405180910390a3506040805160208101909152606090910135815290565b6108376116f2565b6108a48484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061177592505050565b50505050565b6108b26116f2565b6108bb83610b6a565b610902576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b67ffffffffffffffff83166000908152600760205260408120600401805461092990613079565b80601f016020809104026020016040519081016040528092919081815260200182805461095590613079565b80156109a25780601f10610977576101008083540402835291602001916109a2565b820191906000526020600020905b81548152906001019060200180831161098557829003601f168201915b5050505067ffffffffffffffff86166000908152600760205260409020919250506004016109d18385836132bc565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610a10939291906133d6565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108f9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b236116f2565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006105f3600567ffffffffffffffff841661192b565b6040805180820190915260608082526020820152610ba6610ba18361343a565b611946565b610bb38260600135611b10565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610c0d84602001602081019061044f9190612b42565b81526040805160208181019092526000815291015292915050565b6060610c346002611bb3565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260039091015480841660608301529190910490911660808201526105f390611bc0565b67ffffffffffffffff8116600090815260076020526040902060050180546060919061062490613079565b610d416116f2565b73ffffffffffffffffffffffffffffffffffffffff8116610d8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b60606000610e226005611bb3565b90506000815167ffffffffffffffff811115610e4057610e40612ecc565b604051908082528060200260200182016040528015610e69578160200160208202803683370190505b50905060005b8251811015610ec557828181518110610e8a57610e8a6134dc565b6020026020010151828281518110610ea457610ea46134dc565b67ffffffffffffffff90921660209283029190910190910152600101610e6f565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526105f390611bc0565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610fde575060005473ffffffffffffffffffffffffffffffffffffffff163314155b15611017576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b611022838383611c72565b505050565b61102f6116f2565b60005b8181101561102257600083838381811061104e5761104e6134dc565b9050602002810190611060919061350b565b61106990613549565b905061107e8160800151826020015115611d5c565b6110918160a00151826020015115611d5c565b80602001511561138d5780516110b39060059067ffffffffffffffff16611e95565b6110f85780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f9565b604081015151158061110d5750606081015151155b15611144576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c1790911696151502959095179098559081015194015193811693169091029190911760038201559151909190600482019061132590826135fd565b506060820151600582019061133a90826135fd565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c295506113809493929190613717565b60405180910390a16114a4565b80516113a59060059067ffffffffffffffff16611ea1565b6113ea5780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f9565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906114536004830182612a95565b611461600583016000612a95565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b50600101611032565b6114b56116f2565b6114be81611ead565b50565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146115565760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f9565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611604573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162891906137b0565b1561165f576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61166c8160200151611fa2565b600061167b82602001516105f9565b905080516000148061169f575080805190602001208260a001518051906020012014155b156116dc578160a001516040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016108f99190612bc1565b6116ee826020015183606001516120c8565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611773576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108f9565b565b7f00000000000000000000000000000000000000000000000000000000000000006117cc576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82518110156118625760008382815181106117ec576117ec6134dc565b6020026020010151905061180a81600261210f90919063ffffffff16565b156118595760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016117cf565b5060005b8151811015611022576000828281518110611883576118836134dc565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118c75750611923565b6118d2600282612131565b156119215760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611866565b600081815260018301602052604081205415155b9392505050565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146119db5760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f9565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aad91906137b0565b15611ae4576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611af18160400151612153565b611afe81602001516121d2565b6114be81602001518260600151612320565b6040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b158015611b9857600080fd5b505af1158015611bac573d6000803e3d6000fd5b5050505050565b6060600061193f83612364565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152611c4e82606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642611c3291906137fc565b85608001516fffffffffffffffffffffffffffffffff166123bf565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b611c7b83610b6a565b611cbd576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016108f9565b611cc8826000611d5c565b67ffffffffffffffff83166000908152600760205260409020611ceb90836123e9565b611cf6816000611d5c565b67ffffffffffffffff83166000908152600760205260409020611d1c90600201826123e9565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051611d4f9392919061380f565b60405180910390a1505050565b815115611e235781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580611db2575060408201516fffffffffffffffffffffffffffffffff16155b15611deb57816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016108f99190613892565b80156116ee576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580611e5c575060208201516fffffffffffffffffffffffffffffffff1615155b156116ee57816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016108f99190613892565b600061193f838361258b565b600061193f83836125da565b3373ffffffffffffffffffffffffffffffffffffffff821603611f2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108f9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b611fab81610b6a565b611fed576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f9565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa15801561206c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209091906137b0565b6114be576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b67ffffffffffffffff821660009081526007602052604090206116ee90600201827f00000000000000000000000000000000000000000000000000000000000000006126cd565b600061193f8373ffffffffffffffffffffffffffffffffffffffff84166125da565b600061193f8373ffffffffffffffffffffffffffffffffffffffff841661258b565b7f0000000000000000000000000000000000000000000000000000000000000000156114be57612184600282612a50565b6114be576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016108f9565b6121db81610b6a565b61221d576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f9565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa158015612296573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ba91906138ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114be576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f9565b67ffffffffffffffff821660009081526007602052604090206116ee90827f00000000000000000000000000000000000000000000000000000000000000006126cd565b60608160000180548060200260200160405190810160405280929190818152602001828054801561069d57602002820191906000526020600020905b8154815260200190600101908083116123a05750505050509050919050565b60006123de856123cf84866138eb565b6123d99087613902565b612a7f565b90505b949350505050565b815460009061241290700100000000000000000000000000000000900463ffffffff16426137fc565b905080156124b4576001830154835461245a916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166123bf565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546124da916fffffffffffffffffffffffffffffffff9081169116612a7f565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990611d4f908490613892565b60008181526001830160205260408120546125d2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f3565b5060006105f3565b600081815260018301602052604081205480156126c35760006125fe6001836137fc565b8554909150600090612612906001906137fc565b9050808214612677576000866000018281548110612632576126326134dc565b9060005260206000200154905080876000018481548110612655576126556134dc565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061268857612688613915565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f3565b60009150506105f3565b825474010000000000000000000000000000000000000000900460ff1615806126f4575081155b156126fe57505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061274490700100000000000000000000000000000000900463ffffffff16426137fc565b905080156128045781831115612786576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546127c09083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166123bf565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156128bb5773ffffffffffffffffffffffffffffffffffffffff8416612863576040517ff94ebcd100000000000000000000000000000000000000000000000000000000815260048101839052602481018690526044016108f9565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff851660448201526064016108f9565b848310156129ce5760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169060009082906128ff90826137fc565b612909878a6137fc565b6129139190613902565b61291d9190613944565b905073ffffffffffffffffffffffffffffffffffffffff8616612976576040517f15279c0800000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016108f9565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff871660448201526064016108f9565b6129d885846137fc565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561193f565b6000818310612a8e578161193f565b5090919050565b508054612aa190613079565b6000825580601f10612ab1575050565b601f0160209004906000526020600020908101906114be91905b80821115612adf5760008155600101612acb565b5090565b600060208284031215612af557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461193f57600080fd5b803567ffffffffffffffff81168114612b3d57600080fd5b919050565b600060208284031215612b5457600080fd5b61193f82612b25565b6000815180845260005b81811015612b8357602081850181015186830182015201612b67565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061193f6020830184612b5d565b73ffffffffffffffffffffffffffffffffffffffff811681146114be57600080fd5b8035612b3d81612bd4565b600060208284031215612c1357600080fd5b813561193f81612bd4565b600060208284031215612c3057600080fd5b813567ffffffffffffffff811115612c4757600080fd5b8201610100818503121561193f57600080fd5b60008083601f840112612c6c57600080fd5b50813567ffffffffffffffff811115612c8457600080fd5b6020830191508360208260051b8501011115612c9f57600080fd5b9250929050565b60008060008060408587031215612cbc57600080fd5b843567ffffffffffffffff80821115612cd457600080fd5b612ce088838901612c5a565b90965094506020870135915080821115612cf957600080fd5b50612d0687828801612c5a565b95989497509550505050565b600080600060408486031215612d2757600080fd5b612d3084612b25565b9250602084013567ffffffffffffffff80821115612d4d57600080fd5b818601915086601f830112612d6157600080fd5b813581811115612d7057600080fd5b876020828501011115612d8257600080fd5b6020830194508093505050509250925092565b600060208284031215612da757600080fd5b813567ffffffffffffffff811115612dbe57600080fd5b820160a0818503121561193f57600080fd5b602081526000825160406020840152612dec6060840182612b5d565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612e278282612b5d565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e7e57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612e4c565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e7e57835167ffffffffffffffff1683529284019291840191600101612ea6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff81118282101715612f1f57612f1f612ecc565b60405290565b60405160c0810167ffffffffffffffff81118282101715612f1f57612f1f612ecc565b80151581146114be57600080fd5b8035612b3d81612f48565b80356fffffffffffffffffffffffffffffffff81168114612b3d57600080fd5b600060608284031215612f9357600080fd5b6040516060810181811067ffffffffffffffff82111715612fb657612fb6612ecc565b6040529050808235612fc781612f48565b8152612fd560208401612f61565b6020820152612fe660408401612f61565b60408201525092915050565b600080600060e0848603121561300757600080fd5b61301084612b25565b925061301f8560208601612f81565b915061302e8560808601612f81565b90509250925092565b6000806020838503121561304a57600080fd5b823567ffffffffffffffff81111561306157600080fd5b61306d85828601612c5a565b90969095509350505050565b600181811c9082168061308d57607f821691505b6020821081036130c6577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082601f8301126130dd57600080fd5b813567ffffffffffffffff808211156130f8576130f8612ecc565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561313e5761313e612ecc565b8160405283815286602085880101111561315757600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000610100823603121561318a57600080fd5b613192612efb565b823567ffffffffffffffff808211156131aa57600080fd5b6131b6368387016130cc565b83526131c460208601612b25565b60208401526131d560408601612bf6565b6040840152606085013560608401526131f060808601612bf6565b608084015260a085013591508082111561320957600080fd5b613215368387016130cc565b60a084015260c085013591508082111561322e57600080fd5b61323a368387016130cc565b60c084015260e085013591508082111561325357600080fd5b50613260368286016130cc565b60e08301525092915050565b601f821115611022576000816000526020600020601f850160051c810160208610156132955750805b601f850160051c820191505b818110156132b4578281556001016132a1565b505050505050565b67ffffffffffffffff8311156132d4576132d4612ecc565b6132e8836132e28354613079565b8361326c565b6000601f84116001811461333a57600085156133045750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611bac565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156133895786850135825560209485019460019092019101613369565b50868210156133c4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b6040815260006133e96040830186612b5d565b82810360208401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050949350505050565b600060a0823603121561344c57600080fd5b60405160a0810167ffffffffffffffff828210818311171561347057613470612ecc565b81604052843591508082111561348557600080fd5b50613492368286016130cc565b8252506134a160208401612b25565b602082015260408301356134b481612bd4565b60408201526060838101359082015260808301356134d181612bd4565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec183360301811261353f57600080fd5b9190910192915050565b6000610140823603121561355c57600080fd5b613564612f25565b61356d83612b25565b815261357b60208401612f56565b6020820152604083013567ffffffffffffffff8082111561359b57600080fd5b6135a7368387016130cc565b604084015260608501359150808211156135c057600080fd5b506135cd368286016130cc565b6060830152506135e03660808501612f81565b60808201526135f23660e08501612f81565b60a082015292915050565b815167ffffffffffffffff81111561361757613617612ecc565b61362b816136258454613079565b8461326c565b602080601f83116001811461367e57600084156136485750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556132b4565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156136cb578886015182559484019460019091019084016136ac565b508582101561370757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff8716835280602084015261373b81840187612b5d565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff90811660608701529087015116608085015291506137799050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612e27565b6000602082840312156137c257600080fd5b815161193f81612f48565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156105f3576105f36137cd565b67ffffffffffffffff8416815260e0810161385b60208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c08301526123e1565b606081016105f382848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b6000602082840312156138e057600080fd5b815161193f81612bd4565b80820281158282048414176105f3576105f36137cd565b808201808211156105f3576105f36137cd565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008261397a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"localTokenDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162004809380380620048098339810160408190526200003591620005a2565b8484848484336000816200005c57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200008f576200008f81620001eb565b50506001600160a01b0385161580620000af57506001600160a01b038116155b80620000c257506001600160a01b038216155b15620000e1576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000151575060408051601f3d908101601f191682019092526200014e91810190620006c4565b60015b1562000191578060ff168560ff16146200018f576040516332ad3e0760e11b815260ff80871660048301528216602482015260440160405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001db57604080516000815260208101909152620001db908462000265565b5050505050505050505062000730565b336001600160a01b038216036200021557604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e05162000286576040516335f4a7b360e01b815260040160405180910390fd5b60005b825181101562000311576000838281518110620002aa57620002aa620006e2565b60209081029190910101519050620002c4600282620003c2565b1562000307576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b5060010162000289565b5060005b8151811015620003bd576000828281518110620003365762000336620006e2565b6020026020010151905060006001600160a01b0316816001600160a01b031603620003625750620003b4565b6200036f600282620003e2565b15620003b2576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010162000315565b505050565b6000620003d9836001600160a01b038416620003f9565b90505b92915050565b6000620003d9836001600160a01b038416620004fd565b60008181526001830160205260408120548015620004f257600062000420600183620006f8565b85549091506000906200043690600190620006f8565b9050808214620004a25760008660000182815481106200045a576200045a620006e2565b9060005260206000200154905080876000018481548110620004805762000480620006e2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620004b657620004b66200071a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620003dc565b6000915050620003dc565b60008181526001830160205260408120546200054657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003dc565b506000620003dc565b6001600160a01b03811681146200056557600080fd5b50565b805160ff811681146200057a57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b80516200057a816200054f565b600080600080600060a08688031215620005bb57600080fd5b8551620005c8816200054f565b94506020620005d987820162000568565b60408801519095506001600160401b0380821115620005f757600080fd5b818901915089601f8301126200060c57600080fd5b8151818111156200062157620006216200057f565b8060051b604051601f19603f830116810181811085821117156200064957620006496200057f565b60405291825284820192508381018501918c8311156200066857600080fd5b938501935b828510156200069157620006818562000595565b845293850193928501926200066d565b809850505050505050620006a86060870162000595565b9150620006b86080870162000595565b90509295509295909350565b600060208284031215620006d757600080fd5b620003d98262000568565b634e487b7160e01b600052603260045260246000fd5b81810381811115620003dc57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e051614028620007e16000396000818161054f01528181611d8201526127cd0152600081816105290152818161189f015261206e0152600081816102e001528181610ba901528181611a4801528181611b0201528181611b3601528181611b6901528181611bce01528181611c270152611cc90152600081816102470152818161029c01528181610708015281816121eb0152818161276301526129b801526140286000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80639a4575b911610104578063c0d78655116100a2578063dc0bd97111610071578063dc0bd97114610527578063e0351e131461054d578063e8a1da1714610573578063f2fde38b1461058657600080fd5b8063c0d78655146104d9578063c4bffe2b146104ec578063c75eea9c14610501578063cf7401f31461051457600080fd5b8063acfecf91116100de578063acfecf9114610426578063af58d59f14610439578063b0f479a1146104a8578063b7946580146104c657600080fd5b80639a4575b9146103d1578063a42a7b8b146103f1578063a7cd63b71461041157600080fd5b806354c8a4f31161017157806379ba50971161014b57806379ba5097146103855780637d54534e1461038d5780638926f54f146103a05780638da5cb5b146103b357600080fd5b806354c8a4f31461033f57806362ddd3c4146103545780636d3d1a581461036757600080fd5b8063240028e8116101ad578063240028e81461028c57806324f65ee7146102d9578063390775371461030a5780634c5ef0ed1461032c57600080fd5b806301ffc9a7146101d4578063181f5a77146101fc57806321df0da714610245575b600080fd5b6101e76101e2366004613178565b610599565b60405190151581526020015b60405180910390f35b6102386040518060400160405280601781526020017f4275726e4d696e74546f6b656e506f6f6c20312e352e3100000000000000000081525081565b6040516101f3919061321e565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b6101e761029a366004613253565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b61031d610318366004613270565b61067e565b604051905181526020016101f3565b6101e761033a3660046132c9565b61084d565b61035261034d366004613398565b610897565b005b6103526103623660046132c9565b610912565b60095473ffffffffffffffffffffffffffffffffffffffff16610267565b6103526109af565b61035261039b366004613253565b610a7d565b6101e76103ae366004613404565b610afe565b60015473ffffffffffffffffffffffffffffffffffffffff16610267565b6103e46103df36600461341f565b610b15565b6040516101f3919061345a565b6104046103ff366004613404565b610bee565b6040516101f391906134b1565b610419610d59565b6040516101f39190613533565b6103526104343660046132c9565b610d6a565b61044c610447366004613404565b610e82565b6040516101f3919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610267565b6102386104d4366004613404565b610f57565b6103526104e7366004613253565b611007565b6104f46110e2565b6040516101f3919061358d565b61044c61050f366004613404565b61119a565b610352610522366004613715565b61126c565b7f0000000000000000000000000000000000000000000000000000000000000000610267565b7f00000000000000000000000000000000000000000000000000000000000000006101e7565b610352610581366004613398565b6112f0565b610352610594366004613253565b611802565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061062c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061067857507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60408051602081019091526000815261069682611816565b60006106ef60608401356106ea6106b060c087018761375a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3a92505050565b611afe565b905073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f1961073d6060860160408701613253565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b1580156107aa57600080fd5b505af11580156107be573d6000803e3d6000fd5b506107d3925050506060840160408501613253565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f08360405161083191815260200190565b60405180910390a3604080516020810190915290815292915050565b600061088f83836040516108629291906137bf565b604080519182900390912067ffffffffffffffff8716600090815260076020529190912060050190611d12565b949350505050565b61089f611d2d565b61090c84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611d8092505050565b50505050565b61091a611d2d565b61092383610afe565b61096a576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b6109aa8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f3692505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a00576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a85611d2d565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b6000610678600567ffffffffffffffff8416611d12565b6040805180820190915260608082526020820152610b3282612030565b610b3f82606001356121bc565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610b998460200160208101906104d49190613404565b8152602001610be66040805160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260609101604051602081830303815290604052905090565b905292915050565b67ffffffffffffffff8116600090815260076020526040812060609190610c1790600501612258565b90506000815167ffffffffffffffff811115610c3557610c356135cf565b604051908082528060200260200182016040528015610c6857816020015b6060815260200190600190039081610c535790505b50905060005b8251811015610d515760086000848381518110610c8d57610c8d6137cf565b602002602001015181526020019081526020016000208054610cae906137fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610cda906137fe565b8015610d275780601f10610cfc57610100808354040283529160200191610d27565b820191906000526020600020905b815481529060010190602001808311610d0a57829003601f168201915b5050505050828281518110610d3e57610d3e6137cf565b6020908102919091010152600101610c6e565b509392505050565b6060610d656002612258565b905090565b610d72611d2d565b610d7b83610afe565b610dbd576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610961565b610dfd8282604051610dd09291906137bf565b604080519182900390912067ffffffffffffffff8616600090815260076020529190912060050190612265565b610e39578282826040517f74f23c7c0000000000000000000000000000000000000000000000000000000081526004016109619392919061389a565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d768383604051610e759291906138be565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261067890612271565b67ffffffffffffffff81166000908152600760205260409020600401805460609190610f82906137fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610fae906137fe565b8015610ffb5780601f10610fd057610100808354040283529160200191610ffb565b820191906000526020600020905b815481529060010190602001808311610fde57829003601f168201915b50505050509050919050565b61100f611d2d565b73ffffffffffffffffffffffffffffffffffffffff811661105c576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006110f06005612258565b90506000815167ffffffffffffffff81111561110e5761110e6135cf565b604051908082528060200260200182016040528015611137578160200160208202803683370190505b50905060005b825181101561119357828181518110611158576111586137cf565b6020026020010151828281518110611172576111726137cf565b67ffffffffffffffff9092166020928302919091019091015260010161113d565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261067890612271565b60095473ffffffffffffffffffffffffffffffffffffffff1633148015906112ac575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156112e5576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b6109aa838383612323565b6112f8611d2d565b60005b838110156114e5576000858583818110611317576113176137cf565b905060200201602081019061132c9190613404565b9050611343600567ffffffffffffffff8316612265565b611385576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b67ffffffffffffffff811660009081526007602052604081206113aa90600501612258565b905060005b81518110156114165761140d8282815181106113cd576113cd6137cf565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050161226590919063ffffffff16565b506001016113af565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff0000000000000000000000000000000000000000009081168255600182018390556002820180549091169055600381018290559061147f600483018261310b565b60058201600081816114918282613145565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916945060200192506114d3915050565b60405180910390a150506001016112fb565b5060005b818110156117fb576000838383818110611505576115056137cf565b905060200281019061151791906138d2565b6115209061399e565b90506115318160600151600061240d565b6115408160800151600061240d565b80604001515160000361157f576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516115979060059067ffffffffffffffff1661254a565b6115dc5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610961565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a90910299909316171790941695909517909255909202909117600382015590820151600482019061175f9082613b15565b5060005b8260200151518110156117a35761179b83600001518460200151838151811061178e5761178e6137cf565b6020026020010151611f36565b600101611763565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c282600001518360400151846060015185608001516040516117e99493929190613c2f565b60405180910390a150506001016114e9565b5050505050565b61180a611d2d565b61181381612556565b50565b61182961029a60a0830160808401613253565b6118885761183d60a0820160808301613253565b6040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610961565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6118d46040840160208501613404565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015611945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119699190613cc8565b156119a0576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b86119b36040830160208401613404565b61261a565b6119d86119cb6040830160208401613404565b61033a60a084018461375a565b611a1d576119e960a082018261375a565b6040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016109619291906138be565b611813611a306040830160208401613404565b8260600135612740565b60008151600003611a6c57507f0000000000000000000000000000000000000000000000000000000000000000919050565b8151602014611aa957816040517f953576f7000000000000000000000000000000000000000000000000000000008152600401610961919061321e565b600082806020019051810190611abf9190613ce5565b905060ff81111561067857826040517f953576f7000000000000000000000000000000000000000000000000000000008152600401610961919061321e565b60007f000000000000000000000000000000000000000000000000000000000000000060ff168260ff1603611b34575081610678565b7f000000000000000000000000000000000000000000000000000000000000000060ff168260ff161115611c1f576000611b8e7f000000000000000000000000000000000000000000000000000000000000000084613d2d565b9050604d8160ff161115611c02576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610961565b611c0d81600a613e66565b611c179085613e75565b915050610678565b6000611c4b837f0000000000000000000000000000000000000000000000000000000000000000613d2d565b9050604d8160ff161180611c925750611c6581600a613e66565b611c8f907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613e75565b84115b15611cfd576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610961565b611d0881600a613e66565b61088f9085613eb0565b600081815260018301602052604081205415155b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d7e576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f0000000000000000000000000000000000000000000000000000000000000000611dd7576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611e6d576000838281518110611df757611df76137cf565b60200260200101519050611e1581600261278790919063ffffffff16565b15611e645760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611dda565b5060005b81518110156109aa576000828281518110611e8e57611e8e6137cf565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ed25750611f2e565b611edd6002826127a9565b15611f2c5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611e71565b8051600003611f71576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff8416600090815260079092526040909120611fa3906005018261254a565b611fdd5782826040517f393b8ad2000000000000000000000000000000000000000000000000000000008152600401610961929190613ec7565b6000818152600860205260409020611ff58382613b15565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea83604051610e75919061321e565b61204361029a60a0830160808401613253565b6120575761183d60a0820160808301613253565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6120a36040840160208501613404565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015612114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121389190613cc8565b1561216f576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6121876121826060830160408401613253565b6127cb565b61219f61219a6040830160208401613404565b61284a565b6118136121b26040830160208401613404565b8260600135612998565b6040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b15801561224457600080fd5b505af11580156117fb573d6000803e3d6000fd5b60606000611d26836129dc565b6000611d268383612a37565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526122ff82606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426122e39190613eea565b85608001516fffffffffffffffffffffffffffffffff16612b2a565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61232c83610afe565b61236e576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610961565b61237982600061240d565b67ffffffffffffffff8316600090815260076020526040902061239c9083612b52565b6123a781600061240d565b67ffffffffffffffff831660009081526007602052604090206123cd9060020182612b52565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b83838360405161240093929190613efd565b60405180910390a1505050565b8151156124d85781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612463575060408201516fffffffffffffffffffffffffffffffff16155b1561249c57816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016109619190613f80565b80156124d4576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580612511575060208201516fffffffffffffffffffffffffffffffff1615155b156124d457816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016109619190613f80565b6000611d268383612cf4565b3373ffffffffffffffffffffffffffffffffffffffff8216036125a5576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61262381610afe565b612665576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa1580156126e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127089190613cc8565b611813576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b67ffffffffffffffff821660009081526007602052604090206124d490600201827f0000000000000000000000000000000000000000000000000000000000000000612d43565b6000611d268373ffffffffffffffffffffffffffffffffffffffff8416612a37565b6000611d268373ffffffffffffffffffffffffffffffffffffffff8416612cf4565b7f000000000000000000000000000000000000000000000000000000000000000015611813576127fc6002826130c6565b611813576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610961565b61285381610afe565b612895576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610961565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa15801561290e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129329190613fbc565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611813576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610961565b67ffffffffffffffff821660009081526007602052604090206124d490827f0000000000000000000000000000000000000000000000000000000000000000612d43565b606081600001805480602002602001604051908101604052809291908181526020018280548015610ffb57602002820191906000526020600020905b815481526020019060010190808311612a185750505050509050919050565b60008181526001830160205260408120548015612b20576000612a5b600183613eea565b8554909150600090612a6f90600190613eea565b9050808214612ad4576000866000018281548110612a8f57612a8f6137cf565b9060005260206000200154905080876000018481548110612ab257612ab26137cf565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ae557612ae5613fd9565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610678565b6000915050610678565b6000612b4985612b3a8486613eb0565b612b449087614008565b6130f5565b95945050505050565b8154600090612b7b90700100000000000000000000000000000000900463ffffffff1642613eea565b90508015612c1d5760018301548354612bc3916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612b2a565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354612c43916fffffffffffffffffffffffffffffffff90811691166130f5565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990612400908490613f80565b6000818152600183016020526040812054612d3b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610678565b506000610678565b825474010000000000000000000000000000000000000000900460ff161580612d6a575081155b15612d7457505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612dba90700100000000000000000000000000000000900463ffffffff1642613eea565b90508015612e7a5781831115612dfc576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612e369083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612b2a565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612f315773ffffffffffffffffffffffffffffffffffffffff8416612ed9576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610961565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610961565b848310156130445760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290612f759082613eea565b612f7f878a613eea565b612f899190614008565b612f939190613e75565b905073ffffffffffffffffffffffffffffffffffffffff8616612fec576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610961565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610961565b61304e8584613eea565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611d26565b60008183106131045781611d26565b5090919050565b508054613117906137fe565b6000825580601f10613127575050565b601f016020900490600052602060002090810190611813919061315f565b508054600082559060005260206000209081019061181391905b5b808211156131745760008155600101613160565b5090565b60006020828403121561318a57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d2657600080fd5b6000815180845260005b818110156131e0576020818501810151868301820152016131c4565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611d2660208301846131ba565b73ffffffffffffffffffffffffffffffffffffffff8116811461181357600080fd5b60006020828403121561326557600080fd5b8135611d2681613231565b60006020828403121561328257600080fd5b813567ffffffffffffffff81111561329957600080fd5b82016101008185031215611d2657600080fd5b803567ffffffffffffffff811681146132c457600080fd5b919050565b6000806000604084860312156132de57600080fd5b6132e7846132ac565b9250602084013567ffffffffffffffff8082111561330457600080fd5b818601915086601f83011261331857600080fd5b81358181111561332757600080fd5b87602082850101111561333957600080fd5b6020830194508093505050509250925092565b60008083601f84011261335e57600080fd5b50813567ffffffffffffffff81111561337657600080fd5b6020830191508360208260051b850101111561339157600080fd5b9250929050565b600080600080604085870312156133ae57600080fd5b843567ffffffffffffffff808211156133c657600080fd5b6133d28883890161334c565b909650945060208701359150808211156133eb57600080fd5b506133f88782880161334c565b95989497509550505050565b60006020828403121561341657600080fd5b611d26826132ac565b60006020828403121561343157600080fd5b813567ffffffffffffffff81111561344857600080fd5b820160a08185031215611d2657600080fd5b60208152600082516040602084015261347660608401826131ba565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b4982826131ba565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015613526577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526135148583516131ba565b945092850192908501906001016134da565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358157835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161354f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358157835167ffffffffffffffff16835292840192918401916001016135a9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613621576136216135cf565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561366e5761366e6135cf565b604052919050565b801515811461181357600080fd5b80356fffffffffffffffffffffffffffffffff811681146132c457600080fd5b6000606082840312156136b657600080fd5b6040516060810181811067ffffffffffffffff821117156136d9576136d96135cf565b60405290508082356136ea81613676565b81526136f860208401613684565b602082015261370960408401613684565b60408201525092915050565b600080600060e0848603121561372a57600080fd5b613733846132ac565b925061374285602086016136a4565b915061375185608086016136a4565b90509250925092565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261378f57600080fd5b83018035915067ffffffffffffffff8211156137aa57600080fd5b60200191503681900382131561339157600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061381257607f821691505b60208210810361384b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b67ffffffffffffffff84168152604060208201526000612b49604083018486613851565b60208152600061088f602083018486613851565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261390657600080fd5b9190910192915050565b600082601f83011261392157600080fd5b813567ffffffffffffffff81111561393b5761393b6135cf565b61396c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613627565b81815284602083860101111561398157600080fd5b816020850160208301376000918101602001919091529392505050565b600061012082360312156139b157600080fd5b6139b96135fe565b6139c2836132ac565b815260208084013567ffffffffffffffff808211156139e057600080fd5b9085019036601f8301126139f357600080fd5b813581811115613a0557613a056135cf565b8060051b613a14858201613627565b9182528381018501918581019036841115613a2e57600080fd5b86860192505b83831015613a6a57823585811115613a4c5760008081fd5b613a5a3689838a0101613910565b8352509186019190860190613a34565b8087890152505050506040860135925080831115613a8757600080fd5b5050613a9536828601613910565b604083015250613aa836606085016136a4565b6060820152613aba3660c085016136a4565b608082015292915050565b601f8211156109aa576000816000526020600020601f850160051c81016020861015613aee5750805b601f850160051c820191505b81811015613b0d57828155600101613afa565b505050505050565b815167ffffffffffffffff811115613b2f57613b2f6135cf565b613b4381613b3d84546137fe565b84613ac5565b602080601f831160018114613b965760008415613b605750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b0d565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613be357888601518255948401946001909101908401613bc4565b5085821015613c1f57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152613c53818401876131ba565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff9081166060870152908701511660808501529150613c919050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612b49565b600060208284031215613cda57600080fd5b8151611d2681613676565b600060208284031215613cf757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff828116828216039081111561067857610678613cfe565b600181815b80851115613d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613d8557613d85613cfe565b80851615613d9257918102915b93841c9390800290613d4b565b509250929050565b600082613db657506001610678565b81613dc357506000610678565b8160018114613dd95760028114613de357613dff565b6001915050610678565b60ff841115613df457613df4613cfe565b50506001821b610678565b5060208310610133831016604e8410600b8410161715613e22575081810a610678565b613e2c8383613d46565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613e5e57613e5e613cfe565b029392505050565b6000611d2660ff841683613da7565b600082613eab577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b808202811582820484141761067857610678613cfe565b67ffffffffffffffff8316815260406020820152600061088f60408301846131ba565b8181038181111561067857610678613cfe565b67ffffffffffffffff8416815260e08101613f4960208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c083015261088f565b6060810161067882848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600060208284031215613fce57600080fd5b8151611d2681613231565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8082018082111561067857610678613cfe56fea164736f6c6343000818000a", } var BurnMintTokenPoolABI = BurnMintTokenPoolMetaData.ABI var BurnMintTokenPoolBin = BurnMintTokenPoolMetaData.Bin -func DeployBurnMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnMintTokenPool, error) { +func DeployBurnMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, localTokenDecimals uint8, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnMintTokenPool, error) { parsed, err := BurnMintTokenPoolMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -99,7 +98,7 @@ func DeployBurnMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBacke return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnMintTokenPoolBin), backend, token, allowlist, rmnProxy, router) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnMintTokenPoolBin), backend, token, localTokenDecimals, allowlist, rmnProxy, router) if err != nil { return common.Address{}, nil, nil, err } @@ -332,26 +331,26 @@ func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) GetRateLimitAdmin() (c return _BurnMintTokenPool.Contract.GetRateLimitAdmin(&_BurnMintTokenPool.CallOpts) } -func (_BurnMintTokenPool *BurnMintTokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_BurnMintTokenPool *BurnMintTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _BurnMintTokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _BurnMintTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_BurnMintTokenPool *BurnMintTokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnMintTokenPool.Contract.GetRemotePool(&_BurnMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnMintTokenPool *BurnMintTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnMintTokenPool.Contract.GetRemotePools(&_BurnMintTokenPool.CallOpts, remoteChainSelector) } -func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnMintTokenPool.Contract.GetRemotePool(&_BurnMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnMintTokenPool.Contract.GetRemotePools(&_BurnMintTokenPool.CallOpts, remoteChainSelector) } func (_BurnMintTokenPool *BurnMintTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -464,6 +463,50 @@ func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) GetToken() (common.Add return _BurnMintTokenPool.Contract.GetToken(&_BurnMintTokenPool.CallOpts) } +func (_BurnMintTokenPool *BurnMintTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _BurnMintTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_BurnMintTokenPool *BurnMintTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _BurnMintTokenPool.Contract.GetTokenDecimals(&_BurnMintTokenPool.CallOpts) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _BurnMintTokenPool.Contract.GetTokenDecimals(&_BurnMintTokenPool.CallOpts) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _BurnMintTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_BurnMintTokenPool *BurnMintTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnMintTokenPool.Contract.IsRemotePool(&_BurnMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnMintTokenPool.Contract.IsRemotePool(&_BurnMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnMintTokenPool *BurnMintTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _BurnMintTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -586,6 +629,18 @@ func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) AcceptOwnership() return _BurnMintTokenPool.Contract.AcceptOwnership(&_BurnMintTokenPool.TransactOpts) } +func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.AddRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.AddRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _BurnMintTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -598,16 +653,16 @@ func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) ApplyAllowListUpda return _BurnMintTokenPool.Contract.ApplyAllowListUpdates(&_BurnMintTokenPool.TransactOpts, removes, adds) } -func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnMintTokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnMintTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnMintTokenPool *BurnMintTokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnMintTokenPool.Contract.ApplyChainUpdates(&_BurnMintTokenPool.TransactOpts, chains) +func (_BurnMintTokenPool *BurnMintTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.ApplyChainUpdates(&_BurnMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnMintTokenPool.Contract.ApplyChainUpdates(&_BurnMintTokenPool.TransactOpts, chains) +func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.ApplyChainUpdates(&_BurnMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -634,6 +689,18 @@ func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) ReleaseOrMint(rele return _BurnMintTokenPool.Contract.ReleaseOrMint(&_BurnMintTokenPool.TransactOpts, releaseOrMintIn) } +func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.RemoveRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnMintTokenPool.Contract.RemoveRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _BurnMintTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -658,18 +725,6 @@ func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) SetRateLimitAdmin( return _BurnMintTokenPool.Contract.SetRateLimitAdmin(&_BurnMintTokenPool.TransactOpts, rateLimitAdmin) } -func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnMintTokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_BurnMintTokenPool *BurnMintTokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnMintTokenPool.Contract.SetRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_BurnMintTokenPool *BurnMintTokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnMintTokenPool.Contract.SetRemotePool(&_BurnMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_BurnMintTokenPool *BurnMintTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _BurnMintTokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2066,6 +2121,123 @@ func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseOwnershipTransferred(l return event, nil } +type BurnMintTokenPoolRateLimitAdminSetIterator struct { + Event *BurnMintTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnMintTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnMintTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *BurnMintTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnMintTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnMintTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _BurnMintTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &BurnMintTokenPoolRateLimitAdminSetIterator{contract: _BurnMintTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _BurnMintTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnMintTokenPoolRateLimitAdminSet) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*BurnMintTokenPoolRateLimitAdminSet, error) { + event := new(BurnMintTokenPoolRateLimitAdminSet) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type BurnMintTokenPoolReleasedIterator struct { Event *BurnMintTokenPoolReleased @@ -2203,8 +2375,136 @@ func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseReleased(log types.Log return event, nil } -type BurnMintTokenPoolRemotePoolSetIterator struct { - Event *BurnMintTokenPoolRemotePoolSet +type BurnMintTokenPoolRemotePoolAddedIterator struct { + Event *BurnMintTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnMintTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnMintTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *BurnMintTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnMintTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnMintTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &BurnMintTokenPoolRemotePoolAddedIterator{contract: _BurnMintTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnMintTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnMintTokenPoolRemotePoolAdded) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*BurnMintTokenPoolRemotePoolAdded, error) { + event := new(BurnMintTokenPoolRemotePoolAdded) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type BurnMintTokenPoolRemotePoolRemovedIterator struct { + Event *BurnMintTokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2215,7 +2515,7 @@ type BurnMintTokenPoolRemotePoolSetIterator struct { fail error } -func (it *BurnMintTokenPoolRemotePoolSetIterator) Next() bool { +func (it *BurnMintTokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2224,7 +2524,7 @@ func (it *BurnMintTokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BurnMintTokenPoolRemotePoolSet) + it.Event = new(BurnMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2239,7 +2539,7 @@ func (it *BurnMintTokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(BurnMintTokenPoolRemotePoolSet) + it.Event = new(BurnMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2254,44 +2554,43 @@ func (it *BurnMintTokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *BurnMintTokenPoolRemotePoolSetIterator) Error() error { +func (it *BurnMintTokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *BurnMintTokenPoolRemotePoolSetIterator) Close() error { +func (it *BurnMintTokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type BurnMintTokenPoolRemotePoolSet struct { +type BurnMintTokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolSetIterator, error) { +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnMintTokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnMintTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &BurnMintTokenPoolRemotePoolSetIterator{contract: _BurnMintTokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &BurnMintTokenPoolRemotePoolRemovedIterator{contract: _BurnMintTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnMintTokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnMintTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2301,8 +2600,8 @@ func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRemotePoolSet(opts *bi select { case log := <-logs: - event := new(BurnMintTokenPoolRemotePoolSet) - if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(BurnMintTokenPoolRemotePoolRemoved) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2323,9 +2622,9 @@ func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) WatchRemotePoolSet(opts *bi }), nil } -func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*BurnMintTokenPoolRemotePoolSet, error) { - event := new(BurnMintTokenPoolRemotePoolSet) - if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_BurnMintTokenPool *BurnMintTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*BurnMintTokenPoolRemotePoolRemoved, error) { + event := new(BurnMintTokenPoolRemotePoolRemoved) + if err := _BurnMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -2591,10 +2890,14 @@ func (_BurnMintTokenPool *BurnMintTokenPool) ParseLog(log types.Log) (generated. return _BurnMintTokenPool.ParseOwnershipTransferRequested(log) case _BurnMintTokenPool.abi.Events["OwnershipTransferred"].ID: return _BurnMintTokenPool.ParseOwnershipTransferred(log) + case _BurnMintTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _BurnMintTokenPool.ParseRateLimitAdminSet(log) case _BurnMintTokenPool.abi.Events["Released"].ID: return _BurnMintTokenPool.ParseReleased(log) - case _BurnMintTokenPool.abi.Events["RemotePoolSet"].ID: - return _BurnMintTokenPool.ParseRemotePoolSet(log) + case _BurnMintTokenPool.abi.Events["RemotePoolAdded"].ID: + return _BurnMintTokenPool.ParseRemotePoolAdded(log) + case _BurnMintTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _BurnMintTokenPool.ParseRemotePoolRemoved(log) case _BurnMintTokenPool.abi.Events["RouterUpdated"].ID: return _BurnMintTokenPool.ParseRouterUpdated(log) case _BurnMintTokenPool.abi.Events["TokensConsumed"].ID: @@ -2649,12 +2952,20 @@ func (BurnMintTokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (BurnMintTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (BurnMintTokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (BurnMintTokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (BurnMintTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (BurnMintTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (BurnMintTokenPoolRouterUpdated) Topic() common.Hash { @@ -2680,7 +2991,7 @@ type BurnMintTokenPoolInterface interface { GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -2692,6 +3003,10 @@ type BurnMintTokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -2704,20 +3019,22 @@ type BurnMintTokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -2788,17 +3105,29 @@ type BurnMintTokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*BurnMintTokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnMintTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*BurnMintTokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*BurnMintTokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*BurnMintTokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*BurnMintTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnMintTokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*BurnMintTokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*BurnMintTokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*BurnMintTokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generated/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go b/core/gethwrappers/ccip/generated/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go index 5ce5bf9f1d..7315989c07 100644 --- a/core/gethwrappers/ccip/generated/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go +++ b/core/gethwrappers/ccip/generated/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go @@ -74,23 +74,22 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig } var BurnWithFromMintTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162004508380380620045088339810160408190526200003491620008c0565b8383838333806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c2816200018f565b5050506001600160a01b0384161580620000e357506001600160a01b038116155b80620000f657506001600160a01b038216155b1562000115576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c05262000168576040805160008152602081019091526200016890846200023a565b5062000185925050506001600160a01b0385163060001962000397565b5050505062000afc565b336001600160a01b03821603620001e95760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c0516200025b576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002e65760008382815181106200027f576200027f620009d0565b60209081029190910101519050620002996002826200047d565b15620002dc576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016200025e565b5060005b8151811015620003925760008282815181106200030b576200030b620009d0565b6020026020010151905060006001600160a01b0316816001600160a01b03160362000337575062000389565b620003446002826200049d565b1562000387576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620002ea565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015620003e9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200040f9190620009e6565b6200041b919062000a16565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091529192506200047791869190620004b416565b50505050565b600062000494836001600160a01b03841662000585565b90505b92915050565b600062000494836001600160a01b03841662000689565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000503906001600160a01b038516908490620006db565b80519091501562000392578080602001905181019062000524919062000a2c565b620003925760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000086565b600081815260018301602052604081205480156200067e576000620005ac60018362000a57565b8554909150600090620005c29060019062000a57565b90508082146200062e576000866000018281548110620005e657620005e6620009d0565b90600052602060002001549050808760000184815481106200060c576200060c620009d0565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000642576200064262000a6d565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000497565b600091505062000497565b6000818152600183016020526040812054620006d25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000497565b50600062000497565b6060620006ec8484600085620006f4565b949350505050565b606082471015620007575760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000086565b600080866001600160a01b0316858760405162000775919062000aa9565b60006040518083038185875af1925050503d8060008114620007b4576040519150601f19603f3d011682016040523d82523d6000602084013e620007b9565b606091505b509092509050620007cd87838387620007d8565b979650505050505050565b606083156200084c57825160000362000844576001600160a01b0385163b620008445760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000086565b5081620006ec565b620006ec8383815115620008635781518083602001fd5b8060405162461bcd60e51b815260040162000086919062000ac7565b6001600160a01b03811681146200089557600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b8051620008bb816200087f565b919050565b60008060008060808587031215620008d757600080fd5b8451620008e4816200087f565b602086810151919550906001600160401b03808211156200090457600080fd5b818801915088601f8301126200091957600080fd5b8151818111156200092e576200092e62000898565b8060051b604051601f19603f8301168101818110858211171562000956576200095662000898565b60405291825284820192508381018501918b8311156200097557600080fd5b938501935b828510156200099e576200098e85620008ae565b845293850193928501926200097a565b809850505050505050620009b560408601620008ae565b9150620009c560608601620008ae565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620009f957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000497576200049762000a00565b60006020828403121562000a3f57600080fd5b8151801515811462000a5057600080fd5b9392505050565b8181038181111562000497576200049762000a00565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000aa057818101518382015260200162000a86565b50506000910152565b6000825162000abd81846020870162000a83565b9190910192915050565b602081526000825180602084015262000ae881604085016020870162000a83565b601f01601f19169190910160400192915050565b60805160a05160c05161398f62000b79600039600081816104da0152818161177401526121580152600081816104b4015281816115a50152611a2a0152600081816102360152818161028b015281816106dd015281816114c50152818161194a01528181611b42015281816120ee0152612343015261398f6000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c80639a4575b9116100ee578063c4bffe2b11610097578063db6327dc11610071578063db6327dc1461049f578063dc0bd971146104b2578063e0351e13146104d8578063f2fde38b146104fe57600080fd5b8063c4bffe2b14610464578063c75eea9c14610479578063cf7401f31461048c57600080fd5b8063b0f479a1116100c8578063b0f479a114610420578063b79465801461043e578063c0d786551461045157600080fd5b80639a4575b91461037c578063a7cd63b71461039c578063af58d59f146103b157600080fd5b806354c8a4f31161015b57806379ba50971161013557806379ba5097146103305780637d54534e146103385780638926f54f1461034b5780638da5cb5b1461035e57600080fd5b806354c8a4f3146102ea5780636d3d1a58146102ff57806378a010b21461031d57600080fd5b806321df0da71161018c57806321df0da714610234578063240028e81461027b57806339077537146102c857600080fd5b806301ffc9a7146101b35780630a2fd493146101db578063181f5a77146101fb575b600080fd5b6101c66101c1366004612ae6565b610511565b60405190151581526020015b60405180910390f35b6101ee6101e9366004612b45565b6105f6565b6040516101d29190612bc4565b60408051808201909152601f81527f4275726e5769746846726f6d4d696e74546f6b656e506f6f6c20312e352e300060208201526101ee565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101d2565b6101c6610289366004612c04565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b6102db6102d6366004612c21565b6106a6565b604051905181526020016101d2565b6102fd6102f8366004612ca9565b61082c565b005b60085473ffffffffffffffffffffffffffffffffffffffff16610256565b6102fd61032b366004612d15565b6108a7565b6102fd610a1b565b6102fd610346366004612c04565b610b18565b6101c6610359366004612b45565b610b67565b60005473ffffffffffffffffffffffffffffffffffffffff16610256565b61038f61038a366004612d98565b610b7e565b6040516101d29190612dd3565b6103a4610c25565b6040516101d29190612e33565b6103c46103bf366004612b45565b610c36565b6040516101d2919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610256565b6101ee61044c366004612b45565b610d0b565b6102fd61045f366004612c04565b610d36565b61046c610e11565b6040516101d29190612e8d565b6103c4610487366004612b45565b610ec9565b6102fd61049a366004612ff5565b610f9b565b6102fd6104ad36600461303a565b611024565b7f0000000000000000000000000000000000000000000000000000000000000000610256565b7f00000000000000000000000000000000000000000000000000000000000000006101c6565b6102fd61050c366004612c04565b6114aa565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf0000000000000000000000000000000000000000000000000000000014806105a457507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b806105f057507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b67ffffffffffffffff811660009081526007602052604090206004018054606091906106219061307c565b80601f016020809104026020016040519081016040528092919081815260200182805461064d9061307c565b801561069a5780601f1061066f5761010080835404028352916020019161069a565b820191906000526020600020905b81548152906001019060200180831161067d57829003601f168201915b50505050509050919050565b6040805160208101909152600081526106c66106c18361317a565b6114be565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f196107126060850160408601612c04565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260608501356024820152604401600060405180830381600087803b15801561078257600080fd5b505af1158015610796573d6000803e3d6000fd5b506107ab925050506060830160408401612c04565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0846060013560405161080d91815260200190565b60405180910390a3506040805160208101909152606090910135815290565b6108346116ef565b6108a18484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061177292505050565b50505050565b6108af6116ef565b6108b883610b67565b6108ff576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b67ffffffffffffffff8316600090815260076020526040812060040180546109269061307c565b80601f01602080910402602001604051908101604052809291908181526020018280546109529061307c565b801561099f5780601f106109745761010080835404028352916020019161099f565b820191906000526020600020905b81548152906001019060200180831161098257829003601f168201915b5050505067ffffffffffffffff86166000908152600760205260409020919250506004016109ce8385836132bf565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610a0d939291906133d9565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108f6565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b206116ef565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006105f0600567ffffffffffffffff8416611928565b6040805180820190915260608082526020820152610ba3610b9e8361343d565b611943565b610bb08260600135611b0d565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610c0a84602001602081019061044c9190612b45565b81526040805160208181019092526000815291015292915050565b6060610c316002611bb6565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260039091015480841660608301529190910490911660808201526105f090611bc3565b67ffffffffffffffff811660009081526007602052604090206005018054606091906106219061307c565b610d3e6116ef565b73ffffffffffffffffffffffffffffffffffffffff8116610d8b576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b60606000610e1f6005611bb6565b90506000815167ffffffffffffffff811115610e3d57610e3d612ecf565b604051908082528060200260200182016040528015610e66578160200160208202803683370190505b50905060005b8251811015610ec257828181518110610e8757610e876134df565b6020026020010151828281518110610ea157610ea16134df565b67ffffffffffffffff90921660209283029190910190910152600101610e6c565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526105f090611bc3565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590610fdb575060005473ffffffffffffffffffffffffffffffffffffffff163314155b15611014576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024016108f6565b61101f838383611c75565b505050565b61102c6116ef565b60005b8181101561101f57600083838381811061104b5761104b6134df565b905060200281019061105d919061350e565b6110669061354c565b905061107b8160800151826020015115611d5f565b61108e8160a00151826020015115611d5f565b80602001511561138a5780516110b09060059067ffffffffffffffff16611e98565b6110f55780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f6565b604081015151158061110a5750606081015151155b15611141576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c179091169615150295909517909855908101519401519381169316909102919091176003820155915190919060048201906113229082613600565b50606082015160058201906113379082613600565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2955061137d949392919061371a565b60405180910390a16114a1565b80516113a29060059067ffffffffffffffff16611ea4565b6113e75780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108f6565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906114506004830182612a98565b61145e600583016000612a98565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b5060010161102f565b6114b26116ef565b6114bb81611eb0565b50565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146115535760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f6565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611601573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162591906137b3565b1561165c576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116698160200151611fa5565b600061167882602001516105f6565b905080516000148061169c575080805190602001208260a001518051906020012014155b156116d9578160a001516040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016108f69190612bc4565b6116eb826020015183606001516120cb565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611770576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108f6565b565b7f00000000000000000000000000000000000000000000000000000000000000006117c9576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561185f5760008382815181106117e9576117e96134df565b6020026020010151905061180781600261211290919063ffffffff16565b156118565760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016117cc565b5060005b815181101561101f576000828281518110611880576118806134df565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118c45750611920565b6118cf600282612134565b1561191e5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611863565b600081815260018301602052604081205415155b9392505050565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146119d85760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016108f6565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aaa91906137b3565b15611ae1576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611aee8160400151612156565b611afb81602001516121d5565b6114bb81602001518260600151612323565b6040517f9dc29fac000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690639dc29fac90604401600060405180830381600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b5050505050565b6060600061193c83612367565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152611c5182606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642611c3591906137ff565b85608001516fffffffffffffffffffffffffffffffff166123c2565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b611c7e83610b67565b611cc0576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016108f6565b611ccb826000611d5f565b67ffffffffffffffff83166000908152600760205260409020611cee90836123ec565b611cf9816000611d5f565b67ffffffffffffffff83166000908152600760205260409020611d1f90600201826123ec565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051611d5293929190613812565b60405180910390a1505050565b815115611e265781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580611db5575060408201516fffffffffffffffffffffffffffffffff16155b15611dee57816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016108f69190613895565b80156116eb576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580611e5f575060208201516fffffffffffffffffffffffffffffffff1615155b156116eb57816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016108f69190613895565b600061193c838361258e565b600061193c83836125dd565b3373ffffffffffffffffffffffffffffffffffffffff821603611f2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108f6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b611fae81610b67565b611ff0576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f6565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa15801561206f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209391906137b3565b6114bb576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f6565b67ffffffffffffffff821660009081526007602052604090206116eb90600201827f00000000000000000000000000000000000000000000000000000000000000006126d0565b600061193c8373ffffffffffffffffffffffffffffffffffffffff84166125dd565b600061193c8373ffffffffffffffffffffffffffffffffffffffff841661258e565b7f0000000000000000000000000000000000000000000000000000000000000000156114bb57612187600282612a53565b6114bb576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016108f6565b6121de81610b67565b612220576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016108f6565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa158015612299573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bd91906138d1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114bb576040517f728fe07b0000000000000000000000000000000000000000000000000000000081523360048201526024016108f6565b67ffffffffffffffff821660009081526007602052604090206116eb90827f00000000000000000000000000000000000000000000000000000000000000006126d0565b60608160000180548060200260200160405190810160405280929190818152602001828054801561069a57602002820191906000526020600020905b8154815260200190600101908083116123a35750505050509050919050565b60006123e1856123d284866138ee565b6123dc9087613905565b612a82565b90505b949350505050565b815460009061241590700100000000000000000000000000000000900463ffffffff16426137ff565b905080156124b7576001830154835461245d916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166123c2565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546124dd916fffffffffffffffffffffffffffffffff9081169116612a82565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990611d52908490613895565b60008181526001830160205260408120546125d5575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105f0565b5060006105f0565b600081815260018301602052604081205480156126c65760006126016001836137ff565b8554909150600090612615906001906137ff565b905080821461267a576000866000018281548110612635576126356134df565b9060005260206000200154905080876000018481548110612658576126586134df565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061268b5761268b613918565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105f0565b60009150506105f0565b825474010000000000000000000000000000000000000000900460ff1615806126f7575081155b1561270157505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061274790700100000000000000000000000000000000900463ffffffff16426137ff565b905080156128075781831115612789576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546127c39083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166123c2565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156128be5773ffffffffffffffffffffffffffffffffffffffff8416612866576040517ff94ebcd100000000000000000000000000000000000000000000000000000000815260048101839052602481018690526044016108f6565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff851660448201526064016108f6565b848310156129d15760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1690600090829061290290826137ff565b61290c878a6137ff565b6129169190613905565b6129209190613947565b905073ffffffffffffffffffffffffffffffffffffffff8616612979576040517f15279c0800000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016108f6565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff871660448201526064016108f6565b6129db85846137ff565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561193c565b6000818310612a91578161193c565b5090919050565b508054612aa49061307c565b6000825580601f10612ab4575050565b601f0160209004906000526020600020908101906114bb91905b80821115612ae25760008155600101612ace565b5090565b600060208284031215612af857600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461193c57600080fd5b803567ffffffffffffffff81168114612b4057600080fd5b919050565b600060208284031215612b5757600080fd5b61193c82612b28565b6000815180845260005b81811015612b8657602081850181015186830182015201612b6a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061193c6020830184612b60565b73ffffffffffffffffffffffffffffffffffffffff811681146114bb57600080fd5b8035612b4081612bd7565b600060208284031215612c1657600080fd5b813561193c81612bd7565b600060208284031215612c3357600080fd5b813567ffffffffffffffff811115612c4a57600080fd5b8201610100818503121561193c57600080fd5b60008083601f840112612c6f57600080fd5b50813567ffffffffffffffff811115612c8757600080fd5b6020830191508360208260051b8501011115612ca257600080fd5b9250929050565b60008060008060408587031215612cbf57600080fd5b843567ffffffffffffffff80821115612cd757600080fd5b612ce388838901612c5d565b90965094506020870135915080821115612cfc57600080fd5b50612d0987828801612c5d565b95989497509550505050565b600080600060408486031215612d2a57600080fd5b612d3384612b28565b9250602084013567ffffffffffffffff80821115612d5057600080fd5b818601915086601f830112612d6457600080fd5b813581811115612d7357600080fd5b876020828501011115612d8557600080fd5b6020830194508093505050509250925092565b600060208284031215612daa57600080fd5b813567ffffffffffffffff811115612dc157600080fd5b820160a0818503121561193c57600080fd5b602081526000825160406020840152612def6060840182612b60565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612e2a8282612b60565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e8157835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612e4f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e8157835167ffffffffffffffff1683529284019291840191600101612ea9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff81118282101715612f2257612f22612ecf565b60405290565b60405160c0810167ffffffffffffffff81118282101715612f2257612f22612ecf565b80151581146114bb57600080fd5b8035612b4081612f4b565b80356fffffffffffffffffffffffffffffffff81168114612b4057600080fd5b600060608284031215612f9657600080fd5b6040516060810181811067ffffffffffffffff82111715612fb957612fb9612ecf565b6040529050808235612fca81612f4b565b8152612fd860208401612f64565b6020820152612fe960408401612f64565b60408201525092915050565b600080600060e0848603121561300a57600080fd5b61301384612b28565b92506130228560208601612f84565b91506130318560808601612f84565b90509250925092565b6000806020838503121561304d57600080fd5b823567ffffffffffffffff81111561306457600080fd5b61307085828601612c5d565b90969095509350505050565b600181811c9082168061309057607f821691505b6020821081036130c9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082601f8301126130e057600080fd5b813567ffffffffffffffff808211156130fb576130fb612ecf565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561314157613141612ecf565b8160405283815286602085880101111561315a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000610100823603121561318d57600080fd5b613195612efe565b823567ffffffffffffffff808211156131ad57600080fd5b6131b9368387016130cf565b83526131c760208601612b28565b60208401526131d860408601612bf9565b6040840152606085013560608401526131f360808601612bf9565b608084015260a085013591508082111561320c57600080fd5b613218368387016130cf565b60a084015260c085013591508082111561323157600080fd5b61323d368387016130cf565b60c084015260e085013591508082111561325657600080fd5b50613263368286016130cf565b60e08301525092915050565b601f82111561101f576000816000526020600020601f850160051c810160208610156132985750805b601f850160051c820191505b818110156132b7578281556001016132a4565b505050505050565b67ffffffffffffffff8311156132d7576132d7612ecf565b6132eb836132e5835461307c565b8361326f565b6000601f84116001811461333d57600085156133075750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611baf565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561338c578685013582556020948501946001909201910161336c565b50868210156133c7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b6040815260006133ec6040830186612b60565b82810360208401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050949350505050565b600060a0823603121561344f57600080fd5b60405160a0810167ffffffffffffffff828210818311171561347357613473612ecf565b81604052843591508082111561348857600080fd5b50613495368286016130cf565b8252506134a460208401612b28565b602082015260408301356134b781612bd7565b60408201526060838101359082015260808301356134d481612bd7565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec183360301811261354257600080fd5b9190910192915050565b6000610140823603121561355f57600080fd5b613567612f28565b61357083612b28565b815261357e60208401612f59565b6020820152604083013567ffffffffffffffff8082111561359e57600080fd5b6135aa368387016130cf565b604084015260608501359150808211156135c357600080fd5b506135d0368286016130cf565b6060830152506135e33660808501612f84565b60808201526135f53660e08501612f84565b60a082015292915050565b815167ffffffffffffffff81111561361a5761361a612ecf565b61362e81613628845461307c565b8461326f565b602080601f831160018114613681576000841561364b5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556132b7565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156136ce578886015182559484019460019091019084016136af565b508582101561370a57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff8716835280602084015261373e81840187612b60565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff908116606087015290870151166080850152915061377c9050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612e2a565b6000602082840312156137c557600080fd5b815161193c81612f4b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156105f0576105f06137d0565b67ffffffffffffffff8416815260e0810161385e60208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c08301526123e4565b606081016105f082848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b6000602082840312156138e357600080fd5b815161193c81612bd7565b80820281158282048414176105f0576105f06137d0565b808201808211156105f0576105f06137d0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008261397d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"localTokenDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162004c5c38038062004c5c833981016040819052620000359162000918565b8484848484336000816200005c57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200008f576200008f8162000206565b50506001600160a01b0385161580620000af57506001600160a01b038116155b80620000c257506001600160a01b038216155b15620000e1576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000151575060408051601f3d908101601f191682019092526200014e9181019062000a3a565b60015b1562000192578060ff168560ff161462000190576040516332ad3e0760e11b815260ff8087166004830152821660248201526044015b60405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001dc57604080516000815260208101909152620001dc908462000280565b50620001fb935050506001600160a01b038716905030600019620003dd565b505050505062000b84565b336001600160a01b038216036200023057604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e051620002a1576040516335f4a7b360e01b815260040160405180910390fd5b60005b82518110156200032c576000838281518110620002c557620002c562000a58565b60209081029190910101519050620002df600282620004c3565b1562000322576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101620002a4565b5060005b8151811015620003d857600082828151811062000351576200035162000a58565b6020026020010151905060006001600160a01b0316816001600160a01b0316036200037d5750620003cf565b6200038a600282620004e3565b15620003cd576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010162000330565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156200042f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000455919062000a6e565b62000461919062000a9e565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620004bd91869190620004fa16565b50505050565b6000620004da836001600160a01b038416620005cb565b90505b92915050565b6000620004da836001600160a01b038416620006cf565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009062000549906001600160a01b03851690849062000721565b805190915015620003d857808060200190518101906200056a919062000ab4565b620003d85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000187565b60008181526001830160205260408120548015620006c4576000620005f260018362000adf565b8554909150600090620006089060019062000adf565b9050808214620006745760008660000182815481106200062c576200062c62000a58565b906000526020600020015490508087600001848154811062000652576200065262000a58565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000688576200068862000af5565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620004dd565b6000915050620004dd565b60008181526001830160205260408120546200071857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620004dd565b506000620004dd565b60606200073284846000856200073a565b949350505050565b6060824710156200079d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000187565b600080866001600160a01b03168587604051620007bb919062000b31565b60006040518083038185875af1925050503d8060008114620007fa576040519150601f19603f3d011682016040523d82523d6000602084013e620007ff565b606091505b50909250905062000813878383876200081e565b979650505050505050565b60608315620008925782516000036200088a576001600160a01b0385163b6200088a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000187565b508162000732565b620007328383815115620008a95781518083602001fd5b8060405162461bcd60e51b815260040162000187919062000b4f565b6001600160a01b0381168114620008db57600080fd5b50565b805160ff81168114620008f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b8051620008f081620008c5565b600080600080600060a086880312156200093157600080fd5b85516200093e81620008c5565b945060206200094f878201620008de565b60408801519095506001600160401b03808211156200096d57600080fd5b818901915089601f8301126200098257600080fd5b815181811115620009975762000997620008f5565b8060051b604051601f19603f83011681018181108582111715620009bf57620009bf620008f5565b60405291825284820192508381018501918c831115620009de57600080fd5b938501935b8285101562000a0757620009f7856200090b565b84529385019392850192620009e3565b80985050505050505062000a1e606087016200090b565b915062000a2e608087016200090b565b90509295509295909350565b60006020828403121562000a4d57600080fd5b620004da82620008de565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562000a8157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620004dd57620004dd62000a88565b60006020828403121562000ac757600080fd5b8151801515811462000ad857600080fd5b9392505050565b81810381811115620004dd57620004dd62000a88565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000b2857818101518382015260200162000b0e565b50506000910152565b6000825162000b4581846020870162000b0b565b9190910192915050565b602081526000825180602084015262000b7081604085016020870162000b0b565b601f01601f19169190910160400192915050565b60805160a05160c05160e05161402762000c356000396000818161054801528181611d7b01526127cc0152600081816105220152818161189801526120670152600081816102d901528181610ba201528181611a4101528181611afb01528181611b2f01528181611b6201528181611bc701528181611c200152611cc20152600081816102400152818161029501528181610701015281816121ea0152818161276201526129b701526140276000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80639a4575b911610104578063c0d78655116100a2578063dc0bd97111610071578063dc0bd97114610520578063e0351e1314610546578063e8a1da171461056c578063f2fde38b1461057f57600080fd5b8063c0d78655146104d2578063c4bffe2b146104e5578063c75eea9c146104fa578063cf7401f31461050d57600080fd5b8063acfecf91116100de578063acfecf911461041f578063af58d59f14610432578063b0f479a1146104a1578063b7946580146104bf57600080fd5b80639a4575b9146103ca578063a42a7b8b146103ea578063a7cd63b71461040a57600080fd5b806354c8a4f31161017157806379ba50971161014b57806379ba50971461037e5780637d54534e146103865780638926f54f146103995780638da5cb5b146103ac57600080fd5b806354c8a4f31461033857806362ddd3c41461034d5780636d3d1a581461036057600080fd5b8063240028e8116101ad578063240028e81461028557806324f65ee7146102d257806339077537146103035780634c5ef0ed1461032557600080fd5b806301ffc9a7146101d4578063181f5a77146101fc57806321df0da71461023e575b600080fd5b6101e76101e2366004613177565b610592565b60405190151581526020015b60405180910390f35b60408051808201909152601f81527f4275726e5769746846726f6d4d696e74546f6b656e506f6f6c20312e352e310060208201525b6040516101f3919061321d565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b6101e7610293366004613252565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b61031661031136600461326f565b610677565b604051905181526020016101f3565b6101e76103333660046132c8565b610846565b61034b610346366004613397565b610890565b005b61034b61035b3660046132c8565b61090b565b60095473ffffffffffffffffffffffffffffffffffffffff16610260565b61034b6109a8565b61034b610394366004613252565b610a76565b6101e76103a7366004613403565b610af7565b60015473ffffffffffffffffffffffffffffffffffffffff16610260565b6103dd6103d836600461341e565b610b0e565b6040516101f39190613459565b6103fd6103f8366004613403565b610be7565b6040516101f391906134b0565b610412610d52565b6040516101f39190613532565b61034b61042d3660046132c8565b610d63565b610445610440366004613403565b610e7b565b6040516101f3919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610260565b6102316104cd366004613403565b610f50565b61034b6104e0366004613252565b611000565b6104ed6110db565b6040516101f3919061358c565b610445610508366004613403565b611193565b61034b61051b366004613714565b611265565b7f0000000000000000000000000000000000000000000000000000000000000000610260565b7f00000000000000000000000000000000000000000000000000000000000000006101e7565b61034b61057a366004613397565b6112e9565b61034b61058d366004613252565b6117fb565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061062557507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061067157507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60408051602081019091526000815261068f8261180f565b60006106e860608401356106e36106a960c0870187613759565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3392505050565b611af7565b905073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f196107366060860160408701613252565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101849052604401600060405180830381600087803b1580156107a357600080fd5b505af11580156107b7573d6000803e3d6000fd5b506107cc925050506060840160408501613252565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f08360405161082a91815260200190565b60405180910390a3604080516020810190915290815292915050565b6000610888838360405161085b9291906137be565b604080519182900390912067ffffffffffffffff8716600090815260076020529190912060050190611d0b565b949350505050565b610898611d26565b61090584848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611d7992505050565b50505050565b610913611d26565b61091c83610af7565b610963576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b6109a38383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f2f92505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109f9576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a7e611d26565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b6000610671600567ffffffffffffffff8416611d0b565b6040805180820190915260608082526020820152610b2b82612029565b610b3882606001356121b5565b6040516060830135815233907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a26040518060400160405280610b928460200160208101906104cd9190613403565b8152602001610bdf6040805160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260609101604051602081830303815290604052905090565b905292915050565b67ffffffffffffffff8116600090815260076020526040812060609190610c1090600501612257565b90506000815167ffffffffffffffff811115610c2e57610c2e6135ce565b604051908082528060200260200182016040528015610c6157816020015b6060815260200190600190039081610c4c5790505b50905060005b8251811015610d4a5760086000848381518110610c8657610c866137ce565b602002602001015181526020019081526020016000208054610ca7906137fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd3906137fd565b8015610d205780601f10610cf557610100808354040283529160200191610d20565b820191906000526020600020905b815481529060010190602001808311610d0357829003601f168201915b5050505050828281518110610d3757610d376137ce565b6020908102919091010152600101610c67565b509392505050565b6060610d5e6002612257565b905090565b610d6b611d26565b610d7483610af7565b610db6576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8416600482015260240161095a565b610df68282604051610dc99291906137be565b604080519182900390912067ffffffffffffffff8616600090815260076020529190912060050190612264565b610e32578282826040517f74f23c7c00000000000000000000000000000000000000000000000000000000815260040161095a93929190613899565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d768383604051610e6e9291906138bd565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261067190612270565b67ffffffffffffffff81166000908152600760205260409020600401805460609190610f7b906137fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa7906137fd565b8015610ff45780601f10610fc957610100808354040283529160200191610ff4565b820191906000526020600020905b815481529060010190602001808311610fd757829003601f168201915b50505050509050919050565b611008611d26565b73ffffffffffffffffffffffffffffffffffffffff8116611055576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006110e96005612257565b90506000815167ffffffffffffffff811115611107576111076135ce565b604051908082528060200260200182016040528015611130578160200160208202803683370190505b50905060005b825181101561118c57828181518110611151576111516137ce565b602002602001015182828151811061116b5761116b6137ce565b67ffffffffffffffff90921660209283029190910190910152600101611136565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261067190612270565b60095473ffffffffffffffffffffffffffffffffffffffff1633148015906112a5575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156112de576040517f8e4a23d600000000000000000000000000000000000000000000000000000000815233600482015260240161095a565b6109a3838383612322565b6112f1611d26565b60005b838110156114de576000858583818110611310576113106137ce565b90506020020160208101906113259190613403565b905061133c600567ffffffffffffffff8316612264565b61137e576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161095a565b67ffffffffffffffff811660009081526007602052604081206113a390600501612257565b905060005b815181101561140f576114068282815181106113c6576113c66137ce565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050161226490919063ffffffff16565b506001016113a8565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff00000000000000000000000000000000000000000090811682556001820183905560028201805490911690556003810182905590611478600483018261310a565b600582016000818161148a8282613144565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916945060200192506114cc915050565b60405180910390a150506001016112f4565b5060005b818110156117f45760008383838181106114fe576114fe6137ce565b905060200281019061151091906138d1565b6115199061399d565b905061152a8160600151600061240c565b6115398160800151600061240c565b806040015151600003611578576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516115909060059067ffffffffffffffff16612549565b6115d55780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015260240161095a565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a9091029990931617179094169590951790925590920290911760038201559082015160048201906117589082613b14565b5060005b82602001515181101561179c57611794836000015184602001518381518110611787576117876137ce565b6020026020010151611f2f565b60010161175c565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c282600001518360400151846060015185608001516040516117e29493929190613c2e565b60405180910390a150506001016114e2565b5050505050565b611803611d26565b61180c81612555565b50565b61182261029360a0830160808401613252565b6118815761183660a0820160808301613252565b6040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240161095a565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6118cd6040840160208501613403565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa15801561193e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119629190613cc7565b15611999576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b16119ac6040830160208401613403565b612619565b6119d16119c46040830160208401613403565b61033360a0840184613759565b611a16576119e260a0820182613759565b6040517f24eb47e500000000000000000000000000000000000000000000000000000000815260040161095a9291906138bd565b61180c611a296040830160208401613403565b826060013561273f565b60008151600003611a6557507f0000000000000000000000000000000000000000000000000000000000000000919050565b8151602014611aa257816040517f953576f700000000000000000000000000000000000000000000000000000000815260040161095a919061321d565b600082806020019051810190611ab89190613ce4565b905060ff81111561067157826040517f953576f700000000000000000000000000000000000000000000000000000000815260040161095a919061321d565b60007f000000000000000000000000000000000000000000000000000000000000000060ff168260ff1603611b2d575081610671565b7f000000000000000000000000000000000000000000000000000000000000000060ff168260ff161115611c18576000611b877f000000000000000000000000000000000000000000000000000000000000000084613d2c565b9050604d8160ff161115611bfb576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f00000000000000000000000000000000000000000000000000000000000000001660248201526044810185905260640161095a565b611c0681600a613e65565b611c109085613e74565b915050610671565b6000611c44837f0000000000000000000000000000000000000000000000000000000000000000613d2c565b9050604d8160ff161180611c8b5750611c5e81600a613e65565b611c88907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613e74565b84115b15611cf6576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f00000000000000000000000000000000000000000000000000000000000000001660248201526044810185905260640161095a565b611d0181600a613e65565b6108889085613eaf565b600081815260018301602052604081205415155b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d77576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f0000000000000000000000000000000000000000000000000000000000000000611dd0576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611e66576000838281518110611df057611df06137ce565b60200260200101519050611e0e81600261278690919063ffffffff16565b15611e5d5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611dd3565b5060005b81518110156109a3576000828281518110611e8757611e876137ce565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ecb5750611f27565b611ed66002826127a8565b15611f255760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611e6a565b8051600003611f6a576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff8416600090815260079092526040909120611f9c9060050182612549565b611fd65782826040517f393b8ad200000000000000000000000000000000000000000000000000000000815260040161095a929190613ec6565b6000818152600860205260409020611fee8382613b14565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea83604051610e6e919061321d565b61203c61029360a0830160808401613252565b6120505761183660a0820160808301613252565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb61209c6040840160208501613403565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa15801561210d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121319190613cc7565b15612168576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61218061217b6060830160408401613252565b6127ca565b6121986121936040830160208401613403565b612849565b61180c6121ab6040830160208401613403565b8260600135612997565b6040517f9dc29fac000000000000000000000000000000000000000000000000000000008152306004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690639dc29fac90604401600060405180830381600087803b15801561224357600080fd5b505af11580156117f4573d6000803e3d6000fd5b60606000611d1f836129db565b6000611d1f8383612a36565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526122fe82606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426122e29190613ee9565b85608001516fffffffffffffffffffffffffffffffff16612b29565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61232b83610af7565b61236d576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8416600482015260240161095a565b61237882600061240c565b67ffffffffffffffff8316600090815260076020526040902061239b9083612b51565b6123a681600061240c565b67ffffffffffffffff831660009081526007602052604090206123cc9060020182612b51565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b8383836040516123ff93929190613efc565b60405180910390a1505050565b8151156124d75781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612462575060408201516fffffffffffffffffffffffffffffffff16155b1561249b57816040517f8020d12400000000000000000000000000000000000000000000000000000000815260040161095a9190613f7f565b80156124d3576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580612510575060208201516fffffffffffffffffffffffffffffffff1615155b156124d357816040517fd68af9cc00000000000000000000000000000000000000000000000000000000815260040161095a9190613f7f565b6000611d1f8383612cf3565b3373ffffffffffffffffffffffffffffffffffffffff8216036125a4576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b61262281610af7565b612664576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161095a565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa1580156126e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127079190613cc7565b61180c576040517f728fe07b00000000000000000000000000000000000000000000000000000000815233600482015260240161095a565b67ffffffffffffffff821660009081526007602052604090206124d390600201827f0000000000000000000000000000000000000000000000000000000000000000612d42565b6000611d1f8373ffffffffffffffffffffffffffffffffffffffff8416612a36565b6000611d1f8373ffffffffffffffffffffffffffffffffffffffff8416612cf3565b7f00000000000000000000000000000000000000000000000000000000000000001561180c576127fb6002826130c5565b61180c576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161095a565b61285281610af7565b612894576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161095a565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa15801561290d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129319190613fbb565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461180c576040517f728fe07b00000000000000000000000000000000000000000000000000000000815233600482015260240161095a565b67ffffffffffffffff821660009081526007602052604090206124d390827f0000000000000000000000000000000000000000000000000000000000000000612d42565b606081600001805480602002602001604051908101604052809291908181526020018280548015610ff457602002820191906000526020600020905b815481526020019060010190808311612a175750505050509050919050565b60008181526001830160205260408120548015612b1f576000612a5a600183613ee9565b8554909150600090612a6e90600190613ee9565b9050808214612ad3576000866000018281548110612a8e57612a8e6137ce565b9060005260206000200154905080876000018481548110612ab157612ab16137ce565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ae457612ae4613fd8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610671565b6000915050610671565b6000612b4885612b398486613eaf565b612b439087614007565b6130f4565b95945050505050565b8154600090612b7a90700100000000000000000000000000000000900463ffffffff1642613ee9565b90508015612c1c5760018301548354612bc2916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612b29565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354612c42916fffffffffffffffffffffffffffffffff90811691166130f4565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19906123ff908490613f7f565b6000818152600183016020526040812054612d3a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610671565b506000610671565b825474010000000000000000000000000000000000000000900460ff161580612d69575081155b15612d7357505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612db990700100000000000000000000000000000000900463ffffffff1642613ee9565b90508015612e795781831115612dfb576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612e359083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612b29565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612f305773ffffffffffffffffffffffffffffffffffffffff8416612ed8576040517ff94ebcd1000000000000000000000000000000000000000000000000000000008152600481018390526024810186905260440161095a565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff8516604482015260640161095a565b848310156130435760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290612f749082613ee9565b612f7e878a613ee9565b612f889190614007565b612f929190613e74565b905073ffffffffffffffffffffffffffffffffffffffff8616612feb576040517f15279c08000000000000000000000000000000000000000000000000000000008152600481018290526024810186905260440161095a565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff8716604482015260640161095a565b61304d8584613ee9565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611d1f565b60008183106131035781611d1f565b5090919050565b508054613116906137fd565b6000825580601f10613126575050565b601f01602090049060005260206000209081019061180c919061315e565b508054600082559060005260206000209081019061180c91905b5b80821115613173576000815560010161315f565b5090565b60006020828403121561318957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d1f57600080fd5b6000815180845260005b818110156131df576020818501810151868301820152016131c3565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611d1f60208301846131b9565b73ffffffffffffffffffffffffffffffffffffffff8116811461180c57600080fd5b60006020828403121561326457600080fd5b8135611d1f81613230565b60006020828403121561328157600080fd5b813567ffffffffffffffff81111561329857600080fd5b82016101008185031215611d1f57600080fd5b803567ffffffffffffffff811681146132c357600080fd5b919050565b6000806000604084860312156132dd57600080fd5b6132e6846132ab565b9250602084013567ffffffffffffffff8082111561330357600080fd5b818601915086601f83011261331757600080fd5b81358181111561332657600080fd5b87602082850101111561333857600080fd5b6020830194508093505050509250925092565b60008083601f84011261335d57600080fd5b50813567ffffffffffffffff81111561337557600080fd5b6020830191508360208260051b850101111561339057600080fd5b9250929050565b600080600080604085870312156133ad57600080fd5b843567ffffffffffffffff808211156133c557600080fd5b6133d18883890161334b565b909650945060208701359150808211156133ea57600080fd5b506133f78782880161334b565b95989497509550505050565b60006020828403121561341557600080fd5b611d1f826132ab565b60006020828403121561343057600080fd5b813567ffffffffffffffff81111561344757600080fd5b820160a08185031215611d1f57600080fd5b60208152600082516040602084015261347560608401826131b9565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612b4882826131b9565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015613525577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526135138583516131b9565b945092850192908501906001016134d9565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358057835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161354e565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561358057835167ffffffffffffffff16835292840192918401916001016135a8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613620576136206135ce565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561366d5761366d6135ce565b604052919050565b801515811461180c57600080fd5b80356fffffffffffffffffffffffffffffffff811681146132c357600080fd5b6000606082840312156136b557600080fd5b6040516060810181811067ffffffffffffffff821117156136d8576136d86135ce565b60405290508082356136e981613675565b81526136f760208401613683565b602082015261370860408401613683565b60408201525092915050565b600080600060e0848603121561372957600080fd5b613732846132ab565b925061374185602086016136a3565b915061375085608086016136a3565b90509250925092565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261378e57600080fd5b83018035915067ffffffffffffffff8211156137a957600080fd5b60200191503681900382131561339057600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061381157607f821691505b60208210810361384a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b67ffffffffffffffff84168152604060208201526000612b48604083018486613850565b602081526000610888602083018486613850565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261390557600080fd5b9190910192915050565b600082601f83011261392057600080fd5b813567ffffffffffffffff81111561393a5761393a6135ce565b61396b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613626565b81815284602083860101111561398057600080fd5b816020850160208301376000918101602001919091529392505050565b600061012082360312156139b057600080fd5b6139b86135fd565b6139c1836132ab565b815260208084013567ffffffffffffffff808211156139df57600080fd5b9085019036601f8301126139f257600080fd5b813581811115613a0457613a046135ce565b8060051b613a13858201613626565b9182528381018501918581019036841115613a2d57600080fd5b86860192505b83831015613a6957823585811115613a4b5760008081fd5b613a593689838a010161390f565b8352509186019190860190613a33565b8087890152505050506040860135925080831115613a8657600080fd5b5050613a943682860161390f565b604083015250613aa736606085016136a3565b6060820152613ab93660c085016136a3565b608082015292915050565b601f8211156109a3576000816000526020600020601f850160051c81016020861015613aed5750805b601f850160051c820191505b81811015613b0c57828155600101613af9565b505050505050565b815167ffffffffffffffff811115613b2e57613b2e6135ce565b613b4281613b3c84546137fd565b84613ac4565b602080601f831160018114613b955760008415613b5f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b0c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613be257888601518255948401946001909101908401613bc3565b5085821015613c1e57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152613c52818401876131b9565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff9081166060870152908701511660808501529150613c909050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612b48565b600060208284031215613cd957600080fd5b8151611d1f81613675565b600060208284031215613cf657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff828116828216039081111561067157610671613cfd565b600181815b80851115613d9e57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613d8457613d84613cfd565b80851615613d9157918102915b93841c9390800290613d4a565b509250929050565b600082613db557506001610671565b81613dc257506000610671565b8160018114613dd85760028114613de257613dfe565b6001915050610671565b60ff841115613df357613df3613cfd565b50506001821b610671565b5060208310610133831016604e8410600b8410161715613e21575081810a610671565b613e2b8383613d45565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613e5d57613e5d613cfd565b029392505050565b6000611d1f60ff841683613da6565b600082613eaa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b808202811582820484141761067157610671613cfd565b67ffffffffffffffff8316815260406020820152600061088860408301846131b9565b8181038181111561067157610671613cfd565b67ffffffffffffffff8416815260e08101613f4860208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152610888565b6060810161067182848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600060208284031215613fcd57600080fd5b8151611d1f81613230565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8082018082111561067157610671613cfd56fea164736f6c6343000818000a", } var BurnWithFromMintTokenPoolABI = BurnWithFromMintTokenPoolMetaData.ABI var BurnWithFromMintTokenPoolBin = BurnWithFromMintTokenPoolMetaData.Bin -func DeployBurnWithFromMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnWithFromMintTokenPool, error) { +func DeployBurnWithFromMintTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, localTokenDecimals uint8, allowlist []common.Address, rmnProxy common.Address, router common.Address) (common.Address, *types.Transaction, *BurnWithFromMintTokenPool, error) { parsed, err := BurnWithFromMintTokenPoolMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -99,7 +98,7 @@ func DeployBurnWithFromMintTokenPool(auth *bind.TransactOpts, backend bind.Contr return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnWithFromMintTokenPoolBin), backend, token, allowlist, rmnProxy, router) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BurnWithFromMintTokenPoolBin), backend, token, localTokenDecimals, allowlist, rmnProxy, router) if err != nil { return common.Address{}, nil, nil, err } @@ -332,26 +331,26 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) GetRat return _BurnWithFromMintTokenPool.Contract.GetRateLimitAdmin(&_BurnWithFromMintTokenPool.CallOpts) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _BurnWithFromMintTokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _BurnWithFromMintTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnWithFromMintTokenPool.Contract.GetRemotePool(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnWithFromMintTokenPool.Contract.GetRemotePools(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _BurnWithFromMintTokenPool.Contract.GetRemotePool(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector) +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _BurnWithFromMintTokenPool.Contract.GetRemotePools(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector) } func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -464,6 +463,50 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) GetTok return _BurnWithFromMintTokenPool.Contract.GetToken(&_BurnWithFromMintTokenPool.CallOpts) } +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _BurnWithFromMintTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _BurnWithFromMintTokenPool.Contract.GetTokenDecimals(&_BurnWithFromMintTokenPool.CallOpts) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _BurnWithFromMintTokenPool.Contract.GetTokenDecimals(&_BurnWithFromMintTokenPool.CallOpts) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _BurnWithFromMintTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnWithFromMintTokenPool.Contract.IsRemotePool(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _BurnWithFromMintTokenPool.Contract.IsRemotePool(&_BurnWithFromMintTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _BurnWithFromMintTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -586,6 +629,18 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) Ac return _BurnWithFromMintTokenPool.Contract.AcceptOwnership(&_BurnWithFromMintTokenPool.TransactOpts) } +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.AddRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.AddRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _BurnWithFromMintTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -598,16 +653,16 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) Ap return _BurnWithFromMintTokenPool.Contract.ApplyAllowListUpdates(&_BurnWithFromMintTokenPool.TransactOpts, removes, adds) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnWithFromMintTokenPool.TransactOpts, chains) +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnWithFromMintTokenPool.TransactOpts, chains) +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.ApplyChainUpdates(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -634,6 +689,18 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) Re return _BurnWithFromMintTokenPool.Contract.ReleaseOrMint(&_BurnWithFromMintTokenPool.TransactOpts, releaseOrMintIn) } +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.RemoveRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _BurnWithFromMintTokenPool.Contract.RemoveRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _BurnWithFromMintTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -658,18 +725,6 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) Se return _BurnWithFromMintTokenPool.Contract.SetRateLimitAdmin(&_BurnWithFromMintTokenPool.TransactOpts, rateLimitAdmin) } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.Contract.SetRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _BurnWithFromMintTokenPool.Contract.SetRemotePool(&_BurnWithFromMintTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _BurnWithFromMintTokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2066,6 +2121,123 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseOwners return event, nil } +type BurnWithFromMintTokenPoolRateLimitAdminSetIterator struct { + Event *BurnWithFromMintTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnWithFromMintTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnWithFromMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnWithFromMintTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnWithFromMintTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *BurnWithFromMintTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnWithFromMintTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnWithFromMintTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _BurnWithFromMintTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &BurnWithFromMintTokenPoolRateLimitAdminSetIterator{contract: _BurnWithFromMintTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _BurnWithFromMintTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnWithFromMintTokenPoolRateLimitAdminSet) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*BurnWithFromMintTokenPoolRateLimitAdminSet, error) { + event := new(BurnWithFromMintTokenPoolRateLimitAdminSet) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type BurnWithFromMintTokenPoolReleasedIterator struct { Event *BurnWithFromMintTokenPoolReleased @@ -2203,8 +2375,136 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseReleas return event, nil } -type BurnWithFromMintTokenPoolRemotePoolSetIterator struct { - Event *BurnWithFromMintTokenPoolRemotePoolSet +type BurnWithFromMintTokenPoolRemotePoolAddedIterator struct { + Event *BurnWithFromMintTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *BurnWithFromMintTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(BurnWithFromMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(BurnWithFromMintTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *BurnWithFromMintTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *BurnWithFromMintTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type BurnWithFromMintTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnWithFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &BurnWithFromMintTokenPoolRemotePoolAddedIterator{contract: _BurnWithFromMintTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _BurnWithFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(BurnWithFromMintTokenPoolRemotePoolAdded) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolAdded, error) { + event := new(BurnWithFromMintTokenPoolRemotePoolAdded) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type BurnWithFromMintTokenPoolRemotePoolRemovedIterator struct { + Event *BurnWithFromMintTokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2215,7 +2515,7 @@ type BurnWithFromMintTokenPoolRemotePoolSetIterator struct { fail error } -func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Next() bool { +func (it *BurnWithFromMintTokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2224,7 +2524,7 @@ func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BurnWithFromMintTokenPoolRemotePoolSet) + it.Event = new(BurnWithFromMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2239,7 +2539,7 @@ func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(BurnWithFromMintTokenPoolRemotePoolSet) + it.Event = new(BurnWithFromMintTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2254,44 +2554,43 @@ func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Error() error { +func (it *BurnWithFromMintTokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *BurnWithFromMintTokenPoolRemotePoolSetIterator) Close() error { +func (it *BurnWithFromMintTokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type BurnWithFromMintTokenPoolRemotePoolSet struct { +type BurnWithFromMintTokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolSetIterator, error) { +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnWithFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnWithFromMintTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &BurnWithFromMintTokenPoolRemotePoolSetIterator{contract: _BurnWithFromMintTokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &BurnWithFromMintTokenPoolRemotePoolRemovedIterator{contract: _BurnWithFromMintTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _BurnWithFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _BurnWithFromMintTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2301,8 +2600,8 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRemote select { case log := <-logs: - event := new(BurnWithFromMintTokenPoolRemotePoolSet) - if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(BurnWithFromMintTokenPoolRemotePoolRemoved) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2323,9 +2622,9 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) WatchRemote }), nil } -func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolSet, error) { - event := new(BurnWithFromMintTokenPoolRemotePoolSet) - if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolRemoved, error) { + event := new(BurnWithFromMintTokenPoolRemotePoolRemoved) + if err := _BurnWithFromMintTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -2591,10 +2890,14 @@ func (_BurnWithFromMintTokenPool *BurnWithFromMintTokenPool) ParseLog(log types. return _BurnWithFromMintTokenPool.ParseOwnershipTransferRequested(log) case _BurnWithFromMintTokenPool.abi.Events["OwnershipTransferred"].ID: return _BurnWithFromMintTokenPool.ParseOwnershipTransferred(log) + case _BurnWithFromMintTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _BurnWithFromMintTokenPool.ParseRateLimitAdminSet(log) case _BurnWithFromMintTokenPool.abi.Events["Released"].ID: return _BurnWithFromMintTokenPool.ParseReleased(log) - case _BurnWithFromMintTokenPool.abi.Events["RemotePoolSet"].ID: - return _BurnWithFromMintTokenPool.ParseRemotePoolSet(log) + case _BurnWithFromMintTokenPool.abi.Events["RemotePoolAdded"].ID: + return _BurnWithFromMintTokenPool.ParseRemotePoolAdded(log) + case _BurnWithFromMintTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _BurnWithFromMintTokenPool.ParseRemotePoolRemoved(log) case _BurnWithFromMintTokenPool.abi.Events["RouterUpdated"].ID: return _BurnWithFromMintTokenPool.ParseRouterUpdated(log) case _BurnWithFromMintTokenPool.abi.Events["TokensConsumed"].ID: @@ -2649,12 +2952,20 @@ func (BurnWithFromMintTokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (BurnWithFromMintTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (BurnWithFromMintTokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (BurnWithFromMintTokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (BurnWithFromMintTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (BurnWithFromMintTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (BurnWithFromMintTokenPoolRouterUpdated) Topic() common.Hash { @@ -2680,7 +2991,7 @@ type BurnWithFromMintTokenPoolInterface interface { GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -2692,6 +3003,10 @@ type BurnWithFromMintTokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -2704,20 +3019,22 @@ type BurnWithFromMintTokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -2788,17 +3105,29 @@ type BurnWithFromMintTokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*BurnWithFromMintTokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*BurnWithFromMintTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*BurnWithFromMintTokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*BurnWithFromMintTokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*BurnWithFromMintTokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*BurnWithFromMintTokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *BurnWithFromMintTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*BurnWithFromMintTokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*BurnWithFromMintTokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generated/lock_release_token_pool/lock_release_token_pool.go b/core/gethwrappers/ccip/generated/lock_release_token_pool/lock_release_token_pool.go index 275f9c7a38..32edf6ef6c 100644 --- a/core/gethwrappers/ccip/generated/lock_release_token_pool/lock_release_token_pool.go +++ b/core/gethwrappers/ccip/generated/lock_release_token_pool/lock_release_token_pool.go @@ -74,23 +74,22 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig } var LockReleaseTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"acceptLiquidity\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LiquidityNotAccepted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"canAcceptLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRebalancer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"provideLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebalancer\",\"type\":\"address\"}],\"name\":\"setRebalancer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101006040523480156200001257600080fd5b50604051620049ae380380620049ae833981016040819052620000359162000565565b848484833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200017e565b5050506001600160a01b0384161580620000e457506001600160a01b038116155b80620000f757506001600160a01b038216155b1562000116576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c052620001695760408051600081526020810190915262000169908462000229565b5050505090151560e05250620006d692505050565b336001600160a01b03821603620001d85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c0516200024a576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002d55760008382815181106200026e576200026e62000688565b602090810291909101015190506200028860028262000386565b15620002cb576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016200024d565b5060005b815181101562000381576000828281518110620002fa57620002fa62000688565b6020026020010151905060006001600160a01b0316816001600160a01b03160362000326575062000378565b62000333600282620003a6565b1562000376576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620002d9565b505050565b60006200039d836001600160a01b038416620003bd565b90505b92915050565b60006200039d836001600160a01b038416620004c1565b60008181526001830160205260408120548015620004b6576000620003e46001836200069e565b8554909150600090620003fa906001906200069e565b9050808214620004665760008660000182815481106200041e576200041e62000688565b906000526020600020015490508087600001848154811062000444576200044462000688565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806200047a576200047a620006c0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620003a0565b6000915050620003a0565b60008181526001830160205260408120546200050a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003a0565b506000620003a0565b6001600160a01b03811681146200052957600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b80516200054f8162000513565b919050565b805180151581146200054f57600080fd5b600080600080600060a086880312156200057e57600080fd5b85516200058b8162000513565b602087810151919650906001600160401b0380821115620005ab57600080fd5b818901915089601f830112620005c057600080fd5b815181811115620005d557620005d56200052c565b8060051b604051601f19603f83011681018181108582111715620005fd57620005fd6200052c565b60405291825284820192508381018501918c8311156200061c57600080fd5b938501935b828510156200064557620006358562000542565b8452938501939285019262000621565b8099505050505050506200065c6040870162000542565b92506200066c6060870162000554565b91506200067c6080870162000542565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b81810381811115620003a057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e05161423c62000772600039600081816104ef015261174201526000818161059c01528181611cde015261278301526000818161057601528181611b0f0152611f94015260008181610290015281816102e50152818161077a0152818161084c015281816108ed0152818161180401528181611a2f01528181611eb401528181612719015261296e015261423c6000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063c4bffe2b116100a2578063dc0bd97111610071578063dc0bd97114610574578063e0351e131461059a578063eb521a4c146105c0578063f2fde38b146105d357600080fd5b8063c4bffe2b14610526578063c75eea9c1461053b578063cf7401f31461054e578063db6327dc1461056157600080fd5b8063b0f479a1116100de578063b0f479a1146104bc578063b7946580146104da578063bb98546b146104ed578063c0d786551461051357600080fd5b80638da5cb5b146103fa5780639a4575b914610418578063a7cd63b714610438578063af58d59f1461044d57600080fd5b806354c8a4f31161018757806378a010b21161015657806378a010b2146103b957806379ba5097146103cc5780637d54534e146103d45780638926f54f146103e757600080fd5b806354c8a4f31461036257806366320087146103755780636cfd1553146103885780636d3d1a581461039b57600080fd5b806321df0da7116101c357806321df0da71461028e578063240028e8146102d55780633907753714610322578063432a6ba31461034457600080fd5b806301ffc9a7146101f55780630a2fd4931461021d5780630a861f2a1461023d578063181f5a7714610252575b600080fd5b610208610203366004613318565b6105e6565b60405190151581526020015b60405180910390f35b61023061022b366004613377565b610642565b6040516102149190613400565b61025061024b366004613413565b6106f2565b005b6102306040518060400160405280601a81526020017f4c6f636b52656c65617365546f6b656e506f6f6c20312e352e3000000000000081525081565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610214565b6102086102e3366004613459565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b610335610330366004613476565b6108a3565b60405190518152602001610214565b60095473ffffffffffffffffffffffffffffffffffffffff166102b0565b6102506103703660046134fe565b6109a9565b61025061038336600461356a565b610a24565b610250610396366004613459565b610b00565b60085473ffffffffffffffffffffffffffffffffffffffff166102b0565b6102506103c7366004613596565b610b4f565b610250610cbe565b6102506103e2366004613459565b610dbb565b6102086103f5366004613377565b610e0a565b60005473ffffffffffffffffffffffffffffffffffffffff166102b0565b61042b610426366004613619565b610e21565b6040516102149190613654565b610440610ebb565b60405161021491906136b4565b61046061045b366004613377565b610ecc565b604051610214919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff166102b0565b6102306104e8366004613377565b610fa1565b7f0000000000000000000000000000000000000000000000000000000000000000610208565b610250610521366004613459565b610fcc565b61052e6110a7565b604051610214919061370e565b610460610549366004613377565b61115f565b61025061055c366004613876565b611231565b61025061056f3660046138bb565b6112ba565b7f00000000000000000000000000000000000000000000000000000000000000006102b0565b7f0000000000000000000000000000000000000000000000000000000000000000610208565b6102506105ce366004613413565b611740565b6102506105e1366004613459565b61185c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fe1d4056600000000000000000000000000000000000000000000000000000000148061063c575061063c82611870565b92915050565b67ffffffffffffffff8116600090815260076020526040902060040180546060919061066d906138fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610699906138fd565b80156106e65780601f106106bb576101008083540402835291602001916106e6565b820191906000526020600020905b8154815290600101906020018083116106c957829003601f168201915b50505050509050919050565b60095473ffffffffffffffffffffffffffffffffffffffff16331461074a576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fa9190613950565b1015610832576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61087373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611954565b604051819033907fc2c3f06e49b9f15e7b4af9055e183b0d73362e033ad82a07dec9bf984017171990600090a350565b6040805160208101909152600081526108c36108be83613a14565b611a28565b6109186108d66060840160408501613459565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906060850135611954565b6109286060830160408401613459565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52846060013560405161098a91815260200190565b60405180910390a3506040805160208101909152606090910135815290565b6109b1611c59565b610a1e84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611cdc92505050565b50505050565b610a2c611c59565b6040517f0a861f2a0000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff831690630a861f2a90602401600060405180830381600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f6fa7abcf1345d1d478e5ea0da6b5f26a90eadb0546ef15ed3833944fbfd1db6282604051610af491815260200190565b60405180910390a25050565b610b08611c59565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610b57611c59565b610b6083610e0a565b610ba2576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610741565b67ffffffffffffffff831660009081526007602052604081206004018054610bc9906138fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf5906138fd565b8015610c425780601f10610c1757610100808354040283529160200191610c42565b820191906000526020600020905b815481529060010190602001808311610c2557829003601f168201915b5050505067ffffffffffffffff8616600090815260076020526040902091925050600401610c71838583613b59565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610cb093929190613c74565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610741565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610dc3611c59565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600061063c600567ffffffffffffffff8416611e92565b6040805180820190915260608082526020820152610e46610e4183613cd8565b611ead565b6040516060830135815233907f9f1ec8c880f76798e7b793325d625e9b60e4082a553c98f42b6cda368dd600089060200160405180910390a26040518060400160405280610ea08460200160208101906104e89190613377565b81526040805160208181019092526000815291015292915050565b6060610ec76002612077565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261063c90612084565b67ffffffffffffffff8116600090815260076020526040902060050180546060919061066d906138fd565b610fd4611c59565b73ffffffffffffffffffffffffffffffffffffffff8116611021576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006110b56005612077565b90506000815167ffffffffffffffff8111156110d3576110d3613750565b6040519080825280602002602001820160405280156110fc578160200160208202803683370190505b50905060005b82518110156111585782818151811061111d5761111d613d7a565b602002602001015182828151811061113757611137613d7a565b67ffffffffffffffff90921660209283029190910190910152600101611102565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261063c90612084565b60085473ffffffffffffffffffffffffffffffffffffffff163314801590611271575060005473ffffffffffffffffffffffffffffffffffffffff163314155b156112aa576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610741565b6112b5838383612136565b505050565b6112c2611c59565b60005b818110156112b55760008383838181106112e1576112e1613d7a565b90506020028101906112f39190613da9565b6112fc90613de7565b90506113118160800151826020015115612220565b6113248160a00151826020015115612220565b8060200151156116205780516113469060059067ffffffffffffffff16612359565b61138b5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610741565b60408101515115806113a05750606081015151155b156113d7576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c179091169615150295909517909855908101519401519381169316909102919091176003820155915190919060048201906115b89082613e9b565b50606082015160058201906115cd9082613e9b565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c295506116139493929190613fb5565b60405180910390a1611737565b80516116389060059067ffffffffffffffff16612365565b61167d5780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610741565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906116e660048301826132ca565b6116f46005830160006132ca565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b506001016112c5565b7f0000000000000000000000000000000000000000000000000000000000000000611797576040517fe93f8fa400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095473ffffffffffffffffffffffffffffffffffffffff1633146117ea576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610741565b61182c73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084612371565b604051819033907fc17cea59c2955cb181b03393209566960365771dbba9dc3d510180e7cb31208890600090a350565b611864611c59565b61186d816123cf565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061190357507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061063c57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526112b59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526124c4565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614611abd5760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610741565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8f919061404e565b15611bc6576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611bd381602001516125d0565b6000611be28260200151610642565b9050805160001480611c06575080805190602001208260a001518051906020012014155b15611c43578160a001516040517f24eb47e50000000000000000000000000000000000000000000000000000000081526004016107419190613400565b611c55826020015183606001516126f6565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611cda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610741565b565b7f0000000000000000000000000000000000000000000000000000000000000000611d33576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611dc9576000838281518110611d5357611d53613d7a565b60200260200101519050611d7181600261273d90919063ffffffff16565b15611dc05760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611d36565b5060005b81518110156112b5576000828281518110611dea57611dea613d7a565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611e2e5750611e8a565b611e3960028261275f565b15611e885760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611dcd565b600081815260018301602052604081205415155b9392505050565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614611f425760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610741565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611ff0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612014919061404e565b1561204b576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6120588160400151612781565b6120658160200151612800565b61186d8160200151826060015161294e565b60606000611ea683612992565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915261211282606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426120f6919061409a565b85608001516fffffffffffffffffffffffffffffffff166129ed565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61213f83610e0a565b612181576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610741565b61218c826000612220565b67ffffffffffffffff831660009081526007602052604090206121af9083612a17565b6121ba816000612220565b67ffffffffffffffff831660009081526007602052604090206121e09060020182612a17565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051612213939291906140ad565b60405180910390a1505050565b8151156122e75781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612276575060408201516fffffffffffffffffffffffffffffffff16155b156122af57816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016107419190614130565b8015611c55576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580612320575060208201516fffffffffffffffffffffffffffffffff1615155b15611c5557816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016107419190614130565b6000611ea68383612bb9565b6000611ea68383612c08565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610a1e9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016119a6565b3373ffffffffffffffffffffffffffffffffffffffff82160361244e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610741565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000612526826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612cfb9092919063ffffffff16565b8051909150156112b55780806020019051810190612544919061404e565b6112b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610741565b6125d981610e0a565b61261b576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610741565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa15801561269a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126be919061404e565b61186d576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610741565b67ffffffffffffffff82166000908152600760205260409020611c5590600201827f0000000000000000000000000000000000000000000000000000000000000000612d0a565b6000611ea68373ffffffffffffffffffffffffffffffffffffffff8416612c08565b6000611ea68373ffffffffffffffffffffffffffffffffffffffff8416612bb9565b7f00000000000000000000000000000000000000000000000000000000000000001561186d576127b260028261308d565b61186d576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610741565b61280981610e0a565b61284b576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610741565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa1580156128c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128e8919061416c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461186d576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610741565b67ffffffffffffffff82166000908152600760205260409020611c5590827f0000000000000000000000000000000000000000000000000000000000000000612d0a565b6060816000018054806020026020016040519081016040528092919081815260200182805480156106e657602002820191906000526020600020905b8154815260200190600101908083116129ce5750505050509050919050565b6000612a0c856129fd8486614189565b612a0790876141a0565b6130bc565b90505b949350505050565b8154600090612a4090700100000000000000000000000000000000900463ffffffff164261409a565b90508015612ae25760018301548354612a88916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166129ed565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354612b08916fffffffffffffffffffffffffffffffff90811691166130bc565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990612213908490614130565b6000818152600183016020526040812054612c005750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561063c565b50600061063c565b60008181526001830160205260408120548015612cf1576000612c2c60018361409a565b8554909150600090612c409060019061409a565b9050808214612ca5576000866000018281548110612c6057612c60613d7a565b9060005260206000200154905080876000018481548110612c8357612c83613d7a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612cb657612cb66141b3565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061063c565b600091505061063c565b6060612a0f84846000856130d2565b825474010000000000000000000000000000000000000000900460ff161580612d31575081155b15612d3b57505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612d8190700100000000000000000000000000000000900463ffffffff164261409a565b90508015612e415781831115612dc3576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612dfd9083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166129ed565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612ef85773ffffffffffffffffffffffffffffffffffffffff8416612ea0576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610741565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610741565b8483101561300b5760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290612f3c908261409a565b612f46878a61409a565b612f5091906141a0565b612f5a91906141e2565b905073ffffffffffffffffffffffffffffffffffffffff8616612fb3576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610741565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610741565b613015858461409a565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611ea6565b60008183106130cb5781611ea6565b5090919050565b606082471015613164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610741565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161318d919061421d565b60006040518083038185875af1925050503d80600081146131ca576040519150601f19603f3d011682016040523d82523d6000602084013e6131cf565b606091505b50915091506131e0878383876131eb565b979650505050505050565b6060831561328157825160000361327a5773ffffffffffffffffffffffffffffffffffffffff85163b61327a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610741565b5081612a0f565b612a0f83838151156132965781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107419190613400565b5080546132d6906138fd565b6000825580601f106132e6575050565b601f01602090049060005260206000209081019061186d91905b808211156133145760008155600101613300565b5090565b60006020828403121561332a57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611ea657600080fd5b803567ffffffffffffffff8116811461337257600080fd5b919050565b60006020828403121561338957600080fd5b611ea68261335a565b60005b838110156133ad578181015183820152602001613395565b50506000910152565b600081518084526133ce816020860160208601613392565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611ea660208301846133b6565b60006020828403121561342557600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461186d57600080fd5b80356133728161342c565b60006020828403121561346b57600080fd5b8135611ea68161342c565b60006020828403121561348857600080fd5b813567ffffffffffffffff81111561349f57600080fd5b82016101008185031215611ea657600080fd5b60008083601f8401126134c457600080fd5b50813567ffffffffffffffff8111156134dc57600080fd5b6020830191508360208260051b85010111156134f757600080fd5b9250929050565b6000806000806040858703121561351457600080fd5b843567ffffffffffffffff8082111561352c57600080fd5b613538888389016134b2565b9096509450602087013591508082111561355157600080fd5b5061355e878288016134b2565b95989497509550505050565b6000806040838503121561357d57600080fd5b82356135888161342c565b946020939093013593505050565b6000806000604084860312156135ab57600080fd5b6135b48461335a565b9250602084013567ffffffffffffffff808211156135d157600080fd5b818601915086601f8301126135e557600080fd5b8135818111156135f457600080fd5b87602082850101111561360657600080fd5b6020830194508093505050509250925092565b60006020828403121561362b57600080fd5b813567ffffffffffffffff81111561364257600080fd5b820160a08185031215611ea657600080fd5b60208152600082516040602084015261367060608401826133b6565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526136ab82826133b6565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101561370257835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016136d0565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561370257835167ffffffffffffffff168352928401929184019160010161372a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff811182821017156137a3576137a3613750565b60405290565b60405160c0810167ffffffffffffffff811182821017156137a3576137a3613750565b801515811461186d57600080fd5b8035613372816137cc565b80356fffffffffffffffffffffffffffffffff8116811461337257600080fd5b60006060828403121561381757600080fd5b6040516060810181811067ffffffffffffffff8211171561383a5761383a613750565b604052905080823561384b816137cc565b8152613859602084016137e5565b602082015261386a604084016137e5565b60408201525092915050565b600080600060e0848603121561388b57600080fd5b6138948461335a565b92506138a38560208601613805565b91506138b28560808601613805565b90509250925092565b600080602083850312156138ce57600080fd5b823567ffffffffffffffff8111156138e557600080fd5b6138f1858286016134b2565b90969095509350505050565b600181811c9082168061391157607f821691505b60208210810361394a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006020828403121561396257600080fd5b5051919050565b600082601f83011261397a57600080fd5b813567ffffffffffffffff8082111561399557613995613750565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156139db576139db613750565b816040528381528660208588010111156139f457600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006101008236031215613a2757600080fd5b613a2f61377f565b823567ffffffffffffffff80821115613a4757600080fd5b613a5336838701613969565b8352613a616020860161335a565b6020840152613a726040860161344e565b604084015260608501356060840152613a8d6080860161344e565b608084015260a0850135915080821115613aa657600080fd5b613ab236838701613969565b60a084015260c0850135915080821115613acb57600080fd5b613ad736838701613969565b60c084015260e0850135915080821115613af057600080fd5b50613afd36828601613969565b60e08301525092915050565b601f8211156112b5576000816000526020600020601f850160051c81016020861015613b325750805b601f850160051c820191505b81811015613b5157828155600101613b3e565b505050505050565b67ffffffffffffffff831115613b7157613b71613750565b613b8583613b7f83546138fd565b83613b09565b6000601f841160018114613bd75760008515613ba15750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355613c6d565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015613c265786850135825560209485019460019092019101613c06565b5086821015613c61577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b604081526000613c8760408301866133b6565b82810360208401528381528385602083013760006020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050949350505050565b600060a08236031215613cea57600080fd5b60405160a0810167ffffffffffffffff8282108183111715613d0e57613d0e613750565b816040528435915080821115613d2357600080fd5b50613d3036828601613969565b825250613d3f6020840161335a565b60208201526040830135613d528161342c565b6040820152606083810135908201526080830135613d6f8161342c565b608082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112613ddd57600080fd5b9190910192915050565b60006101408236031215613dfa57600080fd5b613e026137a9565b613e0b8361335a565b8152613e19602084016137da565b6020820152604083013567ffffffffffffffff80821115613e3957600080fd5b613e4536838701613969565b60408401526060850135915080821115613e5e57600080fd5b50613e6b36828601613969565b606083015250613e7e3660808501613805565b6080820152613e903660e08501613805565b60a082015292915050565b815167ffffffffffffffff811115613eb557613eb5613750565b613ec981613ec384546138fd565b84613b09565b602080601f831160018114613f1c5760008415613ee65750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555613b51565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613f6957888601518255948401946001909101908401613f4a565b5085821015613fa557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152613fd9818401876133b6565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff90811660608701529087015116608085015291506140179050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e08301526136ab565b60006020828403121561406057600080fd5b8151611ea6816137cc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561063c5761063c61406b565b67ffffffffffffffff8416815260e081016140f960208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152612a0f565b6060810161063c82848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b60006020828403121561417e57600080fd5b8151611ea68161342c565b808202811582820484141761063c5761063c61406b565b8082018082111561063c5761063c61406b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600082614218577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008251613ddd81846020870161339256fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"localTokenDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"acceptLiquidity\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLiquidity\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LiquidityNotAccepted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LiquidityTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"canAcceptLiquidity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRebalancer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"provideLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rebalancer\",\"type\":\"address\"}],\"name\":\"setRebalancer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101206040523480156200001257600080fd5b506040516200511f3803806200511f8339810160408190526200003591620005bb565b8585858584336000816200005c57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200008f576200008f81620001f3565b50506001600160a01b0385161580620000af57506001600160a01b038116155b80620000c257506001600160a01b038216155b15620000e1576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000151575060408051601f3d908101601f191682019092526200014e91810190620006ee565b60015b1562000191578060ff168560ff16146200018f576040516332ad3e0760e11b815260ff80871660048301528216602482015260440160405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001db57604080516000815260208101909152620001db90846200026d565b5050505091151561010052506200075a945050505050565b336001600160a01b038216036200021d57604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e0516200028e576040516335f4a7b360e01b815260040160405180910390fd5b60005b825181101562000319576000838281518110620002b257620002b26200070c565b60209081029190910101519050620002cc600282620003ca565b156200030f576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b5060010162000291565b5060005b8151811015620003c55760008282815181106200033e576200033e6200070c565b6020026020010151905060006001600160a01b0316816001600160a01b0316036200036a5750620003bc565b62000377600282620003ea565b15620003ba576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b6001016200031d565b505050565b6000620003e1836001600160a01b03841662000401565b90505b92915050565b6000620003e1836001600160a01b03841662000505565b60008181526001830160205260408120548015620004fa5760006200042860018362000722565b85549091506000906200043e9060019062000722565b9050808214620004aa5760008660000182815481106200046257620004626200070c565b90600052602060002001549050808760000184815481106200048857620004886200070c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620004be57620004be62000744565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620003e4565b6000915050620003e4565b60008181526001830160205260408120546200054e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003e4565b506000620003e4565b6001600160a01b03811681146200056d57600080fd5b50565b805160ff811681146200058257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b8051620005828162000557565b805180151581146200058257600080fd5b60008060008060008060c08789031215620005d557600080fd5b8651620005e28162000557565b95506020620005f388820162000570565b60408901519096506001600160401b03808211156200061157600080fd5b818a0191508a601f8301126200062657600080fd5b8151818111156200063b576200063b62000587565b8060051b604051601f19603f8301168101818110858211171562000663576200066362000587565b60405291825284820192508381018501918d8311156200068257600080fd5b938501935b82851015620006ab576200069b856200059d565b8452938501939285019262000687565b809950505050505050620006c2606088016200059d565b9250620006d260808801620005aa565b9150620006e260a088016200059d565b90509295509295509295565b6000602082840312156200070157600080fd5b620003e18262000570565b634e487b7160e01b600052603260045260246000fd5b81810381811115620003e457634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e051610100516148f46200082b600039600081816105a40152611ac601526000818161063e015281816123180152612e3101526000818161061801528181611e35015261260401526000818161036701528181610e6b01528181611fde01528181612098015281816120cc015281816120ff01528181612164015281816121bd015261225f0152600081816102ce015281816103230152818161077f015281816108510152818161094501528181611b8801528181612dc7015261301c01526148f46000f3fe608060405234801561001057600080fd5b50600436106102415760003560e01c80638da5cb5b11610145578063c0d78655116100bd578063dc0bd9711161008c578063e8a1da1711610071578063e8a1da1714610662578063eb521a4c14610675578063f2fde38b1461068857600080fd5b8063dc0bd97114610616578063e0351e131461063c57600080fd5b8063c0d78655146105c8578063c4bffe2b146105db578063c75eea9c146105f0578063cf7401f31461060357600080fd5b8063acfecf9111610114578063b0f479a1116100f9578063b0f479a114610571578063b79465801461058f578063bb98546b146105a257600080fd5b8063acfecf91146104ef578063af58d59f1461050257600080fd5b80638da5cb5b1461047c5780639a4575b91461049a578063a42a7b8b146104ba578063a7cd63b7146104da57600080fd5b80634c5ef0ed116101d85780636cfd1553116101a757806379ba50971161018c57806379ba50971461044e5780637d54534e146104565780638926f54f1461046957600080fd5b80636cfd15531461041d5780636d3d1a581461043057600080fd5b80634c5ef0ed146103d157806354c8a4f3146103e457806362ddd3c4146103f7578063663200871461040a57600080fd5b8063240028e811610214578063240028e81461031357806324f65ee7146103605780633907753714610391578063432a6ba3146103b357600080fd5b806301ffc9a7146102465780630a861f2a1461026e578063181f5a771461028357806321df0da7146102cc575b600080fd5b6102596102543660046139e3565b61069b565b60405190151581526020015b60405180910390f35b61028161027c366004613a25565b6106f7565b005b6102bf6040518060400160405280601a81526020017f4c6f636b52656c65617365546f6b656e506f6f6c20312e352e3100000000000081525081565b6040516102659190613aac565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610265565b610259610321366004613ae1565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610265565b6103a461039f366004613afe565b6108a8565b60405190518152602001610265565b600a5473ffffffffffffffffffffffffffffffffffffffff166102ee565b6102596103df366004613b57565b6109f6565b6102816103f2366004613c26565b610a40565b610281610405366004613b57565b610abb565b610281610418366004613c92565b610b53565b61028161042b366004613ae1565b610c2f565b60095473ffffffffffffffffffffffffffffffffffffffff166102ee565b610281610c7e565b610281610464366004613ae1565b610d4c565b610259610477366004613cbe565b610dcd565b60015473ffffffffffffffffffffffffffffffffffffffff166102ee565b6104ad6104a8366004613cd9565b610de4565b6040516102659190613d14565b6104cd6104c8366004613cbe565b610eb0565b6040516102659190613d6b565b6104e261101b565b6040516102659190613ded565b6102816104fd366004613b57565b61102c565b610515610510366004613cbe565b611144565b604051610265919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff166102ee565b6102bf61059d366004613cbe565b611219565b7f0000000000000000000000000000000000000000000000000000000000000000610259565b6102816105d6366004613ae1565b6112c9565b6105e36113a4565b6040516102659190613e47565b6105156105fe366004613cbe565b61145c565b610281610611366004613fcf565b61152e565b7f00000000000000000000000000000000000000000000000000000000000000006102ee565b7f0000000000000000000000000000000000000000000000000000000000000000610259565b610281610670366004613c26565b6115b2565b610281610683366004613a25565b611ac4565b610281610696366004613ae1565b611be0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fe1d405660000000000000000000000000000000000000000000000000000000014806106f157506106f182611bf4565b92915050565b600a5473ffffffffffffffffffffffffffffffffffffffff16331461074f576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ff9190614014565b1015610837576040517fbb55fd2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61087873ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163383611cd8565b604051819033907fc2c3f06e49b9f15e7b4af9055e183b0d73362e033ad82a07dec9bf984017171990600090a350565b6040805160208101909152600081526108c082611dac565b600061091960608401356109146108da60c087018761402d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611fd092505050565b612094565b905061096c61092e6060850160408601613ae1565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169083611cd8565b61097c6060840160408501613ae1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52836040516109da91815260200190565b60405180910390a3604080516020810190915290815292915050565b6000610a388383604051610a0b929190614092565b604080519182900390912067ffffffffffffffff87166000908152600760205291909120600501906122a8565b949350505050565b610a486122c3565b610ab58484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061231692505050565b50505050565b610ac36122c3565b610acc83610dcd565b610b0e576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610746565b610b4e8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506124cc92505050565b505050565b610b5b6122c3565b6040517f0a861f2a0000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff831690630a861f2a90602401600060405180830381600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff167f6fa7abcf1345d1d478e5ea0da6b5f26a90eadb0546ef15ed3833944fbfd1db6282604051610c2391815260200190565b60405180910390a25050565b610c376122c3565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ccf576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610d546122c3565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b60006106f1600567ffffffffffffffff84166122a8565b6040805180820190915260608082526020820152610e01826125c6565b6040516060830135815233907f9f1ec8c880f76798e7b793325d625e9b60e4082a553c98f42b6cda368dd600089060200160405180910390a26040518060400160405280610e5b84602001602081019061059d9190613cbe565b8152602001610ea86040805160ff7f000000000000000000000000000000000000000000000000000000000000000016602082015260609101604051602081830303815290604052905090565b905292915050565b67ffffffffffffffff8116600090815260076020526040812060609190610ed990600501612752565b90506000815167ffffffffffffffff811115610ef757610ef7613e89565b604051908082528060200260200182016040528015610f2a57816020015b6060815260200190600190039081610f155790505b50905060005b82518110156110135760086000848381518110610f4f57610f4f6140a2565b602002602001015181526020019081526020016000208054610f70906140d1565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9c906140d1565b8015610fe95780601f10610fbe57610100808354040283529160200191610fe9565b820191906000526020600020905b815481529060010190602001808311610fcc57829003601f168201915b5050505050828281518110611000576110006140a2565b6020908102919091010152600101610f30565b509392505050565b60606110276002612752565b905090565b6110346122c3565b61103d83610dcd565b61107f576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610746565b6110bf8282604051611092929190614092565b604080519182900390912067ffffffffffffffff861660009081526007602052919091206005019061275f565b6110fb578282826040517f74f23c7c0000000000000000000000000000000000000000000000000000000081526004016107469392919061416d565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d768383604051611137929190614191565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260039091015480841660608301529190910490911660808201526106f19061276b565b67ffffffffffffffff81166000908152600760205260409020600401805460609190611244906140d1565b80601f0160208091040260200160405190810160405280929190818152602001828054611270906140d1565b80156112bd5780601f10611292576101008083540402835291602001916112bd565b820191906000526020600020905b8154815290600101906020018083116112a057829003601f168201915b50505050509050919050565b6112d16122c3565b73ffffffffffffffffffffffffffffffffffffffff811661131e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006113b26005612752565b90506000815167ffffffffffffffff8111156113d0576113d0613e89565b6040519080825280602002602001820160405280156113f9578160200160208202803683370190505b50905060005b82518110156114555782818151811061141a5761141a6140a2565b6020026020010151828281518110611434576114346140a2565b67ffffffffffffffff909216602092830291909101909101526001016113ff565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526106f19061276b565b60095473ffffffffffffffffffffffffffffffffffffffff16331480159061156e575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156115a7576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610746565b610b4e83838361281d565b6115ba6122c3565b60005b838110156117a75760008585838181106115d9576115d96140a2565b90506020020160208101906115ee9190613cbe565b9050611605600567ffffffffffffffff831661275f565b611647576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610746565b67ffffffffffffffff8116600090815260076020526040812061166c90600501612752565b905060005b81518110156116d8576116cf82828151811061168f5761168f6140a2565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050161275f90919063ffffffff16565b50600101611671565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff000000000000000000000000000000000000000000908116825560018201839055600282018054909116905560038101829055906117416004830182613976565b600582016000818161175382826139b0565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d85991694506020019250611795915050565b60405180910390a150506001016115bd565b5060005b81811015611abd5760008383838181106117c7576117c76140a2565b90506020028101906117d991906141a5565b6117e290614271565b90506117f381606001516000612907565b61180281608001516000612907565b806040015151600003611841576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516118599060059067ffffffffffffffff16612a44565b61189e5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610746565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a909102999093161717909416959095179092559092029091176003820155908201516004820190611a2190826143e8565b5060005b826020015151811015611a6557611a5d836000015184602001518381518110611a5057611a506140a2565b60200260200101516124cc565b600101611a25565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c28260000151836040015184606001518560800151604051611aab9493929190614502565b60405180910390a150506001016117ab565b5050505050565b7f0000000000000000000000000000000000000000000000000000000000000000611b1b576040517fe93f8fa400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a5473ffffffffffffffffffffffffffffffffffffffff163314611b6e576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610746565b611bb073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084612a50565b604051819033907fc17cea59c2955cb181b03393209566960365771dbba9dc3d510180e7cb31208890600090a350565b611be86122c3565b611bf181612aae565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf000000000000000000000000000000000000000000000000000000001480611c8757507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b806106f157507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610b4e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612b72565b611dbf61032160a0830160808401613ae1565b611e1e57611dd360a0820160808301613ae1565b6040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610746565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb611e6a6040840160208501613cbe565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015611edb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eff919061459b565b15611f36576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f4e611f496040830160208401613cbe565b612c7e565b611f6e611f616040830160208401613cbe565b6103df60a084018461402d565b611fb357611f7f60a082018261402d565b6040517f24eb47e5000000000000000000000000000000000000000000000000000000008152600401610746929190614191565b611bf1611fc66040830160208401613cbe565b8260600135612da4565b6000815160000361200257507f0000000000000000000000000000000000000000000000000000000000000000919050565b815160201461203f57816040517f953576f70000000000000000000000000000000000000000000000000000000081526004016107469190613aac565b6000828060200190518101906120559190614014565b905060ff8111156106f157826040517f953576f70000000000000000000000000000000000000000000000000000000081526004016107469190613aac565b60007f000000000000000000000000000000000000000000000000000000000000000060ff168260ff16036120ca5750816106f1565b7f000000000000000000000000000000000000000000000000000000000000000060ff168260ff1611156121b55760006121247f0000000000000000000000000000000000000000000000000000000000000000846145e7565b9050604d8160ff161115612198576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610746565b6121a381600a614720565b6121ad908561472f565b9150506106f1565b60006121e1837f00000000000000000000000000000000000000000000000000000000000000006145e7565b9050604d8160ff16118061222857506121fb81600a614720565b612225907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61472f565b84115b15612293576040517fa9cb113d00000000000000000000000000000000000000000000000000000000815260ff80851660048301527f000000000000000000000000000000000000000000000000000000000000000016602482015260448101859052606401610746565b61229e81600a614720565b610a38908561476a565b600081815260018301602052604081205415155b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314612314576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f000000000000000000000000000000000000000000000000000000000000000061236d576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561240357600083828151811061238d5761238d6140a2565b602002602001015190506123ab816002612deb90919063ffffffff16565b156123fa5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101612370565b5060005b8151811015610b4e576000828281518110612424576124246140a2565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361246857506124c4565b612473600282612e0d565b156124c25760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101612407565b8051600003612507576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff84166000908152600790925260409091206125399060050182612a44565b6125735782826040517f393b8ad2000000000000000000000000000000000000000000000000000000008152600401610746929190614781565b600081815260086020526040902061258b83826143e8565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea836040516111379190613aac565b6125d961032160a0830160808401613ae1565b6125ed57611dd360a0820160808301613ae1565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb6126396040840160208501613cbe565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa1580156126aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ce919061459b565b15612705576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61271d6127186060830160408401613ae1565b612e2f565b6127356127306040830160208401613cbe565b612eae565b611bf16127486040830160208401613cbe565b8260600135612ffc565b606060006122bc83613040565b60006122bc838361309b565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526127f982606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426127dd91906147a4565b85608001516fffffffffffffffffffffffffffffffff1661318e565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61282683610dcd565b612868576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610746565b612873826000612907565b67ffffffffffffffff8316600090815260076020526040902061289690836131b6565b6128a1816000612907565b67ffffffffffffffff831660009081526007602052604090206128c790600201826131b6565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b8383836040516128fa939291906147b7565b60405180910390a1505050565b8151156129d25781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff1610158061295d575060408201516fffffffffffffffffffffffffffffffff16155b1561299657816040517f8020d124000000000000000000000000000000000000000000000000000000008152600401610746919061483a565b80156129ce576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580612a0b575060208201516fffffffffffffffffffffffffffffffff1615155b156129ce57816040517fd68af9cc000000000000000000000000000000000000000000000000000000008152600401610746919061483a565b60006122bc8383613358565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610ab59085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611d2a565b3373ffffffffffffffffffffffffffffffffffffffff821603612afd576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000612bd4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166133a79092919063ffffffff16565b805190915015610b4e5780806020019051810190612bf2919061459b565b610b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610746565b612c8781610dcd565b612cc9576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610746565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa158015612d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6c919061459b565b611bf1576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610746565b67ffffffffffffffff821660009081526007602052604090206129ce90600201827f00000000000000000000000000000000000000000000000000000000000000006133b6565b60006122bc8373ffffffffffffffffffffffffffffffffffffffff841661309b565b60006122bc8373ffffffffffffffffffffffffffffffffffffffff8416613358565b7f000000000000000000000000000000000000000000000000000000000000000015611bf157612e60600282613739565b611bf1576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610746565b612eb781610dcd565b612ef9576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610746565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa158015612f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f969190614876565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bf1576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610746565b67ffffffffffffffff821660009081526007602052604090206129ce90827f00000000000000000000000000000000000000000000000000000000000000006133b6565b6060816000018054806020026020016040519081016040528092919081815260200182805480156112bd57602002820191906000526020600020905b81548152602001906001019080831161307c5750505050509050919050565b600081815260018301602052604081205480156131845760006130bf6001836147a4565b85549091506000906130d3906001906147a4565b90508082146131385760008660000182815481106130f3576130f36140a2565b9060005260206000200154905080876000018481548110613116576131166140a2565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061314957613149614893565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106f1565b60009150506106f1565b60006131ad8561319e848661476a565b6131a890876148c2565b613768565b95945050505050565b81546000906131df90700100000000000000000000000000000000900463ffffffff16426147a4565b905080156132815760018301548354613227916fffffffffffffffffffffffffffffffff8082169281169185917001000000000000000000000000000000009091041661318e565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546132a7916fffffffffffffffffffffffffffffffff9081169116613768565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19906128fa90849061483a565b600081815260018301602052604081205461339f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106f1565b5060006106f1565b6060610a38848460008561377e565b825474010000000000000000000000000000000000000000900460ff1615806133dd575081155b156133e757505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061342d90700100000000000000000000000000000000900463ffffffff16426147a4565b905080156134ed578183111561346f576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546134a99083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1661318e565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156135a45773ffffffffffffffffffffffffffffffffffffffff841661354c576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610746565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610746565b848310156136b75760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169060009082906135e890826147a4565b6135f2878a6147a4565b6135fc91906148c2565b613606919061472f565b905073ffffffffffffffffffffffffffffffffffffffff861661365f576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610746565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610746565b6136c185846147a4565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415156122bc565b600081831061377757816122bc565b5090919050565b606082471015613810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610746565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161383991906148d5565b60006040518083038185875af1925050503d8060008114613876576040519150601f19603f3d011682016040523d82523d6000602084013e61387b565b606091505b509150915061388c87838387613897565b979650505050505050565b6060831561392d5782516000036139265773ffffffffffffffffffffffffffffffffffffffff85163b613926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610746565b5081610a38565b610a3883838151156139425781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107469190613aac565b508054613982906140d1565b6000825580601f10613992575050565b601f016020900490600052602060002090810190611bf191906139ca565b5080546000825590600052602060002090810190611bf191905b5b808211156139df57600081556001016139cb565b5090565b6000602082840312156139f557600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146122bc57600080fd5b600060208284031215613a3757600080fd5b5035919050565b60005b83811015613a59578181015183820152602001613a41565b50506000910152565b60008151808452613a7a816020860160208601613a3e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006122bc6020830184613a62565b73ffffffffffffffffffffffffffffffffffffffff81168114611bf157600080fd5b600060208284031215613af357600080fd5b81356122bc81613abf565b600060208284031215613b1057600080fd5b813567ffffffffffffffff811115613b2757600080fd5b820161010081850312156122bc57600080fd5b803567ffffffffffffffff81168114613b5257600080fd5b919050565b600080600060408486031215613b6c57600080fd5b613b7584613b3a565b9250602084013567ffffffffffffffff80821115613b9257600080fd5b818601915086601f830112613ba657600080fd5b813581811115613bb557600080fd5b876020828501011115613bc757600080fd5b6020830194508093505050509250925092565b60008083601f840112613bec57600080fd5b50813567ffffffffffffffff811115613c0457600080fd5b6020830191508360208260051b8501011115613c1f57600080fd5b9250929050565b60008060008060408587031215613c3c57600080fd5b843567ffffffffffffffff80821115613c5457600080fd5b613c6088838901613bda565b90965094506020870135915080821115613c7957600080fd5b50613c8687828801613bda565b95989497509550505050565b60008060408385031215613ca557600080fd5b8235613cb081613abf565b946020939093013593505050565b600060208284031215613cd057600080fd5b6122bc82613b3a565b600060208284031215613ceb57600080fd5b813567ffffffffffffffff811115613d0257600080fd5b820160a081850312156122bc57600080fd5b602081526000825160406020840152613d306060840182613a62565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526131ad8282613a62565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015613de0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452613dce858351613a62565b94509285019290850190600101613d94565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e3b57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101613e09565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613e3b57835167ffffffffffffffff1683529284019291840191600101613e63565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff81118282101715613edb57613edb613e89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613f2857613f28613e89565b604052919050565b8015158114611bf157600080fd5b80356fffffffffffffffffffffffffffffffff81168114613b5257600080fd5b600060608284031215613f7057600080fd5b6040516060810181811067ffffffffffffffff82111715613f9357613f93613e89565b6040529050808235613fa481613f30565b8152613fb260208401613f3e565b6020820152613fc360408401613f3e565b60408201525092915050565b600080600060e08486031215613fe457600080fd5b613fed84613b3a565b9250613ffc8560208601613f5e565b915061400b8560808601613f5e565b90509250925092565b60006020828403121561402657600080fd5b5051919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261406257600080fd5b83018035915067ffffffffffffffff82111561407d57600080fd5b602001915036819003821315613c1f57600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c908216806140e557607f821691505b60208210810361411e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b67ffffffffffffffff841681526040602082015260006131ad604083018486614124565b602081526000610a38602083018486614124565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181126141d957600080fd5b9190910192915050565b600082601f8301126141f457600080fd5b813567ffffffffffffffff81111561420e5761420e613e89565b61423f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613ee1565b81815284602083860101111561425457600080fd5b816020850160208301376000918101602001919091529392505050565b6000610120823603121561428457600080fd5b61428c613eb8565b61429583613b3a565b815260208084013567ffffffffffffffff808211156142b357600080fd5b9085019036601f8301126142c657600080fd5b8135818111156142d8576142d8613e89565b8060051b6142e7858201613ee1565b918252838101850191858101903684111561430157600080fd5b86860192505b8383101561433d5782358581111561431f5760008081fd5b61432d3689838a01016141e3565b8352509186019190860190614307565b808789015250505050604086013592508083111561435a57600080fd5b5050614368368286016141e3565b60408301525061437b3660608501613f5e565b606082015261438d3660c08501613f5e565b608082015292915050565b601f821115610b4e576000816000526020600020601f850160051c810160208610156143c15750805b601f850160051c820191505b818110156143e0578281556001016143cd565b505050505050565b815167ffffffffffffffff81111561440257614402613e89565b6144168161441084546140d1565b84614398565b602080601f83116001811461446957600084156144335750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556143e0565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156144b657888601518255948401946001909101908401614497565b50858210156144f257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff8716835280602084015261452681840187613a62565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff90811660608701529087015116608085015291506145649050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e08301526131ad565b6000602082840312156145ad57600080fd5b81516122bc81613f30565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff82811682821603908111156106f1576106f16145b8565b600181815b8085111561465957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561463f5761463f6145b8565b8085161561464c57918102915b93841c9390800290614605565b509250929050565b600082614670575060016106f1565b8161467d575060006106f1565b8160018114614693576002811461469d576146b9565b60019150506106f1565b60ff8411156146ae576146ae6145b8565b50506001821b6106f1565b5060208310610133831016604e8410600b84101617156146dc575081810a6106f1565b6146e68383614600565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614718576147186145b8565b029392505050565b60006122bc60ff841683614661565b600082614765577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820281158282048414176106f1576106f16145b8565b67ffffffffffffffff83168152604060208201526000610a386040830184613a62565b818103818111156106f1576106f16145b8565b67ffffffffffffffff8416815260e0810161480360208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152610a38565b606081016106f182848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b60006020828403121561488857600080fd5b81516122bc81613abf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b808201808211156106f1576106f16145b8565b600082516141d9818460208701613a3e56fea164736f6c6343000818000a", } var LockReleaseTokenPoolABI = LockReleaseTokenPoolMetaData.ABI var LockReleaseTokenPoolBin = LockReleaseTokenPoolMetaData.Bin -func DeployLockReleaseTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, allowlist []common.Address, rmnProxy common.Address, acceptLiquidity bool, router common.Address) (common.Address, *types.Transaction, *LockReleaseTokenPool, error) { +func DeployLockReleaseTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, localTokenDecimals uint8, allowlist []common.Address, rmnProxy common.Address, acceptLiquidity bool, router common.Address) (common.Address, *types.Transaction, *LockReleaseTokenPool, error) { parsed, err := LockReleaseTokenPoolMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -99,7 +98,7 @@ func DeployLockReleaseTokenPool(auth *bind.TransactOpts, backend bind.ContractBa return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(LockReleaseTokenPoolBin), backend, token, allowlist, rmnProxy, acceptLiquidity, router) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(LockReleaseTokenPoolBin), backend, token, localTokenDecimals, allowlist, rmnProxy, acceptLiquidity, router) if err != nil { return common.Address{}, nil, nil, err } @@ -376,26 +375,26 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) GetRebalancer() return _LockReleaseTokenPool.Contract.GetRebalancer(&_LockReleaseTokenPool.CallOpts) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _LockReleaseTokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _LockReleaseTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _LockReleaseTokenPool.Contract.GetRemotePool(&_LockReleaseTokenPool.CallOpts, remoteChainSelector) +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _LockReleaseTokenPool.Contract.GetRemotePools(&_LockReleaseTokenPool.CallOpts, remoteChainSelector) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _LockReleaseTokenPool.Contract.GetRemotePool(&_LockReleaseTokenPool.CallOpts, remoteChainSelector) +func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _LockReleaseTokenPool.Contract.GetRemotePools(&_LockReleaseTokenPool.CallOpts, remoteChainSelector) } func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -508,6 +507,50 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) GetToken() (comm return _LockReleaseTokenPool.Contract.GetToken(&_LockReleaseTokenPool.CallOpts) } +func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _LockReleaseTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _LockReleaseTokenPool.Contract.GetTokenDecimals(&_LockReleaseTokenPool.CallOpts) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _LockReleaseTokenPool.Contract.GetTokenDecimals(&_LockReleaseTokenPool.CallOpts) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _LockReleaseTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _LockReleaseTokenPool.Contract.IsRemotePool(&_LockReleaseTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _LockReleaseTokenPool.Contract.IsRemotePool(&_LockReleaseTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_LockReleaseTokenPool *LockReleaseTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _LockReleaseTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -630,6 +673,18 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) AcceptOwners return _LockReleaseTokenPool.Contract.AcceptOwnership(&_LockReleaseTokenPool.TransactOpts) } +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.AddRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.AddRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _LockReleaseTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -642,16 +697,16 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) ApplyAllowLi return _LockReleaseTokenPool.Contract.ApplyAllowListUpdates(&_LockReleaseTokenPool.TransactOpts, removes, adds) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _LockReleaseTokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _LockReleaseTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _LockReleaseTokenPool.Contract.ApplyChainUpdates(&_LockReleaseTokenPool.TransactOpts, chains) +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.ApplyChainUpdates(&_LockReleaseTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _LockReleaseTokenPool.Contract.ApplyChainUpdates(&_LockReleaseTokenPool.TransactOpts, chains) +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.ApplyChainUpdates(&_LockReleaseTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -690,6 +745,18 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) ReleaseOrMin return _LockReleaseTokenPool.Contract.ReleaseOrMint(&_LockReleaseTokenPool.TransactOpts, releaseOrMintIn) } +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.RemoveRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _LockReleaseTokenPool.Contract.RemoveRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _LockReleaseTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -726,18 +793,6 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) SetRebalance return _LockReleaseTokenPool.Contract.SetRebalancer(&_LockReleaseTokenPool.TransactOpts, rebalancer) } -func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _LockReleaseTokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_LockReleaseTokenPool *LockReleaseTokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _LockReleaseTokenPool.Contract.SetRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _LockReleaseTokenPool.Contract.SetRemotePool(&_LockReleaseTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_LockReleaseTokenPool *LockReleaseTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _LockReleaseTokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2558,6 +2613,123 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseOwnershipTransfe return event, nil } +type LockReleaseTokenPoolRateLimitAdminSetIterator struct { + Event *LockReleaseTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *LockReleaseTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(LockReleaseTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(LockReleaseTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *LockReleaseTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *LockReleaseTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type LockReleaseTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*LockReleaseTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _LockReleaseTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &LockReleaseTokenPoolRateLimitAdminSetIterator{contract: _LockReleaseTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _LockReleaseTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(LockReleaseTokenPoolRateLimitAdminSet) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*LockReleaseTokenPoolRateLimitAdminSet, error) { + event := new(LockReleaseTokenPoolRateLimitAdminSet) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type LockReleaseTokenPoolReleasedIterator struct { Event *LockReleaseTokenPoolReleased @@ -2695,8 +2867,136 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseReleased(log typ return event, nil } -type LockReleaseTokenPoolRemotePoolSetIterator struct { - Event *LockReleaseTokenPoolRemotePoolSet +type LockReleaseTokenPoolRemotePoolAddedIterator struct { + Event *LockReleaseTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *LockReleaseTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(LockReleaseTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(LockReleaseTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *LockReleaseTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *LockReleaseTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type LockReleaseTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _LockReleaseTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &LockReleaseTokenPoolRemotePoolAddedIterator{contract: _LockReleaseTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _LockReleaseTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(LockReleaseTokenPoolRemotePoolAdded) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*LockReleaseTokenPoolRemotePoolAdded, error) { + event := new(LockReleaseTokenPoolRemotePoolAdded) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type LockReleaseTokenPoolRemotePoolRemovedIterator struct { + Event *LockReleaseTokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2707,7 +3007,7 @@ type LockReleaseTokenPoolRemotePoolSetIterator struct { fail error } -func (it *LockReleaseTokenPoolRemotePoolSetIterator) Next() bool { +func (it *LockReleaseTokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2716,7 +3016,7 @@ func (it *LockReleaseTokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(LockReleaseTokenPoolRemotePoolSet) + it.Event = new(LockReleaseTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2731,7 +3031,7 @@ func (it *LockReleaseTokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(LockReleaseTokenPoolRemotePoolSet) + it.Event = new(LockReleaseTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2746,44 +3046,43 @@ func (it *LockReleaseTokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *LockReleaseTokenPoolRemotePoolSetIterator) Error() error { +func (it *LockReleaseTokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *LockReleaseTokenPoolRemotePoolSetIterator) Close() error { +func (it *LockReleaseTokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type LockReleaseTokenPoolRemotePoolSet struct { +type LockReleaseTokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolSetIterator, error) { +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _LockReleaseTokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _LockReleaseTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &LockReleaseTokenPoolRemotePoolSetIterator{contract: _LockReleaseTokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &LockReleaseTokenPoolRemotePoolRemovedIterator{contract: _LockReleaseTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _LockReleaseTokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _LockReleaseTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2793,8 +3092,8 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRemotePoolSet(op select { case log := <-logs: - event := new(LockReleaseTokenPoolRemotePoolSet) - if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(LockReleaseTokenPoolRemotePoolRemoved) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2815,9 +3114,9 @@ func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) WatchRemotePoolSet(op }), nil } -func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*LockReleaseTokenPoolRemotePoolSet, error) { - event := new(LockReleaseTokenPoolRemotePoolSet) - if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_LockReleaseTokenPool *LockReleaseTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*LockReleaseTokenPoolRemotePoolRemoved, error) { + event := new(LockReleaseTokenPoolRemotePoolRemoved) + if err := _LockReleaseTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -3089,10 +3388,14 @@ func (_LockReleaseTokenPool *LockReleaseTokenPool) ParseLog(log types.Log) (gene return _LockReleaseTokenPool.ParseOwnershipTransferRequested(log) case _LockReleaseTokenPool.abi.Events["OwnershipTransferred"].ID: return _LockReleaseTokenPool.ParseOwnershipTransferred(log) + case _LockReleaseTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _LockReleaseTokenPool.ParseRateLimitAdminSet(log) case _LockReleaseTokenPool.abi.Events["Released"].ID: return _LockReleaseTokenPool.ParseReleased(log) - case _LockReleaseTokenPool.abi.Events["RemotePoolSet"].ID: - return _LockReleaseTokenPool.ParseRemotePoolSet(log) + case _LockReleaseTokenPool.abi.Events["RemotePoolAdded"].ID: + return _LockReleaseTokenPool.ParseRemotePoolAdded(log) + case _LockReleaseTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _LockReleaseTokenPool.ParseRemotePoolRemoved(log) case _LockReleaseTokenPool.abi.Events["RouterUpdated"].ID: return _LockReleaseTokenPool.ParseRouterUpdated(log) case _LockReleaseTokenPool.abi.Events["TokensConsumed"].ID: @@ -3159,12 +3462,20 @@ func (LockReleaseTokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (LockReleaseTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (LockReleaseTokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (LockReleaseTokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (LockReleaseTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (LockReleaseTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (LockReleaseTokenPoolRouterUpdated) Topic() common.Hash { @@ -3194,7 +3505,7 @@ type LockReleaseTokenPoolInterface interface { GetRebalancer(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -3206,6 +3517,10 @@ type LockReleaseTokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -3218,9 +3533,11 @@ type LockReleaseTokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) @@ -3228,14 +3545,14 @@ type LockReleaseTokenPoolInterface interface { ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) SetRebalancer(opts *bind.TransactOpts, rebalancer common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferLiquidity(opts *bind.TransactOpts, from common.Address, amount *big.Int) (*types.Transaction, error) @@ -3328,17 +3645,29 @@ type LockReleaseTokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*LockReleaseTokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*LockReleaseTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*LockReleaseTokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*LockReleaseTokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*LockReleaseTokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*LockReleaseTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*LockReleaseTokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *LockReleaseTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*LockReleaseTokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*LockReleaseTokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*LockReleaseTokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generated/mock_lbtc_token_pool/mock_lbtc_token_pool.go b/core/gethwrappers/ccip/generated/mock_lbtc_token_pool/mock_lbtc_token_pool.go new file mode 100644 index 0000000000..8fa1b3da14 --- /dev/null +++ b/core/gethwrappers/ccip/generated/mock_lbtc_token_pool/mock_lbtc_token_pool.go @@ -0,0 +1,3042 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package mock_lbtc_token_pool + +import ( + "errors" + "fmt" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type PoolLockOrBurnInV1 struct { + Receiver []byte + RemoteChainSelector uint64 + OriginalSender common.Address + Amount *big.Int + LocalToken common.Address +} + +type PoolLockOrBurnOutV1 struct { + DestTokenAddress []byte + DestPoolData []byte +} + +type PoolReleaseOrMintInV1 struct { + OriginalSender []byte + RemoteChainSelector uint64 + Receiver common.Address + Amount *big.Int + LocalToken common.Address + SourcePoolAddress []byte + SourcePoolData []byte + OffchainTokenData []byte +} + +type PoolReleaseOrMintOutV1 struct { + DestinationAmount *big.Int +} + +type RateLimiterConfig struct { + IsEnabled bool + Capacity *big.Int + Rate *big.Int +} + +type RateLimiterTokenBucket struct { + Tokens *big.Int + LastUpdated uint32 + IsEnabled bool + Capacity *big.Int + Rate *big.Int +} + +type TokenPoolChainUpdate struct { + RemoteChainSelector uint64 + RemotePoolAddresses [][]byte + RemoteTokenAddress []byte + OutboundRateLimiterConfig RateLimiterConfig + InboundRateLimiterConfig RateLimiterConfig +} + +var MockLBTCTokenPoolMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_destPoolData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b5060405162003a5138038062003a51833981016040819052620000359162000663565b846008858585336000816200005d57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b038481169190911790915581161562000090576200009081620001fe565b50506001600160a01b0385161580620000b057506001600160a01b038116155b80620000c357506001600160a01b038216155b15620000e2576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000152575060408051601f3d908101601f191682019092526200014f9181019062000785565b60015b1562000192578060ff168560ff161462000190576040516332ad3e0760e11b815260ff80871660048301528216602482015260440160405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001dc57604080516000815260208101909152620001dc908462000278565b505050505080600a9081620001f2919062000841565b5050505050506200095b565b336001600160a01b038216036200022857604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e05162000299576040516335f4a7b360e01b815260040160405180910390fd5b60005b825181101562000324576000838281518110620002bd57620002bd6200090d565b60209081029190910101519050620002d7600282620003d5565b156200031a576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016200029c565b5060005b8151811015620003d05760008282815181106200034957620003496200090d565b6020026020010151905060006001600160a01b0316816001600160a01b031603620003755750620003c7565b62000382600282620003f5565b15620003c5576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010162000328565b505050565b6000620003ec836001600160a01b0384166200040c565b90505b92915050565b6000620003ec836001600160a01b03841662000510565b60008181526001830160205260408120548015620005055760006200043360018362000923565b8554909150600090620004499060019062000923565b9050808214620004b55760008660000182815481106200046d576200046d6200090d565b90600052602060002001549050808760000184815481106200049357620004936200090d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620004c957620004c962000945565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620003ef565b6000915050620003ef565b60008181526001830160205260408120546200055957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003ef565b506000620003ef565b6001600160a01b03811681146200057857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620005bc57620005bc6200057b565b604052919050565b8051620005d18162000562565b919050565b600082601f830112620005e857600080fd5b81516001600160401b038111156200060457620006046200057b565b60206200061a601f8301601f1916820162000591565b82815285828487010111156200062f57600080fd5b60005b838110156200064f57858101830151828201840152820162000632565b506000928101909101919091529392505050565b600080600080600060a086880312156200067c57600080fd5b8551620006898162000562565b602087810151919650906001600160401b0380821115620006a957600080fd5b818901915089601f830112620006be57600080fd5b815181811115620006d357620006d36200057b565b8060051b620006e485820162000591565b918252838101850191858101908d841115620006ff57600080fd5b948601945b838610156200072d57855192506200071c8362000562565b828252948601949086019062000704565b9950620007419250505060408a01620005c4565b95506200075160608a01620005c4565b945060808901519250808311156200076857600080fd5b50506200077888828901620005d6565b9150509295509295909350565b6000602082840312156200079857600080fd5b815160ff81168114620007aa57600080fd5b9392505050565b600181811c90821680620007c657607f821691505b602082108103620007e757634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003d0576000816000526020600020601f850160051c81016020861015620008185750805b601f850160051c820191505b81811015620008395782815560010162000824565b505050505050565b81516001600160401b038111156200085d576200085d6200057b565b62000875816200086e8454620007b1565b84620007ed565b602080601f831160018114620008ad5760008415620008945750858301515b600019600386901b1c1916600185901b17855562000839565b600085815260208120601f198616915b82811015620008de57888601518255948401946001909101908401620008bd565b5085821015620008fd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b81810381811115620003ef57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60805160a05160c05160e0516130a0620009b160003960008181610562015261199f0152600061053c015260006102eb015260008181610252015281816102a7015281816107450152610ba201526130a06000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80639a4575b911610104578063c0d78655116100a2578063dc0bd97111610071578063dc0bd9711461053a578063e0351e1314610560578063e8a1da1714610586578063f2fde38b1461059957600080fd5b8063c0d78655146104ec578063c4bffe2b146104ff578063c75eea9c14610514578063cf7401f31461052757600080fd5b8063acfecf91116100de578063acfecf9114610439578063af58d59f1461044c578063b0f479a1146104bb578063b7946580146104d957600080fd5b80639a4575b9146103e4578063a42a7b8b14610404578063a7cd63b71461042457600080fd5b80634c5ef0ed1161017c57806379ba50971161014b57806379ba5097146103985780637d54534e146103a05780638926f54f146103b35780638da5cb5b146103c657600080fd5b80634c5ef0ed1461033f57806354c8a4f31461035257806362ddd3c4146103675780636d3d1a581461037a57600080fd5b8063240028e8116101b8578063240028e81461029757806324f65ee7146102e457806332a7a82214610315578063390775371461031d57600080fd5b806301ffc9a7146101df578063181f5a771461020757806321df0da714610250575b600080fd5b6101f26101ed36600461243d565b6105ac565b60405190151581526020015b60405180910390f35b6102436040518060400160405280601781526020017f4d6f636b4c425443546f6b656e506f6f6c20312e352e3100000000000000000081525081565b6040516101fe91906124e3565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b6101f26102a53660046124f6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b610243610691565b61033061032b36600461252c565b61071f565b604051905181526020016101fe565b6101f261034d366004612585565b610894565b610365610360366004612654565b6108de565b005b610365610375366004612585565b610959565b60095473ffffffffffffffffffffffffffffffffffffffff16610272565b6103656109f6565b6103656103ae3660046124f6565b610ac4565b6101f26103c13660046126c0565b610b45565b60015473ffffffffffffffffffffffffffffffffffffffff16610272565b6103f76103f23660046126db565b610b5c565b6040516101fe9190612716565b6104176104123660046126c0565b610d07565b6040516101fe919061276d565b61042c610e72565b6040516101fe91906127ef565b610365610447366004612585565b610e83565b61045f61045a3660046126c0565b610f9b565b6040516101fe919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff16610272565b6102436104e73660046126c0565b611070565b6103656104fa3660046124f6565b611120565b6105076111fb565b6040516101fe9190612849565b61045f6105223660046126c0565b6112b3565b6103656105353660046129c8565b611385565b7f0000000000000000000000000000000000000000000000000000000000000000610272565b7f00000000000000000000000000000000000000000000000000000000000000006101f2565b610365610594366004612654565b611409565b6103656105a73660046124f6565b61191b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061063f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061068b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b600a805461069e90612a0d565b80601f01602080910402602001604051908101604052809291908181526020018280546106ca90612a0d565b80156107175780601f106106ec57610100808354040283529160200191610717565b820191906000526020600020905b8154815290600101906020018083116106fa57829003601f168201915b505050505081565b60408051602081019091526000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166340c10f1961077a60608501604086016124f6565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260608501356024820152604401600060405180830381600087803b1580156107ea57600080fd5b505af11580156107fe573d6000803e3d6000fd5b506108139250505060608301604084016124f6565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0846060013560405161087591815260200190565b60405180910390a3506040805160208101909152606090910135815290565b60006108d683836040516108a9929190612a60565b604080519182900390912067ffffffffffffffff871660009081526007602052919091206005019061192f565b949350505050565b6108e661194a565b6109538484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061199d92505050565b50505050565b61096161194a565b61096a83610b45565b6109b1576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024015b60405180910390fd5b6109f18383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b5392505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a47576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610acc61194a565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b600061068b600567ffffffffffffffff841661192f565b60408051808201909152606080825260208201526040517f42966c68000000000000000000000000000000000000000000000000000000008152606083013560048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906342966c6890602401600060405180830381600087803b158015610bfb57600080fd5b505af1158015610c0f573d6000803e3d6000fd5b5050604051606085013581523392507f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7915060200160405180910390a26040518060400160405280610c6d8460200160208101906104e791906126c0565b8152602001600a8054610c7f90612a0d565b80601f0160208091040260200160405190810160405280929190818152602001828054610cab90612a0d565b8015610cf85780601f10610ccd57610100808354040283529160200191610cf8565b820191906000526020600020905b815481529060010190602001808311610cdb57829003601f168201915b50505050508152509050919050565b67ffffffffffffffff8116600090815260076020526040812060609190610d3090600501611c4d565b90506000815167ffffffffffffffff811115610d4e57610d4e61288b565b604051908082528060200260200182016040528015610d8157816020015b6060815260200190600190039081610d6c5790505b50905060005b8251811015610e6a5760086000848381518110610da657610da6612a70565b602002602001015181526020019081526020016000208054610dc790612a0d565b80601f0160208091040260200160405190810160405280929190818152602001828054610df390612a0d565b8015610e405780601f10610e1557610100808354040283529160200191610e40565b820191906000526020600020905b815481529060010190602001808311610e2357829003601f168201915b5050505050828281518110610e5757610e57612a70565b6020908102919091010152600101610d87565b509392505050565b6060610e7e6002611c4d565b905090565b610e8b61194a565b610e9483610b45565b610ed6576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016109a8565b610f168282604051610ee9929190612a60565b604080519182900390912067ffffffffffffffff8616600090815260076020529190912060050190611c5a565b610f52578282826040517f74f23c7c0000000000000000000000000000000000000000000000000000000081526004016109a893929190612ae8565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d768383604051610f8e929190612b0c565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600390910154808416606083015291909104909116608082015261068b90611c66565b67ffffffffffffffff8116600090815260076020526040902060040180546060919061109b90612a0d565b80601f01602080910402602001604051908101604052809291908181526020018280546110c790612a0d565b80156111145780601f106110e957610100808354040283529160200191611114565b820191906000526020600020905b8154815290600101906020018083116110f757829003601f168201915b50505050509050919050565b61112861194a565b73ffffffffffffffffffffffffffffffffffffffff8116611175576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684910160405180910390a15050565b606060006112096005611c4d565b90506000815167ffffffffffffffff8111156112275761122761288b565b604051908082528060200260200182016040528015611250578160200160208202803683370190505b50905060005b82518110156112ac5782818151811061127157611271612a70565b602002602001015182828151811061128b5761128b612a70565b67ffffffffffffffff90921660209283029190910190910152600101611256565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261068b90611c66565b60095473ffffffffffffffffffffffffffffffffffffffff1633148015906113c5575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156113fe576040517f8e4a23d60000000000000000000000000000000000000000000000000000000081523360048201526024016109a8565b6109f1838383611d18565b61141161194a565b60005b838110156115fe57600085858381811061143057611430612a70565b905060200201602081019061144591906126c0565b905061145c600567ffffffffffffffff8316611c5a565b61149e576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff821660048201526024016109a8565b67ffffffffffffffff811660009081526007602052604081206114c390600501611c4d565b905060005b815181101561152f576115268282815181106114e6576114e6612a70565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600501611c5a90919063ffffffff16565b506001016114c8565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff0000000000000000000000000000000000000000009081168255600182018390556002820180549091169055600381018290559061159860048301826123d0565b60058201600081816115aa828261240a565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916945060200192506115ec915050565b60405180910390a15050600101611414565b5060005b8181101561191457600083838381811061161e5761161e612a70565b90506020028101906116309190612b20565b61163990612bec565b905061164a81606001516000611e02565b61165981608001516000611e02565b806040015151600003611698576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516116b09060059067ffffffffffffffff16611f3f565b6116f55780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016109a8565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a9091029990931617179094169590951790925590920290911760038201559082015160048201906118789082612d63565b5060005b8260200151518110156118bc576118b48360000151846020015183815181106118a7576118a7612a70565b6020026020010151611b53565b60010161187c565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c282600001518360400151846060015185608001516040516119029493929190612e7d565b60405180910390a15050600101611602565b5050505050565b61192361194a565b61192c81611f4b565b50565b600081815260018301602052604081205415155b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461199b576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f00000000000000000000000000000000000000000000000000000000000000006119f4576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015611a8a576000838281518110611a1457611a14612a70565b60200260200101519050611a3281600261200f90919063ffffffff16565b15611a815760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506001016119f7565b5060005b81518110156109f1576000828281518110611aab57611aab612a70565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611aef5750611b4b565b611afa600282612031565b15611b495760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101611a8e565b8051600003611b8e576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff8416600090815260079092526040909120611bc09060050182611f3f565b611bfa5782826040517f393b8ad20000000000000000000000000000000000000000000000000000000081526004016109a8929190612f16565b6000818152600860205260409020611c128382612d63565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea83604051610f8e91906124e3565b6060600061194383612053565b600061194383836120ae565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152611cf482606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642611cd89190612f68565b85608001516fffffffffffffffffffffffffffffffff166121a1565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b611d2183610b45565b611d63576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff841660048201526024016109a8565b611d6e826000611e02565b67ffffffffffffffff83166000908152600760205260409020611d9190836121c9565b611d9c816000611e02565b67ffffffffffffffff83166000908152600760205260409020611dc290600201826121c9565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b838383604051611df593929190612f7b565b60405180910390a1505050565b815115611ecd5781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580611e58575060408201516fffffffffffffffffffffffffffffffff16155b15611e9157816040517f8020d1240000000000000000000000000000000000000000000000000000000081526004016109a89190612ffe565b8015611ec9576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580611f06575060208201516fffffffffffffffffffffffffffffffff1615155b15611ec957816040517fd68af9cc0000000000000000000000000000000000000000000000000000000081526004016109a89190612ffe565b6000611943838361236b565b3373ffffffffffffffffffffffffffffffffffffffff821603611f9a576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006119438373ffffffffffffffffffffffffffffffffffffffff84166120ae565b60006119438373ffffffffffffffffffffffffffffffffffffffff841661236b565b60608160000180548060200260200160405190810160405280929190818152602001828054801561111457602002820191906000526020600020905b81548152602001906001019080831161208f5750505050509050919050565b600081815260018301602052604081205480156121975760006120d2600183612f68565b85549091506000906120e690600190612f68565b905080821461214b57600086600001828154811061210657612106612a70565b906000526020600020015490508087600001848154811061212957612129612a70565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061215c5761215c61303a565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061068b565b600091505061068b565b60006121c0856121b18486613069565b6121bb9087613080565b6123ba565b95945050505050565b81546000906121f290700100000000000000000000000000000000900463ffffffff1642612f68565b90508015612294576001830154835461223a916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166121a1565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546122ba916fffffffffffffffffffffffffffffffff90811691166123ba565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990611df5908490612ffe565b60008181526001830160205260408120546123b25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561068b565b50600061068b565b60008183106123c95781611943565b5090919050565b5080546123dc90612a0d565b6000825580601f106123ec575050565b601f01602090049060005260206000209081019061192c9190612424565b508054600082559060005260206000209081019061192c91905b5b808211156124395760008155600101612425565b5090565b60006020828403121561244f57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461194357600080fd5b6000815180845260005b818110156124a557602081850181015186830182015201612489565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000611943602083018461247f565b60006020828403121561250857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461194357600080fd5b60006020828403121561253e57600080fd5b813567ffffffffffffffff81111561255557600080fd5b8201610100818503121561194357600080fd5b803567ffffffffffffffff8116811461258057600080fd5b919050565b60008060006040848603121561259a57600080fd5b6125a384612568565b9250602084013567ffffffffffffffff808211156125c057600080fd5b818601915086601f8301126125d457600080fd5b8135818111156125e357600080fd5b8760208285010111156125f557600080fd5b6020830194508093505050509250925092565b60008083601f84011261261a57600080fd5b50813567ffffffffffffffff81111561263257600080fd5b6020830191508360208260051b850101111561264d57600080fd5b9250929050565b6000806000806040858703121561266a57600080fd5b843567ffffffffffffffff8082111561268257600080fd5b61268e88838901612608565b909650945060208701359150808211156126a757600080fd5b506126b487828801612608565b95989497509550505050565b6000602082840312156126d257600080fd5b61194382612568565b6000602082840312156126ed57600080fd5b813567ffffffffffffffff81111561270457600080fd5b820160a0818503121561194357600080fd5b602081526000825160406020840152612732606084018261247f565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526121c0828261247f565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b828110156127e2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526127d085835161247f565b94509285019290850190600101612796565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561283d57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161280b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561283d57835167ffffffffffffffff1683529284019291840191600101612865565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156128dd576128dd61288b565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561292a5761292a61288b565b604052919050565b80356fffffffffffffffffffffffffffffffff8116811461258057600080fd5b60006060828403121561296457600080fd5b6040516060810181811067ffffffffffffffff821117156129875761298761288b565b6040529050808235801515811461299d57600080fd5b81526129ab60208401612932565b60208201526129bc60408401612932565b60408201525092915050565b600080600060e084860312156129dd57600080fd5b6129e684612568565b92506129f58560208601612952565b9150612a048560808601612952565b90509250925092565b600181811c90821680612a2157607f821691505b602082108103612a5a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b67ffffffffffffffff841681526040602082015260006121c0604083018486612a9f565b6020815260006108d6602083018486612a9f565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee1833603018112612b5457600080fd5b9190910192915050565b600082601f830112612b6f57600080fd5b813567ffffffffffffffff811115612b8957612b8961288b565b612bba60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016128e3565b818152846020838601011115612bcf57600080fd5b816020850160208301376000918101602001919091529392505050565b60006101208236031215612bff57600080fd5b612c076128ba565b612c1083612568565b815260208084013567ffffffffffffffff80821115612c2e57600080fd5b9085019036601f830112612c4157600080fd5b813581811115612c5357612c5361288b565b8060051b612c628582016128e3565b9182528381018501918581019036841115612c7c57600080fd5b86860192505b83831015612cb857823585811115612c9a5760008081fd5b612ca83689838a0101612b5e565b8352509186019190860190612c82565b8087890152505050506040860135925080831115612cd557600080fd5b5050612ce336828601612b5e565b604083015250612cf63660608501612952565b6060820152612d083660c08501612952565b608082015292915050565b601f8211156109f1576000816000526020600020601f850160051c81016020861015612d3c5750805b601f850160051c820191505b81811015612d5b57828155600101612d48565b505050505050565b815167ffffffffffffffff811115612d7d57612d7d61288b565b612d9181612d8b8454612a0d565b84612d13565b602080601f831160018114612de45760008415612dae5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612d5b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015612e3157888601518255948401946001909101908401612e12565b5085821015612e6d57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff87168352806020840152612ea18184018761247f565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff9081166060870152908701511660808501529150612edf9050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e08301526121c0565b67ffffffffffffffff831681526040602082015260006108d6604083018461247f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561068b5761068b612f39565b67ffffffffffffffff8416815260e08101612fc760208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c08301526108d6565b6060810161068b82848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b808202811582820484141761068b5761068b612f39565b8082018082111561068b5761068b612f3956fea164736f6c6343000818000a", +} + +var MockLBTCTokenPoolABI = MockLBTCTokenPoolMetaData.ABI + +var MockLBTCTokenPoolBin = MockLBTCTokenPoolMetaData.Bin + +func DeployMockLBTCTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, token common.Address, allowlist []common.Address, rmnProxy common.Address, router common.Address, destPoolData []byte) (common.Address, *types.Transaction, *MockLBTCTokenPool, error) { + parsed, err := MockLBTCTokenPoolMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MockLBTCTokenPoolBin), backend, token, allowlist, rmnProxy, router, destPoolData) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MockLBTCTokenPool{address: address, abi: *parsed, MockLBTCTokenPoolCaller: MockLBTCTokenPoolCaller{contract: contract}, MockLBTCTokenPoolTransactor: MockLBTCTokenPoolTransactor{contract: contract}, MockLBTCTokenPoolFilterer: MockLBTCTokenPoolFilterer{contract: contract}}, nil +} + +type MockLBTCTokenPool struct { + address common.Address + abi abi.ABI + MockLBTCTokenPoolCaller + MockLBTCTokenPoolTransactor + MockLBTCTokenPoolFilterer +} + +type MockLBTCTokenPoolCaller struct { + contract *bind.BoundContract +} + +type MockLBTCTokenPoolTransactor struct { + contract *bind.BoundContract +} + +type MockLBTCTokenPoolFilterer struct { + contract *bind.BoundContract +} + +type MockLBTCTokenPoolSession struct { + Contract *MockLBTCTokenPool + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type MockLBTCTokenPoolCallerSession struct { + Contract *MockLBTCTokenPoolCaller + CallOpts bind.CallOpts +} + +type MockLBTCTokenPoolTransactorSession struct { + Contract *MockLBTCTokenPoolTransactor + TransactOpts bind.TransactOpts +} + +type MockLBTCTokenPoolRaw struct { + Contract *MockLBTCTokenPool +} + +type MockLBTCTokenPoolCallerRaw struct { + Contract *MockLBTCTokenPoolCaller +} + +type MockLBTCTokenPoolTransactorRaw struct { + Contract *MockLBTCTokenPoolTransactor +} + +func NewMockLBTCTokenPool(address common.Address, backend bind.ContractBackend) (*MockLBTCTokenPool, error) { + abi, err := abi.JSON(strings.NewReader(MockLBTCTokenPoolABI)) + if err != nil { + return nil, err + } + contract, err := bindMockLBTCTokenPool(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MockLBTCTokenPool{address: address, abi: abi, MockLBTCTokenPoolCaller: MockLBTCTokenPoolCaller{contract: contract}, MockLBTCTokenPoolTransactor: MockLBTCTokenPoolTransactor{contract: contract}, MockLBTCTokenPoolFilterer: MockLBTCTokenPoolFilterer{contract: contract}}, nil +} + +func NewMockLBTCTokenPoolCaller(address common.Address, caller bind.ContractCaller) (*MockLBTCTokenPoolCaller, error) { + contract, err := bindMockLBTCTokenPool(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolCaller{contract: contract}, nil +} + +func NewMockLBTCTokenPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*MockLBTCTokenPoolTransactor, error) { + contract, err := bindMockLBTCTokenPool(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolTransactor{contract: contract}, nil +} + +func NewMockLBTCTokenPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*MockLBTCTokenPoolFilterer, error) { + contract, err := bindMockLBTCTokenPool(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolFilterer{contract: contract}, nil +} + +func bindMockLBTCTokenPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MockLBTCTokenPoolMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockLBTCTokenPool.Contract.MockLBTCTokenPoolCaller.contract.Call(opts, result, method, params...) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.MockLBTCTokenPoolTransactor.contract.Transfer(opts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.MockLBTCTokenPoolTransactor.contract.Transact(opts, method, params...) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockLBTCTokenPool.Contract.contract.Call(opts, result, method, params...) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.contract.Transfer(opts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.contract.Transact(opts, method, params...) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetAllowList(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getAllowList") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetAllowList() ([]common.Address, error) { + return _MockLBTCTokenPool.Contract.GetAllowList(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetAllowList() ([]common.Address, error) { + return _MockLBTCTokenPool.Contract.GetAllowList(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetAllowListEnabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getAllowListEnabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetAllowListEnabled() (bool, error) { + return _MockLBTCTokenPool.Contract.GetAllowListEnabled(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetAllowListEnabled() (bool, error) { + return _MockLBTCTokenPool.Contract.GetAllowListEnabled(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetCurrentInboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getCurrentInboundRateLimiterState", remoteChainSelector) + + if err != nil { + return *new(RateLimiterTokenBucket), err + } + + out0 := *abi.ConvertType(out[0], new(RateLimiterTokenBucket)).(*RateLimiterTokenBucket) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetCurrentInboundRateLimiterState(remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + return _MockLBTCTokenPool.Contract.GetCurrentInboundRateLimiterState(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetCurrentInboundRateLimiterState(remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + return _MockLBTCTokenPool.Contract.GetCurrentInboundRateLimiterState(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetCurrentOutboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getCurrentOutboundRateLimiterState", remoteChainSelector) + + if err != nil { + return *new(RateLimiterTokenBucket), err + } + + out0 := *abi.ConvertType(out[0], new(RateLimiterTokenBucket)).(*RateLimiterTokenBucket) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetCurrentOutboundRateLimiterState(remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + return _MockLBTCTokenPool.Contract.GetCurrentOutboundRateLimiterState(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetCurrentOutboundRateLimiterState(remoteChainSelector uint64) (RateLimiterTokenBucket, error) { + return _MockLBTCTokenPool.Contract.GetCurrentOutboundRateLimiterState(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getRateLimitAdmin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetRateLimitAdmin() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRateLimitAdmin(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetRateLimitAdmin() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRateLimitAdmin(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) + + if err != nil { + return *new([][]byte), err + } + + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _MockLBTCTokenPool.Contract.GetRemotePools(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _MockLBTCTokenPool.Contract.GetRemotePools(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getRemoteToken", remoteChainSelector) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetRemoteToken(remoteChainSelector uint64) ([]byte, error) { + return _MockLBTCTokenPool.Contract.GetRemoteToken(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetRemoteToken(remoteChainSelector uint64) ([]byte, error) { + return _MockLBTCTokenPool.Contract.GetRemoteToken(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetRmnProxy(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getRmnProxy") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetRmnProxy() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRmnProxy(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetRmnProxy() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRmnProxy(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetRouter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getRouter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetRouter() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRouter(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetRouter() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetRouter(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getSupportedChains") + + if err != nil { + return *new([]uint64), err + } + + out0 := *abi.ConvertType(out[0], new([]uint64)).(*[]uint64) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetSupportedChains() ([]uint64, error) { + return _MockLBTCTokenPool.Contract.GetSupportedChains(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetSupportedChains() ([]uint64, error) { + return _MockLBTCTokenPool.Contract.GetSupportedChains(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetToken(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getToken") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetToken() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetToken(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetToken() (common.Address, error) { + return _MockLBTCTokenPool.Contract.GetToken(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _MockLBTCTokenPool.Contract.GetTokenDecimals(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _MockLBTCTokenPool.Contract.GetTokenDecimals(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) IDestPoolData(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "i_destPoolData") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) IDestPoolData() ([]byte, error) { + return _MockLBTCTokenPool.Contract.IDestPoolData(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) IDestPoolData() ([]byte, error) { + return _MockLBTCTokenPool.Contract.IDestPoolData(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _MockLBTCTokenPool.Contract.IsRemotePool(&_MockLBTCTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _MockLBTCTokenPool.Contract.IsRemotePool(&_MockLBTCTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) IsSupportedChain(remoteChainSelector uint64) (bool, error) { + return _MockLBTCTokenPool.Contract.IsSupportedChain(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) IsSupportedChain(remoteChainSelector uint64) (bool, error) { + return _MockLBTCTokenPool.Contract.IsSupportedChain(&_MockLBTCTokenPool.CallOpts, remoteChainSelector) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "isSupportedToken", token) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) IsSupportedToken(token common.Address) (bool, error) { + return _MockLBTCTokenPool.Contract.IsSupportedToken(&_MockLBTCTokenPool.CallOpts, token) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) IsSupportedToken(token common.Address) (bool, error) { + return _MockLBTCTokenPool.Contract.IsSupportedToken(&_MockLBTCTokenPool.CallOpts, token) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) Owner() (common.Address, error) { + return _MockLBTCTokenPool.Contract.Owner(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) Owner() (common.Address, error) { + return _MockLBTCTokenPool.Contract.Owner(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _MockLBTCTokenPool.Contract.SupportsInterface(&_MockLBTCTokenPool.CallOpts, interfaceId) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _MockLBTCTokenPool.Contract.SupportsInterface(&_MockLBTCTokenPool.CallOpts, interfaceId) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _MockLBTCTokenPool.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) TypeAndVersion() (string, error) { + return _MockLBTCTokenPool.Contract.TypeAndVersion(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolCallerSession) TypeAndVersion() (string, error) { + return _MockLBTCTokenPool.Contract.TypeAndVersion(&_MockLBTCTokenPool.CallOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "acceptOwnership") +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) AcceptOwnership() (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.AcceptOwnership(&_MockLBTCTokenPool.TransactOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.AcceptOwnership(&_MockLBTCTokenPool.TransactOpts) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.AddRemotePool(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.AddRemotePool(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) ApplyAllowListUpdates(removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ApplyAllowListUpdates(&_MockLBTCTokenPool.TransactOpts, removes, adds) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) ApplyAllowListUpdates(removes []common.Address, adds []common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ApplyAllowListUpdates(&_MockLBTCTokenPool.TransactOpts, removes, adds) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ApplyChainUpdates(&_MockLBTCTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ApplyChainUpdates(&_MockLBTCTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "lockOrBurn", lockOrBurnIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) LockOrBurn(lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.LockOrBurn(&_MockLBTCTokenPool.TransactOpts, lockOrBurnIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) LockOrBurn(lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.LockOrBurn(&_MockLBTCTokenPool.TransactOpts, lockOrBurnIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "releaseOrMint", releaseOrMintIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) ReleaseOrMint(releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ReleaseOrMint(&_MockLBTCTokenPool.TransactOpts, releaseOrMintIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) ReleaseOrMint(releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.ReleaseOrMint(&_MockLBTCTokenPool.TransactOpts, releaseOrMintIn) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.RemoveRemotePool(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.RemoveRemotePool(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) SetChainRateLimiterConfig(remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetChainRateLimiterConfig(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, outboundConfig, inboundConfig) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) SetChainRateLimiterConfig(remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetChainRateLimiterConfig(&_MockLBTCTokenPool.TransactOpts, remoteChainSelector, outboundConfig, inboundConfig) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "setRateLimitAdmin", rateLimitAdmin) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) SetRateLimitAdmin(rateLimitAdmin common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetRateLimitAdmin(&_MockLBTCTokenPool.TransactOpts, rateLimitAdmin) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) SetRateLimitAdmin(rateLimitAdmin common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetRateLimitAdmin(&_MockLBTCTokenPool.TransactOpts, rateLimitAdmin) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "setRouter", newRouter) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) SetRouter(newRouter common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetRouter(&_MockLBTCTokenPool.TransactOpts, newRouter) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) SetRouter(newRouter common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.SetRouter(&_MockLBTCTokenPool.TransactOpts, newRouter) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.contract.Transact(opts, "transferOwnership", to) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.TransferOwnership(&_MockLBTCTokenPool.TransactOpts, to) +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _MockLBTCTokenPool.Contract.TransferOwnership(&_MockLBTCTokenPool.TransactOpts, to) +} + +type MockLBTCTokenPoolAllowListAddIterator struct { + Event *MockLBTCTokenPoolAllowListAdd + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolAllowListAddIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolAllowListAdd) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolAllowListAdd) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolAllowListAddIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolAllowListAddIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolAllowListAdd struct { + Sender common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterAllowListAdd(opts *bind.FilterOpts) (*MockLBTCTokenPoolAllowListAddIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "AllowListAdd") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolAllowListAddIterator{contract: _MockLBTCTokenPool.contract, event: "AllowListAdd", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchAllowListAdd(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolAllowListAdd) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "AllowListAdd") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolAllowListAdd) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "AllowListAdd", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseAllowListAdd(log types.Log) (*MockLBTCTokenPoolAllowListAdd, error) { + event := new(MockLBTCTokenPoolAllowListAdd) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "AllowListAdd", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolAllowListRemoveIterator struct { + Event *MockLBTCTokenPoolAllowListRemove + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolAllowListRemoveIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolAllowListRemove) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolAllowListRemove) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolAllowListRemoveIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolAllowListRemoveIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolAllowListRemove struct { + Sender common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterAllowListRemove(opts *bind.FilterOpts) (*MockLBTCTokenPoolAllowListRemoveIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "AllowListRemove") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolAllowListRemoveIterator{contract: _MockLBTCTokenPool.contract, event: "AllowListRemove", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchAllowListRemove(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolAllowListRemove) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "AllowListRemove") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolAllowListRemove) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "AllowListRemove", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseAllowListRemove(log types.Log) (*MockLBTCTokenPoolAllowListRemove, error) { + event := new(MockLBTCTokenPoolAllowListRemove) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "AllowListRemove", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolBurnedIterator struct { + Event *MockLBTCTokenPoolBurned + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolBurnedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolBurned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolBurned) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolBurnedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolBurnedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolBurned struct { + Sender common.Address + Amount *big.Int + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterBurned(opts *bind.FilterOpts, sender []common.Address) (*MockLBTCTokenPoolBurnedIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "Burned", senderRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolBurnedIterator{contract: _MockLBTCTokenPool.contract, event: "Burned", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchBurned(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolBurned, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "Burned", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolBurned) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Burned", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseBurned(log types.Log) (*MockLBTCTokenPoolBurned, error) { + event := new(MockLBTCTokenPoolBurned) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Burned", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolChainAddedIterator struct { + Event *MockLBTCTokenPoolChainAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolChainAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolChainAddedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolChainAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolChainAdded struct { + RemoteChainSelector uint64 + RemoteToken []byte + OutboundRateLimiterConfig RateLimiterConfig + InboundRateLimiterConfig RateLimiterConfig + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterChainAdded(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainAddedIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "ChainAdded") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolChainAddedIterator{contract: _MockLBTCTokenPool.contract, event: "ChainAdded", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchChainAdded(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainAdded) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "ChainAdded") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolChainAdded) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseChainAdded(log types.Log) (*MockLBTCTokenPoolChainAdded, error) { + event := new(MockLBTCTokenPoolChainAdded) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolChainConfiguredIterator struct { + Event *MockLBTCTokenPoolChainConfigured + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolChainConfiguredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainConfigured) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainConfigured) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolChainConfiguredIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolChainConfiguredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolChainConfigured struct { + RemoteChainSelector uint64 + OutboundRateLimiterConfig RateLimiterConfig + InboundRateLimiterConfig RateLimiterConfig + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterChainConfigured(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainConfiguredIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "ChainConfigured") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolChainConfiguredIterator{contract: _MockLBTCTokenPool.contract, event: "ChainConfigured", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchChainConfigured(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainConfigured) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "ChainConfigured") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolChainConfigured) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainConfigured", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseChainConfigured(log types.Log) (*MockLBTCTokenPoolChainConfigured, error) { + event := new(MockLBTCTokenPoolChainConfigured) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainConfigured", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolChainRemovedIterator struct { + Event *MockLBTCTokenPoolChainRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolChainRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolChainRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolChainRemovedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolChainRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolChainRemoved struct { + RemoteChainSelector uint64 + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterChainRemoved(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainRemovedIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "ChainRemoved") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolChainRemovedIterator{contract: _MockLBTCTokenPool.contract, event: "ChainRemoved", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchChainRemoved(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainRemoved) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "ChainRemoved") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolChainRemoved) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseChainRemoved(log types.Log) (*MockLBTCTokenPoolChainRemoved, error) { + event := new(MockLBTCTokenPoolChainRemoved) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ChainRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolConfigChangedIterator struct { + Event *MockLBTCTokenPoolConfigChanged + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolConfigChangedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolConfigChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolConfigChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolConfigChangedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolConfigChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolConfigChanged struct { + Config RateLimiterConfig + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*MockLBTCTokenPoolConfigChangedIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolConfigChangedIterator{contract: _MockLBTCTokenPool.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolConfigChanged) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolConfigChanged) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ConfigChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseConfigChanged(log types.Log) (*MockLBTCTokenPoolConfigChanged, error) { + event := new(MockLBTCTokenPoolConfigChanged) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "ConfigChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolLockedIterator struct { + Event *MockLBTCTokenPoolLocked + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolLockedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolLocked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolLocked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolLockedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolLockedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolLocked struct { + Sender common.Address + Amount *big.Int + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterLocked(opts *bind.FilterOpts, sender []common.Address) (*MockLBTCTokenPoolLockedIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "Locked", senderRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolLockedIterator{contract: _MockLBTCTokenPool.contract, event: "Locked", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchLocked(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolLocked, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "Locked", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolLocked) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Locked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseLocked(log types.Log) (*MockLBTCTokenPoolLocked, error) { + event := new(MockLBTCTokenPoolLocked) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Locked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolMintedIterator struct { + Event *MockLBTCTokenPoolMinted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolMintedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolMinted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolMinted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolMintedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolMintedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolMinted struct { + Sender common.Address + Recipient common.Address + Amount *big.Int + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterMinted(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*MockLBTCTokenPoolMintedIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "Minted", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolMintedIterator{contract: _MockLBTCTokenPool.contract, event: "Minted", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchMinted(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolMinted, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "Minted", senderRule, recipientRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolMinted) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Minted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseMinted(log types.Log) (*MockLBTCTokenPoolMinted, error) { + event := new(MockLBTCTokenPoolMinted) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Minted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolOwnershipTransferRequestedIterator struct { + Event *MockLBTCTokenPoolOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolOwnershipTransferRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockLBTCTokenPoolOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolOwnershipTransferRequestedIterator{contract: _MockLBTCTokenPool.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolOwnershipTransferRequested) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseOwnershipTransferRequested(log types.Log) (*MockLBTCTokenPoolOwnershipTransferRequested, error) { + event := new(MockLBTCTokenPoolOwnershipTransferRequested) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolOwnershipTransferredIterator struct { + Event *MockLBTCTokenPoolOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockLBTCTokenPoolOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolOwnershipTransferredIterator{contract: _MockLBTCTokenPool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolOwnershipTransferred) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseOwnershipTransferred(log types.Log) (*MockLBTCTokenPoolOwnershipTransferred, error) { + event := new(MockLBTCTokenPoolOwnershipTransferred) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolRateLimitAdminSetIterator struct { + Event *MockLBTCTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*MockLBTCTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolRateLimitAdminSetIterator{contract: _MockLBTCTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolRateLimitAdminSet) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*MockLBTCTokenPoolRateLimitAdminSet, error) { + event := new(MockLBTCTokenPoolRateLimitAdminSet) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolReleasedIterator struct { + Event *MockLBTCTokenPoolReleased + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolReleasedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolReleased) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolReleased) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolReleasedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolReleasedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolReleased struct { + Sender common.Address + Recipient common.Address + Amount *big.Int + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*MockLBTCTokenPoolReleasedIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "Released", senderRule, recipientRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolReleasedIterator{contract: _MockLBTCTokenPool.contract, event: "Released", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchReleased(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + var recipientRule []interface{} + for _, recipientItem := range recipient { + recipientRule = append(recipientRule, recipientItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "Released", senderRule, recipientRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolReleased) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Released", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseReleased(log types.Log) (*MockLBTCTokenPoolReleased, error) { + event := new(MockLBTCTokenPoolReleased) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "Released", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolRemotePoolAddedIterator struct { + Event *MockLBTCTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*MockLBTCTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolRemotePoolAddedIterator{contract: _MockLBTCTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolRemotePoolAdded) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*MockLBTCTokenPoolRemotePoolAdded, error) { + event := new(MockLBTCTokenPoolRemotePoolAdded) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolRemotePoolRemovedIterator struct { + Event *MockLBTCTokenPoolRemotePoolRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolRemotePoolRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRemotePoolRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRemotePoolRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolRemotePoolRemovedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolRemotePoolRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolRemotePoolRemoved struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*MockLBTCTokenPoolRemotePoolRemovedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolRemotePoolRemovedIterator{contract: _MockLBTCTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolRemotePoolRemoved) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*MockLBTCTokenPoolRemotePoolRemoved, error) { + event := new(MockLBTCTokenPoolRemotePoolRemoved) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type MockLBTCTokenPoolRouterUpdatedIterator struct { + Event *MockLBTCTokenPoolRouterUpdated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *MockLBTCTokenPoolRouterUpdatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRouterUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(MockLBTCTokenPoolRouterUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *MockLBTCTokenPoolRouterUpdatedIterator) Error() error { + return it.fail +} + +func (it *MockLBTCTokenPoolRouterUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type MockLBTCTokenPoolRouterUpdated struct { + OldRouter common.Address + NewRouter common.Address + Raw types.Log +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) FilterRouterUpdated(opts *bind.FilterOpts) (*MockLBTCTokenPoolRouterUpdatedIterator, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.FilterLogs(opts, "RouterUpdated") + if err != nil { + return nil, err + } + return &MockLBTCTokenPoolRouterUpdatedIterator{contract: _MockLBTCTokenPool.contract, event: "RouterUpdated", logs: logs, sub: sub}, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) WatchRouterUpdated(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRouterUpdated) (event.Subscription, error) { + + logs, sub, err := _MockLBTCTokenPool.contract.WatchLogs(opts, "RouterUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(MockLBTCTokenPoolRouterUpdated) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RouterUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPoolFilterer) ParseRouterUpdated(log types.Log) (*MockLBTCTokenPoolRouterUpdated, error) { + event := new(MockLBTCTokenPoolRouterUpdated) + if err := _MockLBTCTokenPool.contract.UnpackLog(event, "RouterUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_MockLBTCTokenPool *MockLBTCTokenPool) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _MockLBTCTokenPool.abi.Events["AllowListAdd"].ID: + return _MockLBTCTokenPool.ParseAllowListAdd(log) + case _MockLBTCTokenPool.abi.Events["AllowListRemove"].ID: + return _MockLBTCTokenPool.ParseAllowListRemove(log) + case _MockLBTCTokenPool.abi.Events["Burned"].ID: + return _MockLBTCTokenPool.ParseBurned(log) + case _MockLBTCTokenPool.abi.Events["ChainAdded"].ID: + return _MockLBTCTokenPool.ParseChainAdded(log) + case _MockLBTCTokenPool.abi.Events["ChainConfigured"].ID: + return _MockLBTCTokenPool.ParseChainConfigured(log) + case _MockLBTCTokenPool.abi.Events["ChainRemoved"].ID: + return _MockLBTCTokenPool.ParseChainRemoved(log) + case _MockLBTCTokenPool.abi.Events["ConfigChanged"].ID: + return _MockLBTCTokenPool.ParseConfigChanged(log) + case _MockLBTCTokenPool.abi.Events["Locked"].ID: + return _MockLBTCTokenPool.ParseLocked(log) + case _MockLBTCTokenPool.abi.Events["Minted"].ID: + return _MockLBTCTokenPool.ParseMinted(log) + case _MockLBTCTokenPool.abi.Events["OwnershipTransferRequested"].ID: + return _MockLBTCTokenPool.ParseOwnershipTransferRequested(log) + case _MockLBTCTokenPool.abi.Events["OwnershipTransferred"].ID: + return _MockLBTCTokenPool.ParseOwnershipTransferred(log) + case _MockLBTCTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _MockLBTCTokenPool.ParseRateLimitAdminSet(log) + case _MockLBTCTokenPool.abi.Events["Released"].ID: + return _MockLBTCTokenPool.ParseReleased(log) + case _MockLBTCTokenPool.abi.Events["RemotePoolAdded"].ID: + return _MockLBTCTokenPool.ParseRemotePoolAdded(log) + case _MockLBTCTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _MockLBTCTokenPool.ParseRemotePoolRemoved(log) + case _MockLBTCTokenPool.abi.Events["RouterUpdated"].ID: + return _MockLBTCTokenPool.ParseRouterUpdated(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (MockLBTCTokenPoolAllowListAdd) Topic() common.Hash { + return common.HexToHash("0x2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d8") +} + +func (MockLBTCTokenPoolAllowListRemove) Topic() common.Hash { + return common.HexToHash("0x800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf7566") +} + +func (MockLBTCTokenPoolBurned) Topic() common.Hash { + return common.HexToHash("0x696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7") +} + +func (MockLBTCTokenPoolChainAdded) Topic() common.Hash { + return common.HexToHash("0x8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2") +} + +func (MockLBTCTokenPoolChainConfigured) Topic() common.Hash { + return common.HexToHash("0x0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b") +} + +func (MockLBTCTokenPoolChainRemoved) Topic() common.Hash { + return common.HexToHash("0x5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d859916") +} + +func (MockLBTCTokenPoolConfigChanged) Topic() common.Hash { + return common.HexToHash("0x9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19") +} + +func (MockLBTCTokenPoolLocked) Topic() common.Hash { + return common.HexToHash("0x9f1ec8c880f76798e7b793325d625e9b60e4082a553c98f42b6cda368dd60008") +} + +func (MockLBTCTokenPoolMinted) Topic() common.Hash { + return common.HexToHash("0x9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f0") +} + +func (MockLBTCTokenPoolOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (MockLBTCTokenPoolOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (MockLBTCTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + +func (MockLBTCTokenPoolReleased) Topic() common.Hash { + return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") +} + +func (MockLBTCTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (MockLBTCTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") +} + +func (MockLBTCTokenPoolRouterUpdated) Topic() common.Hash { + return common.HexToHash("0x02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684") +} + +func (_MockLBTCTokenPool *MockLBTCTokenPool) Address() common.Address { + return _MockLBTCTokenPool.address +} + +type MockLBTCTokenPoolInterface interface { + GetAllowList(opts *bind.CallOpts) ([]common.Address, error) + + GetAllowListEnabled(opts *bind.CallOpts) (bool, error) + + GetCurrentInboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (RateLimiterTokenBucket, error) + + GetCurrentOutboundRateLimiterState(opts *bind.CallOpts, remoteChainSelector uint64) (RateLimiterTokenBucket, error) + + GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) + + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) + + GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + + GetRmnProxy(opts *bind.CallOpts) (common.Address, error) + + GetRouter(opts *bind.CallOpts) (common.Address, error) + + GetSupportedChains(opts *bind.CallOpts) ([]uint64, error) + + GetToken(opts *bind.CallOpts) (common.Address, error) + + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IDestPoolData(opts *bind.CallOpts) ([]byte, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) + + IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) + + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) + + LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) + + ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) + + SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) + + SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + FilterAllowListAdd(opts *bind.FilterOpts) (*MockLBTCTokenPoolAllowListAddIterator, error) + + WatchAllowListAdd(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolAllowListAdd) (event.Subscription, error) + + ParseAllowListAdd(log types.Log) (*MockLBTCTokenPoolAllowListAdd, error) + + FilterAllowListRemove(opts *bind.FilterOpts) (*MockLBTCTokenPoolAllowListRemoveIterator, error) + + WatchAllowListRemove(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolAllowListRemove) (event.Subscription, error) + + ParseAllowListRemove(log types.Log) (*MockLBTCTokenPoolAllowListRemove, error) + + FilterBurned(opts *bind.FilterOpts, sender []common.Address) (*MockLBTCTokenPoolBurnedIterator, error) + + WatchBurned(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolBurned, sender []common.Address) (event.Subscription, error) + + ParseBurned(log types.Log) (*MockLBTCTokenPoolBurned, error) + + FilterChainAdded(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainAddedIterator, error) + + WatchChainAdded(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainAdded) (event.Subscription, error) + + ParseChainAdded(log types.Log) (*MockLBTCTokenPoolChainAdded, error) + + FilterChainConfigured(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainConfiguredIterator, error) + + WatchChainConfigured(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainConfigured) (event.Subscription, error) + + ParseChainConfigured(log types.Log) (*MockLBTCTokenPoolChainConfigured, error) + + FilterChainRemoved(opts *bind.FilterOpts) (*MockLBTCTokenPoolChainRemovedIterator, error) + + WatchChainRemoved(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolChainRemoved) (event.Subscription, error) + + ParseChainRemoved(log types.Log) (*MockLBTCTokenPoolChainRemoved, error) + + FilterConfigChanged(opts *bind.FilterOpts) (*MockLBTCTokenPoolConfigChangedIterator, error) + + WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolConfigChanged) (event.Subscription, error) + + ParseConfigChanged(log types.Log) (*MockLBTCTokenPoolConfigChanged, error) + + FilterLocked(opts *bind.FilterOpts, sender []common.Address) (*MockLBTCTokenPoolLockedIterator, error) + + WatchLocked(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolLocked, sender []common.Address) (event.Subscription, error) + + ParseLocked(log types.Log) (*MockLBTCTokenPoolLocked, error) + + FilterMinted(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*MockLBTCTokenPoolMintedIterator, error) + + WatchMinted(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolMinted, sender []common.Address, recipient []common.Address) (event.Subscription, error) + + ParseMinted(log types.Log) (*MockLBTCTokenPoolMinted, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockLBTCTokenPoolOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*MockLBTCTokenPoolOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MockLBTCTokenPoolOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*MockLBTCTokenPoolOwnershipTransferred, error) + + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*MockLBTCTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*MockLBTCTokenPoolRateLimitAdminSet, error) + + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*MockLBTCTokenPoolReleasedIterator, error) + + WatchReleased(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) + + ParseReleased(log types.Log) (*MockLBTCTokenPoolReleased, error) + + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*MockLBTCTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*MockLBTCTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*MockLBTCTokenPoolRemotePoolRemovedIterator, error) + + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolRemoved(log types.Log) (*MockLBTCTokenPoolRemotePoolRemoved, error) + + FilterRouterUpdated(opts *bind.FilterOpts) (*MockLBTCTokenPoolRouterUpdatedIterator, error) + + WatchRouterUpdated(opts *bind.WatchOpts, sink chan<- *MockLBTCTokenPoolRouterUpdated) (event.Subscription, error) + + ParseRouterUpdated(log types.Log) (*MockLBTCTokenPoolRouterUpdated, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/ccip/generated/registry_module_owner_custom/registry_module_owner_custom.go b/core/gethwrappers/ccip/generated/registry_module_owner_custom/registry_module_owner_custom.go index 121135075d..315d75121b 100644 --- a/core/gethwrappers/ccip/generated/registry_module_owner_custom/registry_module_owner_custom.go +++ b/core/gethwrappers/ccip/generated/registry_module_owner_custom/registry_module_owner_custom.go @@ -31,8 +31,8 @@ var ( ) var RegistryModuleOwnerCustomMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AddressZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"CanOnlySelfRegister\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"administrator\",\"type\":\"address\"}],\"name\":\"AdministratorRegistered\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerAdminViaGetCCIPAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerAdminViaOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b5060405161047e38038061047e83398101604081905261002f91610067565b6001600160a01b03811661005657604051639fabe1c160e01b815260040160405180910390fd5b6001600160a01b0316608052610097565b60006020828403121561007957600080fd5b81516001600160a01b038116811461009057600080fd5b9392505050565b6080516103cc6100b2600039600061024a01526103cc6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063181f5a771461004657806396ea2f7a14610098578063ff12c354146100ad575b600080fd5b6100826040518060400160405280601f81526020017f52656769737472794d6f64756c654f776e6572437573746f6d20312e352e300081525081565b60405161008f91906102ef565b60405180910390f35b6100ab6100a636600461037e565b6100c0565b005b6100ab6100bb36600461037e565b61013b565b610138818273ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561010f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013391906103a2565b61018a565b50565b610138818273ffffffffffffffffffffffffffffffffffffffff16638fd6a6ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561010f573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff811633146101fd576040517fc454d18200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528316602482015260440160405180910390fd5b6040517fe677ae3700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063e677ae3790604401600060405180830381600087803b15801561028e57600080fd5b505af11580156102a2573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8085169350851691507f09590fb70af4b833346363965e043a9339e8c7d378b8a2b903c75c277faec4f990600090a35050565b60006020808352835180602085015260005b8181101561031d57858101830151858201604001528201610301565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461013857600080fd5b60006020828403121561039057600080fd5b813561039b8161035c565b9392505050565b6000602082840312156103b457600080fd5b815161039b8161035c56fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAdminRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AddressZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"CanOnlySelfRegister\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"msgSender\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"RequiredRoleNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"administrator\",\"type\":\"address\"}],\"name\":\"AdministratorRegistered\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerAccessControlDefaultAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerAdminViaGetCCIPAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerAdminViaOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a060405234801561001057600080fd5b5060405161064a38038061064a83398101604081905261002f91610067565b6001600160a01b03811661005657604051639fabe1c160e01b815260040160405180910390fd5b6001600160a01b0316608052610097565b60006020828403121561007957600080fd5b81516001600160a01b038116811461009057600080fd5b9392505050565b6080516105986100b260003960006103db01526105986000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063181f5a771461005157806369c0081e146100a357806396ea2f7a146100b8578063ff12c354146100cb575b600080fd5b61008d6040518060400160405280601f81526020017f52656769737472794d6f64756c654f776e6572437573746f6d20312e362e300081525081565b60405161009a9190610480565b60405180910390f35b6100b66100b136600461050f565b6100de565b005b6100b66100c636600461050f565b610255565b6100b66100d936600461050f565b6102d0565b60008173ffffffffffffffffffffffffffffffffffffffff1663a217fddf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561012b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014f9190610533565b6040517f91d148540000000000000000000000000000000000000000000000000000000081526004810182905233602482015290915073ffffffffffffffffffffffffffffffffffffffff8316906391d1485490604401602060405180830381865afa1580156101c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e7919061054c565b610247576040517f86e0b3440000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff831660448201526064015b60405180910390fd5b610251823361031f565b5050565b6102cd818273ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102c8919061056e565b61031f565b50565b6102cd818273ffffffffffffffffffffffffffffffffffffffff16638fd6a6ac6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102a4573d6000803e3d6000fd5b73ffffffffffffffffffffffffffffffffffffffff8116331461038e576040517fc454d18200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301528316602482015260440161023e565b6040517fe677ae3700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063e677ae3790604401600060405180830381600087803b15801561041f57600080fd5b505af1158015610433573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff8085169350851691507f09590fb70af4b833346363965e043a9339e8c7d378b8a2b903c75c277faec4f990600090a35050565b60006020808352835180602085015260005b818110156104ae57858101830151858201604001528201610492565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b73ffffffffffffffffffffffffffffffffffffffff811681146102cd57600080fd5b60006020828403121561052157600080fd5b813561052c816104ed565b9392505050565b60006020828403121561054557600080fd5b5051919050565b60006020828403121561055e57600080fd5b8151801515811461052c57600080fd5b60006020828403121561058057600080fd5b815161052c816104ed56fea164736f6c6343000818000a", } var RegistryModuleOwnerCustomABI = RegistryModuleOwnerCustomMetaData.ABI @@ -193,6 +193,18 @@ func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustomCallerSession) TypeAn return _RegistryModuleOwnerCustom.Contract.TypeAndVersion(&_RegistryModuleOwnerCustom.CallOpts) } +func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustomTransactor) RegisterAccessControlDefaultAdmin(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { + return _RegistryModuleOwnerCustom.contract.Transact(opts, "registerAccessControlDefaultAdmin", token) +} + +func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustomSession) RegisterAccessControlDefaultAdmin(token common.Address) (*types.Transaction, error) { + return _RegistryModuleOwnerCustom.Contract.RegisterAccessControlDefaultAdmin(&_RegistryModuleOwnerCustom.TransactOpts, token) +} + +func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustomTransactorSession) RegisterAccessControlDefaultAdmin(token common.Address) (*types.Transaction, error) { + return _RegistryModuleOwnerCustom.Contract.RegisterAccessControlDefaultAdmin(&_RegistryModuleOwnerCustom.TransactOpts, token) +} + func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustomTransactor) RegisterAdminViaGetCCIPAdmin(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { return _RegistryModuleOwnerCustom.contract.Transact(opts, "registerAdminViaGetCCIPAdmin", token) } @@ -374,6 +386,8 @@ func (_RegistryModuleOwnerCustom *RegistryModuleOwnerCustom) Address() common.Ad type RegistryModuleOwnerCustomInterface interface { TypeAndVersion(opts *bind.CallOpts) (string, error) + RegisterAccessControlDefaultAdmin(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) + RegisterAdminViaGetCCIPAdmin(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) RegisterAdminViaOwner(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) diff --git a/core/gethwrappers/ccip/generated/token_pool/token_pool.go b/core/gethwrappers/ccip/generated/token_pool/token_pool.go index 0bca23641c..5032b336e0 100644 --- a/core/gethwrappers/ccip/generated/token_pool/token_pool.go +++ b/core/gethwrappers/ccip/generated/token_pool/token_pool.go @@ -74,15 +74,14 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig } var TokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"lockOrBurnOut\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"lockOrBurnOut\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } var TokenPoolABI = TokenPoolMetaData.ABI @@ -313,26 +312,26 @@ func (_TokenPool *TokenPoolCallerSession) GetRateLimitAdmin() (common.Address, e return _TokenPool.Contract.GetRateLimitAdmin(&_TokenPool.CallOpts) } -func (_TokenPool *TokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_TokenPool *TokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _TokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _TokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_TokenPool *TokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _TokenPool.Contract.GetRemotePool(&_TokenPool.CallOpts, remoteChainSelector) +func (_TokenPool *TokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _TokenPool.Contract.GetRemotePools(&_TokenPool.CallOpts, remoteChainSelector) } -func (_TokenPool *TokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _TokenPool.Contract.GetRemotePool(&_TokenPool.CallOpts, remoteChainSelector) +func (_TokenPool *TokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _TokenPool.Contract.GetRemotePools(&_TokenPool.CallOpts, remoteChainSelector) } func (_TokenPool *TokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -445,6 +444,50 @@ func (_TokenPool *TokenPoolCallerSession) GetToken() (common.Address, error) { return _TokenPool.Contract.GetToken(&_TokenPool.CallOpts) } +func (_TokenPool *TokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _TokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_TokenPool *TokenPoolSession) GetTokenDecimals() (uint8, error) { + return _TokenPool.Contract.GetTokenDecimals(&_TokenPool.CallOpts) +} + +func (_TokenPool *TokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _TokenPool.Contract.GetTokenDecimals(&_TokenPool.CallOpts) +} + +func (_TokenPool *TokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _TokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_TokenPool *TokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _TokenPool.Contract.IsRemotePool(&_TokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_TokenPool *TokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _TokenPool.Contract.IsRemotePool(&_TokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_TokenPool *TokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _TokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -545,6 +588,18 @@ func (_TokenPool *TokenPoolTransactorSession) AcceptOwnership() (*types.Transact return _TokenPool.Contract.AcceptOwnership(&_TokenPool.TransactOpts) } +func (_TokenPool *TokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_TokenPool *TokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.Contract.AddRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_TokenPool *TokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.Contract.AddRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_TokenPool *TokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _TokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -557,16 +612,16 @@ func (_TokenPool *TokenPoolTransactorSession) ApplyAllowListUpdates(removes []co return _TokenPool.Contract.ApplyAllowListUpdates(&_TokenPool.TransactOpts, removes, adds) } -func (_TokenPool *TokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _TokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_TokenPool *TokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _TokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_TokenPool *TokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _TokenPool.Contract.ApplyChainUpdates(&_TokenPool.TransactOpts, chains) +func (_TokenPool *TokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _TokenPool.Contract.ApplyChainUpdates(&_TokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_TokenPool *TokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _TokenPool.Contract.ApplyChainUpdates(&_TokenPool.TransactOpts, chains) +func (_TokenPool *TokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _TokenPool.Contract.ApplyChainUpdates(&_TokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_TokenPool *TokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -593,6 +648,18 @@ func (_TokenPool *TokenPoolTransactorSession) ReleaseOrMint(releaseOrMintIn Pool return _TokenPool.Contract.ReleaseOrMint(&_TokenPool.TransactOpts, releaseOrMintIn) } +func (_TokenPool *TokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_TokenPool *TokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.Contract.RemoveRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_TokenPool *TokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _TokenPool.Contract.RemoveRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_TokenPool *TokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _TokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -617,18 +684,6 @@ func (_TokenPool *TokenPoolTransactorSession) SetRateLimitAdmin(rateLimitAdmin c return _TokenPool.Contract.SetRateLimitAdmin(&_TokenPool.TransactOpts, rateLimitAdmin) } -func (_TokenPool *TokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _TokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_TokenPool *TokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _TokenPool.Contract.SetRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_TokenPool *TokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _TokenPool.Contract.SetRemotePool(&_TokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_TokenPool *TokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _TokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2025,6 +2080,123 @@ func (_TokenPool *TokenPoolFilterer) ParseOwnershipTransferred(log types.Log) (* return event, nil } +type TokenPoolRateLimitAdminSetIterator struct { + Event *TokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *TokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(TokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(TokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *TokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *TokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type TokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_TokenPool *TokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*TokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _TokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &TokenPoolRateLimitAdminSetIterator{contract: _TokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_TokenPool *TokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *TokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _TokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(TokenPoolRateLimitAdminSet) + if err := _TokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_TokenPool *TokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*TokenPoolRateLimitAdminSet, error) { + event := new(TokenPoolRateLimitAdminSet) + if err := _TokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type TokenPoolReleasedIterator struct { Event *TokenPoolReleased @@ -2162,8 +2334,136 @@ func (_TokenPool *TokenPoolFilterer) ParseReleased(log types.Log) (*TokenPoolRel return event, nil } -type TokenPoolRemotePoolSetIterator struct { - Event *TokenPoolRemotePoolSet +type TokenPoolRemotePoolAddedIterator struct { + Event *TokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *TokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(TokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(TokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *TokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *TokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type TokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_TokenPool *TokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _TokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &TokenPoolRemotePoolAddedIterator{contract: _TokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_TokenPool *TokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _TokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(TokenPoolRemotePoolAdded) + if err := _TokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_TokenPool *TokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*TokenPoolRemotePoolAdded, error) { + event := new(TokenPoolRemotePoolAdded) + if err := _TokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type TokenPoolRemotePoolRemovedIterator struct { + Event *TokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2174,7 +2474,7 @@ type TokenPoolRemotePoolSetIterator struct { fail error } -func (it *TokenPoolRemotePoolSetIterator) Next() bool { +func (it *TokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2183,7 +2483,7 @@ func (it *TokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TokenPoolRemotePoolSet) + it.Event = new(TokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2198,7 +2498,7 @@ func (it *TokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(TokenPoolRemotePoolSet) + it.Event = new(TokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2213,44 +2513,43 @@ func (it *TokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *TokenPoolRemotePoolSetIterator) Error() error { +func (it *TokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *TokenPoolRemotePoolSetIterator) Close() error { +func (it *TokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type TokenPoolRemotePoolSet struct { +type TokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_TokenPool *TokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolSetIterator, error) { +func (_TokenPool *TokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _TokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _TokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &TokenPoolRemotePoolSetIterator{contract: _TokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &TokenPoolRemotePoolRemovedIterator{contract: _TokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_TokenPool *TokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_TokenPool *TokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _TokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _TokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2260,8 +2559,8 @@ func (_TokenPool *TokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, si select { case log := <-logs: - event := new(TokenPoolRemotePoolSet) - if err := _TokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(TokenPoolRemotePoolRemoved) + if err := _TokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2282,9 +2581,9 @@ func (_TokenPool *TokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, si }), nil } -func (_TokenPool *TokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*TokenPoolRemotePoolSet, error) { - event := new(TokenPoolRemotePoolSet) - if err := _TokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_TokenPool *TokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*TokenPoolRemotePoolRemoved, error) { + event := new(TokenPoolRemotePoolRemoved) + if err := _TokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -2433,10 +2732,14 @@ func (_TokenPool *TokenPool) ParseLog(log types.Log) (generated.AbigenLog, error return _TokenPool.ParseOwnershipTransferRequested(log) case _TokenPool.abi.Events["OwnershipTransferred"].ID: return _TokenPool.ParseOwnershipTransferred(log) + case _TokenPool.abi.Events["RateLimitAdminSet"].ID: + return _TokenPool.ParseRateLimitAdminSet(log) case _TokenPool.abi.Events["Released"].ID: return _TokenPool.ParseReleased(log) - case _TokenPool.abi.Events["RemotePoolSet"].ID: - return _TokenPool.ParseRemotePoolSet(log) + case _TokenPool.abi.Events["RemotePoolAdded"].ID: + return _TokenPool.ParseRemotePoolAdded(log) + case _TokenPool.abi.Events["RemotePoolRemoved"].ID: + return _TokenPool.ParseRemotePoolRemoved(log) case _TokenPool.abi.Events["RouterUpdated"].ID: return _TokenPool.ParseRouterUpdated(log) @@ -2489,12 +2792,20 @@ func (TokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (TokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (TokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (TokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (TokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (TokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (TokenPoolRouterUpdated) Topic() common.Hash { @@ -2516,7 +2827,7 @@ type TokenPoolInterface interface { GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -2528,6 +2839,10 @@ type TokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -2538,20 +2853,22 @@ type TokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -2622,17 +2939,29 @@ type TokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*TokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*TokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *TokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*TokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*TokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *TokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*TokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*TokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*TokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *TokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*TokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*TokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*TokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generated/usdc_token_pool/usdc_token_pool.go b/core/gethwrappers/ccip/generated/usdc_token_pool/usdc_token_pool.go index 3e754d5cb7..ca6c4a1977 100644 --- a/core/gethwrappers/ccip/generated/usdc_token_pool/usdc_token_pool.go +++ b/core/gethwrappers/ccip/generated/usdc_token_pool/usdc_token_pool.go @@ -74,8 +74,7 @@ type RateLimiterTokenBucket struct { type TokenPoolChainUpdate struct { RemoteChainSelector uint64 - Allowed bool - RemotePoolAddress []byte + RemotePoolAddresses [][]byte RemoteTokenAddress []byte OutboundRateLimiterConfig RateLimiterConfig InboundRateLimiterConfig RateLimiterConfig @@ -95,8 +94,8 @@ type USDCTokenPoolDomainUpdate struct { } var USDCTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractITokenMessenger\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidDestinationDomain\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.DomainUpdate\",\"name\":\"domain\",\"type\":\"tuple\"}],\"name\":\"InvalidDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidMessageVersion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"got\",\"type\":\"uint64\"}],\"name\":\"InvalidNonce\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"}],\"name\":\"InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidSourceDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidTokenMessengerVersion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"domain\",\"type\":\"uint64\"}],\"name\":\"UnknownDomain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnlockingUSDCFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structUSDCTokenPool.DomainUpdate[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"name\":\"DomainsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"previousPoolAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUPPORTED_USDC_VERSION\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chains\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"getDomain\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.Domain\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePool\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_localDomainIdentifier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_messageTransmitter\",\"outputs\":[{\"internalType\":\"contractIMessageTransmitter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_tokenMessenger\",\"outputs\":[{\"internalType\":\"contractITokenMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.DomainUpdate[]\",\"name\":\"domains\",\"type\":\"tuple[]\"}],\"name\":\"setDomains\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"setRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6101406040523480156200001257600080fd5b50604051620052c6380380620052c6833981016040819052620000359162000b4c565b838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200041b565b5050506001600160a01b0384161580620000e457506001600160a01b038116155b80620000f757506001600160a01b038216155b1562000116576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b0384811660805282811660a052600480546001600160a01b031916918316919091179055825115801560c0526200016957604080516000815260208101909152620001699084620004c6565b5050506001600160a01b038616905062000196576040516306b7c75960e31b815260040160405180910390fd5b6000856001600160a01b0316632c1219216040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001d7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001fd919062000c72565b90506000816001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000240573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000266919062000c99565b905063ffffffff81161562000297576040516334697c6b60e11b815263ffffffff8216600482015260240162000087565b6000876001600160a01b0316639cdbb1816040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002d8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002fe919062000c99565b905063ffffffff8116156200032f576040516316ba39c560e31b815263ffffffff8216600482015260240162000087565b6001600160a01b0380891660e05283166101008190526040805163234d8e3d60e21b81529051638d3638f4916004808201926020929091908290030181865afa15801562000381573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a7919062000c99565b63ffffffff166101205260e051608051620003d1916001600160a01b039091169060001962000623565b6040516001600160a01b03891681527f2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea95449060200160405180910390a1505050505050505062000de6565b336001600160a01b03821603620004755760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c051620004e7576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620005725760008382815181106200050b576200050b62000cc1565b602090810291909101015190506200052560028262000709565b1562000568576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101620004ea565b5060005b81518110156200061e57600082828151811062000597576200059762000cc1565b6020026020010151905060006001600160a01b0316816001600160a01b031603620005c3575062000615565b620005d060028262000729565b1562000613576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010162000576565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801562000675573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200069b919062000cd7565b620006a7919062000d07565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b1790915291925062000703918691906200074016565b50505050565b600062000720836001600160a01b03841662000811565b90505b92915050565b600062000720836001600160a01b03841662000915565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908201526000906200078f906001600160a01b03851690849062000967565b8051909150156200061e5780806020019051810190620007b0919062000d1d565b6200061e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000087565b600081815260018301602052604081205480156200090a5760006200083860018362000d41565b85549091506000906200084e9060019062000d41565b9050808214620008ba57600086600001828154811062000872576200087262000cc1565b906000526020600020015490508087600001848154811062000898576200089862000cc1565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620008ce57620008ce62000d57565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000723565b600091505062000723565b60008181526001830160205260408120546200095e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000723565b50600062000723565b606062000978848460008562000980565b949350505050565b606082471015620009e35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000087565b600080866001600160a01b0316858760405162000a01919062000d93565b60006040518083038185875af1925050503d806000811462000a40576040519150601f19603f3d011682016040523d82523d6000602084013e62000a45565b606091505b50909250905062000a598783838762000a64565b979650505050505050565b6060831562000ad857825160000362000ad0576001600160a01b0385163b62000ad05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000087565b508162000978565b62000978838381511562000aef5781518083602001fd5b8060405162461bcd60e51b815260040162000087919062000db1565b6001600160a01b038116811462000b2157600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b805162000b478162000b0b565b919050565b600080600080600060a0868803121562000b6557600080fd5b855162000b728162000b0b565b8095505060208087015162000b878162000b0b565b60408801519095506001600160401b038082111562000ba557600080fd5b818901915089601f83011262000bba57600080fd5b81518181111562000bcf5762000bcf62000b24565b8060051b604051601f19603f8301168101818110858211171562000bf75762000bf762000b24565b60405291825284820192508381018501918c83111562000c1657600080fd5b938501935b8285101562000c3f5762000c2f8562000b3a565b8452938501939285019262000c1b565b80985050505050505062000c566060870162000b3a565b915062000c666080870162000b3a565b90509295509295909350565b60006020828403121562000c8557600080fd5b815162000c928162000b0b565b9392505050565b60006020828403121562000cac57600080fd5b815163ffffffff8116811462000c9257600080fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121562000cea57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000723576200072362000cf1565b60006020828403121562000d3057600080fd5b8151801515811462000c9257600080fd5b8181038181111562000723576200072362000cf1565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000d8a57818101518382015260200162000d70565b50506000910152565b6000825162000da781846020870162000d6d565b9190910192915050565b602081526000825180602084015262000dd281604085016020870162000d6d565b601f01601f19169190910160400192915050565b60805160a05160c05160e051610100516101205161442762000e9f60003960008181610382015281816111d101528181611e4a0152611ea80152600081816106760152610a7801526000818161035b01526110e701526000818161063a01528181611f45015261288001526000818161057601528181611c4801526121fb01526000818161028f015281816102e4015281816110b101528181611b680152818161211b015281816128160152612a6b01526144276000f3fe608060405234801561001057600080fd5b50600436106101ef5760003560e01c80639a4575b91161010f578063c75eea9c116100a2578063dfadfa3511610071578063dfadfa351461059a578063e0351e1314610638578063f2fde38b1461065e578063fbf84dd71461067157600080fd5b8063c75eea9c1461053b578063cf7401f31461054e578063db6327dc14610561578063dc0bd9711461057457600080fd5b8063b0f479a1116100de578063b0f479a1146104e2578063b794658014610500578063c0d7865514610513578063c4bffe2b1461052657600080fd5b80639a4575b9146104365780639fdf13ff14610456578063a7cd63b71461045e578063af58d59f1461047357600080fd5b80636155cda01161018757806379ba50971161015657806379ba5097146103ea5780637d54534e146103f25780638926f54f146104055780638da5cb5b1461041857600080fd5b80636155cda0146103565780636b716b0d1461037d5780636d3d1a58146103b957806378a010b2146103d757600080fd5b806321df0da7116101c357806321df0da71461028d578063240028e8146102d4578063390775371461032157806354c8a4f31461034357600080fd5b806241d3c1146101f457806301ffc9a7146102095780630a2fd49314610231578063181f5a7714610251575b600080fd5b61020761020236600461320e565b610698565b005b61021c610217366004613283565b610835565b60405190151581526020015b60405180910390f35b61024461023f3660046132eb565b61091a565b604051610228919061336c565b6102446040518060400160405280601381526020017f55534443546f6b656e506f6f6c20312e352e300000000000000000000000000081525081565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610228565b61021c6102e23660046133ac565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b61033461032f3660046133c9565b6109ca565b60405190518152602001610228565b610207610351366004613451565b610bb7565b6102af7f000000000000000000000000000000000000000000000000000000000000000081565b6103a47f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610228565b60085473ffffffffffffffffffffffffffffffffffffffff166102af565b6102076103e53660046134bd565b610c32565b610207610da1565b6102076104003660046133ac565b610e9e565b61021c6104133660046132eb565b610eed565b60005473ffffffffffffffffffffffffffffffffffffffff166102af565b610449610444366004613542565b610f04565b604051610228919061357d565b6103a4600081565b61046661124c565b60405161022891906135dd565b6104866104813660046132eb565b61125d565b604051610228919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff166102af565b61024461050e3660046132eb565b611332565b6102076105213660046133ac565b61135d565b61052e611431565b6040516102289190613637565b6104866105493660046132eb565b6114e9565b61020761055c3660046137c2565b6115bb565b61020761056f366004613809565b611644565b7f00000000000000000000000000000000000000000000000000000000000000006102af565b61060e6105a83660046132eb565b60408051606080820183526000808352602080840182905292840181905267ffffffffffffffff949094168452600982529282902082519384018352805484526001015463ffffffff811691840191909152640100000000900460ff1615159082015290565b604080518251815260208084015163ffffffff169082015291810151151590820152606001610228565b7f000000000000000000000000000000000000000000000000000000000000000061021c565b61020761066c3660046133ac565b611aca565b6102af7f000000000000000000000000000000000000000000000000000000000000000081565b6106a0611ade565b60005b818110156107f75760008383838181106106bf576106bf61384b565b9050608002018036038101906106d5919061388e565b805190915015806106f25750604081015167ffffffffffffffff16155b1561076157604080517fa087bd2900000000000000000000000000000000000000000000000000000000815282516004820152602083015163ffffffff1660248201529082015167ffffffffffffffff1660448201526060820151151560648201526084015b60405180910390fd5b60408051606080820183528351825260208085015163ffffffff9081168285019081529286015115158486019081529585015167ffffffffffffffff166000908152600990925293902091518255516001918201805494511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009095169190931617929092179055016106a3565b507f1889010d2535a0ab1643678d1da87fbbe8b87b2f585b47ddb72ec622aef9ee568282604051610829929190613908565b60405180910390a15050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf0000000000000000000000000000000000000000000000000000000014806108c857507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b8061091457507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b67ffffffffffffffff811660009081526007602052604090206004018054606091906109459061398f565b80601f01602080910402602001604051908101604052809291908181526020018280546109719061398f565b80156109be5780601f10610993576101008083540402835291602001916109be565b820191906000526020600020905b8154815290600101906020018083116109a157829003601f168201915b50505050509050919050565b6040805160208101909152600081526109ea6109e583613a8d565b611b61565b60006109f960c0840184613b82565b810190610a069190613be7565b90506000610a1760e0850185613b82565b810190610a249190613c26565b9050610a34816000015183611d92565b805160208201516040517f57ecfd2800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016926357ecfd2892610aab92600401613cb7565b6020604051808303816000875af1158015610aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aee9190613cdc565b610b24576040517fbf969f2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b3460608501604086016133ac565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f08660600135604051610b9691815260200190565b60405180910390a35050604080516020810190915260609092013582525090565b610bbf611ade565b610c2c84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808802828101820190935287825290935087925086918291850190849080828437600092019190915250611f4392505050565b50505050565b610c3a611ade565b610c4383610eed565b610c85576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610758565b67ffffffffffffffff831660009081526007602052604081206004018054610cac9061398f565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd89061398f565b8015610d255780601f10610cfa57610100808354040283529160200191610d25565b820191906000526020600020905b815481529060010190602001808311610d0857829003601f168201915b5050505067ffffffffffffffff8616600090815260076020526040902091925050600401610d54838583613d41565b508367ffffffffffffffff167fdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf828585604051610d9393929190613ea5565b60405180910390a250505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610e22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610758565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610ea6611ade565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610914600567ffffffffffffffff84166120f9565b6040805180820190915260608082526020820152610f29610f2483613ed5565b612114565b6000600981610f3e60408601602087016132eb565b67ffffffffffffffff168152602080820192909252604090810160002081516060810183528154815260019091015463ffffffff81169382019390935264010000000090920460ff161515908201819052909150610fe557610fa660408401602085016132eb565b6040517fd201c48a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610758565b610fef8380613b82565b9050602014611036576110028380613b82565b6040517fa3c8cf09000000000000000000000000000000000000000000000000000000008152600401610758929190613f79565b60006110428480613b82565b81019061104f9190613f8d565b602083015183516040517ff856ddb60000000000000000000000000000000000000000000000000000000081526060880135600482015263ffffffff90921660248301526044820183905273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116606484015260848301919091529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063f856ddb69060a4016020604051808303816000875af1158015611130573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111549190613fa6565b6040516060870135815290915033907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a260405180604001604052806111b187602001602081019061050e91906132eb565b815260408051808201825267ffffffffffffffff851680825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602093840190815284518085019390935251169281019290925290910190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905295945050505050565b606061125860026122de565b905090565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff161515948201949094526003909101548084166060830152919091049091166080820152610914906122eb565b67ffffffffffffffff811660009081526007602052604090206005018054606091906109459061398f565b611365611ade565b73ffffffffffffffffffffffffffffffffffffffff81166113b2576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f16849101610829565b6060600061143f60056122de565b90506000815167ffffffffffffffff81111561145d5761145d613679565b604051908082528060200260200182016040528015611486578160200160208202803683370190505b50905060005b82518110156114e2578281815181106114a7576114a761384b565b60200260200101518282815181106114c1576114c161384b565b67ffffffffffffffff9092166020928302919091019091015260010161148c565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff161515948201949094526001909101548084166060830152919091049091166080820152610914906122eb565b60085473ffffffffffffffffffffffffffffffffffffffff1633148015906115fb575060005473ffffffffffffffffffffffffffffffffffffffff163314155b15611634576040517f8e4a23d6000000000000000000000000000000000000000000000000000000008152336004820152602401610758565b61163f83838361239d565b505050565b61164c611ade565b60005b8181101561163f57600083838381811061166b5761166b61384b565b905060200281019061167d9190613fc3565b61168690614001565b905061169b8160800151826020015115612487565b6116ae8160a00151826020015115612487565b8060200151156119aa5780516116d09060059067ffffffffffffffff166125c0565b6117155780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610758565b604081015151158061172a5750606081015151155b15611761576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161012081018252608083810180516020908101516fffffffffffffffffffffffffffffffff9081168486019081524263ffffffff90811660a0808901829052865151151560c08a01528651860151851660e08a015295518901518416610100890152918752875180860189529489018051850151841686528585019290925281515115158589015281518401518316606080870191909152915188015183168587015283870194855288880151878901908152828a015183890152895167ffffffffffffffff1660009081526007865289902088518051825482890151838e01519289167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316177001000000000000000000000000000000009188168202177fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90811674010000000000000000000000000000000000000000941515850217865584890151948d0151948a16948a168202949094176001860155995180516002860180549b8301519f830151918b169b9093169a909a179d9096168a029c909c1790911696151502959095179098559081015194015193811693169091029190911760038201559151909190600482019061194290826140b5565b506060820151600582019061195790826140b5565b505081516060830151608084015160a08501516040517f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c2955061199d94939291906141cf565b60405180910390a1611ac1565b80516119c29060059067ffffffffffffffff166125cc565b611a075780516040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9091166004820152602401610758565b805167ffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffff00000000000000000000000000000000000000000090811682556001820183905560028201805490911690556003810182905590611a7060048301826131c0565b611a7e6005830160006131c0565b5050805160405167ffffffffffffffff90911681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d8599169060200160405180910390a15b5060010161164f565b611ad2611ade565b611adb816125d8565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611b5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610758565b565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614611bf65760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610758565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015611ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc89190613cdc565b15611cff576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d0c81602001516126cd565b6000611d1b826020015161091a565b9050805160001480611d3f575080805190602001208260a001518051906020012014155b15611d7c578160a001516040517f24eb47e5000000000000000000000000000000000000000000000000000000008152600401610758919061336c565b611d8e826020015183606001516127f3565b5050565b600482015163ffffffff811615611ddd576040517f68d2f8d600000000000000000000000000000000000000000000000000000000815263ffffffff82166004820152602401610758565b6008830151600c8401516014850151602085015163ffffffff808516911614611e485760208501516040517fe366a11700000000000000000000000000000000000000000000000000000000815263ffffffff91821660048201529084166024820152604401610758565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168263ffffffff1614611edd576040517f77e4802600000000000000000000000000000000000000000000000000000000815263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116600483015283166024820152604401610758565b845167ffffffffffffffff828116911614611f3b5784516040517ff917ffea00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff91821660048201529082166024820152604401610758565b505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000611f9a576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8251811015612030576000838281518110611fba57611fba61384b565b60200260200101519050611fd881600261283a90919063ffffffff16565b156120275760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101611f9d565b5060005b815181101561163f5760008282815181106120515761205161384b565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361209557506120f1565b6120a060028261285c565b156120ef5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101612034565b600081815260018301602052604081205415155b9392505050565b60808101517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff9081169116146121a95760808101516040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610758565b60208101516040517f2cbc26bb00000000000000000000000000000000000000000000000000000000815260809190911b77ffffffffffffffff000000000000000000000000000000001660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cbc26bb90602401602060405180830381865afa158015612257573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061227b9190613cdc565b156122b2576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6122bf816040015161287e565b6122cc81602001516128fd565b611adb81602001518260600151612a4b565b6060600061210d83612a8f565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915261237982606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff164261235d9190614297565b85608001516fffffffffffffffffffffffffffffffff16612aea565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b6123a683610eed565b6123e8576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152602401610758565b6123f3826000612487565b67ffffffffffffffff831660009081526007602052604090206124169083612b14565b612421816000612487565b67ffffffffffffffff831660009081526007602052604090206124479060020182612b14565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b83838360405161247a939291906142aa565b60405180910390a1505050565b81511561254e5781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff161015806124dd575060408201516fffffffffffffffffffffffffffffffff16155b1561251657816040517f8020d124000000000000000000000000000000000000000000000000000000008152600401610758919061432d565b8015611d8e576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408201516fffffffffffffffffffffffffffffffff16151580612587575060208201516fffffffffffffffffffffffffffffffff1615155b15611d8e57816040517fd68af9cc000000000000000000000000000000000000000000000000000000008152600401610758919061432d565b600061210d8383612cb6565b600061210d8383612d05565b3373ffffffffffffffffffffffffffffffffffffffff821603612657576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610758565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6126d681610eed565b612718576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610758565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa158015612797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bb9190613cdc565b611adb576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610758565b67ffffffffffffffff82166000908152600760205260409020611d8e90600201827f0000000000000000000000000000000000000000000000000000000000000000612df8565b600061210d8373ffffffffffffffffffffffffffffffffffffffff8416612d05565b600061210d8373ffffffffffffffffffffffffffffffffffffffff8416612cb6565b7f000000000000000000000000000000000000000000000000000000000000000015611adb576128af60028261317b565b611adb576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610758565b61290681610eed565b612948576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff82166004820152602401610758565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa1580156129c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e59190614369565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611adb576040517f728fe07b000000000000000000000000000000000000000000000000000000008152336004820152602401610758565b67ffffffffffffffff82166000908152600760205260409020611d8e90827f0000000000000000000000000000000000000000000000000000000000000000612df8565b6060816000018054806020026020016040519081016040528092919081815260200182805480156109be57602002820191906000526020600020905b815481526020019060010190808311612acb5750505050509050919050565b6000612b0985612afa8486614386565b612b04908761439d565b6131aa565b90505b949350505050565b8154600090612b3d90700100000000000000000000000000000000900463ffffffff1642614297565b90508015612bdf5760018301548354612b85916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612aea565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354612c05916fffffffffffffffffffffffffffffffff90811691166131aa565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c199061247a90849061432d565b6000818152600183016020526040812054612cfd57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610914565b506000610914565b60008181526001830160205260408120548015612dee576000612d29600183614297565b8554909150600090612d3d90600190614297565b9050808214612da2576000866000018281548110612d5d57612d5d61384b565b9060005260206000200154905080876000018481548110612d8057612d8061384b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612db357612db36143b0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610914565b6000915050610914565b825474010000000000000000000000000000000000000000900460ff161580612e1f575081155b15612e2957505050565b825460018401546fffffffffffffffffffffffffffffffff80831692911690600090612e6f90700100000000000000000000000000000000900463ffffffff1642614297565b90508015612f2f5781831115612eb1576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001860154612eeb9083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612aea565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b84821015612fe65773ffffffffffffffffffffffffffffffffffffffff8416612f8e576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610758565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610758565b848310156130f95760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1690600090829061302a9082614297565b613034878a614297565b61303e919061439d565b61304891906143df565b905073ffffffffffffffffffffffffffffffffffffffff86166130a1576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610758565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610758565b6131038584614297565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561210d565b60008183106131b9578161210d565b5090919050565b5080546131cc9061398f565b6000825580601f106131dc575050565b601f016020900490600052602060002090810190611adb91905b8082111561320a57600081556001016131f6565b5090565b6000806020838503121561322157600080fd5b823567ffffffffffffffff8082111561323957600080fd5b818501915085601f83011261324d57600080fd5b81358181111561325c57600080fd5b8660208260071b850101111561327157600080fd5b60209290920196919550909350505050565b60006020828403121561329557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461210d57600080fd5b67ffffffffffffffff81168114611adb57600080fd5b80356132e6816132c5565b919050565b6000602082840312156132fd57600080fd5b813561210d816132c5565b6000815180845260005b8181101561332e57602081850181015186830182015201613312565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061210d6020830184613308565b73ffffffffffffffffffffffffffffffffffffffff81168114611adb57600080fd5b80356132e68161337f565b6000602082840312156133be57600080fd5b813561210d8161337f565b6000602082840312156133db57600080fd5b813567ffffffffffffffff8111156133f257600080fd5b8201610100818503121561210d57600080fd5b60008083601f84011261341757600080fd5b50813567ffffffffffffffff81111561342f57600080fd5b6020830191508360208260051b850101111561344a57600080fd5b9250929050565b6000806000806040858703121561346757600080fd5b843567ffffffffffffffff8082111561347f57600080fd5b61348b88838901613405565b909650945060208701359150808211156134a457600080fd5b506134b187828801613405565b95989497509550505050565b6000806000604084860312156134d257600080fd5b83356134dd816132c5565b9250602084013567ffffffffffffffff808211156134fa57600080fd5b818601915086601f83011261350e57600080fd5b81358181111561351d57600080fd5b87602082850101111561352f57600080fd5b6020830194508093505050509250925092565b60006020828403121561355457600080fd5b813567ffffffffffffffff81111561356b57600080fd5b820160a0818503121561210d57600080fd5b6020815260008251604060208401526135996060840182613308565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526135d48282613308565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101561362b57835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016135f9565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561362b57835167ffffffffffffffff1683529284019291840191600101613653565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610100810167ffffffffffffffff811182821017156136cc576136cc613679565b60405290565b6040805190810167ffffffffffffffff811182821017156136cc576136cc613679565b60405160c0810167ffffffffffffffff811182821017156136cc576136cc613679565b8015158114611adb57600080fd5b80356132e681613718565b80356fffffffffffffffffffffffffffffffff811681146132e657600080fd5b60006060828403121561376357600080fd5b6040516060810181811067ffffffffffffffff8211171561378657613786613679565b604052905080823561379781613718565b81526137a560208401613731565b60208201526137b660408401613731565b60408201525092915050565b600080600060e084860312156137d757600080fd5b83356137e2816132c5565b92506137f18560208601613751565b91506138008560808601613751565b90509250925092565b6000806020838503121561381c57600080fd5b823567ffffffffffffffff81111561383357600080fd5b61383f85828601613405565b90969095509350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b803563ffffffff811681146132e657600080fd5b6000608082840312156138a057600080fd5b6040516080810181811067ffffffffffffffff821117156138c3576138c3613679565b604052823581526138d66020840161387a565b602082015260408301356138e9816132c5565b604082015260608301356138fc81613718565b60608201529392505050565b6020808252818101839052600090604080840186845b87811015613982578135835263ffffffff61393a86840161387a565b16858401528382013561394c816132c5565b67ffffffffffffffff168385015260608281013561396981613718565b151590840152608092830192919091019060010161391e565b5090979650505050505050565b600181811c908216806139a357607f821691505b6020821081036139dc577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b600082601f8301126139f357600080fd5b813567ffffffffffffffff80821115613a0e57613a0e613679565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715613a5457613a54613679565b81604052838152866020858801011115613a6d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006101008236031215613aa057600080fd5b613aa86136a8565b823567ffffffffffffffff80821115613ac057600080fd5b613acc368387016139e2565b8352613ada602086016132db565b6020840152613aeb604086016133a1565b604084015260608501356060840152613b06608086016133a1565b608084015260a0850135915080821115613b1f57600080fd5b613b2b368387016139e2565b60a084015260c0850135915080821115613b4457600080fd5b613b50368387016139e2565b60c084015260e0850135915080821115613b6957600080fd5b50613b76368286016139e2565b60e08301525092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613bb757600080fd5b83018035915067ffffffffffffffff821115613bd257600080fd5b60200191503681900382131561344a57600080fd5b600060408284031215613bf957600080fd5b613c016136d2565b8235613c0c816132c5565b8152613c1a6020840161387a565b60208201529392505050565b600060208284031215613c3857600080fd5b813567ffffffffffffffff80821115613c5057600080fd5b9083019060408286031215613c6457600080fd5b613c6c6136d2565b823582811115613c7b57600080fd5b613c87878286016139e2565b825250602083013582811115613c9c57600080fd5b613ca8878286016139e2565b60208301525095945050505050565b604081526000613cca6040830185613308565b82810360208401526135d48185613308565b600060208284031215613cee57600080fd5b815161210d81613718565b601f82111561163f576000816000526020600020601f850160051c81016020861015613d225750805b601f850160051c820191505b81811015611f3b57828155600101613d2e565b67ffffffffffffffff831115613d5957613d59613679565b613d6d83613d67835461398f565b83613cf9565b6000601f841160018114613dbf5760008515613d895750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355613e55565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015613e0e5786850135825560209485019460019092019101613dee565b5086821015613e49577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000613eb86040830186613308565b8281036020840152613ecb818587613e5c565b9695505050505050565b600060a08236031215613ee757600080fd5b60405160a0810167ffffffffffffffff8282108183111715613f0b57613f0b613679565b816040528435915080821115613f2057600080fd5b50613f2d368286016139e2565b8252506020830135613f3e816132c5565b60208201526040830135613f518161337f565b6040820152606083810135908201526080830135613f6e8161337f565b608082015292915050565b602081526000612b0c602083018486613e5c565b600060208284031215613f9f57600080fd5b5035919050565b600060208284031215613fb857600080fd5b815161210d816132c5565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112613ff757600080fd5b9190910192915050565b6000610140823603121561401457600080fd5b61401c6136f5565b614025836132db565b815261403360208401613726565b6020820152604083013567ffffffffffffffff8082111561405357600080fd5b61405f368387016139e2565b6040840152606085013591508082111561407857600080fd5b50614085368286016139e2565b6060830152506140983660808501613751565b60808201526140aa3660e08501613751565b60a082015292915050565b815167ffffffffffffffff8111156140cf576140cf613679565b6140e3816140dd845461398f565b84613cf9565b602080601f83116001811461413657600084156141005750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611f3b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561418357888601518255948401946001909101908401614164565b50858210156141bf57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff871683528060208401526141f381840187613308565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff90811660608701529087015116608085015291506142319050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e08301526135d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561091457610914614268565b67ffffffffffffffff8416815260e081016142f660208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152612b0c565b6060810161091482848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b60006020828403121561437b57600080fd5b815161210d8161337f565b808202811582820484141761091457610914614268565b8082018082111561091457610914614268565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600082614415577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractITokenMessenger\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"AggregateValueMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"AggregateValueRateLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AllowListNotEnabled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerIsNotARampOnRouter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CursedByRMN\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"DisabledNonZeroRateLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expected\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"actual\",\"type\":\"uint8\"}],\"name\":\"InvalidDecimalArgs\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidDestinationDomain\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.DomainUpdate\",\"name\":\"domain\",\"type\":\"tuple\"}],\"name\":\"InvalidDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidMessageVersion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"got\",\"type\":\"uint64\"}],\"name\":\"InvalidNonce\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"InvalidRateLimitRate\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"}],\"name\":\"InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"}],\"name\":\"InvalidRemoteChainDecimals\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidRemotePoolForChain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidSourceDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"}],\"name\":\"InvalidSourcePoolAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidTokenMessengerVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"NonExistentChain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"remoteDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"localDecimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"remoteAmount\",\"type\":\"uint256\"}],\"name\":\"OverflowDetected\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"PoolAlreadyAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RateLimitMustBeDisabled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"SenderNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenMaxCapacityExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minWaitInSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRateLimitReached\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"domain\",\"type\":\"uint64\"}],\"name\":\"UnknownDomain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnlockingUSDCFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListAdd\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"AllowListRemove\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remoteToken\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"ChainConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"ChainRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"indexed\":false,\"internalType\":\"structRateLimiter.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"structUSDCTokenPool.DomainUpdate[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"name\":\"DomainsSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Locked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"RateLimitAdminSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Released\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"RemotePoolRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldRouter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"RouterUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"TokensConsumed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUPPORTED_USDC_VERSION\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"addRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"removes\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"adds\",\"type\":\"address[]\"}],\"name\":\"applyAllowListUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64[]\",\"name\":\"remoteChainSelectorsToRemove\",\"type\":\"uint64[]\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes[]\",\"name\":\"remotePoolAddresses\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"remoteTokenAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundRateLimiterConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundRateLimiterConfig\",\"type\":\"tuple\"}],\"internalType\":\"structTokenPool.ChainUpdate[]\",\"name\":\"chainsToAdd\",\"type\":\"tuple[]\"}],\"name\":\"applyChainUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowList\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentInboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getCurrentOutboundRateLimiterState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"tokens\",\"type\":\"uint128\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdated\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.TokenBucket\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainSelector\",\"type\":\"uint64\"}],\"name\":\"getDomain\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.Domain\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRateLimitAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemotePools\",\"outputs\":[{\"internalType\":\"bytes[]\",\"name\":\"\",\"type\":\"bytes[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"getRemoteToken\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRmnProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"rmnProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedChains\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTokenDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_localDomainIdentifier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_messageTransmitter\",\"outputs\":[{\"internalType\":\"contractIMessageTransmitter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_tokenMessenger\",\"outputs\":[{\"internalType\":\"contractITokenMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"isRemotePool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"}],\"name\":\"isSupportedChain\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isSupportedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"receiver\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"}],\"internalType\":\"structPool.LockOrBurnInV1\",\"name\":\"lockOrBurnIn\",\"type\":\"tuple\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"destTokenAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"destPoolData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.LockOrBurnOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"originalSender\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"localToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolAddress\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sourcePoolData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainTokenData\",\"type\":\"bytes\"}],\"internalType\":\"structPool.ReleaseOrMintInV1\",\"name\":\"releaseOrMintIn\",\"type\":\"tuple\"}],\"name\":\"releaseOrMint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destinationAmount\",\"type\":\"uint256\"}],\"internalType\":\"structPool.ReleaseOrMintOutV1\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"remotePoolAddress\",\"type\":\"bytes\"}],\"name\":\"removeRemotePool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteChainSelector\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"outboundConfig\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"capacity\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"rate\",\"type\":\"uint128\"}],\"internalType\":\"structRateLimiter.Config\",\"name\":\"inboundConfig\",\"type\":\"tuple\"}],\"name\":\"setChainRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"allowedCaller\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"domainIdentifier\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"internalType\":\"structUSDCTokenPool.DomainUpdate[]\",\"name\":\"domains\",\"type\":\"tuple[]\"}],\"name\":\"setDomains\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"rateLimitAdmin\",\"type\":\"address\"}],\"name\":\"setRateLimitAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRouter\",\"type\":\"address\"}],\"name\":\"setRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6101606040523480156200001257600080fd5b50604051620054b7380380620054b7833981016040819052620000359162000b93565b836006848484336000816200005d57604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03848116919091179091558116156200009057620000908162000493565b50506001600160a01b0385161580620000b057506001600160a01b038116155b80620000c357506001600160a01b038216155b15620000e2576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808616608081905290831660c0526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa92505050801562000152575060408051601f3d908101601f191682019092526200014f9181019062000cb9565b60015b1562000193578060ff168560ff161462000191576040516332ad3e0760e11b815260ff8087166004830152821660248201526044015b60405180910390fd5b505b60ff841660a052600480546001600160a01b0319166001600160a01b038316179055825115801560e052620001dd57604080516000815260208101909152620001dd90846200050d565b5050506001600160a01b03871691506200020c9050576040516306b7c75960e31b815260040160405180910390fd5b6000856001600160a01b0316632c1219216040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200024d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000273919062000ce5565b90506000816001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002b6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002dc919062000d05565b905063ffffffff8116156200030d576040516334697c6b60e11b815263ffffffff8216600482015260240162000188565b6000876001600160a01b0316639cdbb1816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200034e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000374919062000d05565b905063ffffffff811615620003a5576040516316ba39c560e31b815263ffffffff8216600482015260240162000188565b6001600160a01b038089166101005283166101208190526040805163234d8e3d60e21b81529051638d3638f4916004808201926020929091908290030181865afa158015620003f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200041e919062000d05565b63ffffffff16610140526101005160805162000449916001600160a01b03909116906000196200066a565b6040516001600160a01b03891681527f2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea95449060200160405180910390a1505050505050505062000e52565b336001600160a01b03821603620004bd57604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60e0516200052e576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620005b957600083828151811062000552576200055262000d2d565b602090810291909101015190506200056c60028262000750565b15620005af576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b5060010162000531565b5060005b815181101562000665576000828281518110620005de57620005de62000d2d565b6020026020010151905060006001600160a01b0316816001600160a01b0316036200060a57506200065c565b6200061760028262000770565b156200065a576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b600101620005bd565b505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015620006bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006e2919062000d43565b620006ee919062000d73565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091529192506200074a918691906200078716565b50505050565b600062000767836001600160a01b03841662000858565b90505b92915050565b600062000767836001600160a01b0384166200095c565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490820152600090620007d6906001600160a01b038516908490620009ae565b805190915015620006655780806020019051810190620007f7919062000d89565b620006655760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000188565b60008181526001830160205260408120548015620009515760006200087f60018362000dad565b8554909150600090620008959060019062000dad565b905080821462000901576000866000018281548110620008b957620008b962000d2d565b9060005260206000200154905080876000018481548110620008df57620008df62000d2d565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000915576200091562000dc3565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200076a565b60009150506200076a565b6000818152600183016020526040812054620009a5575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200076a565b5060006200076a565b6060620009bf8484600085620009c7565b949350505050565b60608247101562000a2a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000188565b600080866001600160a01b0316858760405162000a48919062000dff565b60006040518083038185875af1925050503d806000811462000a87576040519150601f19603f3d011682016040523d82523d6000602084013e62000a8c565b606091505b50909250905062000aa08783838762000aab565b979650505050505050565b6060831562000b1f57825160000362000b17576001600160a01b0385163b62000b175760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000188565b5081620009bf565b620009bf838381511562000b365781518083602001fd5b8060405162461bcd60e51b815260040162000188919062000e1d565b6001600160a01b038116811462000b6857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b805162000b8e8162000b52565b919050565b600080600080600060a0868803121562000bac57600080fd5b855162000bb98162000b52565b8095505060208087015162000bce8162000b52565b60408801519095506001600160401b038082111562000bec57600080fd5b818901915089601f83011262000c0157600080fd5b81518181111562000c165762000c1662000b6b565b8060051b604051601f19603f8301168101818110858211171562000c3e5762000c3e62000b6b565b60405291825284820192508381018501918c83111562000c5d57600080fd5b938501935b8285101562000c865762000c768562000b81565b8452938501939285019262000c62565b80985050505050505062000c9d6060870162000b81565b915062000cad6080870162000b81565b90509295509295909350565b60006020828403121562000ccc57600080fd5b815160ff8116811462000cde57600080fd5b9392505050565b60006020828403121562000cf857600080fd5b815162000cde8162000b52565b60006020828403121562000d1857600080fd5b815163ffffffff8116811462000cde57600080fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121562000d5657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156200076a576200076a62000d5d565b60006020828403121562000d9c57600080fd5b8151801515811462000cde57600080fd5b818103818111156200076a576200076a62000d5d565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000df657818101518382015260200162000ddc565b50506000910152565b6000825162000e1381846020870162000dd9565b9190910192915050565b602081526000825180602084015262000e3e81604085016020870162000dd9565b601f01601f19169190910160400192915050565b60805160a05160c05160e0516101005161012051610140516145af62000f08600039600081816104170152818161113c01528181612107015261216501526000818161072b0152610a750152600081816103dd01526110520152600081816106dc0152818161221d0152612bcc01526000818161061801528181611eb40152612509015260006103660152600081816102cd015281816103220152818161101c01528181612b620152612db701526145af6000f3fe608060405234801561001057600080fd5b50600436106102405760003560e01c80639a4575b911610145578063c4bffe2b116100bd578063dfadfa351161008c578063e8a1da1711610071578063e8a1da1714610700578063f2fde38b14610713578063fbf84dd71461072657600080fd5b8063dfadfa351461063c578063e0351e13146106da57600080fd5b8063c4bffe2b146105db578063c75eea9c146105f0578063cf7401f314610603578063dc0bd9711461061657600080fd5b8063acfecf9111610114578063b0f479a1116100f9578063b0f479a114610597578063b7946580146105b5578063c0d78655146105c857600080fd5b8063acfecf9114610515578063af58d59f1461052857600080fd5b80639a4575b9146104b85780639fdf13ff146104d8578063a42a7b8b146104e0578063a7cd63b71461050057600080fd5b806354c8a4f3116101d85780636d3d1a58116101a75780637d54534e1161018c5780637d54534e146104745780638926f54f146104875780638da5cb5b1461049a57600080fd5b80636d3d1a581461044e57806379ba50971461046c57600080fd5b806354c8a4f3146103c55780636155cda0146103d857806362ddd3c4146103ff5780636b716b0d1461041257600080fd5b8063240028e811610214578063240028e81461031257806324f65ee71461035f57806339077537146103905780634c5ef0ed146103b257600080fd5b806241d3c11461024557806301ffc9a71461025a578063181f5a771461028257806321df0da7146102cb575b600080fd5b610258610253366004613577565b61074d565b005b61026d6102683660046135ec565b6108ea565b60405190151581526020015b60405180910390f35b6102be6040518060400160405280601381526020017f55534443546f6b656e506f6f6c20312e352e310000000000000000000000000081525081565b6040516102799190613692565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610279565b61026d6103203660046136c7565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff90811691161490565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610279565b6103a361039e3660046136e4565b6109cf565b60405190518152602001610279565b61026d6103c0366004613736565b610bb4565b6102586103d3366004613807565b610bfe565b6102ed7f000000000000000000000000000000000000000000000000000000000000000081565b61025861040d366004613736565b610c79565b6104397f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610279565b60095473ffffffffffffffffffffffffffffffffffffffff166102ed565b610258610d11565b6102586104823660046136c7565b610ddf565b61026d610495366004613873565b610e60565b60015473ffffffffffffffffffffffffffffffffffffffff166102ed565b6104cb6104c6366004613890565b610e77565b60405161027991906138cb565b610439600081565b6104f36104ee366004613873565b6111b7565b6040516102799190613922565b610508611322565b60405161027991906139a4565b610258610523366004613736565b611333565b61053b610536366004613873565b61144b565b604051610279919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b60045473ffffffffffffffffffffffffffffffffffffffff166102ed565b6102be6105c3366004613873565b611520565b6102586105d63660046136c7565b6115d0565b6105e36116a4565b60405161027991906139fe565b61053b6105fe366004613873565b61175c565b610258610611366004613b8b565b61182e565b7f00000000000000000000000000000000000000000000000000000000000000006102ed565b6106b061064a366004613873565b60408051606080820183526000808352602080840182905292840181905267ffffffffffffffff949094168452600a82529282902082519384018352805484526001015463ffffffff811691840191909152640100000000900460ff1615159082015290565b604080518251815260208084015163ffffffff169082015291810151151590820152606001610279565b7f000000000000000000000000000000000000000000000000000000000000000061026d565b61025861070e366004613807565b6118b2565b6102586107213660046136c7565b611dc4565b6102ed7f000000000000000000000000000000000000000000000000000000000000000081565b610755611dd8565b60005b818110156108ac57600083838381811061077457610774613bd2565b90506080020180360381019061078a9190613c15565b805190915015806107a75750604081015167ffffffffffffffff16155b1561081657604080517fa087bd2900000000000000000000000000000000000000000000000000000000815282516004820152602083015163ffffffff1660248201529082015167ffffffffffffffff1660448201526060820151151560648201526084015b60405180910390fd5b60408051606080820183528351825260208085015163ffffffff9081168285019081529286015115158486019081529585015167ffffffffffffffff166000908152600a90925293902091518255516001918201805494511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909516919093161792909217905501610758565b507f1889010d2535a0ab1643678d1da87fbbe8b87b2f585b47ddb72ec622aef9ee5682826040516108de929190613c8f565b60405180910390a15050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167faff2afbf00000000000000000000000000000000000000000000000000000000148061097d57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e64dd2900000000000000000000000000000000000000000000000000000000145b806109c957507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b6040805160208101909152600081526109e782611e2b565b60006109f660c0840184613d16565b810190610a039190613d7b565b90506000610a1460e0850185613d16565b810190610a219190613e48565b9050610a3181600001518361204f565b805160208201516040517f57ecfd2800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016926357ecfd2892610aa892600401613ed9565b6020604051808303816000875af1158015610ac7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aeb9190613efe565b610b21576040517fbf969f2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b3160608501604086016136c7565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f08660600135604051610b9391815260200190565b60405180910390a35050604080516020810190915260609092013582525090565b6000610bf68383604051610bc9929190613f1b565b604080519182900390912067ffffffffffffffff8716600090815260076020529190912060050190612200565b949350505050565b610c06611dd8565b610c738484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061221b92505050565b50505050565b610c81611dd8565b610c8a83610e60565b610ccc576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8416600482015260240161080d565b610d0c8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123d192505050565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d62576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610de7611dd8565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d091749060200160405180910390a150565b60006109c9600567ffffffffffffffff8416612200565b6040805180820190915260608082526020820152610e94826124cb565b6000600a81610ea96040860160208701613873565b67ffffffffffffffff168152602080820192909252604090810160002081516060810183528154815260019091015463ffffffff81169382019390935264010000000090920460ff161515908201819052909150610f5057610f116040840160208501613873565b6040517fd201c48a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015260240161080d565b610f5a8380613d16565b9050602014610fa157610f6d8380613d16565b6040517fa3c8cf0900000000000000000000000000000000000000000000000000000000815260040161080d929190613f74565b6000610fad8480613d16565b810190610fba9190613f88565b602083015183516040517ff856ddb60000000000000000000000000000000000000000000000000000000081526060880135600482015263ffffffff90921660248301526044820183905273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116606484015260848301919091529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063f856ddb69060a4016020604051808303816000875af115801561109b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bf9190613fa1565b6040516060870135815290915033907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a2604051806040016040528061111c8760200160208101906105c39190613873565b815260408051808201825267ffffffffffffffff851680825263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602093840190815284518085019390935251169281019290925290910190606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905295945050505050565b67ffffffffffffffff81166000908152600760205260408120606091906111e090600501612657565b90506000815167ffffffffffffffff8111156111fe576111fe613a40565b60405190808252806020026020018201604052801561123157816020015b606081526020019060019003908161121c5790505b50905060005b825181101561131a576008600084838151811061125657611256613bd2565b60200260200101518152602001908152602001600020805461127790613fbe565b80601f01602080910402602001604051908101604052809291908181526020018280546112a390613fbe565b80156112f05780601f106112c5576101008083540402835291602001916112f0565b820191906000526020600020905b8154815290600101906020018083116112d357829003601f168201915b505050505082828151811061130757611307613bd2565b6020908102919091010152600101611237565b509392505050565b606061132e6002612657565b905090565b61133b611dd8565b61134483610e60565b611386576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8416600482015260240161080d565b6113c68282604051611399929190613f1b565b604080519182900390912067ffffffffffffffff8616600090815260076020529190912060050190612664565b611402578282826040517f74f23c7c00000000000000000000000000000000000000000000000000000000815260040161080d93929190614011565b8267ffffffffffffffff167f52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76838360405161143e929190613f74565b60405180910390a2505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845260028201546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260039091015480841660608301529190910490911660808201526109c990612670565b67ffffffffffffffff8116600090815260076020526040902060040180546060919061154b90613fbe565b80601f016020809104026020016040519081016040528092919081815260200182805461157790613fbe565b80156115c45780601f10611599576101008083540402835291602001916115c4565b820191906000526020600020905b8154815290600101906020018083116115a757829003601f168201915b50505050509050919050565b6115d8611dd8565b73ffffffffffffffffffffffffffffffffffffffff8116611625576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f168491016108de565b606060006116b26005612657565b90506000815167ffffffffffffffff8111156116d0576116d0613a40565b6040519080825280602002602001820160405280156116f9578160200160208202803683370190505b50905060005b82518110156117555782818151811061171a5761171a613bd2565b602002602001015182828151811061173457611734613bd2565b67ffffffffffffffff909216602092830291909101909101526001016116ff565b5092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915267ffffffffffffffff8216600090815260076020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526109c990612670565b60095473ffffffffffffffffffffffffffffffffffffffff16331480159061186e575060015473ffffffffffffffffffffffffffffffffffffffff163314155b156118a7576040517f8e4a23d600000000000000000000000000000000000000000000000000000000815233600482015260240161080d565b610d0c838383612722565b6118ba611dd8565b60005b83811015611aa75760008585838181106118d9576118d9613bd2565b90506020020160208101906118ee9190613873565b9050611905600567ffffffffffffffff8316612664565b611947576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161080d565b67ffffffffffffffff8116600090815260076020526040812061196c90600501612657565b905060005b81518110156119d8576119cf82828151811061198f5761198f613bd2565b6020026020010151600760008667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050161266490919063ffffffff16565b50600101611971565b5067ffffffffffffffff8216600090815260076020526040812080547fffffffffffffffffffffff00000000000000000000000000000000000000000090811682556001820183905560028201805490911690556003810182905590611a41600483018261350a565b6005820160008181611a538282613544565b505060405167ffffffffffffffff871681527f5204aec90a3c794d8e90fded8b46ae9c7c552803e7e832e0c1d358396d85991694506020019250611a95915050565b60405180910390a150506001016118bd565b5060005b81811015611dbd576000838383818110611ac757611ac7613bd2565b9050602002810190611ad99190614035565b611ae290614112565b9050611af38160600151600061280c565b611b028160800151600061280c565b806040015151600003611b41576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051611b599060059067ffffffffffffffff16612949565b611b9e5780516040517f1d5ad3c500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff909116600482015260240161080d565b805167ffffffffffffffff16600090815260076020908152604091829020825160a08082018552606080870180518601516fffffffffffffffffffffffffffffffff90811680865263ffffffff42168689018190528351511515878b0181905284518a0151841686890181905294518b0151841660809889018190528954740100000000000000000000000000000000000000009283027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7001000000000000000000000000000000008087027fffffffffffffffffffffffff000000000000000000000000000000000000000094851690981788178216929092178d5592810290971760018c01558c519889018d52898e0180518d01518716808b528a8e019590955280515115158a8f018190528151909d01518716988a01899052518d0151909516979098018790526002890180549a909102999093161717909416959095179092559092029091176003820155908201516004820190611d21908261421a565b5060005b826020015151811015611d6557611d5d836000015184602001518381518110611d5057611d50613bd2565b60200260200101516123d1565b600101611d25565b507f8d340f17e19058004c20453540862a9c62778504476f6756755cb33bcd6c38c28260000151836040015184606001518560800151604051611dab9493929190614334565b60405180910390a15050600101611aab565b5050505050565b611dcc611dd8565b611dd581612955565b50565b60015473ffffffffffffffffffffffffffffffffffffffff163314611e29576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611e3e61032060a08301608084016136c7565b611e9d57611e5260a08201608083016136c7565b6040517f961c9a4f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240161080d565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb611ee96040840160208501613873565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa158015611f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7e9190613efe565b15611fb5576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611fcd611fc86040830160208401613873565b612a19565b611fed611fe06040830160208401613873565b6103c060a0840184613d16565b61203257611ffe60a0820182613d16565b6040517f24eb47e500000000000000000000000000000000000000000000000000000000815260040161080d929190613f74565b611dd56120456040830160208401613873565b8260600135612b3f565b600482015163ffffffff81161561209a576040517f68d2f8d600000000000000000000000000000000000000000000000000000000815263ffffffff8216600482015260240161080d565b6008830151600c8401516014850151602085015163ffffffff8085169116146121055760208501516040517fe366a11700000000000000000000000000000000000000000000000000000000815263ffffffff9182166004820152908416602482015260440161080d565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168263ffffffff161461219a576040517f77e4802600000000000000000000000000000000000000000000000000000000815263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301528316602482015260440161080d565b845167ffffffffffffffff8281169116146121f85784516040517ff917ffea00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff9182166004820152908216602482015260440161080d565b505050505050565b600081815260018301602052604081205415155b9392505050565b7f0000000000000000000000000000000000000000000000000000000000000000612272576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561230857600083828151811061229257612292613bd2565b602002602001015190506122b0816002612b8690919063ffffffff16565b156122ff5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50600101612275565b5060005b8151811015610d0c57600082828151811061232957612329613bd2565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361236d57506123c9565b612378600282612ba8565b156123c75760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b60010161230c565b805160000361240c576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805160208083019190912067ffffffffffffffff841660009081526007909252604090912061243e9060050182612949565b6124785782826040517f393b8ad200000000000000000000000000000000000000000000000000000000815260040161080d9291906143cd565b6000818152600860205260409020612490838261421a565b508267ffffffffffffffff167f7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea8360405161143e9190613692565b6124de61032060a08301608084016136c7565b6124f257611e5260a08201608083016136c7565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016632cbc26bb61253e6040840160208501613873565b60405160e083901b7fffffffff0000000000000000000000000000000000000000000000000000000016815260809190911b77ffffffffffffffff00000000000000000000000000000000166004820152602401602060405180830381865afa1580156125af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d39190613efe565b1561260a576040517f53ad11d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61262261261d60608301604084016136c7565b612bca565b61263a6126356040830160208401613873565b612c49565b611dd561264d6040830160208401613873565b8260600135612d97565b6060600061221483612ddb565b60006122148383612e36565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526126fe82606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426126e2919061441f565b85608001516fffffffffffffffffffffffffffffffff16612f29565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b61272b83610e60565b61276d576040517f1e670e4b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8416600482015260240161080d565b61277882600061280c565b67ffffffffffffffff8316600090815260076020526040902061279b9083612f51565b6127a681600061280c565b67ffffffffffffffff831660009081526007602052604090206127cc9060020182612f51565b7f0350d63aa5f270e01729d00d627eeb8f3429772b1818c016c66a588a864f912b8383836040516127ff93929190614432565b60405180910390a1505050565b8151156128d75781602001516fffffffffffffffffffffffffffffffff1682604001516fffffffffffffffffffffffffffffffff16101580612862575060408201516fffffffffffffffffffffffffffffffff16155b1561289b57816040517f8020d12400000000000000000000000000000000000000000000000000000000815260040161080d91906144b5565b80156128d3576040517f433fc33d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b60408201516fffffffffffffffffffffffffffffffff16151580612910575060208201516fffffffffffffffffffffffffffffffff1615155b156128d357816040517fd68af9cc00000000000000000000000000000000000000000000000000000000815260040161080d91906144b5565b600061221483836130f3565b3373ffffffffffffffffffffffffffffffffffffffff8216036129a4576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b612a2281610e60565b612a64576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161080d565b600480546040517f83826b2b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925233602483015273ffffffffffffffffffffffffffffffffffffffff16906383826b2b90604401602060405180830381865afa158015612ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b079190613efe565b611dd5576040517f728fe07b00000000000000000000000000000000000000000000000000000000815233600482015260240161080d565b67ffffffffffffffff821660009081526007602052604090206128d390600201827f0000000000000000000000000000000000000000000000000000000000000000613142565b60006122148373ffffffffffffffffffffffffffffffffffffffff8416612e36565b60006122148373ffffffffffffffffffffffffffffffffffffffff84166130f3565b7f000000000000000000000000000000000000000000000000000000000000000015611dd557612bfb6002826134c5565b611dd5576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161080d565b612c5281610e60565b612c94576040517fa9902c7e00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8216600482015260240161080d565b600480546040517fa8d87a3b00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84169281019290925273ffffffffffffffffffffffffffffffffffffffff169063a8d87a3b90602401602060405180830381865afa158015612d0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d3191906144f1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dd5576040517f728fe07b00000000000000000000000000000000000000000000000000000000815233600482015260240161080d565b67ffffffffffffffff821660009081526007602052604090206128d390827f0000000000000000000000000000000000000000000000000000000000000000613142565b6060816000018054806020026020016040519081016040528092919081815260200182805480156115c457602002820191906000526020600020905b815481526020019060010190808311612e175750505050509050919050565b60008181526001830160205260408120548015612f1f576000612e5a60018361441f565b8554909150600090612e6e9060019061441f565b9050808214612ed3576000866000018281548110612e8e57612e8e613bd2565b9060005260206000200154905080876000018481548110612eb157612eb1613bd2565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ee457612ee461450e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109c9565b60009150506109c9565b6000612f4885612f39848661453d565b612f439087614554565b6134f4565b95945050505050565b8154600090612f7a90700100000000000000000000000000000000900463ffffffff164261441f565b9050801561301c5760018301548354612fc2916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612f29565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354613042916fffffffffffffffffffffffffffffffff90811691166134f4565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19906127ff9084906144b5565b600081815260018301602052604081205461313a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109c9565b5060006109c9565b825474010000000000000000000000000000000000000000900460ff161580613169575081155b1561317357505050565b825460018401546fffffffffffffffffffffffffffffffff808316929116906000906131b990700100000000000000000000000000000000900463ffffffff164261441f565b9050801561327957818311156131fb576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546132359083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612f29565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156133305773ffffffffffffffffffffffffffffffffffffffff84166132d8576040517ff94ebcd1000000000000000000000000000000000000000000000000000000008152600481018390526024810186905260440161080d565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff8516604482015260640161080d565b848310156134435760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16906000908290613374908261441f565b61337e878a61441f565b6133889190614554565b6133929190614567565b905073ffffffffffffffffffffffffffffffffffffffff86166133eb576040517f15279c08000000000000000000000000000000000000000000000000000000008152600481018290526024810186905260440161080d565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff8716604482015260640161080d565b61344d858461441f565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515612214565b60008183106135035781612214565b5090919050565b50805461351690613fbe565b6000825580601f10613526575050565b601f016020900490600052602060002090810190611dd5919061355e565b5080546000825590600052602060002090810190611dd591905b5b80821115613573576000815560010161355f565b5090565b6000806020838503121561358a57600080fd5b823567ffffffffffffffff808211156135a257600080fd5b818501915085601f8301126135b657600080fd5b8135818111156135c557600080fd5b8660208260071b85010111156135da57600080fd5b60209290920196919550909350505050565b6000602082840312156135fe57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461221457600080fd5b6000815180845260005b8181101561365457602081850181015186830182015201613638565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000612214602083018461362e565b73ffffffffffffffffffffffffffffffffffffffff81168114611dd557600080fd5b6000602082840312156136d957600080fd5b8135612214816136a5565b6000602082840312156136f657600080fd5b813567ffffffffffffffff81111561370d57600080fd5b8201610100818503121561221457600080fd5b67ffffffffffffffff81168114611dd557600080fd5b60008060006040848603121561374b57600080fd5b833561375681613720565b9250602084013567ffffffffffffffff8082111561377357600080fd5b818601915086601f83011261378757600080fd5b81358181111561379657600080fd5b8760208285010111156137a857600080fd5b6020830194508093505050509250925092565b60008083601f8401126137cd57600080fd5b50813567ffffffffffffffff8111156137e557600080fd5b6020830191508360208260051b850101111561380057600080fd5b9250929050565b6000806000806040858703121561381d57600080fd5b843567ffffffffffffffff8082111561383557600080fd5b613841888389016137bb565b9096509450602087013591508082111561385a57600080fd5b50613867878288016137bb565b95989497509550505050565b60006020828403121561388557600080fd5b813561221481613720565b6000602082840312156138a257600080fd5b813567ffffffffffffffff8111156138b957600080fd5b820160a0818503121561221457600080fd5b6020815260008251604060208401526138e7606084018261362e565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848303016040850152612f48828261362e565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015613997577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc088860301845261398585835161362e565b9450928501929085019060010161394b565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156139f257835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016139c0565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156139f257835167ffffffffffffffff1683529284019291840191600101613a1a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613a9257613a92613a40565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613adf57613adf613a40565b604052919050565b8015158114611dd557600080fd5b80356fffffffffffffffffffffffffffffffff81168114613b1557600080fd5b919050565b600060608284031215613b2c57600080fd5b6040516060810181811067ffffffffffffffff82111715613b4f57613b4f613a40565b6040529050808235613b6081613ae7565b8152613b6e60208401613af5565b6020820152613b7f60408401613af5565b60408201525092915050565b600080600060e08486031215613ba057600080fd5b8335613bab81613720565b9250613bba8560208601613b1a565b9150613bc98560808601613b1a565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b803563ffffffff81168114613b1557600080fd5b600060808284031215613c2757600080fd5b6040516080810181811067ffffffffffffffff82111715613c4a57613c4a613a40565b60405282358152613c5d60208401613c01565b60208201526040830135613c7081613720565b60408201526060830135613c8381613ae7565b60608201529392505050565b6020808252818101839052600090604080840186845b87811015613d09578135835263ffffffff613cc1868401613c01565b168584015283820135613cd381613720565b67ffffffffffffffff1683850152606082810135613cf081613ae7565b1515908401526080928301929190910190600101613ca5565b5090979650505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112613d4b57600080fd5b83018035915067ffffffffffffffff821115613d6657600080fd5b60200191503681900382131561380057600080fd5b600060408284031215613d8d57600080fd5b613d95613a6f565b8235613da081613720565b8152613dae60208401613c01565b60208201529392505050565b600082601f830112613dcb57600080fd5b813567ffffffffffffffff811115613de557613de5613a40565b613e1660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601613a98565b818152846020838601011115613e2b57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215613e5a57600080fd5b813567ffffffffffffffff80821115613e7257600080fd5b9083019060408286031215613e8657600080fd5b613e8e613a6f565b823582811115613e9d57600080fd5b613ea987828601613dba565b825250602083013582811115613ebe57600080fd5b613eca87828601613dba565b60208301525095945050505050565b604081526000613eec604083018561362e565b8281036020840152612f48818561362e565b600060208284031215613f1057600080fd5b815161221481613ae7565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b602081526000610bf6602083018486613f2b565b600060208284031215613f9a57600080fd5b5035919050565b600060208284031215613fb357600080fd5b815161221481613720565b600181811c90821680613fd257607f821691505b60208210810361400b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b67ffffffffffffffff84168152604060208201526000612f48604083018486613f2b565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261406957600080fd5b9190910192915050565b600082601f83011261408457600080fd5b8135602067ffffffffffffffff808311156140a1576140a1613a40565b8260051b6140b0838201613a98565b93845285810183019383810190888611156140ca57600080fd5b84880192505b85831015614106578235848111156140e85760008081fd5b6140f68a87838c0101613dba565b83525091840191908401906140d0565b98975050505050505050565b6000610120823603121561412557600080fd5b60405160a0810167ffffffffffffffff828210818311171561414957614149613a40565b816040528435915061415a82613720565b9082526020840135908082111561417057600080fd5b61417c36838701614073565b6020840152604085013591508082111561419557600080fd5b506141a236828601613dba565b6040830152506141b53660608501613b1a565b60608201526141c73660c08501613b1a565b608082015292915050565b601f821115610d0c576000816000526020600020601f850160051c810160208610156141fb5750805b601f850160051c820191505b818110156121f857828155600101614207565b815167ffffffffffffffff81111561423457614234613a40565b614248816142428454613fbe565b846141d2565b602080601f83116001811461429b57600084156142655750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556121f8565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156142e8578886015182559484019460019091019084016142c9565b508582101561432457878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600061010067ffffffffffffffff871683528060208401526143588184018761362e565b8551151560408581019190915260208701516fffffffffffffffffffffffffffffffff90811660608701529087015116608085015291506143969050565b8251151560a083015260208301516fffffffffffffffffffffffffffffffff90811660c084015260408401511660e0830152612f48565b67ffffffffffffffff83168152604060208201526000610bf6604083018461362e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156109c9576109c96143f0565b67ffffffffffffffff8416815260e0810161447e60208301858051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b82511515608083015260208301516fffffffffffffffffffffffffffffffff90811660a084015260408401511660c0830152610bf6565b606081016109c982848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b60006020828403121561450357600080fd5b8151612214816136a5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b80820281158282048414176109c9576109c96143f0565b808201808211156109c9576109c96143f0565b60008261459d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea164736f6c6343000818000a", } var USDCTokenPoolABI = USDCTokenPoolMetaData.ABI @@ -389,26 +388,26 @@ func (_USDCTokenPool *USDCTokenPoolCallerSession) GetRateLimitAdmin() (common.Ad return _USDCTokenPool.Contract.GetRateLimitAdmin(&_USDCTokenPool.CallOpts) } -func (_USDCTokenPool *USDCTokenPoolCaller) GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { +func (_USDCTokenPool *USDCTokenPoolCaller) GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) { var out []interface{} - err := _USDCTokenPool.contract.Call(opts, &out, "getRemotePool", remoteChainSelector) + err := _USDCTokenPool.contract.Call(opts, &out, "getRemotePools", remoteChainSelector) if err != nil { - return *new([]byte), err + return *new([][]byte), err } - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + out0 := *abi.ConvertType(out[0], new([][]byte)).(*[][]byte) return out0, err } -func (_USDCTokenPool *USDCTokenPoolSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _USDCTokenPool.Contract.GetRemotePool(&_USDCTokenPool.CallOpts, remoteChainSelector) +func (_USDCTokenPool *USDCTokenPoolSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _USDCTokenPool.Contract.GetRemotePools(&_USDCTokenPool.CallOpts, remoteChainSelector) } -func (_USDCTokenPool *USDCTokenPoolCallerSession) GetRemotePool(remoteChainSelector uint64) ([]byte, error) { - return _USDCTokenPool.Contract.GetRemotePool(&_USDCTokenPool.CallOpts, remoteChainSelector) +func (_USDCTokenPool *USDCTokenPoolCallerSession) GetRemotePools(remoteChainSelector uint64) ([][]byte, error) { + return _USDCTokenPool.Contract.GetRemotePools(&_USDCTokenPool.CallOpts, remoteChainSelector) } func (_USDCTokenPool *USDCTokenPoolCaller) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) { @@ -521,6 +520,28 @@ func (_USDCTokenPool *USDCTokenPoolCallerSession) GetToken() (common.Address, er return _USDCTokenPool.Contract.GetToken(&_USDCTokenPool.CallOpts) } +func (_USDCTokenPool *USDCTokenPoolCaller) GetTokenDecimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _USDCTokenPool.contract.Call(opts, &out, "getTokenDecimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_USDCTokenPool *USDCTokenPoolSession) GetTokenDecimals() (uint8, error) { + return _USDCTokenPool.Contract.GetTokenDecimals(&_USDCTokenPool.CallOpts) +} + +func (_USDCTokenPool *USDCTokenPoolCallerSession) GetTokenDecimals() (uint8, error) { + return _USDCTokenPool.Contract.GetTokenDecimals(&_USDCTokenPool.CallOpts) +} + func (_USDCTokenPool *USDCTokenPoolCaller) ILocalDomainIdentifier(opts *bind.CallOpts) (uint32, error) { var out []interface{} err := _USDCTokenPool.contract.Call(opts, &out, "i_localDomainIdentifier") @@ -587,6 +608,28 @@ func (_USDCTokenPool *USDCTokenPoolCallerSession) ITokenMessenger() (common.Addr return _USDCTokenPool.Contract.ITokenMessenger(&_USDCTokenPool.CallOpts) } +func (_USDCTokenPool *USDCTokenPoolCaller) IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + var out []interface{} + err := _USDCTokenPool.contract.Call(opts, &out, "isRemotePool", remoteChainSelector, remotePoolAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_USDCTokenPool *USDCTokenPoolSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _USDCTokenPool.Contract.IsRemotePool(&_USDCTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + +func (_USDCTokenPool *USDCTokenPoolCallerSession) IsRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) { + return _USDCTokenPool.Contract.IsRemotePool(&_USDCTokenPool.CallOpts, remoteChainSelector, remotePoolAddress) +} + func (_USDCTokenPool *USDCTokenPoolCaller) IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) { var out []interface{} err := _USDCTokenPool.contract.Call(opts, &out, "isSupportedChain", remoteChainSelector) @@ -709,6 +752,18 @@ func (_USDCTokenPool *USDCTokenPoolTransactorSession) AcceptOwnership() (*types. return _USDCTokenPool.Contract.AcceptOwnership(&_USDCTokenPool.TransactOpts) } +func (_USDCTokenPool *USDCTokenPoolTransactor) AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.contract.Transact(opts, "addRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_USDCTokenPool *USDCTokenPoolSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.Contract.AddRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_USDCTokenPool *USDCTokenPoolTransactorSession) AddRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.Contract.AddRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_USDCTokenPool *USDCTokenPoolTransactor) ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) { return _USDCTokenPool.contract.Transact(opts, "applyAllowListUpdates", removes, adds) } @@ -721,16 +776,16 @@ func (_USDCTokenPool *USDCTokenPoolTransactorSession) ApplyAllowListUpdates(remo return _USDCTokenPool.Contract.ApplyAllowListUpdates(&_USDCTokenPool.TransactOpts, removes, adds) } -func (_USDCTokenPool *USDCTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _USDCTokenPool.contract.Transact(opts, "applyChainUpdates", chains) +func (_USDCTokenPool *USDCTokenPoolTransactor) ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _USDCTokenPool.contract.Transact(opts, "applyChainUpdates", remoteChainSelectorsToRemove, chainsToAdd) } -func (_USDCTokenPool *USDCTokenPoolSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _USDCTokenPool.Contract.ApplyChainUpdates(&_USDCTokenPool.TransactOpts, chains) +func (_USDCTokenPool *USDCTokenPoolSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _USDCTokenPool.Contract.ApplyChainUpdates(&_USDCTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } -func (_USDCTokenPool *USDCTokenPoolTransactorSession) ApplyChainUpdates(chains []TokenPoolChainUpdate) (*types.Transaction, error) { - return _USDCTokenPool.Contract.ApplyChainUpdates(&_USDCTokenPool.TransactOpts, chains) +func (_USDCTokenPool *USDCTokenPoolTransactorSession) ApplyChainUpdates(remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) { + return _USDCTokenPool.Contract.ApplyChainUpdates(&_USDCTokenPool.TransactOpts, remoteChainSelectorsToRemove, chainsToAdd) } func (_USDCTokenPool *USDCTokenPoolTransactor) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) { @@ -757,6 +812,18 @@ func (_USDCTokenPool *USDCTokenPoolTransactorSession) ReleaseOrMint(releaseOrMin return _USDCTokenPool.Contract.ReleaseOrMint(&_USDCTokenPool.TransactOpts, releaseOrMintIn) } +func (_USDCTokenPool *USDCTokenPoolTransactor) RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.contract.Transact(opts, "removeRemotePool", remoteChainSelector, remotePoolAddress) +} + +func (_USDCTokenPool *USDCTokenPoolSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.Contract.RemoveRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + +func (_USDCTokenPool *USDCTokenPoolTransactorSession) RemoveRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { + return _USDCTokenPool.Contract.RemoveRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) +} + func (_USDCTokenPool *USDCTokenPoolTransactor) SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) { return _USDCTokenPool.contract.Transact(opts, "setChainRateLimiterConfig", remoteChainSelector, outboundConfig, inboundConfig) } @@ -793,18 +860,6 @@ func (_USDCTokenPool *USDCTokenPoolTransactorSession) SetRateLimitAdmin(rateLimi return _USDCTokenPool.Contract.SetRateLimitAdmin(&_USDCTokenPool.TransactOpts, rateLimitAdmin) } -func (_USDCTokenPool *USDCTokenPoolTransactor) SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _USDCTokenPool.contract.Transact(opts, "setRemotePool", remoteChainSelector, remotePoolAddress) -} - -func (_USDCTokenPool *USDCTokenPoolSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _USDCTokenPool.Contract.SetRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - -func (_USDCTokenPool *USDCTokenPoolTransactorSession) SetRemotePool(remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) { - return _USDCTokenPool.Contract.SetRemotePool(&_USDCTokenPool.TransactOpts, remoteChainSelector, remotePoolAddress) -} - func (_USDCTokenPool *USDCTokenPoolTransactor) SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) { return _USDCTokenPool.contract.Transact(opts, "setRouter", newRouter) } @@ -2435,6 +2490,123 @@ func (_USDCTokenPool *USDCTokenPoolFilterer) ParseOwnershipTransferred(log types return event, nil } +type USDCTokenPoolRateLimitAdminSetIterator struct { + Event *USDCTokenPoolRateLimitAdminSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *USDCTokenPoolRateLimitAdminSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(USDCTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(USDCTokenPoolRateLimitAdminSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *USDCTokenPoolRateLimitAdminSetIterator) Error() error { + return it.fail +} + +func (it *USDCTokenPoolRateLimitAdminSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type USDCTokenPoolRateLimitAdminSet struct { + RateLimitAdmin common.Address + Raw types.Log +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) FilterRateLimitAdminSet(opts *bind.FilterOpts) (*USDCTokenPoolRateLimitAdminSetIterator, error) { + + logs, sub, err := _USDCTokenPool.contract.FilterLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return &USDCTokenPoolRateLimitAdminSetIterator{contract: _USDCTokenPool.contract, event: "RateLimitAdminSet", logs: logs, sub: sub}, nil +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRateLimitAdminSet) (event.Subscription, error) { + + logs, sub, err := _USDCTokenPool.contract.WatchLogs(opts, "RateLimitAdminSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(USDCTokenPoolRateLimitAdminSet) + if err := _USDCTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) ParseRateLimitAdminSet(log types.Log) (*USDCTokenPoolRateLimitAdminSet, error) { + event := new(USDCTokenPoolRateLimitAdminSet) + if err := _USDCTokenPool.contract.UnpackLog(event, "RateLimitAdminSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type USDCTokenPoolReleasedIterator struct { Event *USDCTokenPoolReleased @@ -2572,8 +2744,136 @@ func (_USDCTokenPool *USDCTokenPoolFilterer) ParseReleased(log types.Log) (*USDC return event, nil } -type USDCTokenPoolRemotePoolSetIterator struct { - Event *USDCTokenPoolRemotePoolSet +type USDCTokenPoolRemotePoolAddedIterator struct { + Event *USDCTokenPoolRemotePoolAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *USDCTokenPoolRemotePoolAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(USDCTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(USDCTokenPoolRemotePoolAdded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *USDCTokenPoolRemotePoolAddedIterator) Error() error { + return it.fail +} + +func (it *USDCTokenPoolRemotePoolAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type USDCTokenPoolRemotePoolAdded struct { + RemoteChainSelector uint64 + RemotePoolAddress []byte + Raw types.Log +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolAddedIterator, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _USDCTokenPool.contract.FilterLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return &USDCTokenPoolRemotePoolAddedIterator{contract: _USDCTokenPool.contract, event: "RemotePoolAdded", logs: logs, sub: sub}, nil +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) { + + var remoteChainSelectorRule []interface{} + for _, remoteChainSelectorItem := range remoteChainSelector { + remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) + } + + logs, sub, err := _USDCTokenPool.contract.WatchLogs(opts, "RemotePoolAdded", remoteChainSelectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(USDCTokenPoolRemotePoolAdded) + if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_USDCTokenPool *USDCTokenPoolFilterer) ParseRemotePoolAdded(log types.Log) (*USDCTokenPoolRemotePoolAdded, error) { + event := new(USDCTokenPoolRemotePoolAdded) + if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type USDCTokenPoolRemotePoolRemovedIterator struct { + Event *USDCTokenPoolRemotePoolRemoved contract *bind.BoundContract event string @@ -2584,7 +2884,7 @@ type USDCTokenPoolRemotePoolSetIterator struct { fail error } -func (it *USDCTokenPoolRemotePoolSetIterator) Next() bool { +func (it *USDCTokenPoolRemotePoolRemovedIterator) Next() bool { if it.fail != nil { return false @@ -2593,7 +2893,7 @@ func (it *USDCTokenPoolRemotePoolSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(USDCTokenPoolRemotePoolSet) + it.Event = new(USDCTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2608,7 +2908,7 @@ func (it *USDCTokenPoolRemotePoolSetIterator) Next() bool { select { case log := <-it.logs: - it.Event = new(USDCTokenPoolRemotePoolSet) + it.Event = new(USDCTokenPoolRemotePoolRemoved) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2623,44 +2923,43 @@ func (it *USDCTokenPoolRemotePoolSetIterator) Next() bool { } } -func (it *USDCTokenPoolRemotePoolSetIterator) Error() error { +func (it *USDCTokenPoolRemotePoolRemovedIterator) Error() error { return it.fail } -func (it *USDCTokenPoolRemotePoolSetIterator) Close() error { +func (it *USDCTokenPoolRemotePoolRemovedIterator) Close() error { it.sub.Unsubscribe() return nil } -type USDCTokenPoolRemotePoolSet struct { +type USDCTokenPoolRemotePoolRemoved struct { RemoteChainSelector uint64 - PreviousPoolAddress []byte RemotePoolAddress []byte Raw types.Log } -func (_USDCTokenPool *USDCTokenPoolFilterer) FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolSetIterator, error) { +func (_USDCTokenPool *USDCTokenPoolFilterer) FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolRemovedIterator, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _USDCTokenPool.contract.FilterLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _USDCTokenPool.contract.FilterLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } - return &USDCTokenPoolRemotePoolSetIterator{contract: _USDCTokenPool.contract, event: "RemotePoolSet", logs: logs, sub: sub}, nil + return &USDCTokenPoolRemotePoolRemovedIterator{contract: _USDCTokenPool.contract, event: "RemotePoolRemoved", logs: logs, sub: sub}, nil } -func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) { +func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) { var remoteChainSelectorRule []interface{} for _, remoteChainSelectorItem := range remoteChainSelector { remoteChainSelectorRule = append(remoteChainSelectorRule, remoteChainSelectorItem) } - logs, sub, err := _USDCTokenPool.contract.WatchLogs(opts, "RemotePoolSet", remoteChainSelectorRule) + logs, sub, err := _USDCTokenPool.contract.WatchLogs(opts, "RemotePoolRemoved", remoteChainSelectorRule) if err != nil { return nil, err } @@ -2670,8 +2969,8 @@ func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRemotePoolSet(opts *bind.Watch select { case log := <-logs: - event := new(USDCTokenPoolRemotePoolSet) - if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { + event := new(USDCTokenPoolRemotePoolRemoved) + if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return err } event.Raw = log @@ -2692,9 +2991,9 @@ func (_USDCTokenPool *USDCTokenPoolFilterer) WatchRemotePoolSet(opts *bind.Watch }), nil } -func (_USDCTokenPool *USDCTokenPoolFilterer) ParseRemotePoolSet(log types.Log) (*USDCTokenPoolRemotePoolSet, error) { - event := new(USDCTokenPoolRemotePoolSet) - if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolSet", log); err != nil { +func (_USDCTokenPool *USDCTokenPoolFilterer) ParseRemotePoolRemoved(log types.Log) (*USDCTokenPoolRemotePoolRemoved, error) { + event := new(USDCTokenPoolRemotePoolRemoved) + if err := _USDCTokenPool.contract.UnpackLog(event, "RemotePoolRemoved", log); err != nil { return nil, err } event.Raw = log @@ -2964,10 +3263,14 @@ func (_USDCTokenPool *USDCTokenPool) ParseLog(log types.Log) (generated.AbigenLo return _USDCTokenPool.ParseOwnershipTransferRequested(log) case _USDCTokenPool.abi.Events["OwnershipTransferred"].ID: return _USDCTokenPool.ParseOwnershipTransferred(log) + case _USDCTokenPool.abi.Events["RateLimitAdminSet"].ID: + return _USDCTokenPool.ParseRateLimitAdminSet(log) case _USDCTokenPool.abi.Events["Released"].ID: return _USDCTokenPool.ParseReleased(log) - case _USDCTokenPool.abi.Events["RemotePoolSet"].ID: - return _USDCTokenPool.ParseRemotePoolSet(log) + case _USDCTokenPool.abi.Events["RemotePoolAdded"].ID: + return _USDCTokenPool.ParseRemotePoolAdded(log) + case _USDCTokenPool.abi.Events["RemotePoolRemoved"].ID: + return _USDCTokenPool.ParseRemotePoolRemoved(log) case _USDCTokenPool.abi.Events["RouterUpdated"].ID: return _USDCTokenPool.ParseRouterUpdated(log) case _USDCTokenPool.abi.Events["TokensConsumed"].ID: @@ -3030,12 +3333,20 @@ func (USDCTokenPoolOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (USDCTokenPoolRateLimitAdminSet) Topic() common.Hash { + return common.HexToHash("0x44676b5284b809a22248eba0da87391d79098be38bb03154be88a58bf4d09174") +} + func (USDCTokenPoolReleased) Topic() common.Hash { return common.HexToHash("0x2d87480f50083e2b2759522a8fdda59802650a8055e609a7772cf70c07748f52") } -func (USDCTokenPoolRemotePoolSet) Topic() common.Hash { - return common.HexToHash("0xdb4d6220746a38cbc5335f7e108f7de80f482f4d23350253dfd0917df75a14bf") +func (USDCTokenPoolRemotePoolAdded) Topic() common.Hash { + return common.HexToHash("0x7d628c9a1796743d365ab521a8b2a4686e419b3269919dc9145ea2ce853b54ea") +} + +func (USDCTokenPoolRemotePoolRemoved) Topic() common.Hash { + return common.HexToHash("0x52d00ee4d9bd51b40168f2afc5848837288ce258784ad914278791464b3f4d76") } func (USDCTokenPoolRouterUpdated) Topic() common.Hash { @@ -3065,7 +3376,7 @@ type USDCTokenPoolInterface interface { GetRateLimitAdmin(opts *bind.CallOpts) (common.Address, error) - GetRemotePool(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) + GetRemotePools(opts *bind.CallOpts, remoteChainSelector uint64) ([][]byte, error) GetRemoteToken(opts *bind.CallOpts, remoteChainSelector uint64) ([]byte, error) @@ -3077,12 +3388,16 @@ type USDCTokenPoolInterface interface { GetToken(opts *bind.CallOpts) (common.Address, error) + GetTokenDecimals(opts *bind.CallOpts) (uint8, error) + ILocalDomainIdentifier(opts *bind.CallOpts) (uint32, error) IMessageTransmitter(opts *bind.CallOpts) (common.Address, error) ITokenMessenger(opts *bind.CallOpts) (common.Address, error) + IsRemotePool(opts *bind.CallOpts, remoteChainSelector uint64, remotePoolAddress []byte) (bool, error) + IsSupportedChain(opts *bind.CallOpts, remoteChainSelector uint64) (bool, error) IsSupportedToken(opts *bind.CallOpts, token common.Address) (bool, error) @@ -3095,22 +3410,24 @@ type USDCTokenPoolInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + AddRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + ApplyAllowListUpdates(opts *bind.TransactOpts, removes []common.Address, adds []common.Address) (*types.Transaction, error) - ApplyChainUpdates(opts *bind.TransactOpts, chains []TokenPoolChainUpdate) (*types.Transaction, error) + ApplyChainUpdates(opts *bind.TransactOpts, remoteChainSelectorsToRemove []uint64, chainsToAdd []TokenPoolChainUpdate) (*types.Transaction, error) LockOrBurn(opts *bind.TransactOpts, lockOrBurnIn PoolLockOrBurnInV1) (*types.Transaction, error) ReleaseOrMint(opts *bind.TransactOpts, releaseOrMintIn PoolReleaseOrMintInV1) (*types.Transaction, error) + RemoveRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) + SetChainRateLimiterConfig(opts *bind.TransactOpts, remoteChainSelector uint64, outboundConfig RateLimiterConfig, inboundConfig RateLimiterConfig) (*types.Transaction, error) SetDomains(opts *bind.TransactOpts, domains []USDCTokenPoolDomainUpdate) (*types.Transaction, error) SetRateLimitAdmin(opts *bind.TransactOpts, rateLimitAdmin common.Address) (*types.Transaction, error) - SetRemotePool(opts *bind.TransactOpts, remoteChainSelector uint64, remotePoolAddress []byte) (*types.Transaction, error) - SetRouter(opts *bind.TransactOpts, newRouter common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) @@ -3193,17 +3510,29 @@ type USDCTokenPoolInterface interface { ParseOwnershipTransferred(log types.Log) (*USDCTokenPoolOwnershipTransferred, error) + FilterRateLimitAdminSet(opts *bind.FilterOpts) (*USDCTokenPoolRateLimitAdminSetIterator, error) + + WatchRateLimitAdminSet(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRateLimitAdminSet) (event.Subscription, error) + + ParseRateLimitAdminSet(log types.Log) (*USDCTokenPoolRateLimitAdminSet, error) + FilterReleased(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*USDCTokenPoolReleasedIterator, error) WatchReleased(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolReleased, sender []common.Address, recipient []common.Address) (event.Subscription, error) ParseReleased(log types.Log) (*USDCTokenPoolReleased, error) - FilterRemotePoolSet(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolSetIterator, error) + FilterRemotePoolAdded(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolAddedIterator, error) + + WatchRemotePoolAdded(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolAdded, remoteChainSelector []uint64) (event.Subscription, error) + + ParseRemotePoolAdded(log types.Log) (*USDCTokenPoolRemotePoolAdded, error) + + FilterRemotePoolRemoved(opts *bind.FilterOpts, remoteChainSelector []uint64) (*USDCTokenPoolRemotePoolRemovedIterator, error) - WatchRemotePoolSet(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolSet, remoteChainSelector []uint64) (event.Subscription, error) + WatchRemotePoolRemoved(opts *bind.WatchOpts, sink chan<- *USDCTokenPoolRemotePoolRemoved, remoteChainSelector []uint64) (event.Subscription, error) - ParseRemotePoolSet(log types.Log) (*USDCTokenPoolRemotePoolSet, error) + ParseRemotePoolRemoved(log types.Log) (*USDCTokenPoolRemotePoolRemoved, error) FilterRouterUpdated(opts *bind.FilterOpts) (*USDCTokenPoolRouterUpdatedIterator, error) diff --git a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index ccdb987071..fa8d81ea4b 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,9 +1,9 @@ GETH_VERSION: 1.13.8 -burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.bin 1e60c28ad796a220a38043b369dec8d9bffe23e1c7d9895760e30672872afd06 -burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin 3e8e3358f0bb520af069a7d37ea625940a88461a54418b1d5925eabced8c74df +burn_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.bin 642919607d5642aa98713b88f737c918487adba682535cf630b7c7d5fd80dc43 +burn_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin 054d95f302a142f7b64eea27237e0889bee6c9eb8a487579c7279c09646dc42b burn_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.bin 717c079d5d13300cf3c3ee871c6e5bf9af904411f204fb081a9f3b263cca1391 burn_with_from_mint_rebasing_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintRebasingTokenPool/BurnWithFromMintRebasingTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintRebasingTokenPool/BurnWithFromMintRebasingTokenPool.bin ec9b95105a33de14b078c1261d9cd9d6f3011e940a819b52f11a963951d4bb89 -burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin 734c2a0ea8f1224b5f01ed849410209e74b4e3427e8bfddb8ff5dd8ead5f2d8d +burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin c3f723e7f6394297c095a9d9696f1bceec4a2e85b5be2159f7a21d257eb6b480 burn_with_from_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.bin 1ed5c299f928529081dc01b7a46db2b5e6728001767863495a7675d8db99a9e2 ccip_encoding_utils: ../../../contracts/solc/v0.8.24/ICCIPEncodingUtils/ICCIPEncodingUtils.abi ../../../contracts/solc/v0.8.24/ICCIPEncodingUtils/ICCIPEncodingUtils.bin 2e6fa009821d30a24efdc9f9d14b2269fb9a51cb7d536ea8b2d29d97dd8b591c ccip_home: ../../../contracts/solc/v0.8.24/CCIPHome/CCIPHome.abi ../../../contracts/solc/v0.8.24/CCIPHome/CCIPHome.bin c570b86f8ae7697d3478e70625e06f0f682e75c1f0b7538f4b6f581b0d294b2b @@ -14,10 +14,11 @@ ether_sender_receiver: ../../../contracts/solc/v0.8.24/EtherSenderReceiver/Ether evm_2_evm_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.bin b0d77babbe635cd6ba04c2af049badc9e9d28a4b6ed6bb75f830ad902a618beb evm_2_evm_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.bin 5c02c2b167946b3467636ff2bb58594cb4652fc63d8bdfee2488ed562e2a3e50 fee_quoter: ../../../contracts/solc/v0.8.24/FeeQuoter/FeeQuoter.abi ../../../contracts/solc/v0.8.24/FeeQuoter/FeeQuoter.bin 503823a939ff99fe3bdaaef7a89cd4bbe475e260d3921335dbf9c80d4f584b76 -lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin e6a8ec9e8faccb1da7d90e0f702ed72975964f97dc3222b54cfcca0a0ba3fea2 +lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin 1067f557abeb5570f1da7f050ea982ffad0f35dc064e668a8a0e6af128df490c lock_release_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.bin e632b08be0fbd1d013e8b3a9d75293d0d532b83071c531ff2be1deec1fa48ec1 maybe_revert_message_receiver: ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.bin 982f83cce7216832e747614bb25541debffe050a7141e93806e55a69150746da message_hasher: ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.abi ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.bin 0a2661da24147160383ad61d56a258515d1cc07f5e0f471ec5cbb4bccaf82389 +mock_lbtc_token_pool: ../../../contracts/solc/v0.8.24/MockLBTCTokenPool/MockLBTCTokenPool.abi ../../../contracts/solc/v0.8.24/MockLBTCTokenPool/MockLBTCTokenPool.bin 1bb773ea4cd73712c84335de3e56afc2f738c9b96f3417316b5136e47591b5cc mock_usdc_token_messenger: ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin d976651d36b33ac2196b32b9d2f4fa6690c6a18d41b621365659fce1c1d1e737 mock_usdc_token_transmitter: ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.bin be0dbc3e475741ea0b7a54ec2b935a321b428baa9f4ce18180a87fb38bb87de2 mock_v3_aggregator_contract: ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.abi ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.bin 518e19efa2ff52b0fefd8e597b05765317ee7638189bfe34ca43de2f6599faf4 @@ -28,7 +29,7 @@ offramp: ../../../contracts/solc/v0.8.24/OffRamp/OffRamp.abi ../../../contracts/ onramp: ../../../contracts/solc/v0.8.24/OnRamp/OnRamp.abi ../../../contracts/solc/v0.8.24/OnRamp/OnRamp.bin 330be295a313aa4064819fb76d27f4b1a35fdcbd0959d68a71f1ebb72d0b1d7f ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin c1c2f8a65c7ffd971899cae7fe62f2da57d09e936151e2b92163c4bebe699d6b price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin e7781d600c1bb7aa4620106af7f6e146a109b97f4cb6a7d06c9e15773340ecb2 -registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin 75be86323c227917a9bbc3f799d7ed02f92db546653a36db30ed0ebe64461353 +registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin 0fc277a0b512db4e20b5a32a775b94ed2c0d342d8237511de78c94f7dacad428 report_codec: ../../../contracts/solc/v0.8.24/ReportCodec/ReportCodec.abi ../../../contracts/solc/v0.8.24/ReportCodec/ReportCodec.bin 738616a62c24ad4c5b851d174f40a06b51ccbc0bbfc65f04ff9d1c865f0be5bc rmn_contract: ../../../contracts/solc/v0.8.24/RMN/RMN.abi ../../../contracts/solc/v0.8.24/RMN/RMN.bin 8b45b0fb08631c6b582fd3c0b4052a79cc2b4e091e6286af1ab131bef63661f9 rmn_proxy_contract: ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.abi ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.bin b048d8e752e3c41113ebb305c1efa06737ad36b4907b93e627fb0a3113023454 @@ -36,6 +37,6 @@ rmn_remote: ../../../contracts/solc/v0.8.24/RMNRemote/RMNRemote.abi ../../../con router: ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin 2e4f0a7826c8abb49d882bb49fc5ff20a186dbd3137624b9097ffed903ae4888 self_funded_ping_pong: ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.abi ../../../contracts/solc/v0.8.24/SelfFundedPingPong/SelfFundedPingPong.bin 8ea5d75dbc3f8afd90d22c4a665a94e02892259cd16520c1c6b4cf0dc80c9148 token_admin_registry: ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.abi ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.bin 942be7d1681ac102e0615bee13f76838ebb0b261697cf1270d2bf82c12e57aeb -token_pool: ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin 7c01fd89f5153baa4d7409d14beabb3f861abfbf8880d3c6d06802cc398570f9 -usdc_token_pool: ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin 8e7eae4c7277ce4a0092cca815c046cc49094028c23d2d113de9335fa4358030 +token_pool: ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin da86a1407f31134e7246bde63c80ce8c78ce7d7b44e267f3c1f6030441ff4252 +usdc_token_pool: ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin b688126b13353f7aab7481f3f6b8f79cd2cace96be71eace70237d402823493a weth9: ../../../contracts/solc/v0.8.24/WETH9/WETH9.abi ../../../contracts/solc/v0.8.24/WETH9/WETH9.bin 2970d79a0ca6dd6279cde130de45e56c8790ed695eae477fb5ba4c1bb75b720d diff --git a/core/gethwrappers/ccip/go_generate.go b/core/gethwrappers/ccip/go_generate.go index fd48a3826f..eb2fc0fe2d 100644 --- a/core/gethwrappers/ccip/go_generate.go +++ b/core/gethwrappers/ccip/go_generate.go @@ -23,13 +23,9 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPool/BurnMintTokenPool.bin BurnMintTokenPool burn_mint_token_pool //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnFromMintTokenPool/BurnFromMintTokenPool.bin BurnFromMintTokenPool burn_from_mint_token_pool //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin BurnWithFromMintTokenPool burn_with_from_mint_token_pool -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnMintTokenPoolAndProxy/BurnMintTokenPoolAndProxy.bin BurnMintTokenPoolAndProxy burn_mint_token_pool_and_proxy -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.bin BurnWithFromMintTokenPoolAndProxy burn_with_from_mint_token_pool_and_proxy //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin LockReleaseTokenPool lock_release_token_pool -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.bin LockReleaseTokenPoolAndProxy lock_release_token_pool_and_proxy //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin TokenPool token_pool //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin USDCTokenPool usdc_token_pool -//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/BurnWithFromMintRebasingTokenPool/BurnWithFromMintRebasingTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintRebasingTokenPool/BurnWithFromMintRebasingTokenPool.bin BurnWithFromMintRebasingTokenPool burn_with_from_mint_rebasing_token_pool // Helpers //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.abi ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.bin MockV3Aggregator mock_v3_aggregator_contract @@ -44,6 +40,7 @@ package ccip //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/WETH9/WETH9.abi ../../../contracts/solc/v0.8.24/WETH9/WETH9.bin WETH9 weth9 //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin MockE2EUSDCTokenMessenger mock_usdc_token_messenger //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.bin MockE2EUSDCTransmitter mock_usdc_token_transmitter +//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockLBTCTokenPool/MockLBTCTokenPool.abi ../../../contracts/solc/v0.8.24/MockLBTCTokenPool/MockLBTCTokenPool.bin MockLBTCTokenPool mock_lbtc_token_pool // EncodingUtils //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/ICCIPEncodingUtils/ICCIPEncodingUtils.abi ../../../contracts/solc/v0.8.24/ICCIPEncodingUtils/ICCIPEncodingUtils.bin EncodingUtils ccip_encoding_utils diff --git a/core/scripts/ccip/liquiditymanager/util.go b/core/scripts/ccip/liquiditymanager/util.go index 45aa69ddb8..d49b49f0ed 100644 --- a/core/scripts/ccip/liquiditymanager/util.go +++ b/core/scripts/ccip/liquiditymanager/util.go @@ -243,6 +243,7 @@ func deployTokenPoolAndRebalancer( transactor, client, tokenAddress, + 18, []common.Address{}, armProxyAddress, true, diff --git a/core/scripts/ccip/manual-execution/go.mod b/core/scripts/ccip/manual-execution/go.mod index 9e1c87289e..35a0d698e3 100644 --- a/core/scripts/ccip/manual-execution/go.mod +++ b/core/scripts/ccip/manual-execution/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/ethereum/go-ethereum v1.11.3 github.com/pkg/errors v0.9.1 - github.com/smartcontractkit/chain-selectors v1.0.30 + github.com/smartcontractkit/chain-selectors v1.0.34 go.uber.org/multierr v1.1.0 golang.org/x/crypto v0.1.0 ) diff --git a/core/scripts/ccip/manual-execution/go.sum b/core/scripts/ccip/manual-execution/go.sum index afb6fee028..b84ae836ff 100644 --- a/core/scripts/ccip/manual-execution/go.sum +++ b/core/scripts/ccip/manual-execution/go.sum @@ -72,8 +72,8 @@ github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/smartcontractkit/chain-selectors v1.0.30 h1:jk+xVRocgQ/uvKLSd1JzeHJ/v+EKu1BjrreaSGqKzjo= -github.com/smartcontractkit/chain-selectors v1.0.30/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4= +github.com/smartcontractkit/chain-selectors v1.0.34/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 2d1f4eb22d..a95673fbf5 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -22,7 +22,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chain-selectors v1.0.30 + github.com/smartcontractkit/chain-selectors v1.0.34 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 2d931398a2..921b492a81 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -355,8 +355,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -1073,8 +1073,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chain-selectors v1.0.30 h1:jk+xVRocgQ/uvKLSd1JzeHJ/v+EKu1BjrreaSGqKzjo= -github.com/smartcontractkit/chain-selectors v1.0.30/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4= +github.com/smartcontractkit/chain-selectors v1.0.34/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index 8bca97c37e..16c3440dc5 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -1894,7 +1894,7 @@ func (d *Delegate) ccipExecGetDstProvider(ctx context.Context, jb job.Job, plugi // PROVIDER BASED ARG CONSTRUCTION // Write PluginConfig bytes to send source/dest relayer provider + info outside of top level rargs/pargs over the wire - dstConfigBytes, err := newExecPluginConfig(false, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, string(jb.ID)).Encode() + dstConfigBytes, err := newExecPluginConfig(false, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, pluginJobSpecConfig.LBTCConfig, string(jb.ID)).Encode() if err != nil { return nil, err } @@ -1927,7 +1927,7 @@ func (d *Delegate) ccipExecGetDstProvider(ctx context.Context, jb job.Job, plugi func (d *Delegate) ccipExecGetSrcProvider(ctx context.Context, jb job.Job, pluginJobSpecConfig ccipconfig.ExecPluginJobSpecConfig, transmitterID string, dstProvider types.CCIPExecProvider) (srcProvider types.CCIPExecProvider, srcChainID uint64, err error) { spec := jb.OCR2OracleSpec - srcConfigBytes, err := newExecPluginConfig(true, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, string(jb.ID)).Encode() + srcConfigBytes, err := newExecPluginConfig(true, pluginJobSpecConfig.SourceStartBlock, pluginJobSpecConfig.DestStartBlock, pluginJobSpecConfig.USDCConfig, pluginJobSpecConfig.LBTCConfig, string(jb.ID)).Encode() if err != nil { return nil, 0, err } @@ -1976,12 +1976,13 @@ func (d *Delegate) ccipExecGetSrcProvider(ctx context.Context, jb job.Job, plugi return } -func newExecPluginConfig(isSourceProvider bool, srcStartBlock uint64, dstStartBlock uint64, usdcConfig ccipconfig.USDCConfig, jobID string) config.ExecPluginConfig { +func newExecPluginConfig(isSourceProvider bool, srcStartBlock uint64, dstStartBlock uint64, usdcConfig ccipconfig.USDCConfig, lbtcConfig ccipconfig.LBTCConfig, jobID string) config.ExecPluginConfig { return config.ExecPluginConfig{ IsSourceProvider: isSourceProvider, SourceStartBlock: srcStartBlock, DestStartBlock: dstStartBlock, USDCConfig: usdcConfig, + LBTCConfig: lbtcConfig, JobID: jobID, } } diff --git a/core/services/ocr2/plugins/ccip/ccipexec/initializers.go b/core/services/ocr2/plugins/ccip/ccipexec/initializers.go index aa42ff2828..d2d3d32ce9 100644 --- a/core/services/ocr2/plugins/ccip/ccipexec/initializers.go +++ b/core/services/ocr2/plugins/ccip/ccipexec/initializers.go @@ -121,6 +121,20 @@ func NewExecServices(ctx context.Context, lggr logger.Logger, jb job.Job, srcPro } tokenDataProviders[cciptypes.Address(pluginConfig.USDCConfig.SourceTokenAddress.String())] = usdcReader } + // init lbtc token data provider + if pluginConfig.LBTCConfig.AttestationAPI != "" { + lggr.Infof("LBTC token data provider enabled") + err2 := pluginConfig.LBTCConfig.ValidateLBTCConfig() + if err2 != nil { + return nil, err2 + } + + lbtcReader, err2 := srcProvider.NewTokenDataReader(ctx, ccip.EvmAddrToGeneric(pluginConfig.LBTCConfig.SourceTokenAddress)) + if err2 != nil { + return nil, fmt.Errorf("new lbtc reader: %w", err2) + } + tokenDataProviders[cciptypes.Address(pluginConfig.LBTCConfig.SourceTokenAddress.String())] = lbtcReader + } // Prom wrappers onRampReader = observability.NewObservedOnRampReader(onRampReader, srcChainID, ccip.ExecPluginLabel) diff --git a/core/services/ocr2/plugins/ccip/config/config.go b/core/services/ocr2/plugins/ccip/config/config.go index a24a6edfd1..fbf8d590cf 100644 --- a/core/services/ocr2/plugins/ccip/config/config.go +++ b/core/services/ocr2/plugins/ccip/config/config.go @@ -108,6 +108,7 @@ func (c *DynamicPriceGetterConfig) Validate() error { type ExecPluginJobSpecConfig struct { SourceStartBlock, DestStartBlock uint64 // Only for first time job add. USDCConfig USDCConfig + LBTCConfig LBTCConfig } type USDCConfig struct { @@ -119,10 +120,19 @@ type USDCConfig struct { AttestationAPIIntervalMilliseconds int } +type LBTCConfig struct { + SourceTokenAddress common.Address + AttestationAPI string + AttestationAPITimeoutSeconds uint + // AttestationAPIIntervalMilliseconds can be set to -1 to disable or 0 to use a default interval. + AttestationAPIIntervalMilliseconds int +} + type ExecPluginConfig struct { SourceStartBlock, DestStartBlock uint64 // Only for first time job add. IsSourceProvider bool USDCConfig USDCConfig + LBTCConfig LBTCConfig JobID string } @@ -136,17 +146,30 @@ func (e ExecPluginConfig) Encode() ([]byte, error) { func (uc *USDCConfig) ValidateUSDCConfig() error { if uc.AttestationAPI == "" { - return errors.New("AttestationAPI is required") + return errors.New("USDCConfig: AttestationAPI is required") } if uc.AttestationAPIIntervalMilliseconds < -1 { - return errors.New("AttestationAPIIntervalMilliseconds must be -1 to disable, 0 for default or greater to define the exact interval") + return errors.New("USDCConfig: AttestationAPIIntervalMilliseconds must be -1 to disable, 0 for default or greater to define the exact interval") } if uc.SourceTokenAddress == utils.ZeroAddress { - return errors.New("SourceTokenAddress is required") + return errors.New("USDCConfig: SourceTokenAddress is required") } if uc.SourceMessageTransmitterAddress == utils.ZeroAddress { - return errors.New("SourceMessageTransmitterAddress is required") + return errors.New("USDCConfig: SourceMessageTransmitterAddress is required") } return nil } + +func (lc *LBTCConfig) ValidateLBTCConfig() error { + if lc.AttestationAPI == "" { + return errors.New("LBTCConfig: AttestationAPI is required") + } + if lc.AttestationAPIIntervalMilliseconds < -1 { + return errors.New("LBTCConfig: AttestationAPIIntervalMilliseconds must be -1 to disable, 0 for default or greater to define the exact interval") + } + if lc.SourceTokenAddress == utils.ZeroAddress { + return errors.New("LBTCConfig: SourceTokenAddress is required") + } + return nil +} diff --git a/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go b/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go index 0442f09c47..ee514c6b19 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go @@ -73,6 +73,8 @@ var ( SourceChainSelector = uint64(11787463284727550157) DestChainID = uint64(1337) DestChainSelector = uint64(3379446385462418246) + + TokenDecimals = uint8(18) ) // Backwards compat, in principle these statuses are version dependent @@ -785,6 +787,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh sourceUser, sourceChain, sourceLinkTokenAddress, + TokenDecimals, []common.Address{}, armProxySourceAddress, true, @@ -801,6 +804,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh sourceUser, sourceChain, sourceWeth9addr, + TokenDecimals, []common.Address{}, armProxySourceAddress, true, @@ -819,6 +823,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh destUser, destChain, destLinkTokenAddress, + TokenDecimals, []common.Address{}, armProxyDestAddress, true, @@ -848,6 +853,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh destUser, destChain, destWeth9addr, + TokenDecimals, []common.Address{}, armProxyDestAddress, true, @@ -882,11 +888,11 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh require.NoError(t, err) _, err = sourceLinkPool.ApplyChainUpdates( sourceUser, + []uint64{}, []lock_release_token_pool.TokenPoolChainUpdate{{ RemoteChainSelector: DestChainSelector, - RemotePoolAddress: abiEncodedDestLinkPool, + RemotePoolAddresses: [][]byte{abiEncodedDestLinkPool}, RemoteTokenAddress: abiEncodedDestLinkTokenAddress, - Allowed: true, OutboundRateLimiterConfig: lock_release_token_pool.RateLimiterConfig{ IsEnabled: true, Capacity: HundredLink, @@ -907,11 +913,11 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh require.NoError(t, err) _, err = sourceWeth9Pool.ApplyChainUpdates( sourceUser, + []uint64{}, []lock_release_token_pool.TokenPoolChainUpdate{{ RemoteChainSelector: DestChainSelector, - RemotePoolAddress: abiEncodedDestWrappedPool, + RemotePoolAddresses: [][]byte{abiEncodedDestWrappedPool}, RemoteTokenAddress: abiEncodedDestWrappedTokenAddr, - Allowed: true, OutboundRateLimiterConfig: lock_release_token_pool.RateLimiterConfig{ IsEnabled: true, Capacity: HundredLink, @@ -933,11 +939,11 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh require.NoError(t, err) _, err = destLinkPool.ApplyChainUpdates( destUser, + []uint64{}, []lock_release_token_pool.TokenPoolChainUpdate{{ RemoteChainSelector: SourceChainSelector, - RemotePoolAddress: abiEncodedSourceLinkPool, + RemotePoolAddresses: [][]byte{abiEncodedSourceLinkPool}, RemoteTokenAddress: abiEncodedSourceLinkTokenAddr, - Allowed: true, OutboundRateLimiterConfig: lock_release_token_pool.RateLimiterConfig{ IsEnabled: true, Capacity: HundredLink, @@ -958,11 +964,11 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh require.NoError(t, err) _, err = destWrappedPool.ApplyChainUpdates( destUser, + []uint64{}, []lock_release_token_pool.TokenPoolChainUpdate{{ RemoteChainSelector: SourceChainSelector, - RemotePoolAddress: abiEncodedSourceWrappedPool, + RemotePoolAddresses: [][]byte{abiEncodedSourceWrappedPool}, RemoteTokenAddress: abiEncodedSourceWrappedTokenAddr, - Allowed: true, OutboundRateLimiterConfig: lock_release_token_pool.RateLimiterConfig{ IsEnabled: true, Capacity: HundredLink, diff --git a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go index 961e26d1ce..dd6b667ed1 100644 --- a/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go +++ b/core/services/ocr2/plugins/ccip/testhelpers/integration/jobspec.go @@ -170,6 +170,7 @@ type CCIPJobSpecParams struct { DestStartBlock uint64 USDCAttestationAPI string USDCConfig *config.USDCConfig + LBTCConfig *config.LBTCConfig P2PV2Bootstrappers pq.StringArray } @@ -295,6 +296,11 @@ func (params CCIPJobSpecParams) ExecutionJobSpec() (*OCR2TaskJobSpec, error) { ocrSpec.PluginConfig["USDCConfig.SourceMessageTransmitterAddress"] = fmt.Sprintf(`"%s"`, params.USDCConfig.SourceMessageTransmitterAddress) ocrSpec.PluginConfig["USDCConfig.AttestationAPITimeoutSeconds"] = params.USDCConfig.AttestationAPITimeoutSeconds } + if params.LBTCConfig != nil { + ocrSpec.PluginConfig["LBTCConfig.AttestationAPI"] = fmt.Sprintf(`"%s"`, params.LBTCConfig.AttestationAPI) + ocrSpec.PluginConfig["LBTCConfig.SourceTokenAddress"] = fmt.Sprintf(`"%s"`, params.LBTCConfig.SourceTokenAddress) + ocrSpec.PluginConfig["LBTCConfig.AttestationAPITimeoutSeconds"] = params.LBTCConfig.AttestationAPITimeoutSeconds + } return &OCR2TaskJobSpec{ OCR2OracleSpec: ocrSpec, JobType: "offchainreporting2", diff --git a/core/services/ocr2/plugins/ccip/tokendata/http/http_client.go b/core/services/ocr2/plugins/ccip/tokendata/http/http_client.go index 79ec21b1b8..dd303822c7 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/http/http_client.go +++ b/core/services/ocr2/plugins/ccip/tokendata/http/http_client.go @@ -12,18 +12,21 @@ import ( ) type IHttpClient interface { - // Get issue a GET request to the given url and return the response body and status code. + // Get issues a GET request to the given url and returns the response body and status code. Get(ctx context.Context, url string, timeout time.Duration) ([]byte, int, http.Header, error) + + // Post issues a POST request to the given url with the given request data and returns the response body and status code. + Post(ctx context.Context, url string, requestData io.Reader, timeout time.Duration) ([]byte, int, http.Header, error) } type HttpClient struct { } -func (s *HttpClient) Get(ctx context.Context, url string, timeout time.Duration) ([]byte, int, http.Header, error) { +func doRequest(ctx context.Context, url string, requestType string, requestBody io.Reader, timeout time.Duration) ([]byte, int, http.Header, error) { // Use a timeout to guard against attestation API hanging, causing observation timeout and failing to make any progress. timeoutCtx, cancel := context.WithTimeoutCause(ctx, timeout, tokendata.ErrTimeout) defer cancel() - req, err := http.NewRequestWithContext(timeoutCtx, http.MethodGet, url, nil) + req, err := http.NewRequestWithContext(timeoutCtx, requestType, url, requestBody) if err != nil { return nil, http.StatusBadRequest, nil, err } @@ -46,3 +49,11 @@ func (s *HttpClient) Get(ctx context.Context, url string, timeout time.Duration) body, err := io.ReadAll(res.Body) return body, res.StatusCode, res.Header, err } + +func (s *HttpClient) Get(ctx context.Context, url string, timeout time.Duration) ([]byte, int, http.Header, error) { + return doRequest(ctx, url, http.MethodGet, nil, timeout) +} + +func (s *HttpClient) Post(ctx context.Context, url string, requestBody io.Reader, timeout time.Duration) ([]byte, int, http.Header, error) { + return doRequest(ctx, url, http.MethodPost, requestBody, timeout) +} diff --git a/core/services/ocr2/plugins/ccip/tokendata/http/observed_http_client.go b/core/services/ocr2/plugins/ccip/tokendata/http/observed_http_client.go index d8fb9b1c57..bac36abf7e 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/http/observed_http_client.go +++ b/core/services/ocr2/plugins/ccip/tokendata/http/observed_http_client.go @@ -11,7 +11,7 @@ import ( ) var ( - usdcLatencyBuckets = []float64{ + latencyBuckets = []float64{ float64(10 * time.Millisecond), float64(25 * time.Millisecond), float64(50 * time.Millisecond), @@ -29,7 +29,12 @@ var ( usdcClientHistogram = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "ccip_usdc_client_request_total", Help: "Latency of calls to the USDC client", - Buckets: usdcLatencyBuckets, + Buckets: latencyBuckets, + }, []string{"status", "success"}) + lbtcClientHistogram = promauto.NewHistogramVec(prometheus.HistogramOpts{ + Name: "ccip_lbtc_client_request_total", + Help: "Latency of calls to the LBTC client", + Buckets: latencyBuckets, }, []string{"status", "success"}) ) @@ -38,11 +43,16 @@ type ObservedIHttpClient struct { histogram *prometheus.HistogramVec } -// NewObservedIHttpClient Create a new ObservedIHttpClient with the USDC client metric. -func NewObservedIHttpClient(origin IHttpClient) *ObservedIHttpClient { +// NewObservedUsdcIHttpClient Create a new ObservedIHttpClient with the USDC client metric. +func NewObservedUsdcIHttpClient(origin IHttpClient) *ObservedIHttpClient { return NewObservedIHttpClientWithMetric(origin, usdcClientHistogram) } +// NewObservedLbtcIHttpClient Create a new ObservedIHttpClient with the LBTC client metric. +func NewObservedLbtcIHttpClient(origin IHttpClient) *ObservedIHttpClient { + return NewObservedIHttpClientWithMetric(origin, lbtcClientHistogram) +} + func NewObservedIHttpClientWithMetric(origin IHttpClient, histogram *prometheus.HistogramVec) *ObservedIHttpClient { return &ObservedIHttpClient{ IHttpClient: origin, diff --git a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go new file mode 100644 index 0000000000..86d3c71e62 --- /dev/null +++ b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc.go @@ -0,0 +1,275 @@ +package lbtc + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "net/url" + "sync" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/pkg/errors" + "golang.org/x/time/rate" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/http" +) + +const ( + apiVersion = "v1" + attestationPath = "deposits/getByHash" + defaultAttestationTimeout = 5 * time.Second + + // defaultCoolDownDurationSec defines the default time to wait after getting rate limited. + // this value is only used if the 429 response does not contain the Retry-After header + defaultCoolDownDuration = 30 * time.Second + + // defaultRequestInterval defines the rate in requests per second that the attestation API can be called. + // this is set according to the APIs recommended 5 requests per second rate limit. + defaultRequestInterval = 200 * time.Millisecond + + // APIIntervalRateLimitDisabled is a special value to disable the rate limiting. + APIIntervalRateLimitDisabled = -1 + // APIIntervalRateLimitDefault is a special value to select the default rate limit interval. + APIIntervalRateLimitDefault = 0 +) + +type attestationStatus string + +const ( + attestationStatusUnspecified attestationStatus = "NOTARIZATION_STATUS_UNSPECIFIED" + attestationStatusPending attestationStatus = "NOTARIZATION_STATUS_PENDING" + attestationStatusSubmitted attestationStatus = "NOTARIZATION_STATUS_SUBMITTED" + attestationStatusSessionApproved attestationStatus = "NOTARIZATION_STATUS_SESSION_APPROVED" + attestationStatusFailed attestationStatus = "NOTARIZATION_STATUS_FAILED" +) + +var ( + ErrUnknownResponse = errors.New("unexpected response from attestation API") +) + +type TokenDataReader struct { + lggr logger.Logger + httpClient http.IHttpClient + attestationApi *url.URL + attestationApiTimeout time.Duration + lbtcTokenAddress common.Address + rate *rate.Limiter + + // coolDownUntil defines whether requests are blocked or not. + coolDownUntil time.Time + coolDownMu *sync.RWMutex +} + +type messageAttestationResponse struct { + MessageHash string `json:"message_hash"` + Status attestationStatus `json:"status"` + Attestation string `json:"attestation,omitempty"` // Attestation represented by abi.encode(payload, proof) +} + +type attestationRequest struct { + PayloadHashes []string `json:"messageHash"` +} + +type attestationResponse struct { + Attestations []messageAttestationResponse `json:"attestations"` +} + +type sourceTokenData struct { + SourcePoolAddress []byte + DestTokenAddress []byte + ExtraData []byte + DestGasAmount uint32 +} + +func (m sourceTokenData) AbiString() string { + return `[{ + "components": [ + {"name": "sourcePoolAddress", "type": "bytes"}, + {"name": "destTokenAddress", "type": "bytes"}, + {"name": "extraData", "type": "bytes"}, + {"name": "destGasAmount", "type": "uint32"} + ], + "type": "tuple" + }]` +} + +func (m sourceTokenData) Validate() error { + if len(m.SourcePoolAddress) == 0 { + return errors.New("sourcePoolAddress must be non-empty") + } + if len(m.DestTokenAddress) == 0 { + return errors.New("destTokenAddress must be non-empty") + } + if len(m.ExtraData) == 0 { + return errors.New("extraData must be non-empty") + } + return nil +} + +var _ tokendata.Reader = &TokenDataReader{} + +func NewLBTCTokenDataReader( + lggr logger.Logger, + lbtcAttestationApi *url.URL, + lbtcAttestationApiTimeoutSeconds int, + lbtcTokenAddress common.Address, + requestInterval time.Duration, +) *TokenDataReader { + timeout := time.Duration(lbtcAttestationApiTimeoutSeconds) * time.Second + if lbtcAttestationApiTimeoutSeconds == 0 { + timeout = defaultAttestationTimeout + } + + if requestInterval == APIIntervalRateLimitDisabled { + requestInterval = 0 + } else if requestInterval == APIIntervalRateLimitDefault { + requestInterval = defaultRequestInterval + } + + return &TokenDataReader{ + lggr: lggr, + httpClient: http.NewObservedLbtcIHttpClient(&http.HttpClient{}), + attestationApi: lbtcAttestationApi, + attestationApiTimeout: timeout, + lbtcTokenAddress: lbtcTokenAddress, + coolDownMu: &sync.RWMutex{}, + rate: rate.NewLimiter(rate.Every(requestInterval), 1), + } +} + +func NewLBTCTokenDataReaderWithHttpClient( + origin TokenDataReader, + httpClient http.IHttpClient, + lbtcTokenAddress common.Address, + requestInterval time.Duration, +) *TokenDataReader { + return &TokenDataReader{ + lggr: origin.lggr, + httpClient: httpClient, + attestationApi: origin.attestationApi, + attestationApiTimeout: origin.attestationApiTimeout, + coolDownMu: origin.coolDownMu, + lbtcTokenAddress: lbtcTokenAddress, + rate: rate.NewLimiter(rate.Every(requestInterval), 1), + } +} + +// ReadTokenData queries the LBTC attestation API. +func (s *TokenDataReader) ReadTokenData(ctx context.Context, msg cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta, tokenIndex int) ([]byte, error) { + if tokenIndex < 0 || tokenIndex >= len(msg.TokenAmounts) { + return nil, fmt.Errorf("token index out of bounds") + } + + if s.inCoolDownPeriod() { + // rate limiting cool-down period, we prevent new requests from being sent + return nil, tokendata.ErrRequestsBlocked + } + + if s.rate != nil { + // Wait blocks until it the attestation API can be called or the + // context is Done. + if waitErr := s.rate.Wait(ctx); waitErr != nil { + return nil, fmt.Errorf("lbtc rate limiting error: %w", waitErr) + } + } + + decodedSourceTokenData, err := abihelpers.DecodeAbiStruct[sourceTokenData](msg.SourceTokenData[tokenIndex]) + if err != nil { + return []byte{}, err + } + destTokenData := decodedSourceTokenData.ExtraData + // We don't have better way to determine if the extraData is a payload or sha256(payload) + // Last parameter of the payload struct is 32-bytes nonce (see Lombard's Bridge._deposit(...) method), + // so we can assume that payload always exceeds 32 bytes + if len(destTokenData) != 32 { + s.lggr.Infow("SourceTokenData.extraData size is not 32. This is deposit payload, not sha256(payload). Attestation is disabled onchain", + "destTokenData", hexutil.Encode(destTokenData)) + return destTokenData, nil + } + payloadHash := [32]byte(destTokenData) + + msgID := hexutil.Encode(msg.MessageID[:]) + payloadHashHex := hexutil.Encode(payloadHash[:]) + s.lggr.Infow("Calling attestation API", "messageBodyHash", payloadHashHex, "messageID", msgID) + + attestationResp, err := s.callAttestationApi(ctx, payloadHash) + if err != nil { + return nil, errors.Wrap(err, "failed calling lbtc attestation API") + } + if attestationResp.Attestations == nil || len(attestationResp.Attestations) == 0 { + return nil, errors.New("attestation response is empty") + } + if len(attestationResp.Attestations) > 1 { + s.lggr.Warnw("Multiple attestations received, expected one", "attestations", attestationResp.Attestations) + } + var attestation messageAttestationResponse + for _, attestationCandidate := range attestationResp.Attestations { + if attestationCandidate.MessageHash == payloadHashHex { + attestation = attestationCandidate + } + } + if attestation == (messageAttestationResponse{}) { + return nil, fmt.Errorf("requested attestation %s not found in response", payloadHashHex) + } + s.lggr.Infow("Got response from attestation API", "messageID", msgID, + "attestationStatus", attestation.Status, "attestation", attestation) + switch attestation.Status { + case attestationStatusSessionApproved: + payloadAndProof, err := hexutil.Decode(attestation.Attestation) + if err != nil { + return nil, err + } + return payloadAndProof, nil + case attestationStatusPending: + return nil, tokendata.ErrNotReady + case attestationStatusSubmitted: + return nil, tokendata.ErrNotReady + default: + s.lggr.Errorw("Unexpected response from attestation API", "attestation", attestation) + return nil, ErrUnknownResponse + } +} + +func (s *TokenDataReader) callAttestationApi(ctx context.Context, lbtcMessageHash [32]byte) (attestationResponse, error) { + attestationUrl := fmt.Sprintf("%s/bridge/%s/%s", s.attestationApi.String(), apiVersion, attestationPath) + request := attestationRequest{PayloadHashes: []string{hexutil.Encode(lbtcMessageHash[:])}} + encodedRequest, err := json.Marshal(request) + requestBuffer := bytes.NewBuffer(encodedRequest) + if err != nil { + return attestationResponse{}, err + } + respRaw, _, _, err := s.httpClient.Post(ctx, attestationUrl, requestBuffer, s.attestationApiTimeout) + switch { + case errors.Is(err, tokendata.ErrRateLimit): + s.setCoolDownPeriod(defaultCoolDownDuration) + return attestationResponse{}, tokendata.ErrRateLimit + case err != nil: + return attestationResponse{}, err + } + var attestationResp attestationResponse + err = json.Unmarshal(respRaw, &attestationResp) + return attestationResp, err +} + +func (s *TokenDataReader) setCoolDownPeriod(d time.Duration) { + s.coolDownMu.Lock() + s.coolDownUntil = time.Now().Add(d) + s.coolDownMu.Unlock() +} + +func (s *TokenDataReader) inCoolDownPeriod() bool { + s.coolDownMu.RLock() + defer s.coolDownMu.RUnlock() + return time.Now().Before(s.coolDownUntil) +} + +func (s *TokenDataReader) Close() error { + return nil +} diff --git a/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go new file mode 100644 index 0000000000..8b65685faa --- /dev/null +++ b/core/services/ocr2/plugins/ccip/tokendata/lbtc/lbtc_test.go @@ -0,0 +1,486 @@ +package lbtc + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "sync" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + + cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/abihelpers" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipcalc" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata" +) + +var ( + lbtcMessageHash = "0xbc427abf571a5cfcf7c98799d1f0055f4db25f203f657d30026728a19d16f092" + lbtcMessageAttestation = "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e45c70a5050000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc00000000000000000000000062f10ce5b727edf787ea45776bd050308a61150800000000000000000000000000000000000000000000000000000000000003e60000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000040277eeafba008d767c2636d9428f2ebb13ab29ac70337f4fc34b0f5606767cae546f9be3f12160de6d142e5b3c1c3ebd0bf4298662b32b597d0cc5970c7742fc10000000000000000000000000000000000000000000000000000000000000040bbcd60ecc9e06f2effe7c94161219498a1eb435b419387adadb86ec9a52dfb066ce027532517df7216404049d193a25b85c35edfa3e7c5aa4757bfe84887a3980000000000000000000000000000000000000000000000000000000000000040da4a6dc619b5ca2349783cabecc4efdbc910090d3e234d7b8d0430165f8fae532f9a965ceb85c18bb92e059adefa7ce5835850a705761ab9e026d2db4a13ef9a" + payloadAndProof, _ = hexutil.Decode(lbtcMessageAttestation) +) + +func getMockLBTCEndpoint(t *testing.T, response attestationResponse) *httptest.Server { + responseBytes, err := json.Marshal(response) + require.NoError(t, err) + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write(responseBytes) + require.NoError(t, err) + })) +} + +func TestLBTCReader_callAttestationApi(t *testing.T) { + t.Skipf("Skipping test because it uses the real LBTC attestation API") + attestationURI, err := url.ParseRequestURI("https://bridge-manager.staging.lombard.finance") + require.NoError(t, err) + lggr := logger.TestLogger(t) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, 0, common.Address{}, APIIntervalRateLimitDisabled) + + attestation, err := lbtcService.callAttestationApi(context.Background(), [32]byte(common.FromHex(lbtcMessageHash))) + require.NoError(t, err) + + require.Equal(t, lbtcMessageHash, attestation.Attestations[0].MessageHash) + require.Equal(t, attestationStatusSessionApproved, attestation.Attestations[0].Status) + require.Equal(t, lbtcMessageAttestation, attestation.Attestations[0].Attestation) +} + +func TestLBTCReader_callAttestationApiMock(t *testing.T) { + response := attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSessionApproved, + Attestation: lbtcMessageAttestation, + }, + }, + } + + ts := getMockLBTCEndpoint(t, response) + defer ts.Close() + attestationURI, err := url.ParseRequestURI(ts.URL) + require.NoError(t, err) + + lggr := logger.TestLogger(t) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, 0, common.Address{}, APIIntervalRateLimitDisabled) + attestation, err := lbtcService.callAttestationApi(context.Background(), [32]byte(common.FromHex(lbtcMessageHash))) + require.NoError(t, err) + + require.Equal(t, response.Attestations[0].Status, attestation.Attestations[0].Status) + require.Equal(t, response.Attestations[0].Attestation, attestation.Attestations[0].Attestation) +} + +func TestLBTCReader_callAttestationApiMockError(t *testing.T) { + t.Parallel() + + sessionApprovedResponse := attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSessionApproved, + Attestation: lbtcMessageAttestation, + }, + }, + } + + tests := []struct { + name string + getTs func() *httptest.Server + parentTimeoutSeconds int + customTimeoutSeconds int + expectedError error + }{ + { + name: "server error", + getTs: func() *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusInternalServerError) + })) + }, + parentTimeoutSeconds: 60, + expectedError: nil, + }, + { + name: "default timeout", + getTs: func() *httptest.Server { + responseBytes, _ := json.Marshal(sessionApprovedResponse) + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(defaultAttestationTimeout + time.Second) + _, err := w.Write(responseBytes) + require.NoError(t, err) + })) + }, + parentTimeoutSeconds: 60, + expectedError: tokendata.ErrTimeout, + }, + { + name: "custom timeout", + getTs: func() *httptest.Server { + responseBytes, _ := json.Marshal(sessionApprovedResponse) + + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(2*time.Second + time.Second) + _, err := w.Write(responseBytes) + require.NoError(t, err) + })) + }, + parentTimeoutSeconds: 60, + customTimeoutSeconds: 2, + expectedError: tokendata.ErrTimeout, + }, + { + name: "rate limit", + getTs: func() *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusTooManyRequests) + })) + }, + parentTimeoutSeconds: 60, + expectedError: tokendata.ErrRateLimit, + }, + { + name: "parent context timeout", + getTs: func() *httptest.Server { + return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(defaultAttestationTimeout + time.Second) + })) + }, + parentTimeoutSeconds: 1, + expectedError: nil, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ts := test.getTs() + defer ts.Close() + + attestationURI, err := url.ParseRequestURI(ts.URL) + require.NoError(t, err) + + lggr := logger.TestLogger(t) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, test.customTimeoutSeconds, common.Address{}, APIIntervalRateLimitDisabled) + + parentCtx, cancel := context.WithTimeout(context.Background(), time.Duration(test.parentTimeoutSeconds)*time.Second) + defer cancel() + + _, err = lbtcService.callAttestationApi(parentCtx, [32]byte(common.FromHex(lbtcMessageHash))) + require.Error(t, err) + + if test.expectedError != nil { + require.True(t, errors.Is(err, test.expectedError)) + } + }) + } +} + +func TestLBTCReader_rateLimiting(t *testing.T) { + sessionApprovedResponse := attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSessionApproved, + Attestation: lbtcMessageAttestation, + }, + }, + } + + testCases := []struct { + name string + requests uint64 + rateConfig time.Duration + testDuration time.Duration + timeout time.Duration + err string + additionalErr string + }{ + { + name: "no rate limit when disabled", + requests: 10, + rateConfig: APIIntervalRateLimitDisabled, + testDuration: 1 * time.Millisecond, + }, + { + name: "yes rate limited with default config", + requests: 5, + rateConfig: APIIntervalRateLimitDefault, + testDuration: 4 * defaultRequestInterval, + }, + { + name: "yes rate limited with config", + requests: 10, + rateConfig: 50 * time.Millisecond, + testDuration: 9 * 50 * time.Millisecond, + }, + { + name: "request timeout", + requests: 5, + rateConfig: 100 * time.Millisecond, + testDuration: 1 * time.Millisecond, + timeout: 1 * time.Millisecond, + err: "lbtc rate limiting error:", + additionalErr: "token data API timed out", + }, + } + + extraData, err := hexutil.Decode(lbtcMessageHash) + require.NoError(t, err) + + srcTokenData, err := abihelpers.EncodeAbiStruct[sourceTokenData](sourceTokenData{ + SourcePoolAddress: utils.RandomAddress().Bytes(), + DestTokenAddress: utils.RandomAddress().Bytes(), + ExtraData: extraData, + }) + require.NoError(t, err) + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + ts := getMockLBTCEndpoint(t, sessionApprovedResponse) + defer ts.Close() + attestationURI, err := url.ParseRequestURI(ts.URL) + require.NoError(t, err) + + lggr := logger.TestLogger(t) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, 0, utils.RandomAddress(), tc.rateConfig) + + ctx := context.Background() + if tc.timeout > 0 { + var cf context.CancelFunc + ctx, cf = context.WithTimeout(ctx, tc.timeout) + defer cf() + } + + trigger := make(chan struct{}) + errorChan := make(chan error, tc.requests) + wg := sync.WaitGroup{} + for i := 0; i < int(tc.requests); i++ { + wg.Add(1) + go func() { + defer wg.Done() + + <-trigger + _, err := lbtcService.ReadTokenData(ctx, cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta{ + EVM2EVMMessage: cciptypes.EVM2EVMMessage{ + SourceTokenData: [][]byte{srcTokenData}, + TokenAmounts: []cciptypes.TokenAmount{{Token: ccipcalc.EvmAddrToGeneric(utils.ZeroAddress), Amount: nil}}, // trigger failure due to wrong address + }, + }, 0) + + errorChan <- err + }() + } + + // Start the test + start := time.Now() + close(trigger) + + // Wait for requests to complete + wg.Wait() + finish := time.Now() + close(errorChan) + + // Collect errors + errorFound := false + for err := range errorChan { + if tc.err != "" && strings.Contains(err.Error(), tc.err) { + errorFound = true + } else if tc.additionalErr != "" && strings.Contains(err.Error(), tc.additionalErr) { + errorFound = true + } else if err != nil { + require.Fail(t, "unexpected error", err) + } + } + + if tc.err != "" { + assert.True(t, errorFound) + } + assert.WithinDuration(t, start.Add(tc.testDuration), finish, 50*time.Millisecond) + }) + } +} + +func TestLBTCReader_skipApiOnFullPayload(t *testing.T) { + sessionApprovedResponse := attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSessionApproved, + Attestation: lbtcMessageAttestation, + }, + }, + } + + srcTokenData, err := abihelpers.EncodeAbiStruct[sourceTokenData](sourceTokenData{ + SourcePoolAddress: utils.RandomAddress().Bytes(), + DestTokenAddress: utils.RandomAddress().Bytes(), + ExtraData: []byte(lbtcMessageHash), // more than 32 bytes + }) + require.NoError(t, err) + + ts := getMockLBTCEndpoint(t, sessionApprovedResponse) + defer ts.Close() + attestationURI, err := url.ParseRequestURI(ts.URL) + require.NoError(t, err) + + lggr, logs := logger.TestLoggerObserved(t, zapcore.InfoLevel) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, 0, utils.RandomAddress(), APIIntervalRateLimitDefault) + + ctx := context.Background() + + destTokenData, err := lbtcService.ReadTokenData(ctx, cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta{ + EVM2EVMMessage: cciptypes.EVM2EVMMessage{ + SourceTokenData: [][]byte{srcTokenData}, + TokenAmounts: []cciptypes.TokenAmount{{Token: ccipcalc.EvmAddrToGeneric(utils.ZeroAddress), Amount: nil}}, // trigger failure due to wrong address + }, + }, 0) + require.NoError(t, err) + require.EqualValues(t, []byte(lbtcMessageHash), destTokenData) + + require.Equal(t, 1, logs.Len()) + require.Contains(t, logs.All()[0].Message, "SourceTokenData.extraData size is not 32. This is deposit payload, not sha256(payload). Attestation is disabled onchain") +} + +func TestLBTCReader_expectedOutput(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + response attestationResponse + expectedReturn []byte + expectedError error + }{ + { + name: "expected payloadAndProof when status SESSION_APPROVED", + response: attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSessionApproved, + Attestation: lbtcMessageAttestation, + }, + }, + }, + expectedReturn: payloadAndProof, + expectedError: nil, + }, + { + name: "expected ErrNotReady on status PENDING", + response: attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusPending, + Attestation: lbtcMessageAttestation, + }, + }, + }, + expectedReturn: nil, + expectedError: tokendata.ErrNotReady, + }, + { + name: "expected ErrNotReady on status SUBMITTED", + response: attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusSubmitted, + Attestation: lbtcMessageAttestation, + }, + }, + }, + expectedReturn: nil, + expectedError: tokendata.ErrNotReady, + }, + { + name: "expected ErrUnknownResponse on status UNSPECIFIED", + response: attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusUnspecified, + Attestation: lbtcMessageAttestation, + }, + }, + }, + expectedReturn: nil, + expectedError: ErrUnknownResponse, + }, + { + name: "expected ErrUnknownResponse on status FAILED", + response: attestationResponse{ + Attestations: []messageAttestationResponse{ + { + MessageHash: lbtcMessageHash, + Status: attestationStatusFailed, + Attestation: lbtcMessageAttestation, + }, + }, + }, + expectedReturn: nil, + expectedError: ErrUnknownResponse, + }, + } + + extraData, err := hexutil.Decode(lbtcMessageHash) + require.NoError(t, err) + + srcTokenData, err := abihelpers.EncodeAbiStruct[sourceTokenData](sourceTokenData{ + SourcePoolAddress: utils.RandomAddress().Bytes(), + DestTokenAddress: utils.RandomAddress().Bytes(), + ExtraData: extraData, + }) + require.NoError(t, err) + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + ts := getMockLBTCEndpoint(t, tc.response) + defer ts.Close() + attestationURI, err := url.ParseRequestURI(ts.URL) + require.NoError(t, err) + + lggr := logger.TestLogger(t) + lbtcService := NewLBTCTokenDataReader(lggr, attestationURI, 0, utils.RandomAddress(), APIIntervalRateLimitDefault) + + ctx := context.Background() + + payloadAndProof, err := lbtcService.ReadTokenData(ctx, cciptypes.EVM2EVMOnRampCCIPSendRequestedWithMeta{ + EVM2EVMMessage: cciptypes.EVM2EVMMessage{ + SourceTokenData: [][]byte{srcTokenData}, + TokenAmounts: []cciptypes.TokenAmount{{Token: ccipcalc.EvmAddrToGeneric(utils.ZeroAddress), Amount: nil}}, // trigger failure due to wrong address + }, + }, 0) + + if tc.expectedReturn != nil { + require.EqualValues(t, tc.expectedReturn, payloadAndProof) + } else if tc.expectedError != nil { + require.True(t, strings.Contains(err.Error(), tc.expectedError.Error())) + } + }) + } +} + +func Test_DecodeSourceTokenData(t *testing.T) { + input, err := hexutil.Decode("0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000249f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000267d40f64ecc4d95f3e8b2237df5f37b10812c250000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c47e4b3124597fdf8dd07843d4a7052f2ee80c3000000000000000000000000000000000000000000000000000000000000000e45c70a5050000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc00000000000000000000000062f10ce5b727edf787ea45776bd050308a61150800000000000000000000000000000000000000000000000000000000000003e6000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000") + require.NoError(t, err) + decoded, err := abihelpers.DecodeAbiStruct[sourceTokenData](input) + require.NoError(t, err) + expected, err := hexutil.Decode("0x5c70a5050000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc00000000000000000000000062f10ce5b727edf787ea45776bd050308a61150800000000000000000000000000000000000000000000000000000000000003e60000000000000000000000000000000000000000000000000000000000000006") + require.NoError(t, err) + require.Equal(t, expected, decoded.ExtraData) +} diff --git a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go index fe3a86d2af..89bb17e844 100644 --- a/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go +++ b/core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go @@ -133,7 +133,7 @@ func NewUSDCTokenDataReader( return &TokenDataReader{ lggr: lggr, usdcReader: usdcReader, - httpClient: http.NewObservedIHttpClient(&http.HttpClient{}), + httpClient: http.NewObservedUsdcIHttpClient(&http.HttpClient{}), attestationApi: usdcAttestationApi, attestationApiTimeout: timeout, usdcTokenAddress: usdcTokenAddress, diff --git a/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go b/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go index 080e9b82e3..c9fbc9950d 100644 --- a/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go +++ b/core/services/ocr2/plugins/liquiditymanager/internal/integration_test.go @@ -657,7 +657,7 @@ func deployContracts( // deploy lock/release pool targeting the weth9 contract lockReleasePoolAddress, _, _, err := lock_release_token_pool.DeployLockReleaseTokenPool( - owner, backend, wethAddress, []common.Address{}, armProxyAddress, true, routerAddress) + owner, backend, wethAddress, 18, []common.Address{}, armProxyAddress, true, routerAddress) require.NoError(t, err, "failed to deploy LockReleaseTokenPool contract") backend.Commit() lockReleasePool, err := lock_release_token_pool.NewLockReleaseTokenPool(lockReleasePoolAddress, backend) diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 1dff3e7b7a..516b418ac9 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -563,8 +563,6 @@ func (r *Relayer) NewCCIPExecProvider(rargs commontypes.RelayArgs, pargs commont return nil, err } - usdcConfig := execPluginConfig.USDCConfig - feeEstimatorConfig := estimatorconfig.NewFeeEstimatorConfigService() // CCIPExec reads when dest chain is mantle, and uses it to calc boosting in batching @@ -591,10 +589,8 @@ func (r *Relayer) NewCCIPExecProvider(rargs commontypes.RelayArgs, pargs commont r.chain.LogPoller(), execPluginConfig.SourceStartBlock, execPluginConfig.JobID, - usdcConfig.AttestationAPI, - int(usdcConfig.AttestationAPITimeoutSeconds), - usdcConfig.AttestationAPIIntervalMilliseconds, - usdcConfig.SourceMessageTransmitterAddress, + execPluginConfig.USDCConfig, + execPluginConfig.LBTCConfig, feeEstimatorConfig, ) } diff --git a/core/services/relay/evm/exec_provider.go b/core/services/relay/evm/exec_provider.go index 193f5e3b00..e7454fc65b 100644 --- a/core/services/relay/evm/exec_provider.go +++ b/core/services/relay/evm/exec_provider.go @@ -10,12 +10,13 @@ import ( "go.uber.org/multierr" "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/types" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/lbtc" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" @@ -29,21 +30,21 @@ import ( ) type SrcExecProvider struct { - lggr logger.Logger - versionFinder ccip.VersionFinder - client client.Client - lp logpoller.LogPoller - startBlock uint64 - estimator gas.EvmFeeEstimator - maxGasPrice *big.Int - usdcReader *ccip.USDCReaderImpl - usdcAttestationAPI string - usdcAttestationAPITimeoutSeconds int - usdcAttestationAPIIntervalMilliseconds int - usdcSrcMsgTransmitterAddr common.Address + lggr logger.Logger + versionFinder ccip.VersionFinder + client client.Client + lp logpoller.LogPoller + startBlock uint64 + estimator gas.EvmFeeEstimator + maxGasPrice *big.Int + usdcReader *ccip.USDCReaderImpl + usdcConfig config.USDCConfig + lbtcConfig config.LBTCConfig feeEstimatorConfig estimatorconfig.FeeEstimatorConfigProvider + // TODO: Add lbtc reader & api fields + // these values are nil and are updated for Close() seenOnRampAddress *cciptypes.Address seenSourceChainSelector *uint64 @@ -59,35 +60,31 @@ func NewSrcExecProvider( lp logpoller.LogPoller, startBlock uint64, jobID string, - usdcAttestationAPI string, - usdcAttestationAPITimeoutSeconds int, - usdcAttestationAPIIntervalMilliseconds int, - usdcSrcMsgTransmitterAddr common.Address, + usdcConfig config.USDCConfig, + lbtcConfig config.LBTCConfig, feeEstimatorConfig estimatorconfig.FeeEstimatorConfigProvider, ) (commontypes.CCIPExecProvider, error) { var usdcReader *ccip.USDCReaderImpl var err error - if usdcAttestationAPI != "" { - usdcReader, err = ccip.NewUSDCReader(lggr, jobID, usdcSrcMsgTransmitterAddr, lp, true) + if usdcConfig.AttestationAPI != "" { + usdcReader, err = ccip.NewUSDCReader(lggr, jobID, usdcConfig.SourceMessageTransmitterAddress, lp, true) if err != nil { return nil, fmt.Errorf("new usdc reader: %w", err) } } return &SrcExecProvider{ - lggr: lggr, - versionFinder: versionFinder, - client: client, - estimator: estimator, - maxGasPrice: maxGasPrice, - lp: lp, - startBlock: startBlock, - usdcReader: usdcReader, - usdcAttestationAPI: usdcAttestationAPI, - usdcAttestationAPITimeoutSeconds: usdcAttestationAPITimeoutSeconds, - usdcAttestationAPIIntervalMilliseconds: usdcAttestationAPIIntervalMilliseconds, - usdcSrcMsgTransmitterAddr: usdcSrcMsgTransmitterAddr, - feeEstimatorConfig: feeEstimatorConfig, + lggr: lggr, + versionFinder: versionFinder, + client: client, + estimator: estimator, + maxGasPrice: maxGasPrice, + lp: lp, + startBlock: startBlock, + usdcReader: usdcReader, + usdcConfig: usdcConfig, + lbtcConfig: lbtcConfig, + feeEstimatorConfig: feeEstimatorConfig, }, nil } @@ -116,10 +113,10 @@ func (s *SrcExecProvider) Close() error { return ccip.CloseOnRampReader(s.lggr, versionFinder, *s.seenSourceChainSelector, *s.seenDestChainSelector, *s.seenOnRampAddress, s.lp, s.client) }) unregisterFuncs = append(unregisterFuncs, func() error { - if s.usdcAttestationAPI == "" { + if s.usdcConfig.AttestationAPI == "" { return nil } - return ccip.CloseUSDCReader(s.lggr, s.lggr.Name(), s.usdcSrcMsgTransmitterAddr, s.lp) + return ccip.CloseUSDCReader(s.lggr, s.lggr.Name(), s.usdcConfig.SourceMessageTransmitterAddress, s.lp) }) var multiErr error for _, fn := range unregisterFuncs { @@ -195,24 +192,40 @@ func (s *SrcExecProvider) NewPriceRegistryReader(ctx context.Context, addr ccipt return } -func (s *SrcExecProvider) NewTokenDataReader(ctx context.Context, tokenAddress cciptypes.Address) (tokenDataReader cciptypes.TokenDataReader, err error) { - attestationURI, err2 := url.ParseRequestURI(s.usdcAttestationAPI) - if err2 != nil { - return nil, fmt.Errorf("failed to parse USDC attestation API: %w", err2) +func (s *SrcExecProvider) NewTokenDataReader(ctx context.Context, tokenAddress cciptypes.Address) (cciptypes.TokenDataReader, error) { + tokenAddr, err := ccip.GenericAddrToEvm(tokenAddress) + if err != nil { + return nil, fmt.Errorf("failed to parse token address: %w", err) } - tokenAddr, err2 := ccip.GenericAddrToEvm(tokenAddress) - if err2 != nil { - return nil, fmt.Errorf("failed to parse token address: %w", err2) + switch tokenAddr { + case s.usdcConfig.SourceTokenAddress: + attestationURI, err := url.ParseRequestURI(s.usdcConfig.AttestationAPI) + if err != nil { + return nil, fmt.Errorf("failed to parse USDC attestation API: %w", err) + } + return usdc.NewUSDCTokenDataReader( + s.lggr, + s.usdcReader, + attestationURI, + int(s.usdcConfig.AttestationAPITimeoutSeconds), + tokenAddr, + time.Duration(s.usdcConfig.AttestationAPIIntervalMilliseconds)*time.Millisecond, + ), nil + case s.lbtcConfig.SourceTokenAddress: + attestationURI, err := url.ParseRequestURI(s.lbtcConfig.AttestationAPI) + if err != nil { + return nil, fmt.Errorf("failed to parse USDC attestation API: %w", err) + } + return lbtc.NewLBTCTokenDataReader( + s.lggr, + attestationURI, + int(s.lbtcConfig.AttestationAPITimeoutSeconds), + tokenAddr, + time.Duration(s.lbtcConfig.AttestationAPIIntervalMilliseconds)*time.Millisecond, + ), nil + default: + return nil, fmt.Errorf("unsupported token address: %s", tokenAddress) } - tokenDataReader = usdc.NewUSDCTokenDataReader( - s.lggr, - s.usdcReader, - attestationURI, - s.usdcAttestationAPITimeoutSeconds, - tokenAddr, - time.Duration(s.usdcAttestationAPIIntervalMilliseconds)*time.Millisecond, - ) - return } func (s *SrcExecProvider) NewTokenPoolBatchedReader(ctx context.Context, offRampAddr cciptypes.Address, sourceChainSelector uint64) (cciptypes.TokenPoolBatchedReader, error) { diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 98d2ec5d34..97744f2557 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -6496,6 +6496,110 @@ GasLimitDefault = 400000

+
Mantle Mainnet (5000)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +ChainType = 'optimismBedrock' +FinalityDepth = 1200 +FinalityTagEnabled = true +LogBackfillBatchSize = 1000 +LogPollInterval = '2s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 10000 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 1 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 +NoNewFinalizedHeadsThreshold = '40m0s' + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[Transactions.AutoPurge] +Enabled = false + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'BlockHistory' +PriceDefault = '20 gwei' +PriceMax = '120 gwei' +PriceMin = '1 gwei' +LimitDefault = 80000000000 +LimitMax = 100000000000 +LimitMultiplier = '1' +LimitTransfer = 21000 +EstimateLimit = false +BumpMin = '100 wei' +BumpPercent = 20 +BumpThreshold = 60 +EIP1559DynamicFees = true +FeeCapDefault = '120 gwei' +TipCapDefault = '0' +TipCapMin = '0' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 200 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +EIP1559FeeCapBufferBlocks = 0 +TransactionPercentile = 60 + +[GasEstimator.FeeHistory] +CacheTimeout = '10s' + +[HeadTracker] +HistoryDepth = 1250 +MaxBufferSize = 3 +SamplingInterval = '1s' +MaxAllowedFinalityDepth = 10000 +FinalityTagBypass = true + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +

+
Mantle Sepolia (5003)

```toml @@ -6513,12 +6617,12 @@ BackupLogPollerBlockDelay = 100 MinIncomingConfirmations = 1 MinContractPayment = '0.00001 link' NonceAutoSync = true -NoNewHeadsThreshold = '0s' +NoNewHeadsThreshold = '3m0s' LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '0s' +NoNewFinalizedHeadsThreshold = '1h0m0s' [Transactions] ForwardersEnabled = false @@ -6535,22 +6639,22 @@ Enabled = false Enabled = true [GasEstimator] -Mode = 'L2Suggested' +Mode = 'BlockHistory' PriceDefault = '20 gwei' -PriceMax = '200 gwei' +PriceMax = '120 gwei' PriceMin = '1 gwei' -LimitDefault = 100000000 -LimitMax = 8000000 +LimitDefault = 80000000000 +LimitMax = 100000000000 LimitMultiplier = '1' LimitTransfer = 21000 EstimateLimit = false -BumpMin = '5 gwei' +BumpMin = '100 wei' BumpPercent = 20 -BumpThreshold = 3 -EIP1559DynamicFees = false -FeeCapDefault = '200 gwei' -TipCapDefault = '1 wei' -TipCapMin = '1 wei' +BumpThreshold = 60 +EIP1559DynamicFees = true +FeeCapDefault = '120 gwei' +TipCapDefault = '0' +TipCapMin = '0' [GasEstimator.BlockHistory] BatchSize = 25 @@ -6564,7 +6668,7 @@ TransactionPercentile = 60 CacheTimeout = '10s' [HeadTracker] -HistoryDepth = 600 +HistoryDepth = 1250 MaxBufferSize = 3 SamplingInterval = '1s' MaxAllowedFinalityDepth = 10000 @@ -7467,9 +7571,9 @@ Enabled = true [GasEstimator] Mode = 'BlockHistory' -PriceDefault = '25 gwei' +PriceDefault = '1 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' LimitDefault = 8000000 LimitMax = 8000000 LimitMultiplier = '1' @@ -7570,9 +7674,9 @@ Enabled = true [GasEstimator] Mode = 'BlockHistory' -PriceDefault = '25 gwei' +PriceDefault = '1 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '25 gwei' +PriceMin = '1 gwei' LimitDefault = 8000000 LimitMax = 8000000 LimitMultiplier = '1' @@ -8368,7 +8472,7 @@ AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'optimismBedrock' -FinalityDepth = 900 +FinalityDepth = 3150 FinalityTagEnabled = true LogBackfillBatchSize = 1000 LogPollInterval = '3s' @@ -8383,7 +8487,7 @@ LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '35m0s' +NoNewFinalizedHeadsThreshold = '1h50m0s' [Transactions] ForwardersEnabled = false @@ -9185,6 +9289,210 @@ GasLimitDefault = 400000

+
Bitlayer Testnet (200810)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 21 +FinalityTagEnabled = false +LogBackfillBatchSize = 1000 +LogPollInterval = '15s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 10000 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 3 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 +NoNewFinalizedHeadsThreshold = '0s' + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[Transactions.AutoPurge] +Enabled = false + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'FeeHistory' +PriceDefault = '1 gwei' +PriceMax = '1 gwei' +PriceMin = '40 mwei' +LimitDefault = 8000000 +LimitMax = 8000000 +LimitMultiplier = '1' +LimitTransfer = 21000 +EstimateLimit = false +BumpMin = '5 gwei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '1 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 8 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[GasEstimator.FeeHistory] +CacheTimeout = '10s' + +[HeadTracker] +HistoryDepth = 100 +MaxBufferSize = 3 +SamplingInterval = '1s' +MaxAllowedFinalityDepth = 10000 +FinalityTagBypass = true + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +

+ +
Bitlayer Mainnet (200901)

+ +```toml +AutoCreateKey = true +BlockBackfillDepth = 10 +BlockBackfillSkip = false +FinalityDepth = 21 +FinalityTagEnabled = false +LogBackfillBatchSize = 1000 +LogPollInterval = '15s' +LogKeepBlocksDepth = 100000 +LogPrunePageSize = 10000 +BackupLogPollerBlockDelay = 100 +MinIncomingConfirmations = 3 +MinContractPayment = '0.00001 link' +NonceAutoSync = true +NoNewHeadsThreshold = '3m0s' +LogBroadcasterEnabled = true +RPCDefaultBatchSize = 250 +RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 +NoNewFinalizedHeadsThreshold = '0s' + +[Transactions] +ForwardersEnabled = false +MaxInFlight = 16 +MaxQueued = 250 +ReaperInterval = '1h0m0s' +ReaperThreshold = '168h0m0s' +ResendAfterThreshold = '1m0s' + +[Transactions.AutoPurge] +Enabled = false + +[BalanceMonitor] +Enabled = true + +[GasEstimator] +Mode = 'FeeHistory' +PriceDefault = '1 gwei' +PriceMax = '1 gwei' +PriceMin = '40 mwei' +LimitDefault = 8000000 +LimitMax = 8000000 +LimitMultiplier = '1' +LimitTransfer = 21000 +EstimateLimit = false +BumpMin = '5 gwei' +BumpPercent = 20 +BumpThreshold = 3 +EIP1559DynamicFees = false +FeeCapDefault = '1 gwei' +TipCapDefault = '1 wei' +TipCapMin = '1 wei' + +[GasEstimator.BlockHistory] +BatchSize = 25 +BlockHistorySize = 8 +CheckInclusionBlocks = 12 +CheckInclusionPercentile = 90 +TransactionPercentile = 60 + +[GasEstimator.FeeHistory] +CacheTimeout = '10s' + +[HeadTracker] +HistoryDepth = 100 +MaxBufferSize = 3 +SamplingInterval = '1s' +MaxAllowedFinalityDepth = 10000 +FinalityTagBypass = true + +[NodePool] +PollFailureThreshold = 5 +PollInterval = '10s' +SelectionMode = 'HighestHead' +SyncThreshold = 5 +LeaseDuration = '0s' +NodeIsSyncingEnabled = false +FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' +NewHeadsPollInterval = '0s' + +[OCR] +ContractConfirmations = 4 +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +DeltaCOverride = '168h0m0s' +DeltaCJitterOverride = '1h0m0s' +ObservationGracePeriod = '1s' + +[OCR2] +[OCR2.Automation] +GasLimit = 5400000 + +[Workflow] +GasLimitDefault = 400000 +``` + +

+
Arbitrum Rinkeby (421611)

```toml @@ -9712,7 +10020,7 @@ AutoCreateKey = true BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'optimismBedrock' -FinalityDepth = 900 +FinalityDepth = 3150 FinalityTagEnabled = true LogBackfillBatchSize = 1000 LogPollInterval = '3s' @@ -9727,7 +10035,7 @@ LogBroadcasterEnabled = true RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 FinalizedBlockOffset = 0 -NoNewFinalizedHeadsThreshold = '35m0s' +NoNewFinalizedHeadsThreshold = '1h50m0s' [Transactions] ForwardersEnabled = false diff --git a/go.mod b/go.mod index e184e443e5..2c951f2915 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/scylladb/go-reflectx v1.0.1 github.com/shirou/gopsutil/v3 v3.24.3 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chain-selectors v1.0.30 + github.com/smartcontractkit/chain-selectors v1.0.34 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 @@ -198,6 +198,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/fjl/memsize v0.0.2 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gagliardetto/binary v0.7.7 // indirect diff --git a/go.sum b/go.sum index 1f2c17d9ae..5147966657 100644 --- a/go.sum +++ b/go.sum @@ -333,8 +333,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -1034,8 +1034,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chain-selectors v1.0.30 h1:jk+xVRocgQ/uvKLSd1JzeHJ/v+EKu1BjrreaSGqKzjo= -github.com/smartcontractkit/chain-selectors v1.0.30/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4= +github.com/smartcontractkit/chain-selectors v1.0.34/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= diff --git a/integration-tests/ccip-tests/actions/ccip_helpers.go b/integration-tests/ccip-tests/actions/ccip_helpers.go index 48802fb263..cb04215e9d 100644 --- a/integration-tests/ccip-tests/actions/ccip_helpers.go +++ b/integration-tests/ccip-tests/actions/ccip_helpers.go @@ -4,6 +4,7 @@ import ( "context" crypto_rand "crypto/rand" "encoding/base64" + "encoding/hex" "encoding/json" "fmt" "math/big" @@ -31,8 +32,6 @@ import ( "golang.org/x/exp/rand" "golang.org/x/sync/errgroup" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - chainselectors "github.com/smartcontractkit/chain-selectors" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" @@ -44,6 +43,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/mockserver" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/pkg/helm/reorg" "github.com/smartcontractkit/chainlink-testing-framework/lib/networks" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/contracts/laneconfig" "github.com/smartcontractkit/chainlink/integration-tests/ccip-tests/testconfig" @@ -62,6 +62,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/router" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/token_pool" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/burn_mint_erc677" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/ccipexec" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/testhelpers" @@ -89,6 +90,7 @@ const ( // DefaultResubscriptionTimeout denotes the max backoff duration for resubscription for various watch events // if the subscription keeps failing even after this duration, the test will fail DefaultResubscriptionTimeout = 2 * time.Hour + LBTCValidDestPoolData = "9b11457aa29d65e4940b67b7da16bd370d29bf6a3247a28066f93ac407b8b811" ) // TODO: These should be refactored along with the default CCIP test setup to use optional config functions @@ -177,6 +179,8 @@ type CCIPCommon struct { MulticallContract common.Address ExistingDeployment bool USDCMockDeployment *bool + LBTCMockDeployment *bool + LBTCDestPoolDataAs32Bytes *bool TokenMessenger *common.Address TokenTransmitter *contracts.TokenTransmitter IsConnectionRestoredRecently *atomic.Bool @@ -721,6 +725,10 @@ func (ccipModule *CCIPCommon) IsUSDCDeployment() bool { return pointer.GetBool(ccipModule.USDCMockDeployment) } +func (ccipModule *CCIPCommon) IsLBTCDeployment() bool { + return pointer.GetBool(ccipModule.LBTCMockDeployment) +} + func (ccipModule *CCIPCommon) WriteLaneConfig(conf *laneconfig.LaneConfig) { var btAddresses, btpAddresses []string priceAggrs := make(map[string]string) @@ -880,7 +888,6 @@ func (ccipModule *CCIPCommon) DeployContracts( // deploy bridge token. for i := len(ccipModule.BridgeTokens); i < noOfTokens; i++ { var token *contracts.ERC20Token - if len(tokenDeployerFns) != noOfTokens { if ccipModule.IsUSDCDeployment() && i == 0 { // if it's USDC deployment, we deploy the burn mint token 677 with decimal 6 and cast it to ERC20Token @@ -926,6 +933,16 @@ func (ccipModule *CCIPCommon) DeployContracts( if err != nil { return fmt.Errorf("granting minter role to token transmitter shouldn't fail %w", err) } + } else if ccipModule.IsLBTCDeployment() && i == 0 { + // if it's LBTC deployment, we deploy the burn mint token 677 with decimal 8 and cast it to ERC20Token + lbtcToken, err := ccipModule.tokenDeployer.DeployCustomBurnMintERC677Token("Lombard LBTC", "LBTC", uint8(8), new(big.Int).Mul(big.NewInt(1e6), big.NewInt(1e18))) + if err != nil { + return fmt.Errorf("deploying bridge lbtc token contract shouldn't fail %w", err) + } + token, err = ccipModule.tokenDeployer.NewERC20TokenContract(lbtcToken.ContractAddress) + if err != nil { + return fmt.Errorf("getting new bridge lbtc token contract shouldn't fail %w", err) + } } else { // otherwise we deploy link token and cast it to ERC20Token linkToken, err := ccipModule.tokenDeployer.DeployLinkTokenContract() @@ -990,6 +1007,43 @@ func (ccipModule *CCIPCommon) DeployContracts( } ccipModule.BridgeTokenPools = append(ccipModule.BridgeTokenPools, usdcPool) + } else if ccipModule.IsLBTCDeployment() && i == 0 { + if ccipModule.RMNContract == nil { + return fmt.Errorf("RMNContract is not initialized") + } + rmnContract := *ccipModule.RMNContract + + destPoolData, err := hex.DecodeString(LBTCValidDestPoolData) // valid 32 bytes should call attestation api + if err != nil { + return errors.Wrapf(err, "decoding dest pool data shouldn't fail") + } + if !pointer.GetBool(ccipModule.LBTCDestPoolDataAs32Bytes) { + // non 32 bytes data should not call attestation api and instead consider it as deposit payload. + // lombard has both attested and non-attested flow + destPoolData = []byte{0x12, 0x34, 0x56, 0x78} + } + lbtcPool, err := ccipModule.tokenDeployer.DeployMockLBTCTokenPoolContract(token.Address(), rmnContract, ccipModule.Router.Instance.Address(), destPoolData) + if err != nil { + return errors.Wrapf(err, "deploying mock lbtc bridge token pool shouldn't fail") + } + lbtcInstance, err := burn_mint_erc677.NewBurnMintERC677(token.ContractAddress, ccipModule.ChainClient.Backend()) + if err != nil { + return errors.Wrapf(err, "failed to get dest usdc token instance") + } + opts, err := ccipModule.tokenDeployer.Client().TransactionOpts(token.OwnerWallet) + if err != nil { + return errors.Wrapf(err, "failed to get transaction opts") + } + tx, err := lbtcInstance.GrantMintAndBurnRoles(opts, common.HexToAddress(lbtcPool.Address())) + if err != nil { + return errors.Wrapf(err, "granting minter role to owner shouldn't fail") + } + err = ccipModule.tokenDeployer.Client().ProcessTransaction(tx) + if err != nil { + return errors.Wrapf(err, "failed to process grant mint role") + } + + ccipModule.BridgeTokenPools = append(ccipModule.BridgeTokenPools, lbtcPool) } else { // deploy lock release token pool in case of non-usdc deployment btp, err := ccipModule.tokenDeployer.DeployLockReleaseTokenPoolContract(token.Address(), *ccipModule.RMNContract, ccipModule.Router.Instance.Address()) @@ -1288,6 +1342,8 @@ func DefaultCCIPModule( ExistingDeployment: pointer.GetBool(testGroupConf.ExistingDeployment), MulticallEnabled: pointer.GetBool(testGroupConf.MulticallInOneTx), USDCMockDeployment: testGroupConf.USDCMockDeployment, + LBTCMockDeployment: testGroupConf.LBTCMockDeployment, + LBTCDestPoolDataAs32Bytes: testGroupConf.LBTCDestPoolDataAs32Bytes, NoOfTokensNeedingDynamicPrice: pointer.GetInt(testGroupConf.TokenConfig.NoOfTokensWithDynamicPrice), poolFunds: testhelpers.Link(5), gasUpdateWatcherMu: &sync.Mutex{}, @@ -3845,6 +3901,21 @@ func (lane *CCIPLane) DeployNewCCIPLane( AttestationAPITimeoutSeconds: 5, } } + if !lane.Source.Common.ExistingDeployment && lane.Source.Common.IsLBTCDeployment() { + api := "" + if killgrave != nil { + api = killgrave.InternalEndpoint + } + if env.MockServer != nil { + api = env.MockServer.Config.ClusterURL + } + // Only one LBTC allowed per chain + jobParams.LBTCConfig = &config.LBTCConfig{ + SourceTokenAddress: common.HexToAddress(lane.Source.Common.BridgeTokens[0].Address()), + AttestationAPI: api, + AttestationAPITimeoutSeconds: 5, + } + } if !bootstrapAdded.Load() { bootstrapAdded.Store(true) err := CreateBootstrapJob(jobParams, bootstrapCommit, bootstrapExec) @@ -4533,6 +4604,48 @@ func SetMockServerWithUSDCAttestation( return nil } +// SetMockServerWithLBTCAttestation responds with a mock attestation for any msgHash +// The path is set with regex to match any path that starts with /v1/attestations +func SetMockServerWithLBTCAttestation( + killGrave *ctftestenv.Killgrave, + mockserver *ctfClient.MockserverClient, +) error { + path := "/bridge/v1/deposits/getByHash" + type attestation struct { + Status string `json:"status"` + Attestation string `json:"attestation"` + MessageHash string `json:"message_hash"` + } + response := struct { + Attestations []attestation `json:"attestations"` + }{ + Attestations: []attestation{ + { + MessageHash: "0x" + LBTCValidDestPoolData, //sample hash + Status: "NOTARIZATION_STATUS_SESSION_APPROVED", + Attestation: "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000e45c70a5050000000000000000000000000000000000000000000000000000000000aa36a7000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000845f8e3c214d8d0e4d83fc094f302aa26a12a0bc00000000000000000000000062f10ce5b727edf787ea45776bd050308a61150800000000000000000000000000000000000000000000000000000000000003e60000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000040277eeafba008d767c2636d9428f2ebb13ab29ac70337f4fc34b0f5606767cae546f9be3f12160de6d142e5b3c1c3ebd0bf4298662b32b597d0cc5970c7742fc10000000000000000000000000000000000000000000000000000000000000040bbcd60ecc9e06f2effe7c94161219498a1eb435b419387adadb86ec9a52dfb066ce027532517df7216404049d193a25b85c35edfa3e7c5aa4757bfe84887a3980000000000000000000000000000000000000000000000000000000000000040da4a6dc619b5ca2349783cabecc4efdbc910090d3e234d7b8d0430165f8fae532f9a965ceb85c18bb92e059adefa7ce5835850a705761ab9e026d2db4a13ef9a", + }, + }, + } + if killGrave == nil && mockserver == nil { + return fmt.Errorf("both killgrave and mockserver are nil") + } + log.Info().Str("path", path).Msg("setting attestation-api response for any msgHash") + if killGrave != nil { + err := killGrave.SetAnyValueResponse(path, []string{http.MethodPost}, response) + if err != nil { + return fmt.Errorf("failed to set killgrave server value: %w", err) + } + } + if mockserver != nil { + err := mockserver.SetAnyValueResponse(path, response) + if err != nil { + return fmt.Errorf("failed to set mockserver value: %w URL = %s", err, fmt.Sprintf("%s/%s/.*", mockserver.LocalURL(), path)) + } + } + return nil +} + // SetMockserverWithTokenPriceValue sets the mock responses in mockserver that are read by chainlink nodes // to simulate different price feed value. // it keeps updating the response every 15 seconds to simulate price feed updates diff --git a/integration-tests/ccip-tests/contracts/contract_deployer.go b/integration-tests/ccip-tests/contracts/contract_deployer.go index 579d16da4f..4d2bd93d96 100644 --- a/integration-tests/ccip-tests/contracts/contract_deployer.go +++ b/integration-tests/ccip-tests/contracts/contract_deployer.go @@ -23,7 +23,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain" - "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/wrappers" @@ -36,6 +35,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/lock_release_token_pool_1_4_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/maybe_revert_message_receiver" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_lbtc_token_pool" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_rmn_contract" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_messenger" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_usdc_token_transmitter" @@ -241,6 +241,43 @@ func (e *CCIPContractsDeployer) DeployBurnMintERC677(ownerMintingAmount *big.Int return token, err } +func (e *CCIPContractsDeployer) DeployCustomBurnMintERC677Token(name, symbol string, decimals uint8, ownerMintingAmount *big.Int) (*ERC677Token, error) { + address, _, instance, err := e.evmClient.DeployContract("Burn Mint ERC 677", func( + auth *bind.TransactOpts, + _ bind.ContractBackend, + ) (common.Address, *types.Transaction, interface{}, error) { + return burn_mint_erc677.DeployBurnMintERC677(auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), name, symbol, decimals, new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e9))) + }) + if err != nil { + return nil, err + } + + token := &ERC677Token{ + client: e.evmClient, + logger: e.logger, + ContractAddress: *address, + instance: instance.(*burn_mint_erc677.BurnMintERC677), + OwnerAddress: common.HexToAddress(e.evmClient.GetDefaultWallet().Address()), + OwnerWallet: e.evmClient.GetDefaultWallet(), + } + if ownerMintingAmount != nil { + // grant minter role to owner and mint tokens + err = token.GrantMintRole(common.HexToAddress(e.evmClient.GetDefaultWallet().Address())) + if err != nil { + return token, fmt.Errorf("granting minter role to owner shouldn't fail %w", err) + } + err = e.evmClient.WaitForEvents() + if err != nil { + return token, fmt.Errorf("error in waiting for granting mint role %w", err) + } + err = token.Mint(common.HexToAddress(e.evmClient.GetDefaultWallet().Address()), ownerMintingAmount) + if err != nil { + return token, fmt.Errorf("minting tokens shouldn't fail %w", err) + } + } + return token, err +} + func (e *CCIPContractsDeployer) DeployERC20TokenContract(deployerFn blockchain.ContractDeployer) (*ERC20Token, error) { address, _, _, err := e.evmClient.DeployContract("Custom ERC20 Token", deployerFn) if err != nil { @@ -488,6 +525,82 @@ func (e *CCIPContractsDeployer) DeployUSDCTokenPoolContract(tokenAddr string, to } } +func (e *CCIPContractsDeployer) NewMockLBTCTokenPoolContract(addr common.Address) ( + *TokenPool, + error, +) { + version := VersionMap[TokenPoolContract] + e.logger.Info().Str("Version", version.String()).Msg("New Mock LBTC Token Pool") + switch version { + case Latest: + pool, err := mock_lbtc_token_pool.NewMockLBTCTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + + if err != nil { + return nil, err + } + e.logger.Info(). + Str("Contract Address", addr.Hex()). + Str("Contract Name", "Mock LBTC Token Pool"). + Str("From", e.evmClient.GetDefaultWallet().Address()). + Str("Network Name", e.evmClient.GetNetworkConfig().Name). + Msg("New contract") + poolInterface, err := token_pool.NewTokenPool(addr, wrappers.MustNewWrappedContractBackend(e.evmClient, nil)) + if err != nil { + return nil, err + } + return &TokenPool{ + client: e.evmClient, + logger: e.logger, + Instance: &TokenPoolWrapper{ + Latest: &LatestPool{ + PoolInterface: poolInterface, + MockLBTCPool: pool, + }, + }, + EthAddress: addr, + OwnerAddress: common.HexToAddress(e.evmClient.GetDefaultWallet().Address()), + OwnerWallet: e.evmClient.GetDefaultWallet(), + }, err + default: + return nil, fmt.Errorf("version not supported: %s", version) + } + +} + +func (e *CCIPContractsDeployer) DeployMockLBTCTokenPoolContract(tokenAddr string, rmnProxy common.Address, router common.Address, destPoolData []byte) ( + *TokenPool, + error, +) { + e.logger.Println("In DeployMockLBTCTokenPoolContract") + version := VersionMap[TokenPoolContract] + e.logger.Debug().Str("Token", tokenAddr).Msg("Deploying Mock LBTC token pool") + token := common.HexToAddress(tokenAddr) + switch version { + case Latest: + address, _, _, err := e.evmClient.DeployContract("Mock LBTC Token Pool", func( + auth *bind.TransactOpts, + _ bind.ContractBackend, + ) (common.Address, *types.Transaction, interface{}, error) { + return mock_lbtc_token_pool.DeployMockLBTCTokenPool( + auth, + wrappers.MustNewWrappedContractBackend(e.evmClient, nil), + token, + []common.Address{}, + rmnProxy, + router, + destPoolData, + ) + }) + + if err != nil { + return nil, err + } + return e.NewMockLBTCTokenPoolContract(*address) + default: + return nil, fmt.Errorf("version not supported: %s", version) + } +} + func (e *CCIPContractsDeployer) DeployLockReleaseTokenPoolContract(tokenAddr string, rmnProxy common.Address, router common.Address) ( *TokenPool, error, @@ -505,6 +618,7 @@ func (e *CCIPContractsDeployer) DeployLockReleaseTokenPoolContract(tokenAddr str auth, wrappers.MustNewWrappedContractBackend(e.evmClient, nil), token, + testhelpers.TokenDecimals, []common.Address{}, rmnProxy, true, diff --git a/integration-tests/ccip-tests/contracts/contract_models.go b/integration-tests/ccip-tests/contracts/contract_models.go index 6bb926b3d5..5a4bf5c45a 100644 --- a/integration-tests/ccip-tests/contracts/contract_models.go +++ b/integration-tests/ccip-tests/contracts/contract_models.go @@ -18,6 +18,7 @@ import ( "golang.org/x/exp/rand" "github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/mock_lbtc_token_pool" "github.com/smartcontractkit/chainlink/integration-tests/wrappers" @@ -404,6 +405,7 @@ type LatestPool struct { PoolInterface *token_pool.TokenPool LockReleasePool *lock_release_token_pool.LockReleaseTokenPool USDCPool *usdc_token_pool.USDCTokenPool + MockLBTCPool *mock_lbtc_token_pool.MockLBTCTokenPool } type V1_4_0Pool struct { @@ -478,14 +480,14 @@ func (w TokenPoolWrapper) IsSupportedChain(opts *bind.CallOpts, remoteChainSelec func (w TokenPoolWrapper) ApplyChainUpdates(opts *bind.TransactOpts, update []token_pool.TokenPoolChainUpdate) (*types.Transaction, error) { if w.Latest != nil && w.Latest.PoolInterface != nil { - return w.Latest.PoolInterface.ApplyChainUpdates(opts, update) + return w.Latest.PoolInterface.ApplyChainUpdates(opts, []uint64{}, update) } if w.V1_4_0 != nil && w.V1_4_0.PoolInterface != nil { V1_4_0Updates := make([]token_pool_1_4_0.TokenPoolChainUpdate, len(update)) for i, u := range update { V1_4_0Updates[i] = token_pool_1_4_0.TokenPoolChainUpdate{ RemoteChainSelector: u.RemoteChainSelector, - Allowed: u.Allowed, + Allowed: true, InboundRateLimiterConfig: token_pool_1_4_0.RateLimiterConfig{ IsEnabled: u.InboundRateLimiterConfig.IsEnabled, Capacity: u.InboundRateLimiterConfig.Capacity, @@ -828,9 +830,8 @@ func (pool *TokenPool) SetRemoteChainOnPool(remoteChainSelector uint64, remotePo selectorsToUpdate = append(selectorsToUpdate, token_pool.TokenPoolChainUpdate{ RemoteChainSelector: remoteChainSelector, - RemotePoolAddress: encodedPoolAddress, + RemotePoolAddresses: [][]byte{encodedPoolAddress}, RemoteTokenAddress: encodedTokenAddress, - Allowed: true, InboundRateLimiterConfig: token_pool.RateLimiterConfig{ IsEnabled: true, Capacity: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e9)), diff --git a/integration-tests/ccip-tests/testconfig/ccip.go b/integration-tests/ccip-tests/testconfig/ccip.go index f0b63c8fae..eb294faec5 100644 --- a/integration-tests/ccip-tests/testconfig/ccip.go +++ b/integration-tests/ccip-tests/testconfig/ccip.go @@ -283,6 +283,8 @@ type CCIPTestGroupConfig struct { MaxNoOfLanes int `toml:",omitempty"` ChaosDuration *config.Duration `toml:",omitempty"` USDCMockDeployment *bool `toml:",omitempty"` + LBTCMockDeployment *bool `toml:",omitempty"` + LBTCDestPoolDataAs32Bytes *bool `toml:",omitempty"` CommitOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` ExecOCRParams *contracts.OffChainAggregatorV2Config `toml:",omitempty"` OffRampConfig *OffRampConfig `toml:",omitempty"` diff --git a/integration-tests/ccip-tests/testconfig/override/mainnet.toml b/integration-tests/ccip-tests/testconfig/override/mainnet.toml index 6fa0c3e0dd..cb83da28cb 100644 --- a/integration-tests/ccip-tests/testconfig/override/mainnet.toml +++ b/integration-tests/ccip-tests/testconfig/override/mainnet.toml @@ -1,10 +1,10 @@ [CCIP] [CCIP.ContractVersions] -PriceRegistry = '1.2.0' -OffRamp = '1.2.0' -OnRamp = '1.2.0' -TokenPool = '1.4.0' -CommitStore = '1.2.0' +PriceRegistry = 'latest' +OffRamp = 'latest' +OnRamp = 'latest' +TokenPool = 'latest' +CommitStore = 'latest' [CCIP.Deployments] Data = """ @@ -19,114 +19,114 @@ Data = """ "wrapped_native": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", "src_contracts": { "Avalanche Mainnet": { - "on_ramp": "0x05B723f3db92430FbE4395fD03E40Cc7e9D17988", + "on_ramp": "0xe80cC83B895ada027b722b78949b296Bd1fC5639", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x79f3ABeCe5A3AFFf32D47F4CFe45e7b65c9a2D91", + "on_ramp": "0x14bF7b1Ca6b843f386bfDfa76BFd439919b9378D", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x77b60F85b25fD501E3ddED6C1fe7bF565C08A22A", + "on_ramp": "0xc1b6287A3292d6469F2D8545877E40A2f75CA9a6", "deployed_at": 0 }, "Blast Mainnet": { - "on_ramp": "0x54480425E9e24138fdF1644a1F70007F25abfB46", + "on_ramp": "0xc5490997680a39A1b4684ce2b668AE8A2eBEC7ee", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xCe11020D56e5FDbfE46D9FC3021641FfbBB5AdEE", + "on_ramp": "0x67761742ac8A21Ec4D76CA18cbd701e5A6F3Bef3", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0x1216DC856Af47a833254a280A038185F51C1B5c4", + "on_ramp": "0xc7d6B885d8A4286E6311F79227430b7862311cd3", "deployed_at": 0 }, "Metis Andromeda": { - "on_ramp": "0x5b23A0a103fC9028363B3BC3577e8Bd45B8E819F", + "on_ramp": "0xF1e73c37CDa8E47768De2246AEf5eFD4d76330ae", "deployed_at": 0 }, "Mode Mainnet": { - "on_ramp": "0x3920BF474BB50fffb4B77c1e6e66F65210D1D722", + "on_ramp": "0xd236ea4DDE7de1e594021764E2f6Cd8e8cD7F047", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0xC09b72E8128620C40D89649019d995Cc79f030C3", + "on_ramp": "0xAFECc7b67c6a8e606e94ce4e2F70D83C2206C2cb", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x122F05F49e90508F089eE8D0d868d1a4f3E5a809", + "on_ramp": "0x6087d6C33946670232DF09Fe93eECbaEa3D6864d", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0x66a0046ac9FA104eB38B04cfF391CcD0122E6FbC", + "on_ramp": "0x52e51f245e600C6A87Ef2090d607D2a0eAedA1a6", "deployed_at": 0 }, "ZKSync Mainnet": { - "on_ramp": "0x2C1016053d9873270d71613cA321aE97Fc89201d", + "on_ramp": "0xd67F6713Fa4448548c984a9a7DCFBD13B0fB78D6", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Mainnet": { - "off_ramp": "0xe0109912157d5B75ea8b3181123Cf32c73bc9920", - "commit_store": "0xDaa61b8Cd85977820f92d1e749E1D9F55Da6CCEA", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x95095007d5Cc3E7517A1A03c9e228adA5D0bc376", + "commit_store": "0x46679C9E93B7312A9191A9aD12A73b0c86A33623", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0xB1b705c2315fced1B38baE463BE7DDef531e47fA", - "commit_store": "0x310cECbFf14Ad0307EfF762F461a487C1abb90bf", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x16B9709F8A23B9EB922E8Dde7EaB1Ede7C79F663", + "commit_store": "0x6c3fD63b9BdE38C414530727a5De858ca023cFc4", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0xdB19F77F87661f9be0F557cf9a1ebeCf7D8F206c", - "commit_store": "0x6e37f4c82d9A31cc42B445874dd3c3De97AB553f", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xb62178f8198905D0Fa6d640Bdb188E4E8143Ac4b", + "commit_store": "0x8F60C335a5d2BEC6B32867d3C05C377E88640AaF", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Blast Mainnet": { - "off_ramp": "0x449C59F4Ef3b1802DD054dd7837Eb2Ca91aFAB84", - "commit_store": "0x1E0e8B01693A248b3Aa1e5aca36336F9022Ceac0", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x40314FeC27C5FCc7AaA05e618802A3fEA8E23Ae3", + "commit_store": "0xe7C1904E00BAf5Ca61926da0d1d2B036f14A3ad8", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x542ba1902044069330e8c5b36A84EC503863722f", - "commit_store": "0x060331fEdA35691e54876D957B4F9e3b8Cb47d20", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x91e46cc5590A4B9182e47f40006140A7077Dec31", + "commit_store": "0x86be76A0FA2bD3ECB69330cBb4fd1f62c48F43E3", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0x0C00414D9dcDB2DA7BF8AF26aE2deb617f09e756", - "commit_store": "0x1d464cd86c5C8358d56281aB31d2213534CCEA13", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xeE53872d1C695933B34cE0a11B58613CBBf37e20", + "commit_store": "0x5D88518a198b99F096d2893092a568A97F60B8d4", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Metis Andromeda": { - "off_ramp": "0xeF8dEb0c01f7389AD4ae05DAB30120dba915D53c", - "commit_store": "0xE594a09Aa8bCb55188758826A160615B95A6F3fE", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xF1A4DE22FF792b0457306C39f4CB5822Ab47bdAE", + "commit_store": "0x7F20F4374f8d99201F22434ad59f96bE898A9E0B", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Mode Mainnet": { - "off_ramp": "0xEDE7ADACFbD27DBEBbE2d6C3BaDf12a634a72Faa", - "commit_store": "0x032B209a6B7a00336047505b55a4cBFBd29eE2c1", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xa964355d8eBa62E9b043Eb27eEe6d999Ecc69429", + "commit_store": "0x72C3cdA94eCAC06f7605301dd7144815C2F05A03", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xeeed4D86F3E0e6d32A6Ad29d8De6A0Dc91963A5f", - "commit_store": "0xbbB563c4d98020b9c0f3Cc34c2C0Ef9676806E35", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x27a971D482335d0f8d1917451390734f7372A4a3", + "commit_store": "0x6642E640321e1Ad01eef2fC2ad5427D84A2Ee269", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x9bDA7c8DCda4E39aFeB483cc0B7E3C1f6E0D5AB1", - "commit_store": "0x63a0AeaadAe851b990bBD9dc41f5C1B08b32026d", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xcabc2D71dC3172a154A5A34cD706B050e0ef9b6f", + "commit_store": "0x78B15A57889200F246fc52790c4F3DfC37d82Aa2", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0xEEf5Fb4c4953F9cA9ab1f25cE590776AfFc2c455", - "commit_store": "0xD268286A277095a9C3C90205110831a84505881c", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x893c14bA328A49336a188F972f997C0d7286B8E4", + "commit_store": "0xc986D260b096E8708D82063309fB98734481A045", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "ZKSync Mainnet": { - "off_ramp": "0x50Fc0de671c775301e1Bdf19C17E778D0f978f6F", - "commit_store": "0x87732C2647168818ED49268EdA8A98C2e62ed744", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x052CF0c46375287255c71B179b10a7BFFD97502F", + "commit_store": "0xE19E9765857A2371d849FDd26D62D2463fb7a0a9", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -135,82 +135,82 @@ Data = """ "fee_token": "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", "arm": "0x4f6Ec25f06A114ADD3154DC17fb637F750AdaA31", "router": "0xF4c7E640EdA248ef95972845a62bdC74237805dB", - "price_registry": "0x2d3b38E0a4DFFDad2A613f7760bE1683F272eA18", + "price_registry": "0xfA4edD04eaAcDB07c8D73621bc1790eC50D8c489", "wrapped_native": "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x98f51B041e493fc4d72B8BD33218480bA0c66DDF", + "on_ramp": "0x4e910c8Bbe88DaDF90baa6c1B7850DbeA32c5B29", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x8eaae6462816CB4957184c48B86afA7642D8Bf2B", + "on_ramp": "0xe6e161d55019AA5960DcF0Af9bB6e4d574C69F99", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x268fb4311D2c6CB2bbA01CCA9AC073Fb3bfd1C7c", + "on_ramp": "0x139D4108C23e66745Eda4ab47c25C83494b7C14d", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xD0701FcC7818c31935331B02Eb21e91eC71a1704", + "on_ramp": "0xe8784c29c583C52FA89144b9e5DD91Df2a1C2587", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0xBd0B9317F6AaA1085993F7b4CD468dE7A6428722", + "on_ramp": "0x38fd0DF16F6fD0a2C3Ec6615c73e50F5d027b8bA", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x8629008887E073260c5434D6CaCFc83C3001d211", + "on_ramp": "0x3e3b4Fba004E7824219e79aE9f676d9D41A216Fa", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x97500490d9126f34cf9aA0126d64623E170319Ef", + "on_ramp": "0x5570a4E979d7460F13b84075ACEF69FAc73914b1", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0x9b1ed9De069Be4d50957464b359f98eD0Bf34dd5", + "on_ramp": "0x1DA12512f852DAaba7883340A4074FfB73FA8f21", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x770b1375F86E7a9bf30DBe3F97bea67193dC9135", - "commit_store": "0x23E2b34Ce8e12c53f8a39AD4b3FFCa845f8E617C", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x508Ea280D46E4796Ce0f1Acf8BEDa610c4238dB3", + "commit_store": "0x20bEde74Da64C9aE47FFDf4B87613752CD13bE5D", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x83F53Fc798FEbfFbdF84830AD403b9989187a06C", - "commit_store": "0xD8ceCE2D7794385E00Ce3EF94550E732b0A0B959", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x6CDAa2711BdF0B719911BF00588A79FA97bf9264", + "commit_store": "0x4c05E7AB694C602De3135e025aEc7F7de06E80F7", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0x4d6A796Bc85dcDF41ce9AaEB50B094C6b589748f", - "commit_store": "0xc4C4358FA01a04D6c6FE3b96a351946d4c2715C2", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x37879EBFCb807f8C397fCe2f42DC0F5329AD6823", + "commit_store": "0xDe615EEaD232BEECF6c9b71c293A387B97814E8D", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x5B833BD6456c604Eb396C0fBa477aD49e82B1A2a", - "commit_store": "0x23E23958D220B774680f91c2c91a6f2B2f610d7e", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xE5F21F43937199D4D57876A83077b3923F68EB76", + "commit_store": "0xf0F791901854fAb16adeBd60F0639b960B6ea0CF", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0xDE7ebf1Dc753D916A9fbEC4ae521Ee74EC2d0B5f", - "commit_store": "0x2dbc917b4DD455532015949c3103B64fcDB891b2", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x1181A59FF0BAEd1E0EA77e919185cB8C3D5D3125", + "commit_store": "0x60b2Bc7858D6296D8c4370E35a930E5ddF13085E", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xb68A3EE8bD0A09eE221cf1859Dd5a4d5765188Fe", - "commit_store": "0x83DCeeCf822981F9F8552925eEfd88CAc1905dEA", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x376C0AFC9E64efE0d9202E1F02c3d7f9Dc15e404", + "commit_store": "0xF8728f8Cd9C809287e6a97B71A2cdfD2c3C034cE", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x19250aBE66B88F214d02B6f3BF80F4118290C619", - "commit_store": "0x87A0935cE6254dB1252bBac90d1D07D04846aDCA", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xFf49E35626Eba28Bee1d251782AB75A6cEd91c45", + "commit_store": "0xee2570De22C0D07d0FaBC1169dC5EcA342B838Da", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0x317dE8bc5c3292E494b6496586696d4966A922B0", - "commit_store": "0x97Fbf3d6DEac16adC721aE9187CeEa1e610aC7Af", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xFA5CF1bBFe0Ba5c01e60513EF8960945A99B78A4", + "commit_store": "0x671c83B1Ebe798bfC625E99Be0FF7C48F6E4C491", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -219,100 +219,100 @@ Data = """ "fee_token": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "arm": "0x56491A98199aD2e687Ea9D0cFB7b4AC57B4980Fc", "router": "0x34B03Cb9086d7D758AC55af71584F81A598759FE", - "price_registry": "0x18C3D917D55Bc1784a3d4729AA3e2C1ecd662fFd", + "price_registry": "0xd64aAbD70A71d9f0A00B99F6EFc1626aA2dD43C7", "wrapped_native": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x2788b46BAcFF49BD89562e6bA5c5FBbbE5Fa92F7", + "on_ramp": "0x5577c19bD183e39a007ce4CE236f1D91e9132D5c", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0x6aa72a998859eF93356c6521B72155D355D0Cfd2", + "on_ramp": "0x43F00dBf0Aa61A099c674A74FBdCb93786564950", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x70bC7f7a6D936b289bBF5c0E19ECE35B437E2e36", + "on_ramp": "0xdABb6De5eC48dd2fcF28ac85CbEFe3F19E03F1BD", "deployed_at": 0 }, "Blast Mainnet": { - "on_ramp": "0x02082b23D35d2670B8a636A431F3C30AF9d21e07", + "on_ramp": "0x0b7Bfe549F26AF4B6aA5246CB3FD96C8a5c23a68", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0x0Bf40b034872D0b364f3DCec04C7434a4Da1C8d9", + "on_ramp": "0x35C724666ba31632A56Bad4390eb69f206ab60C7", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0xAc9fE4179816077674d769698306CE6A7C6A1096", + "on_ramp": "0x83AC865c2E18f2CDc1d10126987FfC465e11c0DF", "deployed_at": 0 }, "Mode Mainnet": { - "on_ramp": "0x4A83dA46c148AB5941a379b4cA49f42d14281C78", + "on_ramp": "0x9d4d125788A548C2f69fAC7f8C3A64FA21d18C9e", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x4FEB11A454C9E8038A8d0aDF599Fe7612ce114bA", + "on_ramp": "0x3A3649852A518ab180f41f28288c6c9184563616", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x6bD4754D86fc87FE5b463D368f26a3587a08347c", + "on_ramp": "0x1C88e3Fd2B0a8735D1b19A77AA6e2333555BB95c", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0x1467fF8f249f5bc604119Af26a47035886f856BE", + "on_ramp": "0x9BaFC5E78C0051c7Bcd1EF37FF02fcBd31B37a72", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x3DA330fd8Ef10d93cFB7D4f8ecE7BC1F10811feC", - "commit_store": "0x86D55Ff492cfBBAf0c0D42D4EE615144E78b3D02", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x2A9C65afF39758CeAa24dBD1ACd1BeB3618e6780", + "commit_store": "0x99C7C97Ed175A3f0BFd4f52526E7B1310bB3fc16", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0x37a6fa55fe61061Ae97bF7314Ae270eCF71c5ED3", - "commit_store": "0x1f558F6dcf0224Ef1F78A24814FED548B9602c80", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xc69a550470bEbC5c3Be98A4C3dD26C6AdD90C64b", + "commit_store": "0x49FeF2978569E8061a7CA5cC676d46970613e9D0", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0x574c697deab06B805D8780898B3F136a1F4892Dc", - "commit_store": "0x002B164b1dcf4E92F352DC625A01Be0E890EdEea", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x133672C0F0067573254dd7C8C9818a37d6208610", + "commit_store": "0xEc44EFcf3E0aC801C742e444B130918a5a3A87E9", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Blast Mainnet": { - "off_ramp": "0x6500EDFBD27d34b7B69D0D45865ddaC4A1ceafE1", - "commit_store": "0x3A328B3fA852409415c15271442EFE4c77C04992", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x38cA434FE65D540942A36c84FdFD4B7C7a9a4612", + "commit_store": "0xF70409dC69Bc50aA30b001d45C7F9E2C706Ad387", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x181Bb1E97b0bDD1D85E741ad0943552D3682cc35", - "commit_store": "0x3fF27A34fF0FA77921C3438e67f58da1a83e9Ce1", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xF616733641D420207b8F30db9C4cE39684768991", + "commit_store": "0x7aa39A9c9D539b5E7388872a193b3447D34bf11F", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0xBE9b0cc569E970dAb953d336c670fc6b7c856c19", - "commit_store": "0xEe89CC6C2236d3b99C2D9c0b3b911690F757FadF", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x53AF5cE4534C39582E6a5E3fD77946E0c3BFe870", + "commit_store": "0xe7a0Ffc182E2330d19fF79adEEC637094c02dcA3", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Mode Mainnet": { - "off_ramp": "0x6C702159daA4DEbae32E294c584B1EaF2356cB1A", - "commit_store": "0x73C8d1E9e240331E3345c6fBe6CDFC71B742B69C", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xFc2278eBc27B9d205e3DC9F1b88D6D863D71190D", + "commit_store": "0x92eeb265F465Aff3AE708117ba7aE35279227845", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xE7E080C8d62d595a223C577C7C8d1f75d9A5E664", - "commit_store": "0xF4d53346bDb6d393C74B0B72Aa7D6689a3eAad79", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x3c5E62cdFD08e23a0961ff2A3155CaBb96cbc89D", + "commit_store": "0xDC39E05264D0C17eD16F2Db363364B127Cf56d75", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x26af2046Da85d7f6712D5edCa81B9E3b2e7A60Ab", - "commit_store": "0x4C1dA405a789AC2853A69D8290B8B9b47a0374F8", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x21159ebdA3E6A2437bCD6ef39853042ACC436D2D", + "commit_store": "0x018Bb120265672C699969a9e2193755d4CF1ca16", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0xC027C5AEb230008c243Be463A73571e581F94c13", - "commit_store": "0x2EB426C8C54D740d1FC856eB3Ff96feA03957978", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x512CA54a0F6447AC41c07Da3336DFcA042D88A7B", + "commit_store": "0xae79C737801b04ECA277d50FDeaC4006C3725F62", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -321,91 +321,91 @@ Data = """ "fee_token": "0x4200000000000000000000000000000000000006", "arm": "0x91cB19E7c4Ba9B08CF544cDc9143042150B007C3", "router": "0x881e3A65B4d4a04dD529061dd0071cf975F58bCD", - "price_registry": "0x1bA15c57c8b74cD32443D7583E7f6d7c638aCf46", + "price_registry": "0x6337a58D4BD7Ba691B66341779e8f87d4679923a", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x1E5Ca70d1e7A1B26061125738a880BBeA42FeB21", + "on_ramp": "0x9D0ffA76C7F82C34Be313b5bFc6d42A72dA8CA69", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0xBE5a9E336D9614024B4Fa10D8112671fc9A42d96", + "on_ramp": "0x4be6E0F97EA849FF80773af7a317356E6c646FD7", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0xdd4Fb402d41Beb0eEeF6CfB1bf445f50bDC8c981", + "on_ramp": "0xE5FD5A0ec3657Ad58E875518e73F6264E00Eb754", "deployed_at": 0 }, "Blast Mainnet": { - "on_ramp": "0xCCC32e2794EaD73f0a0a514Ac1c78D048968ab81", + "on_ramp": "0x9A59832b85217C20b17a990A45BD5d0F3de36266", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xDEA286dc0E01Cb4755650A6CF8d1076b454eA1cb", + "on_ramp": "0x56b30A0Dcd8dc87Ec08b80FA09502bAB801fa78e", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0xcDD0e963E0708a4E936202396983E458cFA4A363", + "on_ramp": "0xDcFB24AEbcB9Edfb6746a045DDcae402381F984B", "deployed_at": 0 }, "Mode Mainnet": { - "on_ramp": "0x626aCCbDDD73532df1caEDb5628Fdc40C5f429Ba", + "on_ramp": "0xEB50Fc6F57AAc6bf060A2Dfc6479fED592e6e184", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0xd952FEAcDd5919Cc5E9454b53bF45d4E73dD6457", + "on_ramp": "0x362E6bE957c18e268ad91046CA6b47EB09AD98C1", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x3DB8Bea142e41cA3633890d0e5640F99a895D6A5", + "on_ramp": "0xd3Bde678BB706Cf727A512515C254BcF021dD203", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x8531E63aE9279a1f0D09eba566CD1b092b95f3D5", - "commit_store": "0x327E13f54c7871a2416006B33B4822eAAD357916", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x7D38c6363d5E4DFD500a691Bc34878b383F58d93", + "commit_store": "0x17891fe60a577c5E1e4a4Ddd78E642428A56039f", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0x8345F2fF67e5A65e85dc955DE1414832608E00aD", - "commit_store": "0xd0b13be4c53A6262b47C5DDd36F0257aa714F562", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x61C3f6d72c80A3D1790b213c4cB58c3d4aaFccDF", + "commit_store": "0x700C6715734111a6D1Cf414F46D85627b298B5dd", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x48a51f5D38BE630Ddd6417Ea2D9052B8efc91a18", - "commit_store": "0xF97127e77252284EC9D4bc13C247c9D1A99F72B0", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x45d524b6Fe99C005C52C65c578dc0e02d9751083", + "commit_store": "0x1ccD0D49e283789a73E882B0ED4B5b1163675c3C", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Blast Mainnet": { - "off_ramp": "0x15F54FDd37ccC8E5a0b64633C95Ef8209Fd86401", - "commit_store": "0x52b5b4f3Cc50E38f736f23897f192430E131ccB8", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x941F0E2E0556aCf60fE0f09972f599d9F8916F01", + "commit_store": "0x575F920e3ef294EA80efB1A4C815EF4B8a67878F", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xEC0cFe335a4d53dBA70CB650Ab56eEc32788F0BB", - "commit_store": "0x0ae3c2c7FB789bd05A450CD3075D11f6c2Ca4F77", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xCA04169671A81E4fB8768cfaD46c347ae65371F1", + "commit_store": "0xb40659aACb709D1D54c80FC0d38b15705358Ce0B", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0xA24D3Bc3A59798a57AF58f69c89DC1C8aFD78F18", - "commit_store": "0x672dbdC3aF7eE37436fe101531D33266D85F33c9", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x300977dBA924af14E166B31F4926892B1f310661", + "commit_store": "0x932D6D5c6647e6495Ed3473ff0F4e31a6056D837", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Mode Mainnet": { - "off_ramp": "0xFC30bFe46b11D4E25C6f7492fd064A70FbF18848", - "commit_store": "0xaeDBe55633F74A291F0A43Daa0Fd719615b78363", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x639Dc04368006544eba7CbC959f3e4361bfEAB0d", + "commit_store": "0x2D3FC7f8b03718157359266ac06AF6373aFee2f1", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xf50c0d2a8B6Db60f1D93E60f03d0413D56153E4F", - "commit_store": "0x16f72C15165f7C9d74c12fDF188E399d4d3724e4", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x18095fbD53184A50C2BB3929a6c62Ca328732062", + "commit_store": "0xa8FA8aE51dB9661e7D1c21141d967d07110036cb", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x75F29f058b31106F99caFdc17c9b26ADfcC7b5D7", - "commit_store": "0xb719616E732581B570232DfB13Ca49D27667Af9f", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x74d574D11977fC8D40f8590C419504cbE178ADB7", + "commit_store": "0x565f70396Ff82C23d25Dd3E57A9A66367dccdF3B", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -418,42 +418,42 @@ Data = """ "wrapped_native": "0x4300000000000000000000000000000000000004", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x42E1f5f5ACCe6e4971D9B9468D7A9Abed8D69DdD", + "on_ramp": "0x28f7E57cEE31241B4B8B72e6b710c4dC2e9bEb28", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x9c98d7aE731b0A53bedffBc1a12d9d43501Ea464", + "on_ramp": "0x01D1A2Ed2053e410177f8E762aF635ee78b7a581", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x955f139225F5d7021EB911ED2787a795f71E5eb6", + "on_ramp": "0xAbBC1fC0C919ecFb0220e90749111e0619abf79A", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xBD9bf9AA79adF083BB7100848Eb15F4e8282E27e", + "on_ramp": "0xEa8112530cA10945C2aA976f8F615582Af9B70fa", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x01A38cd2da195C704bA192fCCDddd8986cb7EdE9", - "commit_store": "0xab6D69db1C1E9B97a26eB3983b0878AdeD248200", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x8e4E966a3f6b3aB56185800a2afFe75CCf7B4DfD", + "commit_store": "0x4a577dC79BfeF5C84a55EF6Df30400083F16AE8d", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0xabC7Dffb2590c44a201EC7532382e1fc01Cd9eEb", - "commit_store": "0xA3086bf1D609d8e8028E8339e4aa4362C7da339D", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x9A9f3714b517231869b97F3b49E2ba1009499d9b", + "commit_store": "0xAB0eCFDE9E681B1CD04D6C5536BafdBada180716", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0x0406F8f66C10Da99ff518bc2242e0Ec486a2c787", - "commit_store": "0xc6A97d753a3001e0B893e5FA2b0ec3d623af6C20", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x5837622b622D3c88Faf5491324575f5c0BB40001", + "commit_store": "0x9fAE0d8F4A15Fb96B999aad81a1C0e39deFDF49e", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x4e0092bBC8EfAb6Eca295caB66986193b90a1Bb9", - "commit_store": "0xd7cA96B58EE33FdB3aa1392c30eD02645b1F28e2", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xFf094AC08B0AA8Ab3d29e034a51199a0ddE3d8C8", + "commit_store": "0x544f068b14e4FAc004579f158ccCE14225264c71", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -466,15 +466,15 @@ Data = """ "wrapped_native": "0x2021B12D8138e2D63cF0895eccABC0DFc92416c6", "src_contracts": { "Ethereum Mainnet": { - "on_ramp": "0x27C96A8a2f70a8408aD6c620717a3bDaA54bb10b", + "on_ramp": "0xc319484eF6cdA3a7f4D470e660b343FB569e9A1e", "deployed_at": 0 } }, "dest_contracts": { "Ethereum Mainnet": { - "off_ramp": "0x90902C0AEE857F3A42f2beBEa38724cE7b7a0cff", - "commit_store": "0x25adA90B241143DD5Df04Fb06C1fF6E7f7624ad9", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x1B12D218280DD1767304A00070101a91f7A61470", + "commit_store": "0x8Ad3FEFf222e2200CbC79cC3AdbaE3b64a37d1F8", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -483,127 +483,127 @@ Data = """ "fee_token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "arm": "0xdCD48419bD5Cd9d1b097695F2af4Ee125aADF84F", "router": "0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D", - "price_registry": "0x020082A7a9c2510e1921116001152DEE4da81985", + "price_registry": "0x8c9b2Efb7c64C394119270bfecE7f54763b958Ad", "wrapped_native": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x925228D7B82d883Dde340A55Fe8e6dA56244A22C", + "on_ramp": "0x69eCC4E2D8ea56E2d0a05bF57f4Fd6aEE7f2c284", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0x3df8dAe2d123081c4D5E946E655F7c109B9Dd630", + "on_ramp": "0xaFd31C0C78785aDF53E4c185670bfd5376249d8A", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x91D25A56Db77aD5147437d8B83Eb563D46eBFa69", + "on_ramp": "0x948306C220Ac325fa9392A6E601042A3CD0b480d", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0xe2c2AB221AA0b957805f229d2AA57fBE2f4dADf7", + "on_ramp": "0xb8a882f3B88bd52D1Ff56A873bfDB84b70431937", "deployed_at": 0 }, "Blast Mainnet": { - "on_ramp": "0x4545F9a17DA50110632C14704a15d893BF9CBD27", + "on_ramp": "0x6751cA96b769129dFE6eB8E349c310deCEDb4e36", "deployed_at": 0 }, "Celo": { - "on_ramp": "0xEd5bE9508ae56531cc0EDe6A3bD588Eb9E2e3cfa", + "on_ramp": "0x741599d9a5a1bfC40A22f530fbCd85E2718e9F90", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0xF538dA6c673A30338269655f4e019B71ba58CFd4", + "on_ramp": "0xf50B9A46C394bD98491ce163d420222d8030F6F0", "deployed_at": 0 }, "Metis Andromeda": { - "on_ramp": "0xa5ef33B57dD8B653F9A9EA7114f46376d18264aC", + "on_ramp": "0x75d536eED32f4c8Bb39F4B0c992163f5BA49B84e", "deployed_at": 0 }, "Mode Mainnet": { - "on_ramp": "0x466a078d17e3706a9414ACc48029EE9Bae4C9b65", + "on_ramp": "0xeA6d4a24B262aB3e61a8A62f018A30beCD086f82", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x86B47d8411006874eEf8E4584BdFD7be8e5549d1", + "on_ramp": "0x3455D8E039736944e66e19eAc77a42e8077B07bf", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x35F0ca9Be776E4B38659944c257bDd0ba75F1B8B", + "on_ramp": "0x15a9D79d6b3485F70bF82bC49dDD1fcB37A7149c", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0xCbE7e5DA76dC99Ac317adF6d99137005FDA4E2C4", + "on_ramp": "0xdEFeADd30D5BFD403d86245b43e39a73d76423cC", "deployed_at": 0 }, "ZKSync Mainnet": { - "on_ramp": "0xD54C93A99CBCb8D865E13DA321B540171795A89f", + "on_ramp": "0x9B14AE850653dD0E30fBC93ab7f77D0d638a365B", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0xeFC4a18af59398FF23bfe7325F2401aD44286F4d", - "commit_store": "0x9B2EEd6A1e16cB50Ed4c876D2dD69468B21b7749", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xdf615eF8D4C64d0ED8Fd7824BBEd2f6a10245aC9", + "commit_store": "0xf7B343A17445F175f2Dd9f5CB29BAf0a8dE75ed3", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0x569940e02D4425eac61A7601632eC00d69f75c17", - "commit_store": "0x2aa101BF99CaeF7fc1355D4c493a1fe187A007cE", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xd98E80C79a15E4dbaF4C40B6cCDF690fe619BFBb", + "commit_store": "0xA9f9bF2b643348c0884f2eBA4F712E833DA9a2b8", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x7Afe7088aff57173565F4b034167643AA8b9171c", - "commit_store": "0x87c55D48DF6EF7B08153Ab079e76bFEcbb793D75", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x66d84fedED0e51aeB47ceD1BB2fc0221Ae8D7C12", + "commit_store": "0x9B9Ec8E26955c034828bBD78E22ab258d983dCdb", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0xdf85c8381954694E74abD07488f452b4c2Cddfb3", - "commit_store": "0x8DC27D621c41a32140e22E2a4dAf1259639BAe04", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x6B4B6359Dd5B47Cdb030E5921456D2a0625a9EbD", + "commit_store": "0xDaC3A82Cc5e7C137bF28e6EF4F68f29D66205ffe", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Blast Mainnet": { - "off_ramp": "0x1a904DbbaDdE629a1460e2F6E2E485Ce06Ed7599", - "commit_store": "0x3CB2A81bb8a188C5353CdFa9994ed8666556FC53", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xF4468E56179e6EF59d6f5B133D9355AAD91Ea9ae", + "commit_store": "0x52275dC17f9eD92230C8C4d57fD36d128701f694", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Celo": { - "off_ramp": "0xd5083684eE92dDeA117636ae5E2F1cb7fE4dfd46", - "commit_store": "0x831097033C88c82a7F1897b168Aa88cC44540C8f", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x794aE32b63b8a82a6e2Ec5017bbC6bfbddA5ce96", + "commit_store": "0x95deB0c4bB9168202d50E874865f9A1842b82D64", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0xE93ec2A57e38C8541c893348cCafEAB01F7D47d4", - "commit_store": "0x118a9389960F86390A4F14ce4C95D6ff076C6bFC", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x70C705ff3eCAA04c8c61d581a59a168a1c49c2ec", + "commit_store": "0x9D93D536Ced80871Bf3DA5Bb47bAedE62c794f8A", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Metis Andromeda": { - "off_ramp": "0xCe6364dBe64D2789D916180131fAda2ABFF702E8", - "commit_store": "0x3d8a95adA63D406ee8232562AbD83CEdb0B90466", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x330349112e13232131Da51f9f3b153d825f65e61", + "commit_store": "0x0f89C7c0586536B618e0469402e1c8234bc52959", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Mode Mainnet": { - "off_ramp": "0xE8af3b68eDfFf65Ce48648009982380701f09B92", - "commit_store": "0x76264869a3eBF51a59FCa5ABa84ee2867c7F190e", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xb57D52F7Cb7BBD19a117585bbaf712108E56dd8f", + "commit_store": "0x01346721418045A6c07b71052e452eF8615e9084", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xB095900fB91db00E6abD247A5A5AD1cee3F20BF7", - "commit_store": "0x4af4B497c998007eF83ad130318eB2b925a79dc8", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x562a2025E60AA19Aa03Ea41D70ea1FD3286d1D3B", + "commit_store": "0x83F3DA5aa2C7534d694B0acde7624573c830250D", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x0af338F0E314c7551bcE0EF516d46d855b0Ee395", - "commit_store": "0xD37a60E8C36E802D2E1a6321832Ee85556Beeb76", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x718672076D6d51E4c76142B37bC99E4945d704a3", + "commit_store": "0x57b548C9c213EA2bcf60193E3D7fd2d2b53Fb9b3", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0x3a129e6C18b23d18BA9E6Aa14Dc2e79d1f91c6c5", - "commit_store": "0x31f6ab382DDeb9A316Ab61C3945a5292a50a89AB", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xc1EcCE580B2C96f4fd202fB7c2a259ECe19a1bF2", + "commit_store": "0xA4755Cd68CA2092447c8c842659a2931f9110320", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "ZKSync Mainnet": { - "off_ramp": "0xb368c8946D9fa5A497cDe1Dff7213f9CdfD143Bf", - "commit_store": "0xa4d264470a67D9f6682EE12Bdc9c35Df44e3F194", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x6868FefbEFDc2B2FB75E6ED216dB1BeC02563D69", + "commit_store": "0x0d26BaE784c8986502E072F4e73B6168e2052045", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -616,69 +616,69 @@ Data = """ "wrapped_native": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x7A36511202f54a8A3Bc62Cc1df24bd391f7c9864", + "on_ramp": "0x140E6D5ba903F684944Dd27369d767DdEf958c9B", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0x732753869bc6bB07Ec81A403F926bbF6fC2FeaE2", + "on_ramp": "0xB707a6D1d32CE99D5c669DeE71D30d25a066D32c", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0xD5d33bc0BF395B39514B7f9f8F66ebc9D8e650Cb", + "on_ramp": "0xb485634dd2E545091722b9d4843d3644addf97e3", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x400eFb50480a73FEc02b115b53F0Ec6EcFf03C67", + "on_ramp": "0xAAb6D9fc00aAc37373206e91789CcDE1E851b3E4", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0x0F246651F1c2275B4E14d8ae166D1fd3Af05c405", + "on_ramp": "0x014ABcfDbCe9F67d0Df34574664a6C0A241Ec03A", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x391516732884d3F8Eec3301C19b819E6e6044C17", + "on_ramp": "0x9379b446fcA75CA57834a4dA33f64ae317Be05e4", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x566c7A2Cb557c36082301B97E998721D14E4bF7d", + "on_ramp": "0xD7a49AfEA62E77Ad6BEB2ed64673026271aae188", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x1bee1FD97824288a36B725f9CF20E07A67d5113b", - "commit_store": "0xB3a48e8664C5dE26822ae44577b100b717C36a54", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x2C1539696E29012806a15Bcd9845Ed1278a9fd63", + "commit_store": "0x5b1762a6023157edaf2c46c818f447B1940765D6", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0x633c19cCD7A818770f7BF59eB9C5AB632CDbc4D5", - "commit_store": "0xbbC073fb2D424eA45A571cc4dd91745E45d0aC73", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xe596D90EF0AEe10257109AC8394a85F8944bF6D0", + "commit_store": "0xd6Dc07804AE06f575C28094F99aCdDC1535904e7", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x4D90524de5783257fd64d1a20689a5b9Bad25de0", - "commit_store": "0xAae8De9f1B7e2FFF0563c2BBf0c69593BD517b52", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x972a85d7ba0209F1896992B2687cC728cf769e50", + "commit_store": "0x5FB18729651f1EDA5ed5ac67594FD94Fa3DBcd29", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0x9118303DE7f4342F9B057f6EC1Be282aa543D99C", - "commit_store": "0xa75f463b8a1d8bf7694Ac13E02938894F45eFbaA", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xbeEDd1C5C13C5886c3d600e94Ff9e82C04A53C38", + "commit_store": "0x392304E3cb636f75Dc95340672F3b8A2359d5Ebc", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xFF61E57A2eE83FA262006C2DaF0D5fB2b36F3070", - "commit_store": "0xF433De9A293553c133E2dB90e226c2F2911f435C", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x658d9ae41A9c291De423d3B4B6C064f6dD0e7Ed2", + "commit_store": "0xd23391fCBb8a41b971f90bC6e95CC8beaD885221", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0x9D3aA479525a5BcE776dD83769e9F9b5B4dD4193", - "commit_store": "0x2B721632693A8BbABa3bA5F125C8cD33D66F28F7", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xd84E2316634ab6516Ecc829E2367633bfB3e4B6D", + "commit_store": "0x9d432DaF8aF8803baF6Cf560CF0f115c7D7b7f16", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x9714098CDdAc380D4443293C55B6CBf6D6bbDbEb", - "commit_store": "0x4338f204C7698eE678d6c44117503f812ca1FA69", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x6d6a4a60E0E23dbea089c0fEbbA9c5912f02bc57", + "commit_store": "0x9CBe49E232aEF27B9d98aC752354879efd7b1E70", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -691,15 +691,15 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000001", "src_contracts": { "WeMix Mainnet": { - "on_ramp": "0x3C5Ab46fA1dB1dECD854224654313a69bf9fcAD3", + "on_ramp": "0xf3baf38136b55F656CC5fdd4417EB6C160877104", "deployed_at": 0 } }, "dest_contracts": { "WeMix Mainnet": { - "off_ramp": "0x2B555774B3D1dcbcd76efb7751F3c5FbCFABC5C4", - "commit_store": "0x213124614aAf31eBCE7c612A12aac5f8aAD77DE4", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xcB154Bb4ed63FC30C416Dd16A2d1C64D8DE8DfD5", + "commit_store": "0x6091D319080D06e1b656F83Ff001DAc124C55613", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -712,24 +712,24 @@ Data = """ "wrapped_native": "0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x87353b87A373E1551D27EDacDaC1644741c6499F", + "on_ramp": "0x8d3039fE2400151c06Ae84a18CAf38dD9b6Ce58b", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xE43f9eD3146d76E627C2504E5140005027992De6", + "on_ramp": "0xdF5394c57A0570ECe45DE0c0fA2e722A672B9198", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x2cc33de75dAFDb3F8F4f24244a9C420374e2C001", - "commit_store": "0x67fE38dB73be154a1f1a63221F898B9d5EE4eF63", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xc6bA5a79991b3775F28259BA551b30eCb0b6D499", + "commit_store": "0xb81b0EE9675879a2Dcaa70CCC3b2c2D38fa404b0", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xc2B1A8c931582D041ba5fF30AEB9fA828B30754d", - "commit_store": "0x90073Ea7A1Ee4Fe5d638B4216Bc60479Eba52001", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x1fd37Bf813D0723BEF614bC93d9D2Ce1AcB3228f", + "commit_store": "0x7C1efda9F744a2B4f88b924B03C6d6B53E3E390F", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -742,51 +742,51 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x65Ad802d80aD6a96C5a4bc9e57E16099de99Dc7F", + "on_ramp": "0xb2e694efcDa0aeB81700019c3047F92fC3bb520E", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x8C5149ff7Cfd99dd561caE9B7abFAA0Ef79eAbeC", + "on_ramp": "0xeb7E8c40E95Cd31666359AaeB1F2CccaAB935643", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x71dB32eF442c29d8cbf72a9AFcb1Ef12B35b0BF4", + "on_ramp": "0x347A070EA1B04bc2b4A8f14320688C277022C90e", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xbD5F9C193a7fEF5D578C55Ddfe4d08d6BCc15648", + "on_ramp": "0x7d2aF78868993a5a86676BA639eC0412709707D9", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x659303e8d4306D3ea8676FB034d56FB6f37E19d9", + "on_ramp": "0x7AB4329D19A0255DA90Ee8dbAA60f8f0cB7950C1", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x8d3E1b15ebC96cec1ffc092cEcAeA6c1DD00aF9b", - "commit_store": "0x1f1DEa0210aE346A20E270a1C3355d99b0B949D2", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x0Cb870C12013c2d5743585F85b298e129cE57203", + "commit_store": "0x682Af2Cfaa5aE554eF222728fF7C7168232e2Ea5", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x7a57670Fa0Cf1Bc2665a1Ae0f5031b9f5a43dD3a", - "commit_store": "0x18ffb74D94175d00D8bB67B70737dE2cE45eed07", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xdfA601DA2163Ca2C77Eb32126E6B7A97024f6181", + "commit_store": "0xb88F947C85b1c6B1E2A0C22792BA58C40c07a644", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0xEfa90cE6289A2777cd5B8fb991B2D0Be44cA5067", - "commit_store": "0xACa5f0942Bb7fF297A7c25E8364373702D81bb3f", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x30612D8fb7EcD05ECb863560BA8806d88e8BbFAF", + "commit_store": "0xf84d023CCFF8b74e565117cBc034859D06EA1976", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xdF8f09AB4DfB49dEC8a0B8b7f1B7F4134252D3e9", - "commit_store": "0x8Ae635d264f20f1dbC0dea03712C194AdbeF50D1", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xb1caBa234721b8F12C545B3dC25B3F87f6a9c91B", + "commit_store": "0x67Ff921DA5d0B61a9b05BDFa92d9f5f992d7861a", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xE4D6AAF678b986D3E6B7A85FA33d0519716a5525", - "commit_store": "0xBF80E30c8c013Ec0d05e2a959CF8000407C813EC", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x4adcD1FB4ec76A3c9960E048f81C19A51B2eAC49", + "commit_store": "0x7B58aF65DFD717fC0d044D860c8f9A85Ca6813D6", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -795,91 +795,91 @@ Data = """ "fee_token": "0x4200000000000000000000000000000000000006", "arm": "0x1c51b6D5BFcFB7ee82C80949DFD146dB157a7E49", "router": "0x3206695CaE29952f4b0c22a169725a865bc8Ce0f", - "price_registry": "0x9270AAA75F4B9038f4c25fEc665B02a150a90361", + "price_registry": "0xb52545aECE8C73A97E52a146757EC15b90Ed8488", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x0C9BE7Cfd12c735E5aaE047C1dCB845d54E518C3", + "on_ramp": "0x6bA81b83091A23e8F2AA173B2b939fAf9E320DfB", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0xD0D3E757bFBce7ae1881DDD7F6d798DDcE588445", + "on_ramp": "0xB9D655Ad5ba80036725d6c753Fa6AF0454cBF630", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0xa3c9544B82846C45BE37593d5d9ACffbE61BF3A6", + "on_ramp": "0xfC51a4CF925f202d86c6092cda879689d2C17201", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x0b1760A8112183303c5526C6b24569fd3A274f3B", + "on_ramp": "0xfE11cfC957cCa331192EAC60040b442303CcA0a9", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0x55183Db1d2aE0b63e4c92A64bEF2CBfc2032B127", + "on_ramp": "0xE4C51Dc01A4E0aB14c7a7a2ed1655E9CF8A3E698", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0x14aA3CC03583aA557DBca4ce72288Cc5F37DDE34", + "on_ramp": "0x604a9dda2e27D56cfCe457E437a61f4ED0De9dE6", "deployed_at": 0 }, "Mode Mainnet": { - "on_ramp": "0x034eA573B049210315110f7eA11c9618E32F08Ae", + "on_ramp": "0xc6d9Cb39e34D83d21A021504024887A0e96D4e94", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x6B57145e322c877E7D91Ed8E31266eB5c02F7EfC", + "on_ramp": "0x9c725164b60E3f6d4d5b7A2841C63E9FD0988805", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0x82e9f4C5ec4a84E310d60D462a12042E5cbA0954", + "on_ramp": "0x6Dbc8D4e5556FD0B82bB0D67c94D0fA1cd288AbD", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0xaC8C94242aa8234Bf89682aBcDDf805AE8cff61D", - "commit_store": "0x55028780918330FD00a34a61D9a7Efd3f43ca845", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xEB3d6956BCf7b1E29634C8cd182fC9FA740Bce34", + "commit_store": "0x6569761680DaC4Bf940244E3cF198A069E34E91F", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0x8dc6490A6204dF846BaBE809cB695ba17Df1F9B1", - "commit_store": "0xA190660787B6B183Dd82B243eA10e609327c7308", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xF8E38B4503418659F791F2135c4912F85BFB7988", + "commit_store": "0x23CAc55aDDF28179A999858720E9Fe686372083A", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0xE14501F2838F2fA1Ceb52E78ABdA289EcE1705EA", - "commit_store": "0xa8DD25B29787527Df283211C24Ac72B17150A696", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x51f37b538aD2Bcb9Eaf884859BF7C5Ec58AEc885", + "commit_store": "0xF472FEb09544Bf991773f4B94fe3F03e458d1b8d", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0xBAE6560eCa9B77Cb047158C783e36F7735C86037", - "commit_store": "0x6168aDF58e1Ad446BaD45c6275Bef60Ef4FFBAb8", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x519ee6B83f57df95486aeA6E26819cb7b4B8ee99", + "commit_store": "0xCfdF2b21D9777E2B0a221F6b6D8fe176461f058e", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xd2D98Be6a1C241e86C807e51cED6ABb51d044203", - "commit_store": "0x4d75A5cE454b264b187BeE9e189aF1564a68408D", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x9979c2dfEcA9051Cf7f08274d978984B2dB12C60", + "commit_store": "0x9358663E8f89df8EFE2346a3c4c1D65d03300576", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0x4358640A2419119DBe0933b5F2c288c3EB2c082C", - "commit_store": "0x44d1a05ef6e54a3CB35a1497303bA272f15f45ed", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x01449040D92D75c58FaDc9Bc1c0eadc70C550484", + "commit_store": "0xb63230DfcE291DA76FD946EFbc966549F9300347", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Mode Mainnet": { - "off_ramp": "0xDf9717d724828537902Fb0c3B7C56c641463Fa38", - "commit_store": "0x8aEFF283381914E07Fc371601D59648ab6D2C0B1", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x5a4BEeafd345264360E6894a6bc5F54a70814E68", + "commit_store": "0x4E94a327A38E6F3509a5639dCF933CfF6DE93FFD", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x7c6221880A1D62506b1A08Dab3Bf695A49AcDD22", - "commit_store": "0x0684076EE3595221861C50cDb9Cb66402Ec11Cb9", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x4BA0A3bD1E2b70b2fe165A53219e7eF6376849a4", + "commit_store": "0xA0f02e1F9C641C9610f688be84F889fE518b36e3", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0x3e5B3b7559D39563a74434157b31781322dA712D", - "commit_store": "0x7954372FF6f80908e5A2dC2a19d796A1005f91D2", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x2f40dCCb74d8B2dd7af065232a06778f2D019375", + "commit_store": "0xd1111a601BAb64a6428426095206A43710CaE932", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -892,78 +892,78 @@ Data = """ "wrapped_native": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0xD16D025330Edb91259EEA8ed499daCd39087c295", + "on_ramp": "0x13263aC754d1e29430930672E3C0019f2BC44Ba2", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0x5FA30697e90eB30954895c45b028F7C0dDD39b12", + "on_ramp": "0x56cb9Cd82553Bd8157e6504020c38f6DA4971717", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0xF5b5A2fC11BF46B1669C3B19d98B19C79109Dca9", + "on_ramp": "0x164507757F7d5Ab35C6af44EeEB099F5be29Da57", "deployed_at": 0 }, "Base Mainnet": { - "on_ramp": "0x20B028A2e0F6CCe3A11f3CE5F2B8986F932e89b4", + "on_ramp": "0xD26A4E0c664E72e3c29E634867191cB1cb9AF570", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0xFd77c53AA4eF0E3C01f5Ac012BF7Cc7A3ECf5168", + "on_ramp": "0x1DAcBae00c779913e6E9fc1A3323FbA4847ba53C", "deployed_at": 0 }, "Gnosis Mainnet": { - "on_ramp": "0x4616621704C81801A56D29c961F9395ee153d46C", + "on_ramp": "0xcc4A8CFd756895d91B476Dd5461286b300914aBf", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x3111cfbF5e84B5D9BD952dd8e957f4Ca75f728Cf", + "on_ramp": "0x868B71490B36674B3B9006fa8711C6fA26A26631", "deployed_at": 0 }, "WeMix Mainnet": { - "on_ramp": "0x5060eF647a1F66BE6eE27FAe3046faf8D53CeB2d", + "on_ramp": "0x9363330c6d807a1393c1fd35893c64d26931CDe6", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0xa8a9eDa2867c2E0CE0d5ECe273961F1EcC3CC25B", - "commit_store": "0xbD4480658dca8496a65046dfD1BDD44EF897Bdb5", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x60f2788225CeE4a94f8E7589931d5A14Cbc4367d", + "commit_store": "0x4DEc80ED383171EC54699B22B869bE098d3cBac9", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0xB9e3680639c9F0C4e0b02FD81C445094426244Ae", - "commit_store": "0x8c63d4e67f7c4af6FEd2f56A34fB4e01CB807CFF", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x35c1Bb5A9c2F3fa8f8dFF470a6bE7d362CeA1ef3", + "commit_store": "0xB3324b80f50a31b12c0C733560D3aA2a32dc5C33", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x592773924741F0Da889a0dfdab71171Dd11E054C", - "commit_store": "0xEC4d35E1A85f770f4D93BA43a462c9d87Ef7017e", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xE58074f8F56E23836f088Ac8b4f3882c1b4CAcbb", + "commit_store": "0x2110a5f138364d788FDF54eCBa25C1688181cb00", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Base Mainnet": { - "off_ramp": "0xD0FA7DE2D18A0c59D3fD7dfC7aB4e913C6Aa7b68", - "commit_store": "0xF88053B9DAC8Dd3039a4eFa8639159aaa3F2D4Cb", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xF4a9Dbb7f3FBa02e3a244B464e459C32B63857F1", + "commit_store": "0x936A0C8635D7087a2D22494762e9a697C3C3D545", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x45320085fF051361D301eC1044318213A5387A15", - "commit_store": "0x4Dc771B5ef21ef60c33e2987E092345f2b63aE08", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xa06e68a11d5694316Cc819f2FFD02663e3314C7C", + "commit_store": "0xB73d668B26817659E9f48F16b780480B4401cFcE", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Gnosis Mainnet": { - "off_ramp": "0x0A04eC196454825d361886cf4FA113A948164Ef8", - "commit_store": "0x74b72633b63A8f4374a12DB6F609305BC5a1b2d5", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x9e2e4e397226f347d11D3fF8469d0c3FFa750C3B", + "commit_store": "0x75faF05ec32C9dA97E99Eb6fb18b5087DecAAa82", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0xBa754ecd3CFA7E9093F688EAc3860cf9D07Fc0AC", - "commit_store": "0x04C0D5302E3D8Ca0A0019141a52a23B59cdb70e4", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x805c292775Be43b10Cc744ea7E81d9939a08cEa4", + "commit_store": "0x52faD8fb48451AA555c0f59accA1dC7C69B9681B", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "WeMix Mainnet": { - "off_ramp": "0xd7c877ea02310Cce9278D9A048Aa1Bb9aF72F00d", - "commit_store": "0x92A1C927E8E10Ab6A40E5A5154e2300D278d1a67", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xd357Bee1Ff4B1cce7dc0d953a9E5613476781732", + "commit_store": "0x784F81E5c2960a7c7e714D6BA383f0d14e93eD65", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -976,69 +976,69 @@ Data = """ "wrapped_native": "0x7D72b22a74A216Af4a002a1095C8C707d6eC1C5f", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x9aBfd6f4C865610692AB6fb1Be862575809fFabf", + "on_ramp": "0xA89c8E2b85a6BeC901C29107E9B640Ff256fc762", "deployed_at": 0 }, "Avalanche Mainnet": { - "on_ramp": "0xbE0Cfae74677F8dd16a246a3a5c8cbB1973118f4", + "on_ramp": "0xEe41778FdE32C19f8f7E0C780838b1cb76bf8aEA", "deployed_at": 0 }, "BSC Mainnet": { - "on_ramp": "0x56657ec4D15C71f7F3C17ba2b21C853A24Dc5381", + "on_ramp": "0x4A62c842f06AC261c93bb5805289c613f55e2Aeb", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0x190bcE84CF2d500B878966F4Cf98a50d78f2675E", + "on_ramp": "0x6c6Dd4fCa5A7B2F11AA3057AB573DD8878C76C5e", "deployed_at": 0 }, "Kroma Mainnet": { - "on_ramp": "0x47E9AE0A815C94836202E696748A5d5476aD8735", + "on_ramp": "0x19e7aD9B0cb28E4604f91376eE2f7dFF0E66318a", "deployed_at": 0 }, "Optimism Mainnet": { - "on_ramp": "0x70f3b0FD7e6a4B9B623e9AB859604A9EE03e48BD", + "on_ramp": "0x96c4e2B1b2c949F570D5992272B7722a3a1d1709", "deployed_at": 0 }, "Polygon Mainnet": { - "on_ramp": "0x777058C1e1dcE4eB8001F38631a1cd9450816e5a", + "on_ramp": "0x728C5d58f6079744E1e41BDAE16200f6c3725954", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0x2ba68a395B72a6E3498D312efeD755ed2f3CF223", - "commit_store": "0xdAeC234DA83F68707Bb8AcB2ee6a01a5FD4c2391", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x007b0D0e63B5939E64286F4C4afB2D52c6114025", + "commit_store": "0x4D8BaDA9006A6C1cd724ae6F2E343640a0D9706d", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Avalanche Mainnet": { - "off_ramp": "0xFac907F9a1087B846Faa75A14C5d34A8639233d8", - "commit_store": "0xF2812063446c7deD2CA306c67A68364BdDcbEfc5", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x8Ef00c4B45f7B3D895150F0C5D978AC6949Af174", + "commit_store": "0xF580F5ba66Eec295B8bE3Ea613985b6CEc65D7C8", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "BSC Mainnet": { - "off_ramp": "0x6ec9ca4Cba62cA17c55F05ad2000B46192f02035", - "commit_store": "0x84534BE763366a69710E119c100832955795B34B", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x90fC76fBd6B82eAe27b34e136271b94788237738", + "commit_store": "0xda174CA3c585b260fc5c347c88cA5946Ce0f46E8", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0xF92Fa796F5307b029c65CA26f322a6D86f211194", - "commit_store": "0xbeC110FF43D52be2066B06525304A9924E16b73b", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x76DE34244b92aB9F4e9D550269Ef1CAdE0d1A2E9", + "commit_store": "0xcbCFFD854a2d033019B98f5583FcD5caDc2bb802", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Kroma Mainnet": { - "off_ramp": "0xF886d8DC64E544af4835cbf91e5678A54D95B80e", - "commit_store": "0x8794C9534658fdCC44f2FF6645Bf31cf9F6d2d5D", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x64F833f1347fd8Ac6b07a08adCc844FFeB8dF928", + "commit_store": "0xf79eA7f1D70640A7a8A309465ca29b35D4103c11", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Optimism Mainnet": { - "off_ramp": "0x87220D01DF0fF27149B47227897074653788fd23", - "commit_store": "0xF8dD2be2C6FA43e48A17146380CbEBBB4291807b", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xd76783CF6A98C95F5927b4b98D5E1Efb78CFc563", + "commit_store": "0x3837A341afE24A451d868966114A39715e91C6f6", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Polygon Mainnet": { - "off_ramp": "0x8f0229804513A9Bc00c1308414AB279Dbc718ae1", - "commit_store": "0x3A85D1b8641d83a87957C6ECF1b62151213e0842", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xe22ef88FccfE6C304Fd245005e959837C86B52F6", + "commit_store": "0x98Ebd40E2535D404fFB361A85bf6b82D64Bda151", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } }, @@ -1051,24 +1051,24 @@ Data = """ "wrapped_native": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91", "src_contracts": { "Arbitrum Mainnet": { - "on_ramp": "0x9033687a0f03012e015f8f8f2a59da57531d2B43", + "on_ramp": "0x66EcB7c8c122d74f19Fc28b275f213Ef8991B7AB", "deployed_at": 0 }, "Ethereum Mainnet": { - "on_ramp": "0x3B80Fe300c9A611abA0496e2543B66Ff7bD4B9e9", + "on_ramp": "0xD1B33FAd3fF7a793EE39473f865630e3b6371086", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Mainnet": { - "off_ramp": "0xF0a08aC528668D4fe8C4cF235a8B82cbf242Fa9d", - "commit_store": "0x5a3C9b21b03E4eBcccb57D296e7ff54102F04424", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0xd448c815C421fFBd770C2d3B9a9cBa4E33E3885c", + "commit_store": "0xC64f4b53eDb629B3293eE806D9b2aCBd1dDE4e13", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" }, "Ethereum Mainnet": { - "off_ramp": "0x7c887B97F9Bba9355EC10e2bA949AdB491Ef44Fd", - "commit_store": "0xA42bf0c8794FA8853Ec0F1B24a489972e8CF4C30", - "receiver_dapp": "0xb509c046e1182c7b36d2d9733554bc268716803c" + "off_ramp": "0x6BACb854483Ffe310F5Ac08879868E96AE0DC000", + "commit_store": "0x117D1015FD2CBaa32A1fe0e0C913fc02B4D5f115", + "receiver_dapp": "0xB509c046e1182c7B36d2D9733554BC268716803C" } } } diff --git a/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane.toml b/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane.toml index 592cb046ad..5b3c1c26c7 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane.toml @@ -13,41 +13,29 @@ Data = """ "Arbitrum Sepolia": { "is_mock_arm": true, "fee_token": "0xb1D4538B4571d411F07960EF2838Ce337FE1E80E", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", - "router": "0x0fF6b6F3Ad10D66600Fd5CC25b98542A05Aa7Bc2", - "price_registry": "0x25d997d8618e1299418b3D905E40bC353ec89F61", + "arm": "0x5261Eac6b2A158b1eafed0144B4894f41b67b01f", + "router": "0x32C3C32B1b3858e45AFc53e1D0D4607463d47d1C", + "price_registry": "0x845A8190d31602fD0862467880468339E04d885b", "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", "src_contracts": { - "Base Sepolia": { - "on_ramp": "0x6BD0f1efA261Ea84DB219c1284b538A65E530ea1", - "deployed_at": 29428386 + "Avalanche Fuji": { + "on_ramp": "0x59f2492ebDfdD3E99b9198A2313AB0A4113014c8", + "deployed_at": 85949437 }, "Optimism Sepolia": { - "on_ramp": "0x94cd0d171eF08924F0008305e5Bb90b0fC1b61AB", - "deployed_at": 13945916 - }, - "Sepolia Testnet": { - "on_ramp": "0x44225eb3B73B1b52Dd2ecD258F9b63418eC6Bf79", - "deployed_at": 13730868 + "on_ramp": "0x3FF2852A4597E6Ac363340Cadbf1666C4246b4B9", + "deployed_at": 87452680 } }, "dest_contracts": { - "Base Sepolia": { - "off_ramp": "0x21560B4ACAEdb8AA2Dd935618F15da43197bdc12", - "commit_store": "0x27B882c393151ADD910F3557849AF0bb09c7d5A6", + "Avalanche Fuji": { + "off_ramp": "0x1b3841f8923195F1E438B471D0415bBE8b3c133D", + "commit_store": "0x55F4a33AC60D994c2F1A3b400Fc2C40140CF50D9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xAE32FD8Ae148BD88E3da6FaE8Cd7561Eed3ec5Cc", - "commit_store": "0x1f1160Ac7828B647A85c9a6b3A58A232C59D67Ab", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Sepolia Testnet": { - "off_ramp": "0xc136114F379b812345bb7e467ECDdb6D0c87De8b", - "commit_store": "0x42b3EbEA14F6CB803e3C7df84392Efb85CE90168", + "off_ramp": "0x695C84498573AEE9A2Be410Aaf7C275535A337D7", + "commit_store": "0xCBDdCEaE1d51F9C40640fa17fb7a2FeEB51DB702", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -55,47 +43,20 @@ Data = """ "Avalanche Fuji": { "is_mock_arm": true, "fee_token": "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0xD4A51dC0F5C680A8A18eA4Ec3A2f25C6db9424B7", - "router": "0xa62e685aDFF45f38eC94378513D128F168964E99", - "price_registry": "0xdbeA1a10AC6a2B729bF128aE9281Ed420dbE7113", + "arm": "0xd550342aE3f8d5D3D38509900034C8b01f556f0e", + "router": "0x13b766d0fe3e01fa5b02b378DF31724dD5368B37", + "price_registry": "0xAEc164EDF7Be32c6d38565BD09c24DAAA5b5887f", "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { - "BSC Testnet": { - "on_ramp": "0xe4f1F7750352f1c37C15C4A314554d6A79d7d146", - "deployed_at": 31437550 - } - }, - "dest_contracts": { - "BSC Testnet": { - "off_ramp": "0x796D720ea9D4326ff356eadE13b123B267C03C80", - "commit_store": "0xaDb37cFd91fa9b6Df1DaAcbAfB4cDFF41e06c956", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - } - } - }, - "BSC Testnet": { - "is_mock_arm": true, - "fee_token": "0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0xbBF534D89d9640e3886db25FE1ffE603Fe160D75", - "router": "0x9CdA5b77eA23459eBaf2e3092c570a6B5605850A", - "price_registry": "0x9213967a47FC3F15A16A0b813208e8Ccb63Dbba6", - "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", - "src_contracts": { - "Avalanche Fuji": { - "on_ramp": "0x0B4F541a7fcE5c251993Bc19D5A40B661e0463f5", - "deployed_at": 39097639 + "Arbitrum Sepolia": { + "on_ramp": "0x2Df17a22794499963EC0DDD43699B1020fdDD4d3", + "deployed_at": 36151865 } }, "dest_contracts": { - "Avalanche Fuji": { - "off_ramp": "0x41E59DCdDec18d7f79DA5F76Ce567d2c5e301E6B", - "commit_store": "0x9487C01D4b3Ae1c9Ac8740A07f3862D646548A14", + "Arbitrum Sepolia": { + "off_ramp": "0xFFBf82f59e5A7E1f92CE3565A6d6C835dEA19D1A", + "commit_store": "0x79357546378F29Ffcf3B7f3492Ee2Bcb9dB4d847", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -103,29 +64,17 @@ Data = """ "Base Sepolia": { "is_mock_arm": true, "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, "arm": "0x866faB92E04bAE5EDa238A9cbFf1e56E09508Ade", "router": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", "price_registry": "0xD886E2286Fd1073df82462ea1822119600Af80b6", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0xAE32FD8Ae148BD88E3da6FaE8Cd7561Eed3ec5Cc", - "deployed_at": 8133125 - }, "Optimism Sepolia": { "on_ramp": "0x9213967a47FC3F15A16A0b813208e8Ccb63Dbba6", "deployed_at": 11607777 } }, "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x34433469A4d6c8b1B0a1a7B91a5C5C2Dd74c67Fb", - "commit_store": "0xFEE7c8E229F538a98437b9A7D0Dd8fCd8A1Ab569", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, "Optimism Sepolia": { "off_ramp": "0x0f30449bcCaCCaA7221B3f7C3304c4AaD68068E8", "commit_store": "0x17a5746c9cf7eAf23533F060F395B2E38eb976ea", @@ -136,75 +85,30 @@ Data = """ "Optimism Sepolia": { "is_mock_arm": true, "fee_token": "0xE4aB69C077896252FAFBD49EFD26B5D171A32410", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", - "router": "0x0fF6b6F3Ad10D66600Fd5CC25b98542A05Aa7Bc2", - "price_registry": "0x3B80b7Ef5c00Eb892CBe72800C028C47AD6380EF", + "arm": "0xb665817485727D670dABD0F03A155401778C26ea", + "router": "0xF66f5c1417159eb38F622006eDE421BbF5262905", + "price_registry": "0x2dF2c61821A7BCcC851B15ee26BB06307d3bEE2d", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x622CB640F52bFfA68b78b2BD12c1940Ca4899621", - "deployed_at": 8020540 + "on_ramp": "0x21ce68614782BF139bF21d7D2566A0d900c8638C", + "deployed_at": 18379535 }, "Base Sepolia": { "on_ramp": "0x12c164d0778E215873A062cEE2814507417339cB", "deployed_at": 13590651 - }, - "Sepolia Testnet": { - "on_ramp": "0x0c2c8D4266C98f1b9333D5E1a42f3f775A0005d4", - "deployed_at": 8020948 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x37004c1245a2D5541377e87cA29699492a4114D5", - "commit_store": "0x51158Ca439feA9E809Bc063CfA6701747b05254e", + "off_ramp": "0xbeBD1F1f92a739810C102E5E5dc844E7efDbd747", + "commit_store": "0x39DEf7c3E3F2306012B96C1a4Cb1D574CA912CCa", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { "off_ramp": "0xB3F3f362FbeD49fA0086B434051C822B55BaADbD", "commit_store": "0xD4995B99c484CCABc868b26c0B2C2Ef10ecde3d7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Sepolia Testnet": { - "off_ramp": "0x80C2aa80F202FeFdFEEF80f516cFd89768c54057", - "commit_store": "0xc1fE981A040D679511ccb9139ca107aCA67520ef", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - } - } - }, - "Sepolia Testnet": { - "is_mock_arm": true, - "fee_token": "0x779877A7B0D9E8603169DdbD7836e478b4624789", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x9912a7389382ff55f85A29C9378B38F7B992c4aE", - "router": "0x1E1F3d8Ac7Df65fCcFcc52dbF03929cEE95430ac", - "price_registry": "0x4358e81f88bB27222779c1BC85003A11A1c66f6F", - "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", - "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0x420a7B5ABB8CF27A70E1906F797e24509B11093D", - "deployed_at": 5275652 - }, - "Optimism Sepolia": { - "on_ramp": "0xEb4EBC1930bA81416A48a59142D89722163D85ae", - "deployed_at": 5281150 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x224D1eB3aB2b7F23b66f093F9cBBC68dA77a1986", - "commit_store": "0x35c54cF12FF9B29dBa60dc23EdD1de0F13CC7fc5", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Optimism Sepolia": { - "off_ramp": "0xF21d01D6Ef822FBC56FC6c8F23f74fE3A0cb39aa", - "commit_store": "0x7F6AF440Bcc54f70Fd8AC2E534d37196c0bA1A38", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } } @@ -219,10 +123,8 @@ TTL = '8h' selected_networks = [ 'ARBITRUM_SEPOLIA', 'AVALANCHE_FUJI', - 'BASE_SEPOLIA', - 'BSC_TESTNET', +# 'BASE_SEPOLIA', 'OPTIMISM_SEPOLIA', - 'SEPOLIA' ] @@ -230,12 +132,14 @@ selected_networks = [ [CCIP.Groups.smoke] # these are all the valid network pairs NetworkPairs = [ - 'BSC_TESTNET,AVALANCHE_FUJI', - 'SEPOLIA,ARBITRUM_SEPOLIA', - 'BASE_SEPOLIA,OPTIMISM_SEPOLIA' +# 'ARBITRUM_SEPOLIA,AVALANCHE_FUJI', + 'ARBITRUM_SEPOLIA,OPTIMISM_SEPOLIA', + 'OPTIMISM_SEPOLIA,ARBITRUM_SEPOLIA', + 'AVALANCHE_FUJI,ARBITRUM_SEPOLIA', +# 'BASE_SEPOLIA,OPTIMISM_SEPOLIA' ] -BiDirectionalLane = true +BiDirectionalLane = false PhaseTimeout = '40m' LocalCluster = false ExistingDeployment = true @@ -255,8 +159,7 @@ AmountPerToken = 1 [CCIP.Groups.load] NetworkPairs = [ - 'AVALANCHE_FUJI,BSC_TESTNET', - 'SEPOLIA,ARBITRUM_SEPOLIA', + 'ARBITRUM_SEPOLIA,AVALANCHE_FUJI', 'BASE_SEPOLIA,OPTIMISM_SEPOLIA' ] @@ -272,7 +175,7 @@ NoOfTokensPerChain = 1 RequestPerUnitTime = [1] TimeUnit = '6m' TestDuration = '3h' -TestRunName = 'BetaSoakTest_CCIPV1dot5' +TestRunName = 'BetaSoakTest_CCIPV1dot5dot4' FailOnFirstErrorInLoad = true [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] diff --git a/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane_native.toml b/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane_native.toml index fcc063c765..f3a43550d9 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane_native.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/beta-testnet/testnet-beta-workinglane_native.toml @@ -11,129 +11,73 @@ Data = """ { "lane_configs": { "Arbitrum Sepolia": { - "is_native_fee_token": true, "is_mock_arm": true, + "is_native_fee_token": true, "fee_token": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", - "router": "0x0fF6b6F3Ad10D66600Fd5CC25b98542A05Aa7Bc2", - "price_registry": "0x25d997d8618e1299418b3D905E40bC353ec89F61", + "arm": "0x5261Eac6b2A158b1eafed0144B4894f41b67b01f", + "router": "0x32C3C32B1b3858e45AFc53e1D0D4607463d47d1C", + "price_registry": "0x845A8190d31602fD0862467880468339E04d885b", "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", "src_contracts": { - "Base Sepolia": { - "on_ramp": "0x6BD0f1efA261Ea84DB219c1284b538A65E530ea1", - "deployed_at": 29428386 + "Avalanche Fuji": { + "on_ramp": "0x59f2492ebDfdD3E99b9198A2313AB0A4113014c8", + "deployed_at": 85949437 }, "Optimism Sepolia": { - "on_ramp": "0x94cd0d171eF08924F0008305e5Bb90b0fC1b61AB", - "deployed_at": 13945916 - }, - "Sepolia Testnet": { - "on_ramp": "0x44225eb3B73B1b52Dd2ecD258F9b63418eC6Bf79", - "deployed_at": 13730868 + "on_ramp": "0x3FF2852A4597E6Ac363340Cadbf1666C4246b4B9", + "deployed_at": 87452680 } }, "dest_contracts": { - "Base Sepolia": { - "off_ramp": "0x21560B4ACAEdb8AA2Dd935618F15da43197bdc12", - "commit_store": "0x27B882c393151ADD910F3557849AF0bb09c7d5A6", + "Avalanche Fuji": { + "off_ramp": "0x1b3841f8923195F1E438B471D0415bBE8b3c133D", + "commit_store": "0x55F4a33AC60D994c2F1A3b400Fc2C40140CF50D9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xAE32FD8Ae148BD88E3da6FaE8Cd7561Eed3ec5Cc", - "commit_store": "0x1f1160Ac7828B647A85c9a6b3A58A232C59D67Ab", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Sepolia Testnet": { - "off_ramp": "0xc136114F379b812345bb7e467ECDdb6D0c87De8b", - "commit_store": "0x42b3EbEA14F6CB803e3C7df84392Efb85CE90168", + "off_ramp": "0x695C84498573AEE9A2Be410Aaf7C275535A337D7", + "commit_store": "0xCBDdCEaE1d51F9C40640fa17fb7a2FeEB51DB702", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } }, "Avalanche Fuji": { - "is_native_fee_token": true, "is_mock_arm": true, + "is_native_fee_token": true, "fee_token": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", - "bridge_tokens": [ - "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846" - ], - "bridge_tokens_pools": [ - "0x156943ae87AaF63eA9272902Cb05407ec7bc9464" - ], - "price_aggregators": null, - "arm": "0xD4A51dC0F5C680A8A18eA4Ec3A2f25C6db9424B7", - "router": "0xa62e685aDFF45f38eC94378513D128F168964E99", - "price_registry": "0xdbeA1a10AC6a2B729bF128aE9281Ed420dbE7113", + "arm": "0xd550342aE3f8d5D3D38509900034C8b01f556f0e", + "router": "0x13b766d0fe3e01fa5b02b378DF31724dD5368B37", + "price_registry": "0xAEc164EDF7Be32c6d38565BD09c24DAAA5b5887f", "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { - "BSC Testnet": { - "on_ramp": "0xe4f1F7750352f1c37C15C4A314554d6A79d7d146", - "deployed_at": 31437550 - } - }, - "dest_contracts": { - "BSC Testnet": { - "off_ramp": "0x796D720ea9D4326ff356eadE13b123B267C03C80", - "commit_store": "0xaDb37cFd91fa9b6Df1DaAcbAfB4cDFF41e06c956", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - } - } - }, - "BSC Testnet": { - "is_native_fee_token": true, - "is_mock_arm": true, - "fee_token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0xbBF534D89d9640e3886db25FE1ffE603Fe160D75", - "router": "0x9CdA5b77eA23459eBaf2e3092c570a6B5605850A", - "price_registry": "0x9213967a47FC3F15A16A0b813208e8Ccb63Dbba6", - "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", - "src_contracts": { - "Avalanche Fuji": { - "on_ramp": "0x0B4F541a7fcE5c251993Bc19D5A40B661e0463f5", - "deployed_at": 39097639 + "Arbitrum Sepolia": { + "on_ramp": "0x2Df17a22794499963EC0DDD43699B1020fdDD4d3", + "deployed_at": 36151865 } }, "dest_contracts": { - "Avalanche Fuji": { - "off_ramp": "0x41E59DCdDec18d7f79DA5F76Ce567d2c5e301E6B", - "commit_store": "0x9487C01D4b3Ae1c9Ac8740A07f3862D646548A14", + "Arbitrum Sepolia": { + "off_ramp": "0xFFBf82f59e5A7E1f92CE3565A6d6C835dEA19D1A", + "commit_store": "0x79357546378F29Ffcf3B7f3492Ee2Bcb9dB4d847", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } }, "Base Sepolia": { - "is_native_fee_token": true, "is_mock_arm": true, + "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000006", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, "arm": "0x866faB92E04bAE5EDa238A9cbFf1e56E09508Ade", "router": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", "price_registry": "0xD886E2286Fd1073df82462ea1822119600Af80b6", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0xAE32FD8Ae148BD88E3da6FaE8Cd7561Eed3ec5Cc", - "deployed_at": 8133125 - }, "Optimism Sepolia": { "on_ramp": "0x9213967a47FC3F15A16A0b813208e8Ccb63Dbba6", "deployed_at": 11607777 } }, "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x34433469A4d6c8b1B0a1a7B91a5C5C2Dd74c67Fb", - "commit_store": "0xFEE7c8E229F538a98437b9A7D0Dd8fCd8A1Ab569", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, "Optimism Sepolia": { "off_ramp": "0x0f30449bcCaCCaA7221B3f7C3304c4AaD68068E8", "commit_store": "0x17a5746c9cf7eAf23533F060F395B2E38eb976ea", @@ -142,79 +86,33 @@ Data = """ } }, "Optimism Sepolia": { - "is_native_fee_token": true, "is_mock_arm": true, + "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000006", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x2aE6d5495fc20226F433be50e37D59c05D186AaA", - "router": "0x0fF6b6F3Ad10D66600Fd5CC25b98542A05Aa7Bc2", - "price_registry": "0x3B80b7Ef5c00Eb892CBe72800C028C47AD6380EF", + "arm": "0xb665817485727D670dABD0F03A155401778C26ea", + "router": "0xF66f5c1417159eb38F622006eDE421BbF5262905", + "price_registry": "0x2dF2c61821A7BCcC851B15ee26BB06307d3bEE2d", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x622CB640F52bFfA68b78b2BD12c1940Ca4899621", - "deployed_at": 8020540 + "on_ramp": "0x21ce68614782BF139bF21d7D2566A0d900c8638C", + "deployed_at": 18379535 }, "Base Sepolia": { "on_ramp": "0x12c164d0778E215873A062cEE2814507417339cB", "deployed_at": 13590651 - }, - "Sepolia Testnet": { - "on_ramp": "0x0c2c8D4266C98f1b9333D5E1a42f3f775A0005d4", - "deployed_at": 8020948 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x37004c1245a2D5541377e87cA29699492a4114D5", - "commit_store": "0x51158Ca439feA9E809Bc063CfA6701747b05254e", + "off_ramp": "0xbeBD1F1f92a739810C102E5E5dc844E7efDbd747", + "commit_store": "0x39DEf7c3E3F2306012B96C1a4Cb1D574CA912CCa", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { "off_ramp": "0xB3F3f362FbeD49fA0086B434051C822B55BaADbD", "commit_store": "0xD4995B99c484CCABc868b26c0B2C2Ef10ecde3d7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Sepolia Testnet": { - "off_ramp": "0x80C2aa80F202FeFdFEEF80f516cFd89768c54057", - "commit_store": "0xc1fE981A040D679511ccb9139ca107aCA67520ef", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - } - } - }, - "Sepolia Testnet": { - "is_native_fee_token": true, - "is_mock_arm": true, - "fee_token": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", - "bridge_tokens": null, - "bridge_tokens_pools": null, - "price_aggregators": null, - "arm": "0x9912a7389382ff55f85A29C9378B38F7B992c4aE", - "router": "0x1E1F3d8Ac7Df65fCcFcc52dbF03929cEE95430ac", - "price_registry": "0x4358e81f88bB27222779c1BC85003A11A1c66f6F", - "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", - "src_contracts": { - "Arbitrum Sepolia": { - "on_ramp": "0x420a7B5ABB8CF27A70E1906F797e24509B11093D", - "deployed_at": 5275652 - }, - "Optimism Sepolia": { - "on_ramp": "0xEb4EBC1930bA81416A48a59142D89722163D85ae", - "deployed_at": 5281150 - } - }, - "dest_contracts": { - "Arbitrum Sepolia": { - "off_ramp": "0x224D1eB3aB2b7F23b66f093F9cBBC68dA77a1986", - "commit_store": "0x35c54cF12FF9B29dBa60dc23EdD1de0F13CC7fc5", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" - }, - "Optimism Sepolia": { - "off_ramp": "0xF21d01D6Ef822FBC56FC6c8F23f74fE3A0cb39aa", - "commit_store": "0x7F6AF440Bcc54f70Fd8AC2E534d37196c0bA1A38", - "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } } @@ -229,26 +127,24 @@ TTL = '8h' selected_networks = [ 'ARBITRUM_SEPOLIA', 'AVALANCHE_FUJI', - 'BASE_SEPOLIA', - 'BSC_TESTNET', + # 'BASE_SEPOLIA', 'OPTIMISM_SEPOLIA', - 'SEPOLIA', ] -[CCIP.Env.NewCLCluster.Common.ChainlinkImage] -version = "sha-17ce920" [CCIP.Groups.smoke] # these are all the valid network pairs NetworkPairs = [ - 'AVALANCHE_FUJI,BSC_TESTNET', - 'SEPOLIA,ARBITRUM_SEPOLIA', - 'BASE_SEPOLIA,OPTIMISM_SEPOLIA', + # 'ARBITRUM_SEPOLIA,AVALANCHE_FUJI', + 'ARBITRUM_SEPOLIA,OPTIMISM_SEPOLIA', + 'OPTIMISM_SEPOLIA,ARBITRUM_SEPOLIA', + 'AVALANCHE_FUJI,ARBITRUM_SEPOLIA', + # 'BASE_SEPOLIA,OPTIMISM_SEPOLIA' ] -BiDirectionalLane = true -PhaseTimeout = '30m' +BiDirectionalLane = false +PhaseTimeout = '40m' LocalCluster = false ExistingDeployment = true ReuseContracts = true @@ -267,8 +163,7 @@ AmountPerToken = 1 [CCIP.Groups.load] NetworkPairs = [ - 'AVALANCHE_FUJI,BSC_TESTNET', - 'SEPOLIA,ARBITRUM_SEPOLIA', + 'ARBITRUM_SEPOLIA,AVALANCHE_FUJI', 'BASE_SEPOLIA,OPTIMISM_SEPOLIA' ] @@ -284,7 +179,7 @@ NoOfTokensPerChain = 1 RequestPerUnitTime = [1] TimeUnit = '6m' TestDuration = '3h' -TestRunName = 'BetaSoakTest_V2.14.0-1.5.1' +TestRunName = 'BetaSoakTest_CCIPV1dot5dot4' FailOnFirstErrorInLoad = true [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] diff --git a/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_32bytes_data.toml b/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_32bytes_data.toml new file mode 100644 index 0000000000..6f75545693 --- /dev/null +++ b/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_32bytes_data.toml @@ -0,0 +1,11 @@ +[CCIP] +[CCIP.Groups] +[CCIP.Groups.smoke] +LBTCMockDeployment = true +LBTCDestPoolDataAs32Bytes = true + +[CCIP.Groups.smoke.TokenConfig] +NoOfTokensPerChain = 1 + +[CCIP.Groups.smoke.MsgDetails] +NoOfTokens = 1 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_non32bytes_data.toml b/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_non32bytes_data.toml new file mode 100644 index 0000000000..21210acbaf --- /dev/null +++ b/integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_non32bytes_data.toml @@ -0,0 +1,11 @@ +[CCIP] +[CCIP.Groups] +[CCIP.Groups.smoke] +LBTCMockDeployment = true +LBTCDestPoolDataAs32Bytes = false + +[CCIP.Groups.smoke.TokenConfig] +NoOfTokensPerChain = 1 + +[CCIP.Groups.smoke.MsgDetails] +NoOfTokens = 1 \ No newline at end of file diff --git a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml index d3c23b0bcb..c6902eaf49 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/load-prod-testnet.toml @@ -1,10 +1,10 @@ [CCIP] [CCIP.ContractVersions] -PriceRegistry = '1.2.0' -OffRamp = '1.2.0' -OnRamp = '1.2.0' -TokenPool = '1.4.0' -CommitStore = '1.2.0' +PriceRegistry = 'latest' +OffRamp = 'latest' +OnRamp = 'latest' +CommitStore = 'latest' +TokenPool = 'latest' [CCIP.Deployments] @@ -20,32 +20,32 @@ Data = """ "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { "Base Sepolia": { - "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", + "on_ramp": "0x0aEc1AC9F6D0c21332d7a66dDF1Fbcb32cF3B0B3", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xC334DE5b020e056d0fE766dE46e8d9f306Ffa1E2", + "on_ramp": "0x2a9EFdc9F93D9b822129038EFCa4B63Adf3f7FB5", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x5724B4Cc39a9690135F7273b44Dfd3BA6c0c69aD", + "on_ramp": "0x75b9a75Ee1fFef6BE7c4F842a041De7c6153CF4E", "deployed_at": 0 } }, "dest_contracts": { "Base Sepolia": { - "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", - "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", + "off_ramp": "0xf8de9d5924CFD28e31a53B63B4903436D9818d69", + "commit_store": "0xDD7CfECE1bb4e8aC2E8b8281CFE1D44247119471", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", - "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", + "off_ramp": "0x1DF9D94C6916918C935E60d2Cb4Ed265Bf778005", + "commit_store": "0xE7eeBE5882609d28C015d0A89DE1ba4f506F4a03", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", - "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", + "off_ramp": "0x01e3D835b4C4697D7F81B9d7Abc89A6E478E4a2f", + "commit_store": "0x4EC313c1Eb620432f42FB5f4Df27f8A566523c1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -59,32 +59,32 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", + "on_ramp": "0x212e8Fd9cCC330ab54E8141FA7d33967eF1eDafF", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x3b39Cd9599137f892Ad57A4f54158198D445D147", + "on_ramp": "0x2945D35F428CE564F5455AD0AF28BDFCa67e76Ab", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x6486906bB2d85A6c0cCEf2A2831C11A2059ebfea", + "on_ramp": "0x29A1F4ecE9246F0042A9062FB89803fA8B1830cB", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", - "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", + "off_ramp": "0x3Ab3a3d35cAC95FfcFCcc127eF01eA8D87b0A64e", + "commit_store": "0x51313B8C068B5227fa7364E6eCB1382Fb751976F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", - "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", + "off_ramp": "0x8718d1cc138421Dbc1B489CB7884FF68DE7ad867", + "commit_store": "0x3291D453c880E5b59EEd04E600c85268Cd378b7f", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", - "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", + "off_ramp": "0x0ecA23Ef70B828fEDd0A84d2692cB0527B52396A", + "commit_store": "0xA7F84Ec616F8e9Fa593339944E76bda90A9737fE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -98,32 +98,32 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", + "on_ramp": "0x91a144F570ABA7FB7079Fb187A267390E0cc7367", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0xe284D2315a28c4d62C419e8474dC457b219DB969", + "on_ramp": "0x6D22953cdEf8B0C9F0976Cfa52c33B198fEc5881", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xC8b93b46BF682c39B3F65Aa1c135bC8A95A5E43a", + "on_ramp": "0x54b32C2aCb4451c6cF66bcbd856d8A7Cc2263531", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", - "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", + "off_ramp": "0xCb2266c2118b1f30D15CBeB3a885531ABaA1b556", + "commit_store": "0x5Ded92E2CF71a8fF7644a67850F061c38B31BfB4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", - "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", + "off_ramp": "0x960c62A491C30d0a60fD74a59d35B9C02697AdaA", + "commit_store": "0x06963745B3839B998288D1a46a46Ec25991A3D5E", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", - "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", + "off_ramp": "0x2aF9B10A5972D0c36f4d8F85773052c104E319B2", + "commit_store": "0x82FCF55b9e9bAb3066c2863F12a02bBc2Ba33F2F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -137,32 +137,32 @@ Data = """ "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", + "on_ramp": "0x12492154714fBD28F28219f6fc4315d19de1025B", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x2B70a05320cB069e0fB55084D402343F832556E7", + "on_ramp": "0x8F35B097022135E0F46831f798a240Cc8c4b0B01", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x69CaB5A0a08a12BaFD8f5B195989D709E396Ed4d", + "on_ramp": "0xACDfd7a98d853FA3914047Cd46e7f5D53BBC9FbB", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", - "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", + "off_ramp": "0x1DEBa99dC8e2A77832461BD386d83D9FCb133137", + "commit_store": "0x139E06b6dBB1a0C41A1686C091795879c943765A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", - "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", + "off_ramp": "0x662738DC7DE4f7eC63d9f73Cdf9BeA5A58DdcC15", + "commit_store": "0x1e46bAC486Dd878cD57B62845530A52343e39693", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", - "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", + "off_ramp": "0xbfa6f6AAE31acB3A285e80026d6475C1a50d1d0F", + "commit_store": "0xB5FbA97Dc61ec68771a92a15360d9C32c9d054E7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } diff --git a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_native.toml b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_native.toml index 24e7cbc9c8..6281274eac 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_native.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_native.toml @@ -14,71 +14,74 @@ Data = """ "Arbitrum Sepolia": { "is_native_fee_token": true, "fee_token": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", - "bridge_tokens": [ - "0xA8C0c11bf64AF62CDCA6f93D3769B88BdD7cb93D" - ], - "bridge_tokens_pools": [ - "0x99685281Ec520a003F1A726A5a8078c2124c1477" - ], "arm": "0xbcBDf0aDEDC9a33ED5338Bdb4B6F7CE664DC2e8B", "router": "0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165", "price_registry": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x1Cb56374296ED19E86F68fA437ee679FD7798DaA", + "on_ramp": "0x20C8c9F13C6AA402F2545AD15fB7a9CdE9108618", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x7854E73C73e7F9bb5b0D5B4861E997f4C6E8dcC6", + "on_ramp": "0xF1623862e4c9f9Fba1Ac0181C4fF53B4f958F065", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x973CbE752258D32AE82b60CD1CB656Eebb588dF0", + "on_ramp": "0xEfe02eB139D2A82e38184d28E3b65bb176F26ebD", + "deployed_at": 0 + }, + "Metis Sepolia": { + "on_ramp": "0x46a79a6a4B07FD3FC14ea8299A99FE29576776E2", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x701Fe16916dd21EFE2f535CA59611D818B017877", + "on_ramp": "0x0B0c08Bb2fA2EbDe25817009ee39eA1ad9bCaC58", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4205E1Ca0202A248A5D42F5975A8FE56F3E302e9", + "on_ramp": "0x64d78F20aD987c7D52FdCB8FB0777bD00de53210", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xBD4106fBE4699FE212A34Cc21b10BFf22b02d959", + "on_ramp": "0x2F3Daf77A663603826c7750E956b6555DE6f8250", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xcab0EF91Bee323d1A617c0a027eE753aFd6997E4", - "commit_store": "0x0d90b9b96cBFa0D01635ce12982ccE1b70827c7a", + "off_ramp": "0x7245a5947E2F32B66aF74F4dAF91718ea19afaDf", + "commit_store": "0x490AC77BbB26f4FFf876Ded07bCAE6DBe685be98", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xc1982985720B959E66c19b64F783361Eb9B60F26", - "commit_store": "0x28F66bB336f6db713d6ad2a3bd1B7a531282A159", + "off_ramp": "0xF2aB55Ed448A6fAD75013900568B6a927f52e5e0", + "commit_store": "0x833E5995A7422120f445f9B8dD1b9BD1037c68E5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x935C26F9a9122E5F9a27f2d3803e74c75B94f5a3", - "commit_store": "0xEdb963Ec5c2E5AbdFdCF137eF44A445a7fa4787A", + "off_ramp": "0xc1Cb31493fB2386aDC1Ea01F935F2bd8a8dCA388", + "commit_store": "0xe21896657A65c8959F16E1c3Ee5713E85d9EA020", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Metis Sepolia": { + "off_ramp": "0xc47143147Fd62A09618C695c7C03714aCe8db1Cf", + "commit_store": "0x2F42e7B22eE5885158916624Ff00608f4C82313D", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfD404A89e1d195F0c65be1A9042C77745197659e", - "commit_store": "0x84B7B012c95f8A152B44Ab3e952f2dEE424fA8e1", + "off_ramp": "0x4a7E91EF68758aaC66AeD656267bbCD0f9b6c019", + "commit_store": "0xb0A09D6A15FF7A0142DF3F62b2C4D1e11D763Ed0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x1c71f141b4630EBE52d6aF4894812960abE207eB", - "commit_store": "0xaB0c8Ba51E7Fa3E5693a4Fbb39473520FD85d173", + "off_ramp": "0xBed6e9131916d724418C8a6FE810F727302a5c00", + "commit_store": "0xdDb61B6bDa1B46d88f556440fABFe219F6da4F3a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x262e16C8D42aa07bE13e58F81e7D9F62F6DE2830", - "commit_store": "0xc132eFAf929299E5ee704Fa6D9796CFa23Bb8b2C", + "off_ramp": "0x11d486E92d291704D1E25cDbAeee687237247826", + "commit_store": "0xece9353095aC79Db9DD5bf2022690Fa6BffeBCAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -86,89 +89,83 @@ Data = """ "Avalanche Fuji": { "is_native_fee_token": true, "fee_token": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", - "bridge_tokens": [ - "0xD21341536c5cF5EB1bcb58f6723cE26e8D8E90e4" - ], - "bridge_tokens_pools": [ - "0xEC1062cbDf4fBf31B3A6Aac62B6F6F123bb70E12" - ], "arm": "0x7e28DD790214139798446A121cFe950B51304684", "router": "0xF694E193200268f9a4868e4Aa017A0118C9a8177", "price_registry": "0x19e157E5fb1DAec1aE4BaB113fdf077F980704AA", "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x8bB16BEDbFd62D1f905ACe8DBBF2954c8EEB4f66", + "on_ramp": "0xa9946BA30DAeC98745755e4410d6e8E894Edc53B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xF25ECF1Aad9B2E43EDc2960cF66f325783245535", + "on_ramp": "0x906BC7D10947A94ba0252e8C2E34868A466c03ED", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", + "on_ramp": "0x0aEc1AC9F6D0c21332d7a66dDF1Fbcb32cF3B0B3", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x1532e5b204ee2b2244170c78E743CB9c168F4DF9", + "on_ramp": "0x3dda45E731EC1db18B95651d1AF1868aa878468D", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xC334DE5b020e056d0fE766dE46e8d9f306Ffa1E2", + "on_ramp": "0x2a9EFdc9F93D9b822129038EFCa4B63Adf3f7FB5", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0xA82b9ACAcFA6FaB1FD721e7a748A30E3001351F9", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x5724B4Cc39a9690135F7273b44Dfd3BA6c0c69aD", + "on_ramp": "0x75b9a75Ee1fFef6BE7c4F842a041De7c6153CF4E", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x677B5ab5C8522d929166c064d5700F147b15fa33", + "on_ramp": "0x1ff99E67986E83bb5BA34143BaA2735853e5738c", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x90A74072e7B0c2d59e13aB4d8f93c8198c413194", - "commit_store": "0xf3458CFd2fdf4a6CF0Ce296d520DD21eB194828b", + "off_ramp": "0xd88CBA0612f2Ce611BF6d073A94C8FD7E70B4fBd", + "commit_store": "0x9b8279E352bC167F714eef96A4C436bE996643cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x10b28009E5D776F1f5AAA73941CE8953B8f42d26", - "commit_store": "0xacDD582F271eCF22FAd6764cCDe1c4a534b732A8", + "off_ramp": "0x9c40A73F5C7454BB7C178AFa56Ee30bFB2DCf7E6", + "commit_store": "0xE5611af1d63340b711B0468a976651Fb79B17870", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", - "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", + "off_ramp": "0xf8de9d5924CFD28e31a53B63B4903436D9818d69", + "commit_store": "0xDD7CfECE1bb4e8aC2E8b8281CFE1D44247119471", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x56dF55aF5F0A4689f3364230587a68eD6A314fAd", - "commit_store": "0xabA7ff98094c4cc7A075812EefF2CD21f6400235", + "off_ramp": "0x3F5035039C23cDAF032C64c084Dc70F811E62ddD", + "commit_store": "0xf5B0245c7B9e15f0cB0B85FF2B6799a45D61CbaA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", - "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", + "off_ramp": "0x1DF9D94C6916918C935E60d2Cb4Ed265Bf778005", + "commit_store": "0xE7eeBE5882609d28C015d0A89DE1ba4f506F4a03", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0xbeD7F478Ef5627FB2B891fDA29Ca0131f6796D9D", + "commit_store": "0x27a319f58c01380056c86938798aCEAA1AC529e2", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", - "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", + "off_ramp": "0x01e3D835b4C4697D7F81B9d7Abc89A6E478E4a2f", + "commit_store": "0x4EC313c1Eb620432f42FB5f4Df27f8A566523c1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xD0D338318bC6837b091FC7AB5F2a94B7783507d5", - "commit_store": "0xd9D479208235c7355848ff4aF26eB5aacfDC30c6", + "off_ramp": "0x15CcAbf0e3484D4872e25b883163D8cB724d4832", + "commit_store": "0x859f3477B7b4ECc19aDD8cCb19740932F21bD76b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -176,71 +173,74 @@ Data = """ "BSC Testnet": { "is_native_fee_token": true, "fee_token": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", - "bridge_tokens": [ - "0xbFA2ACd33ED6EEc0ed3Cc06bF1ac38d22b36B9e9" - ], - "bridge_tokens_pools": [ - "0x31eDe84776DA37e2404eE88d71c234e92cB672e5" - ], "arm": "0x7D899D26F2E94fFcd4b440C3008B0C6BEfcD3cca", "router": "0xE1053aE1857476f36A3C62580FF9b016E8EE8F6f", "price_registry": "0xCCDf022c9d31DC26Ebab4FB92432724a5b79809a", "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0xa2515683E99F50ADbE177519A46bb20FfdBaA5de", + "on_ramp": "0x2A6f8Ed2e7b222163ef6EcC2327171B479399ab2", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x3E807220Ca84b997c0d1928162227b46C618e0c5", + "on_ramp": "0x97856Bf888F6eEDBBd322B28133BCcF9CA9038f6", + "deployed_at": 0 + }, + "Blast Sepolia": { + "on_ramp": "0xd0049BfFc8e2689Df9236FfA393Ccbf7eae4FbbC", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x8735f991d41eA9cA9D2CC75cD201e4B7C866E63e", + "on_ramp": "0x98dEa9e498F2A7aF6c74C915c88A17FbA09b73C2", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xf37CcbfC04adc1B56a46B36F811D52C744a1AF78", + "on_ramp": "0x363EB789fE31F08547a847D8C38d9b55C7Cf1903", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xB1DE44B04C00eaFe9915a3C07a0CaeA4410537dF", + "on_ramp": "0xC1C6438D60AbE9bF4b1F10460184CE9bD312e328", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x89268Afc1BEA0782a27ba84124E3F42b196af927", + "on_ramp": "0xbc85704EDb79ea84E9D3C18965F7f6A16B0a0440", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0x6e6fFCb6B4BED91ff0CC8C2e57EC029dA7DB80C2", - "commit_store": "0x38Bc38Bd824b6eE87571f9D3CFbe6D6E28E3Dc62", + "off_ramp": "0x95b66acfaaDF122f4EccE52C0aD4Fd997DD1150C", + "commit_store": "0x3af04b1c1e79A6B8A4577Bb47EC33eD2E66AeB47", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x2C61FD7E93Dc79422861282145c59B56dFbc3a8c", - "commit_store": "0x42fAe5B3605804CF6d08632d7A25864e24F792Ae", + "off_ramp": "0x0a5147e1Ac38C79c77031194ef64C8B5353F6EE9", + "commit_store": "0x103864D60b33a479EA7D0e23a37e0ce07198f0A9", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Blast Sepolia": { + "off_ramp": "0xe1e8473218acCB82FBc24Ccd3C5D2dF166cd04f3", + "commit_store": "0x020B047A5Ca88fDB1ad3bAD9A082760fC7F770b6", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x71a44a60832B0F8B63232C9516e7E6aEc3A373Dc", - "commit_store": "0xAC24299a91b72d1Cb5B31147e3CF54964D896974", + "off_ramp": "0x1F7FEBCBb10420E039C333A60A444c1a442d826C", + "commit_store": "0x23Ae763a64D39d6038431a64Bbc4A670C89d82b9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x63440C7747d37bc6154b5538AE32b54FE0965AfA", - "commit_store": "0xAD22fA198CECfC534927aE1D480c460d5bB3460F", + "off_ramp": "0xAAe325adbc9C5a28e4e94Fef170D55de2CA9aA01", + "commit_store": "0xD173Df3A1b23ec42eA5C4669b9c956Bef230efd1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xf1c128Fe52Ea78CcAAB407509292E61ce38C1523", - "commit_store": "0x59dFD870dC4bd76A7B879A4f705Fdcd2595f85f9", + "off_ramp": "0xB513523aee87f838e78b32d2Bacaaf2e94D9f0f9", + "commit_store": "0x21A49164890576504C1f1c4DC9442c42C98771D7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xfd9B19c3725da5B517aA705B848ff3f21F98280e", - "commit_store": "0x3c1F1412563188aBc8FE3fd53E8F1Cb601CaB4f9", + "off_ramp": "0xc985571900DCa62387f93F882AB550472531f5DB", + "commit_store": "0xac5DACfAb1a512E33c49EFE42502863FC1a4BAB3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -248,80 +248,74 @@ Data = """ "Base Sepolia": { "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000006", - "bridge_tokens": [ - "0x88A2d74F47a237a62e7A51cdDa67270CE381555e" - ], - "bridge_tokens_pools": [ - "0x875207858c691F192C606068f417dCf666b2EC6B" - ], "arm": "0x7827dD0481EE18DB646bD250d20A8eA43da52146", "router": "0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93", "price_registry": "0x4D20536e60832bE579Cd38E89Dc03d11E1741FbA", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x58622a80c6DdDc072F2b527a99BE1D0934eb2b50", + "on_ramp": "0xb52eF669d3fCeBee1f31418Facc02a16A6F6B0e5", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", + "on_ramp": "0x212e8Fd9cCC330ab54E8141FA7d33967eF1eDafF", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD806966beAB5A3C75E5B90CDA4a6922C6A9F0c9d", + "on_ramp": "0xd54B44811AE99a18Cb95B4704ba04a65C0163751", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xdd0Ee1F20E93a93634AAcE56105E19423881Df56", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0x3d0115386C01436870a2c47e6297962284E70BA6", + "on_ramp": "0xc59689dFDEF9D953cEFbb58912b304bb38408476", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x3b39Cd9599137f892Ad57A4f54158198D445D147", + "on_ramp": "0x2945D35F428CE564F5455AD0AF28BDFCa67e76Ab", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x6486906bB2d85A6c0cCEf2A2831C11A2059ebfea", + "on_ramp": "0x29A1F4ecE9246F0042A9062FB89803fA8B1830cB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xd364C06ac99a82a00d3eFF9F2F78E4Abe4b9baAA", - "commit_store": "0xdE8d0f47a71eA3fDFBD3162271652f2847939097", + "off_ramp": "0x814E735c5DD19240c85E2513DD926Bc3a39f7140", + "commit_store": "0xFc24B204bfA5C65eD8e2Fc02fDe4FeCb62eA8Ac5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", - "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", + "off_ramp": "0x3Ab3a3d35cAC95FfcFCcc127eF01eA8D87b0A64e", + "commit_store": "0x51313B8C068B5227fa7364E6eCB1382Fb751976F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xd5E9508921434e8758f4540D55c1c066b7cc1598", - "commit_store": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "off_ramp": "0x827CF69409307Cd4c979e652894C297ad5124ab7", + "commit_store": "0x547eBe6077305c3fdF8dA66c66cc14b0779CE00C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x8bB08Bc19771C69E739a2078894523b3DC05a05e", + "commit_store": "0xf163Da63bDB8b9C355d41C755E03125988650109", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xB26647A23e8b4284375e5C74b77c9557aE709D03", - "commit_store": "0x4b4fEB401d3E613e1D6242E155C83A80BF9ac2C9", + "off_ramp": "0x11E16c71D76E43acbcb496A70966380d905B1E32", + "commit_store": "0xEe19f039FaE3EF0F94971f0B7B187223D952ac13", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", - "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", + "off_ramp": "0x8718d1cc138421Dbc1B489CB7884FF68DE7ad867", + "commit_store": "0x3291D453c880E5b59EEd04E600c85268Cd378b7f", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", - "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", + "off_ramp": "0x0ecA23Ef70B828fEDd0A84d2692cB0527B52396A", + "commit_store": "0xA7F84Ec616F8e9Fa593339944E76bda90A9737fE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -329,26 +323,29 @@ Data = """ "Blast Sepolia": { "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000023", - "bridge_tokens": [ - "0x8D122C3e8ce9C8B62b87d3551bDfD8C259Bb0771" - ], - "bridge_tokens_pools": [ - "0xFb04129aD1EEDB741CC705ebC1978a7aB63e51f6" - ], "arm": "0x09c1Ed4b112Fb33e594F2aACfEF407e2F14d7F9b", "router": "0xfb2f2A207dC428da81fbAFfDDe121761f8Be1194", "price_registry": "0xc8acE9dF450FaD007755C6C9AB4f0e9c8626E29C", "wrapped_native": "0x4200000000000000000000000000000000000023", "src_contracts": { + "BSC Testnet": { + "on_ramp": "0x6eA6f63b689b5597A0C06a5Eb8DcDFD86383857A", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x85Ef19FC4C63c70744995DC38CAAEC185E0c619f", + "on_ramp": "0x154aDEF773a848da8229D81De73a7b0844400ebd", "deployed_at": 0 } }, "dest_contracts": { + "BSC Testnet": { + "off_ramp": "0xd9dE4aCD27E814bfe70CA33d2A4d079e740626Bd", + "commit_store": "0xe8fF7e22c54f76F453d6072A9d3a12B1D9AbA137", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x92cD24C278D34C726f377703E50875d8f9535dC2", - "commit_store": "0xcE1b4D50CeD56850182Bd58Ace91171cB249B873", + "off_ramp": "0x46DD4e3e2b8a18409646F1C15bf3799a481e67f6", + "commit_store": "0x8250f9E992dda66791dd8b5d356B867ae53382cF", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -356,26 +353,20 @@ Data = """ "Celo Alfajores": { "is_native_fee_token": true, "fee_token": "0x99604d0e2EfE7ABFb58BdE565b5330Bb46Ab3Dca", - "bridge_tokens": [ - "0x7e503dd1dAF90117A1b79953321043d9E6815C72" - ], - "bridge_tokens_pools": [ - "0xC6683ac4a0F62803Bec89a5355B36495ddF2C38b" - ], "arm": "0xEbe35aA4F5e707485484c992AF2069a457b9bBB1", "router": "0xb00E95b773528E2Ea724DB06B75113F239D15Dca", "price_registry": "0x8F048206D11B2c69b8963E2EBd5968D141e022f4", "wrapped_native": "0x99604d0e2EfE7ABFb58BdE565b5330Bb46Ab3Dca", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x16a020c4bbdE363FaB8481262D30516AdbcfcFc8", + "on_ramp": "0x68A4f57A499563192C606a898BAf503A43fcDB4D", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0xa1b97F92D806BA040daf419AFC2765DC723683a4", - "commit_store": "0xcd92C0599Ac515e7588865cC45Eee21A74816aFc", + "off_ramp": "0xF6dB68333D14f6a0c1123cc420ea60980aEDA0Eb", + "commit_store": "0x8f9B63c40891CdF7d1C795625d4260a29bE2bBa0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -383,80 +374,74 @@ Data = """ "Gnosis Chiado": { "is_native_fee_token": true, "fee_token": "0x18c8a7ec7897177E4529065a7E7B0878358B3BfF", - "bridge_tokens": [ - "0xA189971a2c5AcA0DFC5Ee7a2C44a2Ae27b3CF389" - ], - "bridge_tokens_pools": [ - "0xF9a21B587111e7E8745Fb8b13750014f19DB0014" - ], "arm": "0xfE4fB161D870D0F672Ed9C5A898569603f77983F", "router": "0x19b1bac554111517831ACadc0FD119D23Bb14391", "price_registry": "0x2F4ACd1f8986c6B1788159C4c9a5fC3fceCCE363", "wrapped_native": "0x18c8a7ec7897177E4529065a7E7B0878358B3BfF", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x473b49fb592B54a4BfCD55d40E048431982879C9", + "on_ramp": "0x94967Ea06C6543Aaba5B90C52B655003ef82e521", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0x4f3576585e7fCCE5Fc502Bcf3CAdaD22E1194834", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xE48E6AA1fc7D0411acEA95F8C6CaD972A37721D4", + "on_ramp": "0xB2642B54580140C375c9024e273C575a5f53d02d", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x41b4A51cAfb699D9504E89d19D71F92E886028a8", + "on_ramp": "0x0E9504907be794620229C196F82CB062A66B7480", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xAae733212981e06D9C978Eb5148F8af03F54b6EF", + "on_ramp": "0xeb86B5b6f5C66eCb58e4Cf98E607b238126505DC", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x01800fCDd892e37f7829937271840A6F041bE62E", + "on_ramp": "0xd86F5DF82A2500137Ddeef963028d60E3b5A354D", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4ac7FBEc2A7298AbDf0E0F4fDC45015836C4bAFe", + "on_ramp": "0x03691D63C687D09368360e957AFB2F7B4d1651d4", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x9aA82DBB53bf02096B771D40e9432A323a78fB26", - "commit_store": "0x5CdbA91aBC0cD81FC56bc10Ad1835C9E5fB38e5F", + "off_ramp": "0x3633Cce99186217d4C7ed64FD455d218b8Cd5D4c", + "commit_store": "0x6e096286548451828c97F1B3E49C402a4934F39a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0x5E4DB2A3c965B9B2A850a75697Bb6a00b4e35ac5", + "commit_store": "0x2489c5a802fE63943f7E3185A0362327B55DDF67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xbc4AD54e91b213D4279af92c0C5518c0b96cf62D", - "commit_store": "0xff84e8Dd4Fd17eaBb23b6AeA6e1981830e54389C", + "off_ramp": "0x2BA72Ba392C08750328635E36757A2c29a9165CA", + "commit_store": "0x08ebd7Cf4ABDC819c74cB45CbA4e291728538D7C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x4117953A5ceeF12f5B8C1E973b470ab83a8CebA6", - "commit_store": "0x94ad41296186E81f31e1ed0B1BcF5fa9e1721C27", + "off_ramp": "0x269D28B25Ee081ae5340e2BFE99850E92F1cd522", + "commit_store": "0x8dC9329BD221C89c4989d98c38Ff2Cc3dF92d14b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x33d2898F8fb7714FD1661791766f40754982a343", - "commit_store": "0x55d6Df194472f02CD481e506A277c4A29D0D1bCc", + "off_ramp": "0xd93B571ae9CaF43d70b2b53fFD55e035Db641e31", + "commit_store": "0x42C1093b9DdE8d0CD58859C610dc239B66bE26de", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x450543b1d85ca79885851D7b74dc982981b78229", - "commit_store": "0x23B79d940A769FE31b4C867A8BAE80117f24Ca81", + "off_ramp": "0x87F9b8382611ACD01d5696a1f5b05B888e55B0Cc", + "commit_store": "0x29AC46227908d31A9BdDe82c0A4a6c52D802f145", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xbf9036529123DE264bFA0FC7362fE25B650D4B16", - "commit_store": "0x5f7F1abD5c5EdaF2636D58B980e85355AF0Ef80d", + "off_ramp": "0x9aa734100C425309091dAE18154e0356B82d477a", + "commit_store": "0x7cDd533B82f4c32FAE7f551C37b1490909817C45", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -464,26 +449,20 @@ Data = """ "Kroma Sepolia": { "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000001", - "bridge_tokens": [ - "0x6AC3e353D1DDda24d5A5416024d6E436b8817A4e" - ], - "bridge_tokens_pools": [ - "0x0eE8add19554C7bb1920A183Ed47b4FAB9Eb7601" - ], "arm": "0x08f9Af992368FAc58C936A2c5eBc9092894CEa9b", "router": "0xA8C0c11bf64AF62CDCA6f93D3769B88BdD7cb93D", "price_registry": "0xa1ed3A3aA29166C9c8448654A8cA6b7916BC8379", "wrapped_native": "0x4200000000000000000000000000000000000001", "src_contracts": { "WeMix Testnet": { - "on_ramp": "0x6ea155Fc77566D9dcE01B8aa5D7968665dc4f0C5", + "on_ramp": "0xa81418c332d3E04338B058Ab39b1baf53029F638", "deployed_at": 0 } }, "dest_contracts": { "WeMix Testnet": { - "off_ramp": "0xB602B6E5Caf08ac0C920EAE585aed100a8cF6f3B", - "commit_store": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", + "off_ramp": "0x42Dde725C4f05C237a00B582Bb7457e208d3A17C", + "commit_store": "0xb116E9a90534354dA59CF93a87c1E9711c0Aaa2c", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -491,26 +470,29 @@ Data = """ "Metis Sepolia": { "is_native_fee_token": true, "fee_token": "0x5c48e07062aC4E2Cf4b9A768a711Aef18e8fbdA0", - "bridge_tokens": [ - "0x20Aa09AAb761e2E600d65c6929A9fd1E59821D3f" - ], - "bridge_tokens_pools": [ - "0xdE8451E952Eb43350614839cCAA84f7C8701a09C" - ], "arm": "0xf0607A9BDdB5F54dB59ACaA0837aFec2D1c95df6", "router": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", "price_registry": "0x5DCE866b3ae6E0Ed153f0e149D7203A1B266cdF5", "wrapped_native": "0x5c48e07062aC4E2Cf4b9A768a711Aef18e8fbdA0", "src_contracts": { + "Arbitrum Sepolia": { + "on_ramp": "0x2eb69889cc979c0Be120813FcE2f1558efF4ceB5", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xE0dFc15C0CDf607b2088D0B641E00eA0B418124C", "deployed_at": 0 } }, "dest_contracts": { + "Arbitrum Sepolia": { + "off_ramp": "0x839b5dEA3e084790F580E9DfCE8CCfDf49c5835e", + "commit_store": "0xdF38C8aD34C379165f98A75a6894790bB5a16b1D", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x72130De9A85e9C61151253aFF8801Bb3242A00a9", + "commit_store": "0x8F6D64280C379F680Ff0c3278f340D72a465FAAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -518,35 +500,29 @@ Data = """ "Mode Sepolia": { "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000006", - "bridge_tokens": [ - "0xB9d4e1141E67ECFedC8A8139b5229b7FF2BF16F5" - ], - "bridge_tokens_pools": [ - "0x20bBc874bE3Cd94C3E4689EDD5D89dD1cE8Cb7C4" - ], "arm": "0x9eC8a0AbC75ce08978FAf67958482461bCd93B18", "router": "0xc49ec0eB4beb48B8Da4cceC51AA9A5bD0D0A4c43", "price_registry": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Base Sepolia": { - "on_ramp": "0x73f7E074bd7291706a0C5412f51DB46441B1aDCB", + "on_ramp": "0x48ACE2319f643584B77C21476a6c664D7F13a107", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", + "on_ramp": "0xb821885731414497d705dc56325f18AA33e612dC", "deployed_at": 0 } }, "dest_contracts": { "Base Sepolia": { - "off_ramp": "0x137a38c6b1Ad20101F93516aB2159Df525309168", - "commit_store": "0x8F43d867969F14619895d71E0A5b89E0bb20bF70", + "off_ramp": "0xC6b69Fa9eeBc55e64eBc68371Fbd41ff73756F17", + "commit_store": "0xaA6691EA9110409a29C2E665174b4b2fe694cE67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xcD44cec849B6a8eBd5551D6DFeEcA452257Dfe4d", - "commit_store": "0xbA66f08733E6715D33edDfb5a5947676bb45d0e0", + "off_ramp": "0x35dE2C381a2fF8a26c8ae94145be3A9cA8C83600", + "commit_store": "0xE7e60DAee094416b8ab2083047a893c4c4290c48", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -554,80 +530,74 @@ Data = """ "Optimism Sepolia": { "is_native_fee_token": true, "fee_token": "0x4200000000000000000000000000000000000006", - "bridge_tokens": [ - "0x8aF4204e30565DF93352fE8E1De78925F6664dA7" - ], - "bridge_tokens_pools": [ - "0x3Cc9364260D80F09ccAC1eE6B07366dB598900E6" - ], "arm": "0xF51366F72184E22cF4a7a8362508DB0d3370392d", "router": "0x114A20A10b43D4115e5aeef7345a1A71d2a60C57", "price_registry": "0x782a7Ba95215f2F7c3dD4C153cbB2Ae3Ec2d3215", "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "on_ramp": "0x6B36c9CD74E760088817a047C3460dEdFfe9a11A", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", + "on_ramp": "0x91a144F570ABA7FB7079Fb187A267390E0cc7367", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0xe284D2315a28c4d62C419e8474dC457b219DB969", + "on_ramp": "0x6D22953cdEf8B0C9F0976Cfa52c33B198fEc5881", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x835a5b8e6CA17c2bB5A336c93a4E22478E6F1C8A", + "on_ramp": "0xec7D9A84A6d4556056975BE50Cdc97bAa9313632", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x2Cf26fb01E9ccDb831414B766287c0A9e4551089", + "on_ramp": "0x9E09C2A7D6B9F88c62f0E2Af4cd62dF3F4c326F1", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xC8b93b46BF682c39B3F65Aa1c135bC8A95A5E43a", + "on_ramp": "0x54b32C2aCb4451c6cF66bcbd856d8A7Cc2263531", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xc7E53f6aB982af7A7C3e470c8cCa283d3399BDAd", + "on_ramp": "0xB9Ef21C04d8340b223e9C1d7a09f332609c70300", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xDc2c7A3d8068C6F09F0F3648d24C84e372F6014d", - "commit_store": "0xb1aFb5cbE3c29b5Db71F21442BA9EfD450BC23C3", + "off_ramp": "0xF35e2d1457749374453e44B06268aD3f78b133b3", + "commit_store": "0x4bd755d86E25dD4093CAa5639CfDab81571259CA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", - "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", + "off_ramp": "0xCb2266c2118b1f30D15CBeB3a885531ABaA1b556", + "commit_store": "0x5Ded92E2CF71a8fF7644a67850F061c38B31BfB4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", - "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", + "off_ramp": "0x960c62A491C30d0a60fD74a59d35B9C02697AdaA", + "commit_store": "0x06963745B3839B998288D1a46a46Ec25991A3D5E", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0xCE2CE7F940B7c839384e5D7e079A6aE80e8AD6dB", - "commit_store": "0x1b9D78Ec1CEEC439F0b7eA6C428A1a607D9FA7e4", + "off_ramp": "0x7d6721c2E85560F0A233255D3d332AcF6f850d96", + "commit_store": "0xaC00661cAB5161d9B4746DFb7A028d97981aB2c5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0xD667b5706592D0b040C78fEe5EE17D243b7dCB41", - "commit_store": "0x96101BA5250EE9295c193693C1e08A55bC593664", + "off_ramp": "0x4cEeFa55AF23dFD27Cf926e8eFB1D1bCcD24526E", + "commit_store": "0xaD3943BdECbf4ae7d6E51aB0FD06bbC604bB7b95", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", - "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", + "off_ramp": "0x2aF9B10A5972D0c36f4d8F85773052c104E319B2", + "commit_store": "0x82FCF55b9e9bAb3066c2863F12a02bBc2Ba33F2F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x9C08B7712af0344188aa5087D9e6aD0f47191037", - "commit_store": "0x4BE6DB0B884169a6A207fe5cad01eB4C025a13dB", + "off_ramp": "0x0FA15Bc42D4999d964CBf0161489Bd392DEE834e", + "commit_store": "0x37760F99a5b91884C9D89a06408f532aEbb0e674", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -635,71 +605,65 @@ Data = """ "Polygon Amoy": { "is_native_fee_token": true, "fee_token": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", - "bridge_tokens": [ - "0xcab0EF91Bee323d1A617c0a027eE753aFd6997E4" - ], - "bridge_tokens_pools": [ - "0x3064fB3EA546EE09A63AB3bD93E83D8B8525C636" - ], "arm": "0x8b88C39D2875157aB4CE4AD3814409523d539ee1", "router": "0x9C32fCB86BF0f4a1A8921a9Fe46de3198bb884B2", "price_registry": "0xfb2f2A207dC428da81fbAFfDDe121761f8Be1194", "wrapped_native": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x8Fb98b3837578aceEA32b454f3221FE18D7Ce903", + "on_ramp": "0xad6A94CFB51e7DE30FD21F417E4cBf70D3AdaD30", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xC6683ac4a0F62803Bec89a5355B36495ddF2C38b", + "on_ramp": "0x28EC0a9C90360F55C2a9DaD5901b074C257904ca", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2331F6D614C9Fd613Ff59a1aB727f1EDf6c37A68", + "on_ramp": "0x9DF611536f124278Ce968c476BDb10A66E54ecfE", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xA52cDAeb43803A80B3c0C2296f5cFe57e695BE11", + "on_ramp": "0x600f00aef9b8ED8EDBd7284B5F04a1932c3408aF", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x35347A2fC1f2a4c5Eae03339040d0b83b09e6FDA", + "on_ramp": "0x719Aef2C63376AdeCD62D2b59D54682aFBde914a", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x26546096F64B5eF9A1DcDAe70Df6F4f8c2E10C61", + "on_ramp": "0x7D6c93E49E46cc983a677c283EAb27CbbC94e3C4", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", - "commit_store": "0x09B0F93fC2111aE439e853884173AC5b2F809885", + "off_ramp": "0xAc56Df7F5fbde0DeeB1C0d397A150EDD5EE68625", + "commit_store": "0x8AF56D1c76B8c8CeE451a0a654D130e4050B993e", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x948dfaa4842fc23e0e362Fe8D4396AaE4E6DF7EA", - "commit_store": "0x7F4e739D40E58BBd59dAD388171d18e37B26326f", + "off_ramp": "0x40Ba47ea59D80DDd35E3a997AA520FBa0553dddc", + "commit_store": "0x8afe532517b39bA109d1A768E1Ad8b5C6485abF5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x17c542a28e08AEF5697251601C7b2B621d153D42", - "commit_store": "0x811250c20fAB9a1b7ca245453aC214ba637fBEB5", + "off_ramp": "0x7B968B2aDFd31765dAAD80d66c83F9D7006BFFd5", + "commit_store": "0xBc70551B5624BaF8cdCB84136198561C9cf5C176", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", - "commit_store": "0x74ED442ad211050e9C05Dc9A267E037E3d74A03B", + "off_ramp": "0xAA755Ef570986feEb6522377077e549e3013843E", + "commit_store": "0x5C7827EcE6a51AdaC36ef71aC01706deb1C7130d", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xFb04129aD1EEDB741CC705ebC1978a7aB63e51f6", - "commit_store": "0x63f875240149d29136053C954Ca164a9BfA81F77", + "off_ramp": "0x7Ad494C173f5845c6B4028a06cDcC6d3108bc960", + "commit_store": "0x104A1c8b05D37fE732094595Fe696AFc7EAB8668", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xdE8451E952Eb43350614839cCAA84f7C8701a09C", - "commit_store": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", + "off_ramp": "0xa85481273f8C112e96ED7476202F06D6131cf069", + "commit_store": "0x9FdF1D555e37dB09B0d151FEa53c134C88C4DeFd", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -707,134 +671,128 @@ Data = """ "Sepolia Testnet": { "is_native_fee_token": true, "fee_token": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", - "bridge_tokens": [ - "0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05" - ], - "bridge_tokens_pools": [ - "0x38d1ef9619Cd40cf5482C045660Ae7C82Ada062c" - ], "arm": "0x27Da8735d8d1402cEc072C234759fbbB4dABBC4A", "router": "0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59", "price_registry": "0x9EF7D57a4ea30b9e37794E55b0C75F2A70275dCc", "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xe4Dd3B16E09c016402585a8aDFdB4A18f772a07e", + "on_ramp": "0xBc09627e58989Ba8F1eDA775e486467d2A00944F", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", + "on_ramp": "0x12492154714fBD28F28219f6fc4315d19de1025B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD990f8aFA5BCB02f95eEd88ecB7C68f5998bD618", + "on_ramp": "0x7a75b3818412fe0028590feE8270ba9E3fd01DBe", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x2B70a05320cB069e0fB55084D402343F832556E7", + "on_ramp": "0x8F35B097022135E0F46831f798a240Cc8c4b0B01", "deployed_at": 0 }, "Blast Sepolia": { - "on_ramp": "0xDB75E9D9ca7577CcBd7232741be954cf26194a66", + "on_ramp": "0x4ADA60556dA05FcF53a79359e37a3E13FebA22Bf", "deployed_at": 0 }, "Celo Alfajores": { - "on_ramp": "0x3C86d16F52C10B2ff6696a0e1b8E0BcfCC085948", + "on_ramp": "0x1163D1F7D75eEb1C4f4c6912d3cF9642027aFD30", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x3E842E3A79A00AFdd03B52390B1caC6306Ea257E", + "on_ramp": "0x831A7DbE6af8601427A0ADa89b642d4b59007eED", "deployed_at": 0 }, "Metis Sepolia": { - "on_ramp": "0x1C4640914cd57c5f02a68048A0fbb0E12d904223", + "on_ramp": "0xabB5A4f99DFEb4a3912e8Acc0660A008c76dA8c3", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0xc630fbD4D0F6AEB00aD0793FB827b54fBB78e981", + "on_ramp": "0x2Eb0842925fb7aA6045e951e98e8b4b3aFFaBB54", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x69CaB5A0a08a12BaFD8f5B195989D709E396Ed4d", + "on_ramp": "0xACDfd7a98d853FA3914047Cd46e7f5D53BBC9FbB", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x9f656e0361Fb5Df2ac446102c8aB31855B591692", + "on_ramp": "0xf9765c80F6448e6d4d02BeF4a6b4152131A2F513", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xedFc22336Eb0B9B11Ff37C07777db27BCcDe3C65", + "on_ramp": "0xd72c3c132B76F5D232C37dF3bF8f04392D552e0F", "deployed_at": 0 }, "ZKSync Sepolia": { - "on_ramp": "0x1Acb3A885feA37bdA30AB99b99327b14391f500F", + "on_ramp": "0xA2865E4f36760f5fa5c8F958336120f2DF0d974b", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xF18896AB20a09A29e64fdEbA99FDb8EC328f43b1", - "commit_store": "0x93Ff9Dd39Dc01eac1fc4d2c9211D95Ee458CAB94", + "off_ramp": "0xD2f5edfD4561d6E7599F6c6888Bd353cAFd0c55E", + "commit_store": "0x240420BC6bCDc067e668c7492D69fe06B3CF80cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", - "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", + "off_ramp": "0x1DEBa99dC8e2A77832461BD386d83D9FCb133137", + "commit_store": "0x139E06b6dBB1a0C41A1686C091795879c943765A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xdE2d8E126e08d675fCD7fFa5a6CE49925f3Dc692", - "commit_store": "0x0050ac355a82caB31194507f94174297bf0655A7", + "off_ramp": "0x04305BD9D9CA6730517f79c3D9c6828BC2D25Ecb", + "commit_store": "0x32edD59840CD9e474A280cf1707439F2Bd5872d4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", - "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", + "off_ramp": "0x662738DC7DE4f7eC63d9f73Cdf9BeA5A58DdcC15", + "commit_store": "0x1e46bAC486Dd878cD57B62845530A52343e39693", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Blast Sepolia": { - "off_ramp": "0x4e897e5cF3aC307F0541B2151A88bCD781c153a3", - "commit_store": "0xB656652841F347178e193951C4663652aCe36B74", + "off_ramp": "0x049A424cF894709f044bc70177F8F6b792adc3F6", + "commit_store": "0x496fE96E440Fc683478a08Df92A1c5E23E412b1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Celo Alfajores": { - "off_ramp": "0xB435E0f73c18C5a12C324CA1d02F81F2C3e6e761", - "commit_store": "0xbc5d74957F171e75F92c8F0E1C317A25a56a416D", + "off_ramp": "0x4F146d34Be5E273e576ef158Bd7070eC22708D20", + "commit_store": "0xEeB665281c7ab51d25423898f730Ab078c69dd42", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x7db0115A0b3AAb01d30bf81123c5DD7B0C41Add5", - "commit_store": "0x6640723Ea801178c4383FA016b9781e7ef1016EF", + "off_ramp": "0xB424365EEEEA58A36C7EC858f926f4e8275dDEb3", + "commit_store": "0xE95c2135e3330E953BB49068d32Fcba368Acd456", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Metis Sepolia": { - "off_ramp": "0x4DB693A93E9d5196ECD42EC56CDEAe99dFC652ED", - "commit_store": "0xBfACd78F1412B6f93Ac23409bf456aFec1ABd845", + "off_ramp": "0x46DE6201c258f5948135cd0262f91e48Cb8e3828", + "commit_store": "0x3A27Fd059A4eF0e96B0643283A44a56A8d6CF34A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xbEfd8D65F6643De54F0b1268A3bf4618ff85dcB4", - "commit_store": "0x0C161D3470b45Cc677661654C30ce4AdE6aCD288", + "off_ramp": "0x052E52fdd48719A6084366eA184FC44cb8C25DC2", + "commit_store": "0xBBb9baA314eB023E3F9291Aaf4107B6708341B50", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", - "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", + "off_ramp": "0xbfa6f6AAE31acB3A285e80026d6475C1a50d1d0F", + "commit_store": "0xB5FbA97Dc61ec68771a92a15360d9C32c9d054E7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x5032cbC0C4aEeD25bb6E45D8B3fAF05DB0688C5d", - "commit_store": "0xe6201C9996Cc7B6E828E10CbE937E693d577D318", + "off_ramp": "0xC3e550B6aaFA5539df8bbCc5B0991e587f438e75", + "commit_store": "0xd57866D97ca26dfaE34088a3EeE4657BAFaac5f9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x46b639a3C1a4CBfD326b94a2dB7415c27157282f", - "commit_store": "0x7b74554678816b045c1e7409327E086bD436aa46", + "off_ramp": "0x445F41C6aa7e910021786e860d7cfe3E7fcC6640", + "commit_store": "0x307dDE3c696E399b5837456FbCe03b1Ad76D46E3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "ZKSync Sepolia": { - "off_ramp": "0xBaABd4166C892a1081a26535875A8fA3f22937b2", - "commit_store": "0xfda2e83F4D3f42B7629134ecD6E4b29FB8A7A07B", + "off_ramp": "0x9f5dC467A5c97068A1c2987486B8b768275627eD", + "commit_store": "0x6e4601DA99a046e4bde60d051568E3E1F35E3097", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -842,80 +800,74 @@ Data = """ "WeMix Testnet": { "is_native_fee_token": true, "fee_token": "0xbE3686643c05f00eC46e73da594c78098F7a9Ae7", - "bridge_tokens": [ - "0xF4E4057FbBc86915F4b2d63EEFFe641C03294ffc" - ], - "bridge_tokens_pools": [ - "0x82A92B2863F93Be70D20660088Ec060720bA2fdb" - ], "arm": "0x8f6cb63eD5e379722580DFF0A051C140C64F9619", "router": "0xA8C0c11bf64AF62CDCA6f93D3769B88BdD7cb93D", "price_registry": "0x89D17571DB7C9540eeB36760E3c749C8fb984569", "wrapped_native": "0xbE3686643c05f00eC46e73da594c78098F7a9Ae7", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xA9DE3F7A617D67bC50c56baaCb9E0373C15EbfC6", + "on_ramp": "0xa5Be8C619F61505548992D9820c5c485b030C7B0", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xC4aC84da458ba8e40210D2dF94C76E9a41f70069", + "on_ramp": "0x7802B6804bbE7486229ac6D3519f0057c50b40a9", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0x5AD6eed6Be0ffaDCA4105050CF0E584D87E0c2F1", + "on_ramp": "0xd25B8c70CB43022Bdc3aC417E2Cf5159294d95A1", "deployed_at": 0 }, "Kroma Sepolia": { - "on_ramp": "0x428C4dc89b6Bf908B82d77C9CBceA786ea8cc7D0", + "on_ramp": "0x1De2Ca07eEee7F524Fe5edA6C8FFFb79F67b05E9", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x1961a7De751451F410391c251D4D4F98D71B767D", + "on_ramp": "0xB37607C6BD4562F32967dE87D14663D59e3f655d", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xd55148e841e76265B484d399eC71b7076ecB1216", + "on_ramp": "0x0c972752F9aC3255cE45b440f9bBC6500676c4e6", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4d57C6d8037C65fa66D6231844785a428310a735", + "on_ramp": "0x1CD55c65f85681Dfae47c62e6D93340D25006BbB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xeB1dFaB2464Bf0574D43e764E0c758f92e7ecAFb", - "commit_store": "0xcEaCa2B7890065c485f3E58657358a185Ad33791", + "off_ramp": "0xB5492C8A71130B486fAD1091Db683584767A3957", + "commit_store": "0x1e151ED27E2F48EcFBd5b4374d0fc4869e07c397", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x98e811Df9D2512f1aaf58D534607F583D6c54A4F", - "commit_store": "0x8e538351F6E5B2daF3c90C565C3738bca69a2716", + "off_ramp": "0x60536c757c2BBf72cC68A1933F7e336d03Bb68fe", + "commit_store": "0x2fF725556A04b47eB40BbA11d9F51e8fbbee9F07", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xB0e7f0fCcD3c961C473E7c44D939C1cDb4Cec1cB", - "commit_store": "0x4B56D8d53f1A6e0117B09700067De99581aA5542", + "off_ramp": "0xb858077FbE1E55cD7a9092Eb6d5403e068c14EAf", + "commit_store": "0x0EF13C7c95C27A9EA477363a26a09Cff44ba38F9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Kroma Sepolia": { - "off_ramp": "0xD685D2d224dd6D0Db2D56497db6270D77D9a7966", - "commit_store": "0x7e062D6880779a0347e7742058C1b1Ee4AA0B137", + "off_ramp": "0x78d8154e1216F4791086bFa078Aaf07dcD2bD3C6", + "commit_store": "0xe67AAfbE6025e730Cf47a414BEFf2106FF231dB1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xA5f97Bc69Bf06e7C37B93265c5457420A92c5F4b", - "commit_store": "0xd48b9213583074f518D8f4336FDf35370D450132", + "off_ramp": "0x995Fc17FC12b67f75D3cBf3bC71BD9af65671E78", + "commit_store": "0xD0825e3D8e61b67a06A93426749d38bCF73Ddb02", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x6c8f5999B06FDE17B11E4e3C1062b761766F960f", - "commit_store": "0x957c3c2056192e58A8485eF31165fC490d474239", + "off_ramp": "0xd7b5B4F8FF7a87cC92f7B3058365862859d9E057", + "commit_store": "0xa8f2bb4e831caA5E2794AaD014030E378208d4Bc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x8AB103843ED9D28D2C5DAf5FdB9c3e1CE2B6c876", - "commit_store": "0x7d5297c5506ee2A7Ef121Da9bE02b6a6AD30b392", + "off_ramp": "0xa7E2F97Be7798327A49CACD022f33c0E7EfD4897", + "commit_store": "0x6fe69eE4eC9FD768193a40129A3Ba3dF140b2208", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -929,14 +881,14 @@ Data = """ "wrapped_native": "0x4317b2eCD41851173175005783322D29E9bAee9E", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x79a9a5e9e318e8e109776569574814bbf935125a", + "on_ramp": "0xC38536521fde8556351aB7C4D3ea23b64AFbBbab", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0x18FF69051479796175852578725Fc74F58E963F8", - "commit_store": "0xF694b4FD7889480dca3CD41244e8e3395a9EFBa0", + "off_ramp": "0x19Ea9A42cd3682928aF19990dDb3904250D00a1D", + "commit_store": "0x20BF9037927bFadaF028D43ae07d1afccfB8fa85", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -1006,7 +958,7 @@ NetworkPairs = [ 'BASE_SEPOLIA,OPTIMISM_SEPOLIA', 'BASE_SEPOLIA,GNOSIS_CHIADO', - 'KROMA_SEPOLIA,WEMIX_TESTNET', +# 'KROMA_SEPOLIA,WEMIX_TESTNET', 'OPTIMISM_SEPOLIA,POLYGON_AMOY', 'OPTIMISM_SEPOLIA,WEMIX_TESTNET', diff --git a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_token_transfer_native.toml b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_token_transfer_native.toml index b1549377fd..17372a6868 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_token_transfer_native.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/smoke-release-testing_token_transfer_native.toml @@ -26,59 +26,68 @@ Data = """ "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x1Cb56374296ED19E86F68fA437ee679FD7798DaA", + "on_ramp": "0x20C8c9F13C6AA402F2545AD15fB7a9CdE9108618", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x7854E73C73e7F9bb5b0D5B4861E997f4C6E8dcC6", + "on_ramp": "0xF1623862e4c9f9Fba1Ac0181C4fF53B4f958F065", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x973CbE752258D32AE82b60CD1CB656Eebb588dF0", + "on_ramp": "0xEfe02eB139D2A82e38184d28E3b65bb176F26ebD", + "deployed_at": 0 + }, + "Metis Sepolia": { + "on_ramp": "0x46a79a6a4B07FD3FC14ea8299A99FE29576776E2", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x701Fe16916dd21EFE2f535CA59611D818B017877", + "on_ramp": "0x0B0c08Bb2fA2EbDe25817009ee39eA1ad9bCaC58", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4205E1Ca0202A248A5D42F5975A8FE56F3E302e9", + "on_ramp": "0x64d78F20aD987c7D52FdCB8FB0777bD00de53210", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xBD4106fBE4699FE212A34Cc21b10BFf22b02d959", + "on_ramp": "0x2F3Daf77A663603826c7750E956b6555DE6f8250", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xcab0EF91Bee323d1A617c0a027eE753aFd6997E4", - "commit_store": "0x0d90b9b96cBFa0D01635ce12982ccE1b70827c7a", + "off_ramp": "0x7245a5947E2F32B66aF74F4dAF91718ea19afaDf", + "commit_store": "0x490AC77BbB26f4FFf876Ded07bCAE6DBe685be98", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xc1982985720B959E66c19b64F783361Eb9B60F26", - "commit_store": "0x28F66bB336f6db713d6ad2a3bd1B7a531282A159", + "off_ramp": "0xF2aB55Ed448A6fAD75013900568B6a927f52e5e0", + "commit_store": "0x833E5995A7422120f445f9B8dD1b9BD1037c68E5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x935C26F9a9122E5F9a27f2d3803e74c75B94f5a3", - "commit_store": "0xEdb963Ec5c2E5AbdFdCF137eF44A445a7fa4787A", + "off_ramp": "0xc1Cb31493fB2386aDC1Ea01F935F2bd8a8dCA388", + "commit_store": "0xe21896657A65c8959F16E1c3Ee5713E85d9EA020", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Metis Sepolia": { + "off_ramp": "0xc47143147Fd62A09618C695c7C03714aCe8db1Cf", + "commit_store": "0x2F42e7B22eE5885158916624Ff00608f4C82313D", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfD404A89e1d195F0c65be1A9042C77745197659e", - "commit_store": "0x84B7B012c95f8A152B44Ab3e952f2dEE424fA8e1", + "off_ramp": "0x4a7E91EF68758aaC66AeD656267bbCD0f9b6c019", + "commit_store": "0xb0A09D6A15FF7A0142DF3F62b2C4D1e11D763Ed0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x1c71f141b4630EBE52d6aF4894812960abE207eB", - "commit_store": "0xaB0c8Ba51E7Fa3E5693a4Fbb39473520FD85d173", + "off_ramp": "0xBed6e9131916d724418C8a6FE810F727302a5c00", + "commit_store": "0xdDb61B6bDa1B46d88f556440fABFe219F6da4F3a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x262e16C8D42aa07bE13e58F81e7D9F62F6DE2830", - "commit_store": "0xc132eFAf929299E5ee704Fa6D9796CFa23Bb8b2C", + "off_ramp": "0x11d486E92d291704D1E25cDbAeee687237247826", + "commit_store": "0xece9353095aC79Db9DD5bf2022690Fa6BffeBCAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -98,77 +107,77 @@ Data = """ "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x8bB16BEDbFd62D1f905ACe8DBBF2954c8EEB4f66", + "on_ramp": "0xa9946BA30DAeC98745755e4410d6e8E894Edc53B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xF25ECF1Aad9B2E43EDc2960cF66f325783245535", + "on_ramp": "0x906BC7D10947A94ba0252e8C2E34868A466c03ED", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", + "on_ramp": "0x0aEc1AC9F6D0c21332d7a66dDF1Fbcb32cF3B0B3", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x1532e5b204ee2b2244170c78E743CB9c168F4DF9", + "on_ramp": "0x3dda45E731EC1db18B95651d1AF1868aa878468D", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xC334DE5b020e056d0fE766dE46e8d9f306Ffa1E2", + "on_ramp": "0x2a9EFdc9F93D9b822129038EFCa4B63Adf3f7FB5", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0xA82b9ACAcFA6FaB1FD721e7a748A30E3001351F9", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x5724B4Cc39a9690135F7273b44Dfd3BA6c0c69aD", + "on_ramp": "0x75b9a75Ee1fFef6BE7c4F842a041De7c6153CF4E", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x677B5ab5C8522d929166c064d5700F147b15fa33", + "on_ramp": "0x1ff99E67986E83bb5BA34143BaA2735853e5738c", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x90A74072e7B0c2d59e13aB4d8f93c8198c413194", - "commit_store": "0xf3458CFd2fdf4a6CF0Ce296d520DD21eB194828b", + "off_ramp": "0xd88CBA0612f2Ce611BF6d073A94C8FD7E70B4fBd", + "commit_store": "0x9b8279E352bC167F714eef96A4C436bE996643cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x10b28009E5D776F1f5AAA73941CE8953B8f42d26", - "commit_store": "0xacDD582F271eCF22FAd6764cCDe1c4a534b732A8", + "off_ramp": "0x9c40A73F5C7454BB7C178AFa56Ee30bFB2DCf7E6", + "commit_store": "0xE5611af1d63340b711B0468a976651Fb79B17870", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", - "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", + "off_ramp": "0xf8de9d5924CFD28e31a53B63B4903436D9818d69", + "commit_store": "0xDD7CfECE1bb4e8aC2E8b8281CFE1D44247119471", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x56dF55aF5F0A4689f3364230587a68eD6A314fAd", - "commit_store": "0xabA7ff98094c4cc7A075812EefF2CD21f6400235", + "off_ramp": "0x3F5035039C23cDAF032C64c084Dc70F811E62ddD", + "commit_store": "0xf5B0245c7B9e15f0cB0B85FF2B6799a45D61CbaA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", - "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", + "off_ramp": "0x1DF9D94C6916918C935E60d2Cb4Ed265Bf778005", + "commit_store": "0xE7eeBE5882609d28C015d0A89DE1ba4f506F4a03", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0xbeD7F478Ef5627FB2B891fDA29Ca0131f6796D9D", + "commit_store": "0x27a319f58c01380056c86938798aCEAA1AC529e2", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", - "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", + "off_ramp": "0x01e3D835b4C4697D7F81B9d7Abc89A6E478E4a2f", + "commit_store": "0x4EC313c1Eb620432f42FB5f4Df27f8A566523c1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xD0D338318bC6837b091FC7AB5F2a94B7783507d5", - "commit_store": "0xd9D479208235c7355848ff4aF26eB5aacfDC30c6", + "off_ramp": "0x15CcAbf0e3484D4872e25b883163D8cB724d4832", + "commit_store": "0x859f3477B7b4ECc19aDD8cCb19740932F21bD76b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -188,59 +197,68 @@ Data = """ "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0xa2515683E99F50ADbE177519A46bb20FfdBaA5de", + "on_ramp": "0x2A6f8Ed2e7b222163ef6EcC2327171B479399ab2", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x3E807220Ca84b997c0d1928162227b46C618e0c5", + "on_ramp": "0x97856Bf888F6eEDBBd322B28133BCcF9CA9038f6", + "deployed_at": 0 + }, + "Blast Sepolia": { + "on_ramp": "0xd0049BfFc8e2689Df9236FfA393Ccbf7eae4FbbC", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x8735f991d41eA9cA9D2CC75cD201e4B7C866E63e", + "on_ramp": "0x98dEa9e498F2A7aF6c74C915c88A17FbA09b73C2", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xf37CcbfC04adc1B56a46B36F811D52C744a1AF78", + "on_ramp": "0x363EB789fE31F08547a847D8C38d9b55C7Cf1903", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xB1DE44B04C00eaFe9915a3C07a0CaeA4410537dF", + "on_ramp": "0xC1C6438D60AbE9bF4b1F10460184CE9bD312e328", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x89268Afc1BEA0782a27ba84124E3F42b196af927", + "on_ramp": "0xbc85704EDb79ea84E9D3C18965F7f6A16B0a0440", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0x6e6fFCb6B4BED91ff0CC8C2e57EC029dA7DB80C2", - "commit_store": "0x38Bc38Bd824b6eE87571f9D3CFbe6D6E28E3Dc62", + "off_ramp": "0x95b66acfaaDF122f4EccE52C0aD4Fd997DD1150C", + "commit_store": "0x3af04b1c1e79A6B8A4577Bb47EC33eD2E66AeB47", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x2C61FD7E93Dc79422861282145c59B56dFbc3a8c", - "commit_store": "0x42fAe5B3605804CF6d08632d7A25864e24F792Ae", + "off_ramp": "0x0a5147e1Ac38C79c77031194ef64C8B5353F6EE9", + "commit_store": "0x103864D60b33a479EA7D0e23a37e0ce07198f0A9", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Blast Sepolia": { + "off_ramp": "0xe1e8473218acCB82FBc24Ccd3C5D2dF166cd04f3", + "commit_store": "0x020B047A5Ca88fDB1ad3bAD9A082760fC7F770b6", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x71a44a60832B0F8B63232C9516e7E6aEc3A373Dc", - "commit_store": "0xAC24299a91b72d1Cb5B31147e3CF54964D896974", + "off_ramp": "0x1F7FEBCBb10420E039C333A60A444c1a442d826C", + "commit_store": "0x23Ae763a64D39d6038431a64Bbc4A670C89d82b9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x63440C7747d37bc6154b5538AE32b54FE0965AfA", - "commit_store": "0xAD22fA198CECfC534927aE1D480c460d5bB3460F", + "off_ramp": "0xAAe325adbc9C5a28e4e94Fef170D55de2CA9aA01", + "commit_store": "0xD173Df3A1b23ec42eA5C4669b9c956Bef230efd1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xf1c128Fe52Ea78CcAAB407509292E61ce38C1523", - "commit_store": "0x59dFD870dC4bd76A7B879A4f705Fdcd2595f85f9", + "off_ramp": "0xB513523aee87f838e78b32d2Bacaaf2e94D9f0f9", + "commit_store": "0x21A49164890576504C1f1c4DC9442c42C98771D7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xfd9B19c3725da5B517aA705B848ff3f21F98280e", - "commit_store": "0x3c1F1412563188aBc8FE3fd53E8F1Cb601CaB4f9", + "off_ramp": "0xc985571900DCa62387f93F882AB550472531f5DB", + "commit_store": "0xac5DACfAb1a512E33c49EFE42502863FC1a4BAB3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -260,68 +278,68 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x58622a80c6DdDc072F2b527a99BE1D0934eb2b50", + "on_ramp": "0xb52eF669d3fCeBee1f31418Facc02a16A6F6B0e5", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", + "on_ramp": "0x212e8Fd9cCC330ab54E8141FA7d33967eF1eDafF", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD806966beAB5A3C75E5B90CDA4a6922C6A9F0c9d", + "on_ramp": "0xd54B44811AE99a18Cb95B4704ba04a65C0163751", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xdd0Ee1F20E93a93634AAcE56105E19423881Df56", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0x3d0115386C01436870a2c47e6297962284E70BA6", + "on_ramp": "0xc59689dFDEF9D953cEFbb58912b304bb38408476", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x3b39Cd9599137f892Ad57A4f54158198D445D147", + "on_ramp": "0x2945D35F428CE564F5455AD0AF28BDFCa67e76Ab", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x6486906bB2d85A6c0cCEf2A2831C11A2059ebfea", + "on_ramp": "0x29A1F4ecE9246F0042A9062FB89803fA8B1830cB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xd364C06ac99a82a00d3eFF9F2F78E4Abe4b9baAA", - "commit_store": "0xdE8d0f47a71eA3fDFBD3162271652f2847939097", + "off_ramp": "0x814E735c5DD19240c85E2513DD926Bc3a39f7140", + "commit_store": "0xFc24B204bfA5C65eD8e2Fc02fDe4FeCb62eA8Ac5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", - "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", + "off_ramp": "0x3Ab3a3d35cAC95FfcFCcc127eF01eA8D87b0A64e", + "commit_store": "0x51313B8C068B5227fa7364E6eCB1382Fb751976F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xd5E9508921434e8758f4540D55c1c066b7cc1598", - "commit_store": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "off_ramp": "0x827CF69409307Cd4c979e652894C297ad5124ab7", + "commit_store": "0x547eBe6077305c3fdF8dA66c66cc14b0779CE00C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x8bB08Bc19771C69E739a2078894523b3DC05a05e", + "commit_store": "0xf163Da63bDB8b9C355d41C755E03125988650109", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xB26647A23e8b4284375e5C74b77c9557aE709D03", - "commit_store": "0x4b4fEB401d3E613e1D6242E155C83A80BF9ac2C9", + "off_ramp": "0x11E16c71D76E43acbcb496A70966380d905B1E32", + "commit_store": "0xEe19f039FaE3EF0F94971f0B7B187223D952ac13", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", - "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", + "off_ramp": "0x8718d1cc138421Dbc1B489CB7884FF68DE7ad867", + "commit_store": "0x3291D453c880E5b59EEd04E600c85268Cd378b7f", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", - "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", + "off_ramp": "0x0ecA23Ef70B828fEDd0A84d2692cB0527B52396A", + "commit_store": "0xA7F84Ec616F8e9Fa593339944E76bda90A9737fE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -340,15 +358,24 @@ Data = """ "price_registry": "0xc8acE9dF450FaD007755C6C9AB4f0e9c8626E29C", "wrapped_native": "0x4200000000000000000000000000000000000023", "src_contracts": { + "BSC Testnet": { + "on_ramp": "0x6eA6f63b689b5597A0C06a5Eb8DcDFD86383857A", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x85Ef19FC4C63c70744995DC38CAAEC185E0c619f", + "on_ramp": "0x154aDEF773a848da8229D81De73a7b0844400ebd", "deployed_at": 0 } }, "dest_contracts": { + "BSC Testnet": { + "off_ramp": "0xd9dE4aCD27E814bfe70CA33d2A4d079e740626Bd", + "commit_store": "0xe8fF7e22c54f76F453d6072A9d3a12B1D9AbA137", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x92cD24C278D34C726f377703E50875d8f9535dC2", - "commit_store": "0xcE1b4D50CeD56850182Bd58Ace91171cB249B873", + "off_ramp": "0x46DD4e3e2b8a18409646F1C15bf3799a481e67f6", + "commit_store": "0x8250f9E992dda66791dd8b5d356B867ae53382cF", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -368,14 +395,14 @@ Data = """ "wrapped_native": "0x99604d0e2EfE7ABFb58BdE565b5330Bb46Ab3Dca", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x16a020c4bbdE363FaB8481262D30516AdbcfcFc8", + "on_ramp": "0x68A4f57A499563192C606a898BAf503A43fcDB4D", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0xa1b97F92D806BA040daf419AFC2765DC723683a4", - "commit_store": "0xcd92C0599Ac515e7588865cC45Eee21A74816aFc", + "off_ramp": "0xF6dB68333D14f6a0c1123cc420ea60980aEDA0Eb", + "commit_store": "0x8f9B63c40891CdF7d1C795625d4260a29bE2bBa0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -395,68 +422,68 @@ Data = """ "wrapped_native": "0x18c8a7ec7897177E4529065a7E7B0878358B3BfF", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x473b49fb592B54a4BfCD55d40E048431982879C9", + "on_ramp": "0x94967Ea06C6543Aaba5B90C52B655003ef82e521", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0x4f3576585e7fCCE5Fc502Bcf3CAdaD22E1194834", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xE48E6AA1fc7D0411acEA95F8C6CaD972A37721D4", + "on_ramp": "0xB2642B54580140C375c9024e273C575a5f53d02d", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x41b4A51cAfb699D9504E89d19D71F92E886028a8", + "on_ramp": "0x0E9504907be794620229C196F82CB062A66B7480", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xAae733212981e06D9C978Eb5148F8af03F54b6EF", + "on_ramp": "0xeb86B5b6f5C66eCb58e4Cf98E607b238126505DC", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x01800fCDd892e37f7829937271840A6F041bE62E", + "on_ramp": "0xd86F5DF82A2500137Ddeef963028d60E3b5A354D", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4ac7FBEc2A7298AbDf0E0F4fDC45015836C4bAFe", + "on_ramp": "0x03691D63C687D09368360e957AFB2F7B4d1651d4", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x9aA82DBB53bf02096B771D40e9432A323a78fB26", - "commit_store": "0x5CdbA91aBC0cD81FC56bc10Ad1835C9E5fB38e5F", + "off_ramp": "0x3633Cce99186217d4C7ed64FD455d218b8Cd5D4c", + "commit_store": "0x6e096286548451828c97F1B3E49C402a4934F39a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0x5E4DB2A3c965B9B2A850a75697Bb6a00b4e35ac5", + "commit_store": "0x2489c5a802fE63943f7E3185A0362327B55DDF67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xbc4AD54e91b213D4279af92c0C5518c0b96cf62D", - "commit_store": "0xff84e8Dd4Fd17eaBb23b6AeA6e1981830e54389C", + "off_ramp": "0x2BA72Ba392C08750328635E36757A2c29a9165CA", + "commit_store": "0x08ebd7Cf4ABDC819c74cB45CbA4e291728538D7C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x4117953A5ceeF12f5B8C1E973b470ab83a8CebA6", - "commit_store": "0x94ad41296186E81f31e1ed0B1BcF5fa9e1721C27", + "off_ramp": "0x269D28B25Ee081ae5340e2BFE99850E92F1cd522", + "commit_store": "0x8dC9329BD221C89c4989d98c38Ff2Cc3dF92d14b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x33d2898F8fb7714FD1661791766f40754982a343", - "commit_store": "0x55d6Df194472f02CD481e506A277c4A29D0D1bCc", + "off_ramp": "0xd93B571ae9CaF43d70b2b53fFD55e035Db641e31", + "commit_store": "0x42C1093b9DdE8d0CD58859C610dc239B66bE26de", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x450543b1d85ca79885851D7b74dc982981b78229", - "commit_store": "0x23B79d940A769FE31b4C867A8BAE80117f24Ca81", + "off_ramp": "0x87F9b8382611ACD01d5696a1f5b05B888e55B0Cc", + "commit_store": "0x29AC46227908d31A9BdDe82c0A4a6c52D802f145", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xbf9036529123DE264bFA0FC7362fE25B650D4B16", - "commit_store": "0x5f7F1abD5c5EdaF2636D58B980e85355AF0Ef80d", + "off_ramp": "0x9aa734100C425309091dAE18154e0356B82d477a", + "commit_store": "0x7cDd533B82f4c32FAE7f551C37b1490909817C45", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -476,14 +503,14 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000001", "src_contracts": { "WeMix Testnet": { - "on_ramp": "0x6ea155Fc77566D9dcE01B8aa5D7968665dc4f0C5", + "on_ramp": "0xa81418c332d3E04338B058Ab39b1baf53029F638", "deployed_at": 0 } }, "dest_contracts": { "WeMix Testnet": { - "off_ramp": "0xB602B6E5Caf08ac0C920EAE585aed100a8cF6f3B", - "commit_store": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", + "off_ramp": "0x42Dde725C4f05C237a00B582Bb7457e208d3A17C", + "commit_store": "0xb116E9a90534354dA59CF93a87c1E9711c0Aaa2c", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -502,15 +529,24 @@ Data = """ "price_registry": "0x5DCE866b3ae6E0Ed153f0e149D7203A1B266cdF5", "wrapped_native": "0x5c48e07062aC4E2Cf4b9A768a711Aef18e8fbdA0", "src_contracts": { + "Arbitrum Sepolia": { + "on_ramp": "0x2eb69889cc979c0Be120813FcE2f1558efF4ceB5", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xE0dFc15C0CDf607b2088D0B641E00eA0B418124C", "deployed_at": 0 } }, "dest_contracts": { + "Arbitrum Sepolia": { + "off_ramp": "0x839b5dEA3e084790F580E9DfCE8CCfDf49c5835e", + "commit_store": "0xdF38C8aD34C379165f98A75a6894790bB5a16b1D", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x72130De9A85e9C61151253aFF8801Bb3242A00a9", + "commit_store": "0x8F6D64280C379F680Ff0c3278f340D72a465FAAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -530,23 +566,23 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Base Sepolia": { - "on_ramp": "0x73f7E074bd7291706a0C5412f51DB46441B1aDCB", + "on_ramp": "0x48ACE2319f643584B77C21476a6c664D7F13a107", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", + "on_ramp": "0xb821885731414497d705dc56325f18AA33e612dC", "deployed_at": 0 } }, "dest_contracts": { "Base Sepolia": { - "off_ramp": "0x137a38c6b1Ad20101F93516aB2159Df525309168", - "commit_store": "0x8F43d867969F14619895d71E0A5b89E0bb20bF70", + "off_ramp": "0xC6b69Fa9eeBc55e64eBc68371Fbd41ff73756F17", + "commit_store": "0xaA6691EA9110409a29C2E665174b4b2fe694cE67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xcD44cec849B6a8eBd5551D6DFeEcA452257Dfe4d", - "commit_store": "0xbA66f08733E6715D33edDfb5a5947676bb45d0e0", + "off_ramp": "0x35dE2C381a2fF8a26c8ae94145be3A9cA8C83600", + "commit_store": "0xE7e60DAee094416b8ab2083047a893c4c4290c48", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -566,68 +602,68 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "on_ramp": "0x6B36c9CD74E760088817a047C3460dEdFfe9a11A", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", + "on_ramp": "0x91a144F570ABA7FB7079Fb187A267390E0cc7367", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0xe284D2315a28c4d62C419e8474dC457b219DB969", + "on_ramp": "0x6D22953cdEf8B0C9F0976Cfa52c33B198fEc5881", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x835a5b8e6CA17c2bB5A336c93a4E22478E6F1C8A", + "on_ramp": "0xec7D9A84A6d4556056975BE50Cdc97bAa9313632", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x2Cf26fb01E9ccDb831414B766287c0A9e4551089", + "on_ramp": "0x9E09C2A7D6B9F88c62f0E2Af4cd62dF3F4c326F1", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xC8b93b46BF682c39B3F65Aa1c135bC8A95A5E43a", + "on_ramp": "0x54b32C2aCb4451c6cF66bcbd856d8A7Cc2263531", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xc7E53f6aB982af7A7C3e470c8cCa283d3399BDAd", + "on_ramp": "0xB9Ef21C04d8340b223e9C1d7a09f332609c70300", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xDc2c7A3d8068C6F09F0F3648d24C84e372F6014d", - "commit_store": "0xb1aFb5cbE3c29b5Db71F21442BA9EfD450BC23C3", + "off_ramp": "0xF35e2d1457749374453e44B06268aD3f78b133b3", + "commit_store": "0x4bd755d86E25dD4093CAa5639CfDab81571259CA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", - "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", + "off_ramp": "0xCb2266c2118b1f30D15CBeB3a885531ABaA1b556", + "commit_store": "0x5Ded92E2CF71a8fF7644a67850F061c38B31BfB4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", - "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", + "off_ramp": "0x960c62A491C30d0a60fD74a59d35B9C02697AdaA", + "commit_store": "0x06963745B3839B998288D1a46a46Ec25991A3D5E", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0xCE2CE7F940B7c839384e5D7e079A6aE80e8AD6dB", - "commit_store": "0x1b9D78Ec1CEEC439F0b7eA6C428A1a607D9FA7e4", + "off_ramp": "0x7d6721c2E85560F0A233255D3d332AcF6f850d96", + "commit_store": "0xaC00661cAB5161d9B4746DFb7A028d97981aB2c5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0xD667b5706592D0b040C78fEe5EE17D243b7dCB41", - "commit_store": "0x96101BA5250EE9295c193693C1e08A55bC593664", + "off_ramp": "0x4cEeFa55AF23dFD27Cf926e8eFB1D1bCcD24526E", + "commit_store": "0xaD3943BdECbf4ae7d6E51aB0FD06bbC604bB7b95", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", - "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", + "off_ramp": "0x2aF9B10A5972D0c36f4d8F85773052c104E319B2", + "commit_store": "0x82FCF55b9e9bAb3066c2863F12a02bBc2Ba33F2F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x9C08B7712af0344188aa5087D9e6aD0f47191037", - "commit_store": "0x4BE6DB0B884169a6A207fe5cad01eB4C025a13dB", + "off_ramp": "0x0FA15Bc42D4999d964CBf0161489Bd392DEE834e", + "commit_store": "0x37760F99a5b91884C9D89a06408f532aEbb0e674", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -647,59 +683,59 @@ Data = """ "wrapped_native": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x8Fb98b3837578aceEA32b454f3221FE18D7Ce903", + "on_ramp": "0xad6A94CFB51e7DE30FD21F417E4cBf70D3AdaD30", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xC6683ac4a0F62803Bec89a5355B36495ddF2C38b", + "on_ramp": "0x28EC0a9C90360F55C2a9DaD5901b074C257904ca", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2331F6D614C9Fd613Ff59a1aB727f1EDf6c37A68", + "on_ramp": "0x9DF611536f124278Ce968c476BDb10A66E54ecfE", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xA52cDAeb43803A80B3c0C2296f5cFe57e695BE11", + "on_ramp": "0x600f00aef9b8ED8EDBd7284B5F04a1932c3408aF", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x35347A2fC1f2a4c5Eae03339040d0b83b09e6FDA", + "on_ramp": "0x719Aef2C63376AdeCD62D2b59D54682aFBde914a", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x26546096F64B5eF9A1DcDAe70Df6F4f8c2E10C61", + "on_ramp": "0x7D6c93E49E46cc983a677c283EAb27CbbC94e3C4", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", - "commit_store": "0x09B0F93fC2111aE439e853884173AC5b2F809885", + "off_ramp": "0xAc56Df7F5fbde0DeeB1C0d397A150EDD5EE68625", + "commit_store": "0x8AF56D1c76B8c8CeE451a0a654D130e4050B993e", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x948dfaa4842fc23e0e362Fe8D4396AaE4E6DF7EA", - "commit_store": "0x7F4e739D40E58BBd59dAD388171d18e37B26326f", + "off_ramp": "0x40Ba47ea59D80DDd35E3a997AA520FBa0553dddc", + "commit_store": "0x8afe532517b39bA109d1A768E1Ad8b5C6485abF5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x17c542a28e08AEF5697251601C7b2B621d153D42", - "commit_store": "0x811250c20fAB9a1b7ca245453aC214ba637fBEB5", + "off_ramp": "0x7B968B2aDFd31765dAAD80d66c83F9D7006BFFd5", + "commit_store": "0xBc70551B5624BaF8cdCB84136198561C9cf5C176", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", - "commit_store": "0x74ED442ad211050e9C05Dc9A267E037E3d74A03B", + "off_ramp": "0xAA755Ef570986feEb6522377077e549e3013843E", + "commit_store": "0x5C7827EcE6a51AdaC36ef71aC01706deb1C7130d", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xFb04129aD1EEDB741CC705ebC1978a7aB63e51f6", - "commit_store": "0x63f875240149d29136053C954Ca164a9BfA81F77", + "off_ramp": "0x7Ad494C173f5845c6B4028a06cDcC6d3108bc960", + "commit_store": "0x104A1c8b05D37fE732094595Fe696AFc7EAB8668", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xdE8451E952Eb43350614839cCAA84f7C8701a09C", - "commit_store": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", + "off_ramp": "0xa85481273f8C112e96ED7476202F06D6131cf069", + "commit_store": "0x9FdF1D555e37dB09B0d151FEa53c134C88C4DeFd", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -719,122 +755,122 @@ Data = """ "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xe4Dd3B16E09c016402585a8aDFdB4A18f772a07e", + "on_ramp": "0xBc09627e58989Ba8F1eDA775e486467d2A00944F", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", + "on_ramp": "0x12492154714fBD28F28219f6fc4315d19de1025B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD990f8aFA5BCB02f95eEd88ecB7C68f5998bD618", + "on_ramp": "0x7a75b3818412fe0028590feE8270ba9E3fd01DBe", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x2B70a05320cB069e0fB55084D402343F832556E7", + "on_ramp": "0x8F35B097022135E0F46831f798a240Cc8c4b0B01", "deployed_at": 0 }, "Blast Sepolia": { - "on_ramp": "0xDB75E9D9ca7577CcBd7232741be954cf26194a66", + "on_ramp": "0x4ADA60556dA05FcF53a79359e37a3E13FebA22Bf", "deployed_at": 0 }, "Celo Alfajores": { - "on_ramp": "0x3C86d16F52C10B2ff6696a0e1b8E0BcfCC085948", + "on_ramp": "0x1163D1F7D75eEb1C4f4c6912d3cF9642027aFD30", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x3E842E3A79A00AFdd03B52390B1caC6306Ea257E", + "on_ramp": "0x831A7DbE6af8601427A0ADa89b642d4b59007eED", "deployed_at": 0 }, "Metis Sepolia": { - "on_ramp": "0x1C4640914cd57c5f02a68048A0fbb0E12d904223", + "on_ramp": "0xabB5A4f99DFEb4a3912e8Acc0660A008c76dA8c3", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0xc630fbD4D0F6AEB00aD0793FB827b54fBB78e981", + "on_ramp": "0x2Eb0842925fb7aA6045e951e98e8b4b3aFFaBB54", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x69CaB5A0a08a12BaFD8f5B195989D709E396Ed4d", + "on_ramp": "0xACDfd7a98d853FA3914047Cd46e7f5D53BBC9FbB", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x9f656e0361Fb5Df2ac446102c8aB31855B591692", + "on_ramp": "0xf9765c80F6448e6d4d02BeF4a6b4152131A2F513", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xedFc22336Eb0B9B11Ff37C07777db27BCcDe3C65", + "on_ramp": "0xd72c3c132B76F5D232C37dF3bF8f04392D552e0F", "deployed_at": 0 }, "ZKSync Sepolia": { - "on_ramp": "0x1Acb3A885feA37bdA30AB99b99327b14391f500F", + "on_ramp": "0xA2865E4f36760f5fa5c8F958336120f2DF0d974b", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xF18896AB20a09A29e64fdEbA99FDb8EC328f43b1", - "commit_store": "0x93Ff9Dd39Dc01eac1fc4d2c9211D95Ee458CAB94", + "off_ramp": "0xD2f5edfD4561d6E7599F6c6888Bd353cAFd0c55E", + "commit_store": "0x240420BC6bCDc067e668c7492D69fe06B3CF80cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", - "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", + "off_ramp": "0x1DEBa99dC8e2A77832461BD386d83D9FCb133137", + "commit_store": "0x139E06b6dBB1a0C41A1686C091795879c943765A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xdE2d8E126e08d675fCD7fFa5a6CE49925f3Dc692", - "commit_store": "0x0050ac355a82caB31194507f94174297bf0655A7", + "off_ramp": "0x04305BD9D9CA6730517f79c3D9c6828BC2D25Ecb", + "commit_store": "0x32edD59840CD9e474A280cf1707439F2Bd5872d4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", - "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", + "off_ramp": "0x662738DC7DE4f7eC63d9f73Cdf9BeA5A58DdcC15", + "commit_store": "0x1e46bAC486Dd878cD57B62845530A52343e39693", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Blast Sepolia": { - "off_ramp": "0x4e897e5cF3aC307F0541B2151A88bCD781c153a3", - "commit_store": "0xB656652841F347178e193951C4663652aCe36B74", + "off_ramp": "0x049A424cF894709f044bc70177F8F6b792adc3F6", + "commit_store": "0x496fE96E440Fc683478a08Df92A1c5E23E412b1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Celo Alfajores": { - "off_ramp": "0xB435E0f73c18C5a12C324CA1d02F81F2C3e6e761", - "commit_store": "0xbc5d74957F171e75F92c8F0E1C317A25a56a416D", + "off_ramp": "0x4F146d34Be5E273e576ef158Bd7070eC22708D20", + "commit_store": "0xEeB665281c7ab51d25423898f730Ab078c69dd42", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x7db0115A0b3AAb01d30bf81123c5DD7B0C41Add5", - "commit_store": "0x6640723Ea801178c4383FA016b9781e7ef1016EF", + "off_ramp": "0xB424365EEEEA58A36C7EC858f926f4e8275dDEb3", + "commit_store": "0xE95c2135e3330E953BB49068d32Fcba368Acd456", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Metis Sepolia": { - "off_ramp": "0x4DB693A93E9d5196ECD42EC56CDEAe99dFC652ED", - "commit_store": "0xBfACd78F1412B6f93Ac23409bf456aFec1ABd845", + "off_ramp": "0x46DE6201c258f5948135cd0262f91e48Cb8e3828", + "commit_store": "0x3A27Fd059A4eF0e96B0643283A44a56A8d6CF34A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xbEfd8D65F6643De54F0b1268A3bf4618ff85dcB4", - "commit_store": "0x0C161D3470b45Cc677661654C30ce4AdE6aCD288", + "off_ramp": "0x052E52fdd48719A6084366eA184FC44cb8C25DC2", + "commit_store": "0xBBb9baA314eB023E3F9291Aaf4107B6708341B50", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", - "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", + "off_ramp": "0xbfa6f6AAE31acB3A285e80026d6475C1a50d1d0F", + "commit_store": "0xB5FbA97Dc61ec68771a92a15360d9C32c9d054E7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x5032cbC0C4aEeD25bb6E45D8B3fAF05DB0688C5d", - "commit_store": "0xe6201C9996Cc7B6E828E10CbE937E693d577D318", + "off_ramp": "0xC3e550B6aaFA5539df8bbCc5B0991e587f438e75", + "commit_store": "0xd57866D97ca26dfaE34088a3EeE4657BAFaac5f9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x46b639a3C1a4CBfD326b94a2dB7415c27157282f", - "commit_store": "0x7b74554678816b045c1e7409327E086bD436aa46", + "off_ramp": "0x445F41C6aa7e910021786e860d7cfe3E7fcC6640", + "commit_store": "0x307dDE3c696E399b5837456FbCe03b1Ad76D46E3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "ZKSync Sepolia": { - "off_ramp": "0xBaABd4166C892a1081a26535875A8fA3f22937b2", - "commit_store": "0xfda2e83F4D3f42B7629134ecD6E4b29FB8A7A07B", + "off_ramp": "0x9f5dC467A5c97068A1c2987486B8b768275627eD", + "commit_store": "0x6e4601DA99a046e4bde60d051568E3E1F35E3097", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -854,68 +890,68 @@ Data = """ "wrapped_native": "0xbE3686643c05f00eC46e73da594c78098F7a9Ae7", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xA9DE3F7A617D67bC50c56baaCb9E0373C15EbfC6", + "on_ramp": "0xa5Be8C619F61505548992D9820c5c485b030C7B0", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xC4aC84da458ba8e40210D2dF94C76E9a41f70069", + "on_ramp": "0x7802B6804bbE7486229ac6D3519f0057c50b40a9", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0x5AD6eed6Be0ffaDCA4105050CF0E584D87E0c2F1", + "on_ramp": "0xd25B8c70CB43022Bdc3aC417E2Cf5159294d95A1", "deployed_at": 0 }, "Kroma Sepolia": { - "on_ramp": "0x428C4dc89b6Bf908B82d77C9CBceA786ea8cc7D0", + "on_ramp": "0x1De2Ca07eEee7F524Fe5edA6C8FFFb79F67b05E9", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x1961a7De751451F410391c251D4D4F98D71B767D", + "on_ramp": "0xB37607C6BD4562F32967dE87D14663D59e3f655d", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xd55148e841e76265B484d399eC71b7076ecB1216", + "on_ramp": "0x0c972752F9aC3255cE45b440f9bBC6500676c4e6", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4d57C6d8037C65fa66D6231844785a428310a735", + "on_ramp": "0x1CD55c65f85681Dfae47c62e6D93340D25006BbB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xeB1dFaB2464Bf0574D43e764E0c758f92e7ecAFb", - "commit_store": "0xcEaCa2B7890065c485f3E58657358a185Ad33791", + "off_ramp": "0xB5492C8A71130B486fAD1091Db683584767A3957", + "commit_store": "0x1e151ED27E2F48EcFBd5b4374d0fc4869e07c397", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x98e811Df9D2512f1aaf58D534607F583D6c54A4F", - "commit_store": "0x8e538351F6E5B2daF3c90C565C3738bca69a2716", + "off_ramp": "0x60536c757c2BBf72cC68A1933F7e336d03Bb68fe", + "commit_store": "0x2fF725556A04b47eB40BbA11d9F51e8fbbee9F07", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xB0e7f0fCcD3c961C473E7c44D939C1cDb4Cec1cB", - "commit_store": "0x4B56D8d53f1A6e0117B09700067De99581aA5542", + "off_ramp": "0xb858077FbE1E55cD7a9092Eb6d5403e068c14EAf", + "commit_store": "0x0EF13C7c95C27A9EA477363a26a09Cff44ba38F9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Kroma Sepolia": { - "off_ramp": "0xD685D2d224dd6D0Db2D56497db6270D77D9a7966", - "commit_store": "0x7e062D6880779a0347e7742058C1b1Ee4AA0B137", + "off_ramp": "0x78d8154e1216F4791086bFa078Aaf07dcD2bD3C6", + "commit_store": "0xe67AAfbE6025e730Cf47a414BEFf2106FF231dB1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xA5f97Bc69Bf06e7C37B93265c5457420A92c5F4b", - "commit_store": "0xd48b9213583074f518D8f4336FDf35370D450132", + "off_ramp": "0x995Fc17FC12b67f75D3cBf3bC71BD9af65671E78", + "commit_store": "0xD0825e3D8e61b67a06A93426749d38bCF73Ddb02", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x6c8f5999B06FDE17B11E4e3C1062b761766F960f", - "commit_store": "0x957c3c2056192e58A8485eF31165fC490d474239", + "off_ramp": "0xd7b5B4F8FF7a87cC92f7B3058365862859d9E057", + "commit_store": "0xa8f2bb4e831caA5E2794AaD014030E378208d4Bc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x8AB103843ED9D28D2C5DAf5FdB9c3e1CE2B6c876", - "commit_store": "0x7d5297c5506ee2A7Ef121Da9bE02b6a6AD30b392", + "off_ramp": "0xa7E2F97Be7798327A49CACD022f33c0E7EfD4897", + "commit_store": "0x6fe69eE4eC9FD768193a40129A3Ba3dF140b2208", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -923,20 +959,26 @@ Data = """ "ZKSync Sepolia": { "is_native_fee_token": true, "fee_token": "0x4317b2eCD41851173175005783322D29E9bAee9E", + "bridge_tokens": [ + "0xFf6d0c1518A8104611f482eb2801CaF4f13c9dEb" + ], + "bridge_tokens_pools": [ + "0xA16cfA090aA6888AE8Beb92F8bfD316DD05767C9" + ], "arm": "0x926b4f90610Aa448f27c8e0Fd0afa4A17B7305F9", "router": "0xA1fdA8aa9A8C4b945C45aD30647b01f07D7A0B16", "price_registry": "0x648B6BB09bE1C5766C8AC578B9B4aC8497eA671F", "wrapped_native": "0x4317b2eCD41851173175005783322D29E9bAee9E", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x79a9a5e9e318e8e109776569574814bbf935125a", + "on_ramp": "0xC38536521fde8556351aB7C4D3ea23b64AFbBbab", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0x18FF69051479796175852578725Fc74F58E963F8", - "commit_store": "0xF694b4FD7889480dca3CD41244e8e3395a9EFBa0", + "off_ramp": "0x19Ea9A42cd3682928aF19990dDb3904250D00a1D", + "commit_store": "0x20BF9037927bFadaF028D43ae07d1afccfB8fa85", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -976,7 +1018,7 @@ NetworkPairs = [ 'SEPOLIA,ARBITRUM_SEPOLIA', 'SEPOLIA,BASE_SEPOLIA', 'SEPOLIA,BLAST_SEPOLIA', - 'SEPOLIA,MODE_SEPOLIA', +# 'SEPOLIA,MODE_SEPOLIA', 'SEPOLIA,OPTIMISM_SEPOLIA', 'SEPOLIA,POLYGON_AMOY', 'SEPOLIA,WEMIX_TESTNET', @@ -1002,7 +1044,7 @@ NetworkPairs = [ 'ARBITRUM_SEPOLIA,WEMIX_TESTNET', 'ARBITRUM_SEPOLIA,GNOSIS_CHIADO', - 'BASE_SEPOLIA,MODE_SEPOLIA', +# 'BASE_SEPOLIA,MODE_SEPOLIA', 'BASE_SEPOLIA,OPTIMISM_SEPOLIA', 'BASE_SEPOLIA,GNOSIS_CHIADO', diff --git a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/soak-release-testing_token_transfer_with_native_feetoken.toml b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/soak-release-testing_token_transfer_with_native_feetoken.toml index 6a6aa205fc..9c22063f11 100644 --- a/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/soak-release-testing_token_transfer_with_native_feetoken.toml +++ b/integration-tests/ccip-tests/testconfig/tomls/prod-testnet/soak-release-testing_token_transfer_with_native_feetoken.toml @@ -26,59 +26,68 @@ Data = """ "wrapped_native": "0xE591bf0A0CF924A0674d7792db046B23CEbF5f34", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x1Cb56374296ED19E86F68fA437ee679FD7798DaA", + "on_ramp": "0x20C8c9F13C6AA402F2545AD15fB7a9CdE9108618", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x7854E73C73e7F9bb5b0D5B4861E997f4C6E8dcC6", + "on_ramp": "0xF1623862e4c9f9Fba1Ac0181C4fF53B4f958F065", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x973CbE752258D32AE82b60CD1CB656Eebb588dF0", + "on_ramp": "0xEfe02eB139D2A82e38184d28E3b65bb176F26ebD", + "deployed_at": 0 + }, + "Metis Sepolia": { + "on_ramp": "0x46a79a6a4B07FD3FC14ea8299A99FE29576776E2", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x701Fe16916dd21EFE2f535CA59611D818B017877", + "on_ramp": "0x0B0c08Bb2fA2EbDe25817009ee39eA1ad9bCaC58", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4205E1Ca0202A248A5D42F5975A8FE56F3E302e9", + "on_ramp": "0x64d78F20aD987c7D52FdCB8FB0777bD00de53210", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xBD4106fBE4699FE212A34Cc21b10BFf22b02d959", + "on_ramp": "0x2F3Daf77A663603826c7750E956b6555DE6f8250", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xcab0EF91Bee323d1A617c0a027eE753aFd6997E4", - "commit_store": "0x0d90b9b96cBFa0D01635ce12982ccE1b70827c7a", + "off_ramp": "0x7245a5947E2F32B66aF74F4dAF91718ea19afaDf", + "commit_store": "0x490AC77BbB26f4FFf876Ded07bCAE6DBe685be98", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xc1982985720B959E66c19b64F783361Eb9B60F26", - "commit_store": "0x28F66bB336f6db713d6ad2a3bd1B7a531282A159", + "off_ramp": "0xF2aB55Ed448A6fAD75013900568B6a927f52e5e0", + "commit_store": "0x833E5995A7422120f445f9B8dD1b9BD1037c68E5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x935C26F9a9122E5F9a27f2d3803e74c75B94f5a3", - "commit_store": "0xEdb963Ec5c2E5AbdFdCF137eF44A445a7fa4787A", + "off_ramp": "0xc1Cb31493fB2386aDC1Ea01F935F2bd8a8dCA388", + "commit_store": "0xe21896657A65c8959F16E1c3Ee5713E85d9EA020", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Metis Sepolia": { + "off_ramp": "0xc47143147Fd62A09618C695c7C03714aCe8db1Cf", + "commit_store": "0x2F42e7B22eE5885158916624Ff00608f4C82313D", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfD404A89e1d195F0c65be1A9042C77745197659e", - "commit_store": "0x84B7B012c95f8A152B44Ab3e952f2dEE424fA8e1", + "off_ramp": "0x4a7E91EF68758aaC66AeD656267bbCD0f9b6c019", + "commit_store": "0xb0A09D6A15FF7A0142DF3F62b2C4D1e11D763Ed0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x1c71f141b4630EBE52d6aF4894812960abE207eB", - "commit_store": "0xaB0c8Ba51E7Fa3E5693a4Fbb39473520FD85d173", + "off_ramp": "0xBed6e9131916d724418C8a6FE810F727302a5c00", + "commit_store": "0xdDb61B6bDa1B46d88f556440fABFe219F6da4F3a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x262e16C8D42aa07bE13e58F81e7D9F62F6DE2830", - "commit_store": "0xc132eFAf929299E5ee704Fa6D9796CFa23Bb8b2C", + "off_ramp": "0x11d486E92d291704D1E25cDbAeee687237247826", + "commit_store": "0xece9353095aC79Db9DD5bf2022690Fa6BffeBCAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -98,77 +107,77 @@ Data = """ "wrapped_native": "0xd00ae08403B9bbb9124bB305C09058E32C39A48c", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x8bB16BEDbFd62D1f905ACe8DBBF2954c8EEB4f66", + "on_ramp": "0xa9946BA30DAeC98745755e4410d6e8E894Edc53B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xF25ECF1Aad9B2E43EDc2960cF66f325783245535", + "on_ramp": "0x906BC7D10947A94ba0252e8C2E34868A466c03ED", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x1A674645f3EB4147543FCA7d40C5719cbd997362", + "on_ramp": "0x0aEc1AC9F6D0c21332d7a66dDF1Fbcb32cF3B0B3", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x1532e5b204ee2b2244170c78E743CB9c168F4DF9", + "on_ramp": "0x3dda45E731EC1db18B95651d1AF1868aa878468D", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xC334DE5b020e056d0fE766dE46e8d9f306Ffa1E2", + "on_ramp": "0x2a9EFdc9F93D9b822129038EFCa4B63Adf3f7FB5", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0xA82b9ACAcFA6FaB1FD721e7a748A30E3001351F9", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x5724B4Cc39a9690135F7273b44Dfd3BA6c0c69aD", + "on_ramp": "0x75b9a75Ee1fFef6BE7c4F842a041De7c6153CF4E", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x677B5ab5C8522d929166c064d5700F147b15fa33", + "on_ramp": "0x1ff99E67986E83bb5BA34143BaA2735853e5738c", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x90A74072e7B0c2d59e13aB4d8f93c8198c413194", - "commit_store": "0xf3458CFd2fdf4a6CF0Ce296d520DD21eB194828b", + "off_ramp": "0xd88CBA0612f2Ce611BF6d073A94C8FD7E70B4fBd", + "commit_store": "0x9b8279E352bC167F714eef96A4C436bE996643cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x10b28009E5D776F1f5AAA73941CE8953B8f42d26", - "commit_store": "0xacDD582F271eCF22FAd6764cCDe1c4a534b732A8", + "off_ramp": "0x9c40A73F5C7454BB7C178AFa56Ee30bFB2DCf7E6", + "commit_store": "0xE5611af1d63340b711B0468a976651Fb79B17870", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0xdBdE8510226d1E060A3bf982b67705C67f5697e2", - "commit_store": "0x8Ee73BC9492b4182D289E5C1e66e40CD876CC00F", + "off_ramp": "0xf8de9d5924CFD28e31a53B63B4903436D9818d69", + "commit_store": "0xDD7CfECE1bb4e8aC2E8b8281CFE1D44247119471", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x56dF55aF5F0A4689f3364230587a68eD6A314fAd", - "commit_store": "0xabA7ff98094c4cc7A075812EefF2CD21f6400235", + "off_ramp": "0x3F5035039C23cDAF032C64c084Dc70F811E62ddD", + "commit_store": "0xf5B0245c7B9e15f0cB0B85FF2B6799a45D61CbaA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x3d7CbC95DCC33257F14D6Eb780c88Bd56C6335BB", - "commit_store": "0x1fcDC02edDfb405f378ba53cF9E6104feBcB7542", + "off_ramp": "0x1DF9D94C6916918C935E60d2Cb4Ed265Bf778005", + "commit_store": "0xE7eeBE5882609d28C015d0A89DE1ba4f506F4a03", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0xbeD7F478Ef5627FB2B891fDA29Ca0131f6796D9D", + "commit_store": "0x27a319f58c01380056c86938798aCEAA1AC529e2", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x9e5e4324F8608D54A50a317832d456a392E4F8C2", - "commit_store": "0x92A51eD3F041B39EbD1e464C1f7cb1e8f8A8c63f", + "off_ramp": "0x01e3D835b4C4697D7F81B9d7Abc89A6E478E4a2f", + "commit_store": "0x4EC313c1Eb620432f42FB5f4Df27f8A566523c1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xD0D338318bC6837b091FC7AB5F2a94B7783507d5", - "commit_store": "0xd9D479208235c7355848ff4aF26eB5aacfDC30c6", + "off_ramp": "0x15CcAbf0e3484D4872e25b883163D8cB724d4832", + "commit_store": "0x859f3477B7b4ECc19aDD8cCb19740932F21bD76b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -188,59 +197,68 @@ Data = """ "wrapped_native": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0xa2515683E99F50ADbE177519A46bb20FfdBaA5de", + "on_ramp": "0x2A6f8Ed2e7b222163ef6EcC2327171B479399ab2", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x3E807220Ca84b997c0d1928162227b46C618e0c5", + "on_ramp": "0x97856Bf888F6eEDBBd322B28133BCcF9CA9038f6", + "deployed_at": 0 + }, + "Blast Sepolia": { + "on_ramp": "0xd0049BfFc8e2689Df9236FfA393Ccbf7eae4FbbC", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x8735f991d41eA9cA9D2CC75cD201e4B7C866E63e", + "on_ramp": "0x98dEa9e498F2A7aF6c74C915c88A17FbA09b73C2", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xf37CcbfC04adc1B56a46B36F811D52C744a1AF78", + "on_ramp": "0x363EB789fE31F08547a847D8C38d9b55C7Cf1903", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xB1DE44B04C00eaFe9915a3C07a0CaeA4410537dF", + "on_ramp": "0xC1C6438D60AbE9bF4b1F10460184CE9bD312e328", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x89268Afc1BEA0782a27ba84124E3F42b196af927", + "on_ramp": "0xbc85704EDb79ea84E9D3C18965F7f6A16B0a0440", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0x6e6fFCb6B4BED91ff0CC8C2e57EC029dA7DB80C2", - "commit_store": "0x38Bc38Bd824b6eE87571f9D3CFbe6D6E28E3Dc62", + "off_ramp": "0x95b66acfaaDF122f4EccE52C0aD4Fd997DD1150C", + "commit_store": "0x3af04b1c1e79A6B8A4577Bb47EC33eD2E66AeB47", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x2C61FD7E93Dc79422861282145c59B56dFbc3a8c", - "commit_store": "0x42fAe5B3605804CF6d08632d7A25864e24F792Ae", + "off_ramp": "0x0a5147e1Ac38C79c77031194ef64C8B5353F6EE9", + "commit_store": "0x103864D60b33a479EA7D0e23a37e0ce07198f0A9", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, + "Blast Sepolia": { + "off_ramp": "0xe1e8473218acCB82FBc24Ccd3C5D2dF166cd04f3", + "commit_store": "0x020B047A5Ca88fDB1ad3bAD9A082760fC7F770b6", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x71a44a60832B0F8B63232C9516e7E6aEc3A373Dc", - "commit_store": "0xAC24299a91b72d1Cb5B31147e3CF54964D896974", + "off_ramp": "0x1F7FEBCBb10420E039C333A60A444c1a442d826C", + "commit_store": "0x23Ae763a64D39d6038431a64Bbc4A670C89d82b9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x63440C7747d37bc6154b5538AE32b54FE0965AfA", - "commit_store": "0xAD22fA198CECfC534927aE1D480c460d5bB3460F", + "off_ramp": "0xAAe325adbc9C5a28e4e94Fef170D55de2CA9aA01", + "commit_store": "0xD173Df3A1b23ec42eA5C4669b9c956Bef230efd1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xf1c128Fe52Ea78CcAAB407509292E61ce38C1523", - "commit_store": "0x59dFD870dC4bd76A7B879A4f705Fdcd2595f85f9", + "off_ramp": "0xB513523aee87f838e78b32d2Bacaaf2e94D9f0f9", + "commit_store": "0x21A49164890576504C1f1c4DC9442c42C98771D7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xfd9B19c3725da5B517aA705B848ff3f21F98280e", - "commit_store": "0x3c1F1412563188aBc8FE3fd53E8F1Cb601CaB4f9", + "off_ramp": "0xc985571900DCa62387f93F882AB550472531f5DB", + "commit_store": "0xac5DACfAb1a512E33c49EFE42502863FC1a4BAB3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -260,68 +278,68 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x58622a80c6DdDc072F2b527a99BE1D0934eb2b50", + "on_ramp": "0xb52eF669d3fCeBee1f31418Facc02a16A6F6B0e5", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xAbA09a1b7b9f13E05A6241292a66793Ec7d43357", + "on_ramp": "0x212e8Fd9cCC330ab54E8141FA7d33967eF1eDafF", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD806966beAB5A3C75E5B90CDA4a6922C6A9F0c9d", + "on_ramp": "0xd54B44811AE99a18Cb95B4704ba04a65C0163751", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xdd0Ee1F20E93a93634AAcE56105E19423881Df56", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0x3d0115386C01436870a2c47e6297962284E70BA6", + "on_ramp": "0xc59689dFDEF9D953cEFbb58912b304bb38408476", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x3b39Cd9599137f892Ad57A4f54158198D445D147", + "on_ramp": "0x2945D35F428CE564F5455AD0AF28BDFCa67e76Ab", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x6486906bB2d85A6c0cCEf2A2831C11A2059ebfea", + "on_ramp": "0x29A1F4ecE9246F0042A9062FB89803fA8B1830cB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xd364C06ac99a82a00d3eFF9F2F78E4Abe4b9baAA", - "commit_store": "0xdE8d0f47a71eA3fDFBD3162271652f2847939097", + "off_ramp": "0x814E735c5DD19240c85E2513DD926Bc3a39f7140", + "commit_store": "0xFc24B204bfA5C65eD8e2Fc02fDe4FeCb62eA8Ac5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0xAd91214efFee446500940c764DF77AF18427294F", - "commit_store": "0x1242b6c5e0e349b8d4BCf0938f961C4B4f7EA3Fa", + "off_ramp": "0x3Ab3a3d35cAC95FfcFCcc127eF01eA8D87b0A64e", + "commit_store": "0x51313B8C068B5227fa7364E6eCB1382Fb751976F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xd5E9508921434e8758f4540D55c1c066b7cc1598", - "commit_store": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "off_ramp": "0x827CF69409307Cd4c979e652894C297ad5124ab7", + "commit_store": "0x547eBe6077305c3fdF8dA66c66cc14b0779CE00C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x8bB08Bc19771C69E739a2078894523b3DC05a05e", + "commit_store": "0xf163Da63bDB8b9C355d41C755E03125988650109", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xB26647A23e8b4284375e5C74b77c9557aE709D03", - "commit_store": "0x4b4fEB401d3E613e1D6242E155C83A80BF9ac2C9", + "off_ramp": "0x11E16c71D76E43acbcb496A70966380d905B1E32", + "commit_store": "0xEe19f039FaE3EF0F94971f0B7B187223D952ac13", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x86a3910908eCaAA31Fcd9F0fC8841D8E98f1511d", - "commit_store": "0xE99a87C9b5ed4D2b6060195DEea5106ffF655736", + "off_ramp": "0x8718d1cc138421Dbc1B489CB7884FF68DE7ad867", + "commit_store": "0x3291D453c880E5b59EEd04E600c85268Cd378b7f", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x189F61D9B886Dd2975D5Abc893c8Cf5f5effda71", - "commit_store": "0xEE7e27346DCD1e711348D0F7f7ECB53a9a3a08a7", + "off_ramp": "0x0ecA23Ef70B828fEDd0A84d2692cB0527B52396A", + "commit_store": "0xA7F84Ec616F8e9Fa593339944E76bda90A9737fE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -340,15 +358,24 @@ Data = """ "price_registry": "0xc8acE9dF450FaD007755C6C9AB4f0e9c8626E29C", "wrapped_native": "0x4200000000000000000000000000000000000023", "src_contracts": { + "BSC Testnet": { + "on_ramp": "0x6eA6f63b689b5597A0C06a5Eb8DcDFD86383857A", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x85Ef19FC4C63c70744995DC38CAAEC185E0c619f", + "on_ramp": "0x154aDEF773a848da8229D81De73a7b0844400ebd", "deployed_at": 0 } }, "dest_contracts": { + "BSC Testnet": { + "off_ramp": "0xd9dE4aCD27E814bfe70CA33d2A4d079e740626Bd", + "commit_store": "0xe8fF7e22c54f76F453d6072A9d3a12B1D9AbA137", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x92cD24C278D34C726f377703E50875d8f9535dC2", - "commit_store": "0xcE1b4D50CeD56850182Bd58Ace91171cB249B873", + "off_ramp": "0x46DD4e3e2b8a18409646F1C15bf3799a481e67f6", + "commit_store": "0x8250f9E992dda66791dd8b5d356B867ae53382cF", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -368,14 +395,14 @@ Data = """ "wrapped_native": "0x99604d0e2EfE7ABFb58BdE565b5330Bb46Ab3Dca", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x16a020c4bbdE363FaB8481262D30516AdbcfcFc8", + "on_ramp": "0x68A4f57A499563192C606a898BAf503A43fcDB4D", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0xa1b97F92D806BA040daf419AFC2765DC723683a4", - "commit_store": "0xcd92C0599Ac515e7588865cC45Eee21A74816aFc", + "off_ramp": "0xF6dB68333D14f6a0c1123cc420ea60980aEDA0Eb", + "commit_store": "0x8f9B63c40891CdF7d1C795625d4260a29bE2bBa0", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -395,68 +422,68 @@ Data = """ "wrapped_native": "0x18c8a7ec7897177E4529065a7E7B0878358B3BfF", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x473b49fb592B54a4BfCD55d40E048431982879C9", + "on_ramp": "0x94967Ea06C6543Aaba5B90C52B655003ef82e521", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x610F76A35E17DA4542518D85FfEa12645eF111Fc", + "on_ramp": "0x4f3576585e7fCCE5Fc502Bcf3CAdaD22E1194834", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xE48E6AA1fc7D0411acEA95F8C6CaD972A37721D4", + "on_ramp": "0xB2642B54580140C375c9024e273C575a5f53d02d", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x41b4A51cAfb699D9504E89d19D71F92E886028a8", + "on_ramp": "0x0E9504907be794620229C196F82CB062A66B7480", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xAae733212981e06D9C978Eb5148F8af03F54b6EF", + "on_ramp": "0xeb86B5b6f5C66eCb58e4Cf98E607b238126505DC", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x01800fCDd892e37f7829937271840A6F041bE62E", + "on_ramp": "0xd86F5DF82A2500137Ddeef963028d60E3b5A354D", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4ac7FBEc2A7298AbDf0E0F4fDC45015836C4bAFe", + "on_ramp": "0x03691D63C687D09368360e957AFB2F7B4d1651d4", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0x9aA82DBB53bf02096B771D40e9432A323a78fB26", - "commit_store": "0x5CdbA91aBC0cD81FC56bc10Ad1835C9E5fB38e5F", + "off_ramp": "0x3633Cce99186217d4C7ed64FD455d218b8Cd5D4c", + "commit_store": "0x6e096286548451828c97F1B3E49C402a4934F39a", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x3e33290B90fD0FF30a3FA138934DF028E4eCA348", - "commit_store": "0xCFe3556Aa42d40be09BD23aa80448a19443BE5B1", + "off_ramp": "0x5E4DB2A3c965B9B2A850a75697Bb6a00b4e35ac5", + "commit_store": "0x2489c5a802fE63943f7E3185A0362327B55DDF67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xbc4AD54e91b213D4279af92c0C5518c0b96cf62D", - "commit_store": "0xff84e8Dd4Fd17eaBb23b6AeA6e1981830e54389C", + "off_ramp": "0x2BA72Ba392C08750328635E36757A2c29a9165CA", + "commit_store": "0x08ebd7Cf4ABDC819c74cB45CbA4e291728538D7C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x4117953A5ceeF12f5B8C1E973b470ab83a8CebA6", - "commit_store": "0x94ad41296186E81f31e1ed0B1BcF5fa9e1721C27", + "off_ramp": "0x269D28B25Ee081ae5340e2BFE99850E92F1cd522", + "commit_store": "0x8dC9329BD221C89c4989d98c38Ff2Cc3dF92d14b", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0x33d2898F8fb7714FD1661791766f40754982a343", - "commit_store": "0x55d6Df194472f02CD481e506A277c4A29D0D1bCc", + "off_ramp": "0xd93B571ae9CaF43d70b2b53fFD55e035Db641e31", + "commit_store": "0x42C1093b9DdE8d0CD58859C610dc239B66bE26de", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x450543b1d85ca79885851D7b74dc982981b78229", - "commit_store": "0x23B79d940A769FE31b4C867A8BAE80117f24Ca81", + "off_ramp": "0x87F9b8382611ACD01d5696a1f5b05B888e55B0Cc", + "commit_store": "0x29AC46227908d31A9BdDe82c0A4a6c52D802f145", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xbf9036529123DE264bFA0FC7362fE25B650D4B16", - "commit_store": "0x5f7F1abD5c5EdaF2636D58B980e85355AF0Ef80d", + "off_ramp": "0x9aa734100C425309091dAE18154e0356B82d477a", + "commit_store": "0x7cDd533B82f4c32FAE7f551C37b1490909817C45", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -476,14 +503,14 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000001", "src_contracts": { "WeMix Testnet": { - "on_ramp": "0x6ea155Fc77566D9dcE01B8aa5D7968665dc4f0C5", + "on_ramp": "0xa81418c332d3E04338B058Ab39b1baf53029F638", "deployed_at": 0 } }, "dest_contracts": { "WeMix Testnet": { - "off_ramp": "0xB602B6E5Caf08ac0C920EAE585aed100a8cF6f3B", - "commit_store": "0x89D5b13908b9063abCC6791dc724bF7B7c93634C", + "off_ramp": "0x42Dde725C4f05C237a00B582Bb7457e208d3A17C", + "commit_store": "0xb116E9a90534354dA59CF93a87c1E9711c0Aaa2c", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -502,15 +529,24 @@ Data = """ "price_registry": "0x5DCE866b3ae6E0Ed153f0e149D7203A1B266cdF5", "wrapped_native": "0x5c48e07062aC4E2Cf4b9A768a711Aef18e8fbdA0", "src_contracts": { + "Arbitrum Sepolia": { + "on_ramp": "0x2eb69889cc979c0Be120813FcE2f1558efF4ceB5", + "deployed_at": 0 + }, "Sepolia Testnet": { - "on_ramp": "0x2Eff2d1BF5C557d6289D208a7a43608f5E3FeCc2", + "on_ramp": "0xE0dFc15C0CDf607b2088D0B641E00eA0B418124C", "deployed_at": 0 } }, "dest_contracts": { + "Arbitrum Sepolia": { + "off_ramp": "0x839b5dEA3e084790F580E9DfCE8CCfDf49c5835e", + "commit_store": "0xdF38C8aD34C379165f98A75a6894790bB5a16b1D", + "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" + }, "Sepolia Testnet": { - "off_ramp": "0x9Bb7e398ef9Acfe9cA584C39B1E233Cba62BB9f7", - "commit_store": "0x1F4B82cDebaC5e3a0Dd53183D47e51808B4a64cB", + "off_ramp": "0x72130De9A85e9C61151253aFF8801Bb3242A00a9", + "commit_store": "0x8F6D64280C379F680Ff0c3278f340D72a465FAAc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -530,23 +566,23 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Base Sepolia": { - "on_ramp": "0x73f7E074bd7291706a0C5412f51DB46441B1aDCB", + "on_ramp": "0x48ACE2319f643584B77C21476a6c664D7F13a107", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", + "on_ramp": "0xb821885731414497d705dc56325f18AA33e612dC", "deployed_at": 0 } }, "dest_contracts": { "Base Sepolia": { - "off_ramp": "0x137a38c6b1Ad20101F93516aB2159Df525309168", - "commit_store": "0x8F43d867969F14619895d71E0A5b89E0bb20bF70", + "off_ramp": "0xC6b69Fa9eeBc55e64eBc68371Fbd41ff73756F17", + "commit_store": "0xaA6691EA9110409a29C2E665174b4b2fe694cE67", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xcD44cec849B6a8eBd5551D6DFeEcA452257Dfe4d", - "commit_store": "0xbA66f08733E6715D33edDfb5a5947676bb45d0e0", + "off_ramp": "0x35dE2C381a2fF8a26c8ae94145be3A9cA8C83600", + "commit_store": "0xE7e60DAee094416b8ab2083047a893c4c4290c48", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -566,68 +602,68 @@ Data = """ "wrapped_native": "0x4200000000000000000000000000000000000006", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0x1a86b29364D1B3fA3386329A361aA98A104b2742", + "on_ramp": "0x6B36c9CD74E760088817a047C3460dEdFfe9a11A", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x6b38CC6Fa938D5AB09Bdf0CFe580E226fDD793cE", + "on_ramp": "0x91a144F570ABA7FB7079Fb187A267390E0cc7367", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0xe284D2315a28c4d62C419e8474dC457b219DB969", + "on_ramp": "0x6D22953cdEf8B0C9F0976Cfa52c33B198fEc5881", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x835a5b8e6CA17c2bB5A336c93a4E22478E6F1C8A", + "on_ramp": "0xec7D9A84A6d4556056975BE50Cdc97bAa9313632", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x2Cf26fb01E9ccDb831414B766287c0A9e4551089", + "on_ramp": "0x9E09C2A7D6B9F88c62f0E2Af4cd62dF3F4c326F1", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0xC8b93b46BF682c39B3F65Aa1c135bC8A95A5E43a", + "on_ramp": "0x54b32C2aCb4451c6cF66bcbd856d8A7Cc2263531", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xc7E53f6aB982af7A7C3e470c8cCa283d3399BDAd", + "on_ramp": "0xB9Ef21C04d8340b223e9C1d7a09f332609c70300", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xDc2c7A3d8068C6F09F0F3648d24C84e372F6014d", - "commit_store": "0xb1aFb5cbE3c29b5Db71F21442BA9EfD450BC23C3", + "off_ramp": "0xF35e2d1457749374453e44B06268aD3f78b133b3", + "commit_store": "0x4bd755d86E25dD4093CAa5639CfDab81571259CA", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x1F350718e015EB20E5065C09F4A7a3f66888aEeD", - "commit_store": "0x98650A8EB59f75D93563aB34FcF603b1A30e4CBF", + "off_ramp": "0xCb2266c2118b1f30D15CBeB3a885531ABaA1b556", + "commit_store": "0x5Ded92E2CF71a8fF7644a67850F061c38B31BfB4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x0a750ca77369e03613d7640548F4b2b1c695c3Bb", - "commit_store": "0x8fEBC74C26129C8d7E60288C6dCCc75eb494aA3C", + "off_ramp": "0x960c62A491C30d0a60fD74a59d35B9C02697AdaA", + "commit_store": "0x06963745B3839B998288D1a46a46Ec25991A3D5E", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0xCE2CE7F940B7c839384e5D7e079A6aE80e8AD6dB", - "commit_store": "0x1b9D78Ec1CEEC439F0b7eA6C428A1a607D9FA7e4", + "off_ramp": "0x7d6721c2E85560F0A233255D3d332AcF6f850d96", + "commit_store": "0xaC00661cAB5161d9B4746DFb7A028d97981aB2c5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0xD667b5706592D0b040C78fEe5EE17D243b7dCB41", - "commit_store": "0x96101BA5250EE9295c193693C1e08A55bC593664", + "off_ramp": "0x4cEeFa55AF23dFD27Cf926e8eFB1D1bCcD24526E", + "commit_store": "0xaD3943BdECbf4ae7d6E51aB0FD06bbC604bB7b95", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x260AF9b83e0d2Bb6C9015fC9f0BfF8858A0CCE68", - "commit_store": "0x7a0bB92Bc8663abe6296d0162A9b41a2Cb2E0358", + "off_ramp": "0x2aF9B10A5972D0c36f4d8F85773052c104E319B2", + "commit_store": "0x82FCF55b9e9bAb3066c2863F12a02bBc2Ba33F2F", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x9C08B7712af0344188aa5087D9e6aD0f47191037", - "commit_store": "0x4BE6DB0B884169a6A207fe5cad01eB4C025a13dB", + "off_ramp": "0x0FA15Bc42D4999d964CBf0161489Bd392DEE834e", + "commit_store": "0x37760F99a5b91884C9D89a06408f532aEbb0e674", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -647,59 +683,59 @@ Data = """ "wrapped_native": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", "src_contracts": { "Avalanche Fuji": { - "on_ramp": "0x8Fb98b3837578aceEA32b454f3221FE18D7Ce903", + "on_ramp": "0xad6A94CFB51e7DE30FD21F417E4cBf70D3AdaD30", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xC6683ac4a0F62803Bec89a5355B36495ddF2C38b", + "on_ramp": "0x28EC0a9C90360F55C2a9DaD5901b074C257904ca", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x2331F6D614C9Fd613Ff59a1aB727f1EDf6c37A68", + "on_ramp": "0x9DF611536f124278Ce968c476BDb10A66E54ecfE", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0xA52cDAeb43803A80B3c0C2296f5cFe57e695BE11", + "on_ramp": "0x600f00aef9b8ED8EDBd7284B5F04a1932c3408aF", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x35347A2fC1f2a4c5Eae03339040d0b83b09e6FDA", + "on_ramp": "0x719Aef2C63376AdeCD62D2b59D54682aFBde914a", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0x26546096F64B5eF9A1DcDAe70Df6F4f8c2E10C61", + "on_ramp": "0x7D6c93E49E46cc983a677c283EAb27CbbC94e3C4", "deployed_at": 0 } }, "dest_contracts": { "Avalanche Fuji": { - "off_ramp": "0xa733ce82a84335b2E9D864312225B0F3D5d80600", - "commit_store": "0x09B0F93fC2111aE439e853884173AC5b2F809885", + "off_ramp": "0xAc56Df7F5fbde0DeeB1C0d397A150EDD5EE68625", + "commit_store": "0x8AF56D1c76B8c8CeE451a0a654D130e4050B993e", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0x948dfaa4842fc23e0e362Fe8D4396AaE4E6DF7EA", - "commit_store": "0x7F4e739D40E58BBd59dAD388171d18e37B26326f", + "off_ramp": "0x40Ba47ea59D80DDd35E3a997AA520FBa0553dddc", + "commit_store": "0x8afe532517b39bA109d1A768E1Ad8b5C6485abF5", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x17c542a28e08AEF5697251601C7b2B621d153D42", - "commit_store": "0x811250c20fAB9a1b7ca245453aC214ba637fBEB5", + "off_ramp": "0x7B968B2aDFd31765dAAD80d66c83F9D7006BFFd5", + "commit_store": "0xBc70551B5624BaF8cdCB84136198561C9cf5C176", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xfFdE9E8c34A27BEBeaCcAcB7b3044A0A364455C9", - "commit_store": "0x74ED442ad211050e9C05Dc9A267E037E3d74A03B", + "off_ramp": "0xAA755Ef570986feEb6522377077e549e3013843E", + "commit_store": "0x5C7827EcE6a51AdaC36ef71aC01706deb1C7130d", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0xFb04129aD1EEDB741CC705ebC1978a7aB63e51f6", - "commit_store": "0x63f875240149d29136053C954Ca164a9BfA81F77", + "off_ramp": "0x7Ad494C173f5845c6B4028a06cDcC6d3108bc960", + "commit_store": "0x104A1c8b05D37fE732094595Fe696AFc7EAB8668", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0xdE8451E952Eb43350614839cCAA84f7C8701a09C", - "commit_store": "0xaCdaBa07ECad81dc634458b98673931DD9d3Bc14", + "off_ramp": "0xa85481273f8C112e96ED7476202F06D6131cf069", + "commit_store": "0x9FdF1D555e37dB09B0d151FEa53c134C88C4DeFd", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -719,122 +755,122 @@ Data = """ "wrapped_native": "0x097D90c9d3E0B50Ca60e1ae45F6A81010f9FB534", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xe4Dd3B16E09c016402585a8aDFdB4A18f772a07e", + "on_ramp": "0xBc09627e58989Ba8F1eDA775e486467d2A00944F", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0x0477cA0a35eE05D3f9f424d88bC0977ceCf339D4", + "on_ramp": "0x12492154714fBD28F28219f6fc4315d19de1025B", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0xD990f8aFA5BCB02f95eEd88ecB7C68f5998bD618", + "on_ramp": "0x7a75b3818412fe0028590feE8270ba9E3fd01DBe", "deployed_at": 0 }, "Base Sepolia": { - "on_ramp": "0x2B70a05320cB069e0fB55084D402343F832556E7", + "on_ramp": "0x8F35B097022135E0F46831f798a240Cc8c4b0B01", "deployed_at": 0 }, "Blast Sepolia": { - "on_ramp": "0xDB75E9D9ca7577CcBd7232741be954cf26194a66", + "on_ramp": "0x4ADA60556dA05FcF53a79359e37a3E13FebA22Bf", "deployed_at": 0 }, "Celo Alfajores": { - "on_ramp": "0x3C86d16F52C10B2ff6696a0e1b8E0BcfCC085948", + "on_ramp": "0x1163D1F7D75eEb1C4f4c6912d3cF9642027aFD30", "deployed_at": 0 }, "Gnosis Chiado": { - "on_ramp": "0x3E842E3A79A00AFdd03B52390B1caC6306Ea257E", + "on_ramp": "0x831A7DbE6af8601427A0ADa89b642d4b59007eED", "deployed_at": 0 }, "Metis Sepolia": { - "on_ramp": "0x1C4640914cd57c5f02a68048A0fbb0E12d904223", + "on_ramp": "0xabB5A4f99DFEb4a3912e8Acc0660A008c76dA8c3", "deployed_at": 0 }, "Mode Sepolia": { - "on_ramp": "0xc630fbD4D0F6AEB00aD0793FB827b54fBB78e981", + "on_ramp": "0x2Eb0842925fb7aA6045e951e98e8b4b3aFFaBB54", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x69CaB5A0a08a12BaFD8f5B195989D709E396Ed4d", + "on_ramp": "0xACDfd7a98d853FA3914047Cd46e7f5D53BBC9FbB", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0x9f656e0361Fb5Df2ac446102c8aB31855B591692", + "on_ramp": "0xf9765c80F6448e6d4d02BeF4a6b4152131A2F513", "deployed_at": 0 }, "WeMix Testnet": { - "on_ramp": "0xedFc22336Eb0B9B11Ff37C07777db27BCcDe3C65", + "on_ramp": "0xd72c3c132B76F5D232C37dF3bF8f04392D552e0F", "deployed_at": 0 }, "ZKSync Sepolia": { - "on_ramp": "0x1Acb3A885feA37bdA30AB99b99327b14391f500F", + "on_ramp": "0xA2865E4f36760f5fa5c8F958336120f2DF0d974b", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xF18896AB20a09A29e64fdEbA99FDb8EC328f43b1", - "commit_store": "0x93Ff9Dd39Dc01eac1fc4d2c9211D95Ee458CAB94", + "off_ramp": "0xD2f5edfD4561d6E7599F6c6888Bd353cAFd0c55E", + "commit_store": "0x240420BC6bCDc067e668c7492D69fe06B3CF80cE", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x000b26f604eAadC3D874a4404bde6D64a97d95ca", - "commit_store": "0x2dD9273F8208B8393350508131270A6574A69784", + "off_ramp": "0x1DEBa99dC8e2A77832461BD386d83D9FCb133137", + "commit_store": "0x139E06b6dBB1a0C41A1686C091795879c943765A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xdE2d8E126e08d675fCD7fFa5a6CE49925f3Dc692", - "commit_store": "0x0050ac355a82caB31194507f94174297bf0655A7", + "off_ramp": "0x04305BD9D9CA6730517f79c3D9c6828BC2D25Ecb", + "commit_store": "0x32edD59840CD9e474A280cf1707439F2Bd5872d4", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Base Sepolia": { - "off_ramp": "0x31c0B81832B333419f0DfD36A69F502cF9094aed", - "commit_store": "0xDFcde9d698a2B32DB2537DC9B752Cadd1D846a52", + "off_ramp": "0x662738DC7DE4f7eC63d9f73Cdf9BeA5A58DdcC15", + "commit_store": "0x1e46bAC486Dd878cD57B62845530A52343e39693", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Blast Sepolia": { - "off_ramp": "0x4e897e5cF3aC307F0541B2151A88bCD781c153a3", - "commit_store": "0xB656652841F347178e193951C4663652aCe36B74", + "off_ramp": "0x049A424cF894709f044bc70177F8F6b792adc3F6", + "commit_store": "0x496fE96E440Fc683478a08Df92A1c5E23E412b1C", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Celo Alfajores": { - "off_ramp": "0xB435E0f73c18C5a12C324CA1d02F81F2C3e6e761", - "commit_store": "0xbc5d74957F171e75F92c8F0E1C317A25a56a416D", + "off_ramp": "0x4F146d34Be5E273e576ef158Bd7070eC22708D20", + "commit_store": "0xEeB665281c7ab51d25423898f730Ab078c69dd42", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Gnosis Chiado": { - "off_ramp": "0x7db0115A0b3AAb01d30bf81123c5DD7B0C41Add5", - "commit_store": "0x6640723Ea801178c4383FA016b9781e7ef1016EF", + "off_ramp": "0xB424365EEEEA58A36C7EC858f926f4e8275dDEb3", + "commit_store": "0xE95c2135e3330E953BB49068d32Fcba368Acd456", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Metis Sepolia": { - "off_ramp": "0x4DB693A93E9d5196ECD42EC56CDEAe99dFC652ED", - "commit_store": "0xBfACd78F1412B6f93Ac23409bf456aFec1ABd845", + "off_ramp": "0x46DE6201c258f5948135cd0262f91e48Cb8e3828", + "commit_store": "0x3A27Fd059A4eF0e96B0643283A44a56A8d6CF34A", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Mode Sepolia": { - "off_ramp": "0xbEfd8D65F6643De54F0b1268A3bf4618ff85dcB4", - "commit_store": "0x0C161D3470b45Cc677661654C30ce4AdE6aCD288", + "off_ramp": "0x052E52fdd48719A6084366eA184FC44cb8C25DC2", + "commit_store": "0xBBb9baA314eB023E3F9291Aaf4107B6708341B50", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xD50590D4438411EDe47029b0FD7901A7145E5Df6", - "commit_store": "0xe85EEE9Fd434A7b8a586Ee086E828abF41839479", + "off_ramp": "0xbfa6f6AAE31acB3A285e80026d6475C1a50d1d0F", + "commit_store": "0xB5FbA97Dc61ec68771a92a15360d9C32c9d054E7", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x5032cbC0C4aEeD25bb6E45D8B3fAF05DB0688C5d", - "commit_store": "0xe6201C9996Cc7B6E828E10CbE937E693d577D318", + "off_ramp": "0xC3e550B6aaFA5539df8bbCc5B0991e587f438e75", + "commit_store": "0xd57866D97ca26dfaE34088a3EeE4657BAFaac5f9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "WeMix Testnet": { - "off_ramp": "0x46b639a3C1a4CBfD326b94a2dB7415c27157282f", - "commit_store": "0x7b74554678816b045c1e7409327E086bD436aa46", + "off_ramp": "0x445F41C6aa7e910021786e860d7cfe3E7fcC6640", + "commit_store": "0x307dDE3c696E399b5837456FbCe03b1Ad76D46E3", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "ZKSync Sepolia": { - "off_ramp": "0xBaABd4166C892a1081a26535875A8fA3f22937b2", - "commit_store": "0xfda2e83F4D3f42B7629134ecD6E4b29FB8A7A07B", + "off_ramp": "0x9f5dC467A5c97068A1c2987486B8b768275627eD", + "commit_store": "0x6e4601DA99a046e4bde60d051568E3E1F35E3097", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -854,68 +890,68 @@ Data = """ "wrapped_native": "0xbE3686643c05f00eC46e73da594c78098F7a9Ae7", "src_contracts": { "Arbitrum Sepolia": { - "on_ramp": "0xA9DE3F7A617D67bC50c56baaCb9E0373C15EbfC6", + "on_ramp": "0xa5Be8C619F61505548992D9820c5c485b030C7B0", "deployed_at": 0 }, "Avalanche Fuji": { - "on_ramp": "0xC4aC84da458ba8e40210D2dF94C76E9a41f70069", + "on_ramp": "0x7802B6804bbE7486229ac6D3519f0057c50b40a9", "deployed_at": 0 }, "BSC Testnet": { - "on_ramp": "0x5AD6eed6Be0ffaDCA4105050CF0E584D87E0c2F1", + "on_ramp": "0xd25B8c70CB43022Bdc3aC417E2Cf5159294d95A1", "deployed_at": 0 }, "Kroma Sepolia": { - "on_ramp": "0x428C4dc89b6Bf908B82d77C9CBceA786ea8cc7D0", + "on_ramp": "0x1De2Ca07eEee7F524Fe5edA6C8FFFb79F67b05E9", "deployed_at": 0 }, "Optimism Sepolia": { - "on_ramp": "0x1961a7De751451F410391c251D4D4F98D71B767D", + "on_ramp": "0xB37607C6BD4562F32967dE87D14663D59e3f655d", "deployed_at": 0 }, "Polygon Amoy": { - "on_ramp": "0xd55148e841e76265B484d399eC71b7076ecB1216", + "on_ramp": "0x0c972752F9aC3255cE45b440f9bBC6500676c4e6", "deployed_at": 0 }, "Sepolia Testnet": { - "on_ramp": "0x4d57C6d8037C65fa66D6231844785a428310a735", + "on_ramp": "0x1CD55c65f85681Dfae47c62e6D93340D25006BbB", "deployed_at": 0 } }, "dest_contracts": { "Arbitrum Sepolia": { - "off_ramp": "0xeB1dFaB2464Bf0574D43e764E0c758f92e7ecAFb", - "commit_store": "0xcEaCa2B7890065c485f3E58657358a185Ad33791", + "off_ramp": "0xB5492C8A71130B486fAD1091Db683584767A3957", + "commit_store": "0x1e151ED27E2F48EcFBd5b4374d0fc4869e07c397", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Avalanche Fuji": { - "off_ramp": "0x98e811Df9D2512f1aaf58D534607F583D6c54A4F", - "commit_store": "0x8e538351F6E5B2daF3c90C565C3738bca69a2716", + "off_ramp": "0x60536c757c2BBf72cC68A1933F7e336d03Bb68fe", + "commit_store": "0x2fF725556A04b47eB40BbA11d9F51e8fbbee9F07", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "BSC Testnet": { - "off_ramp": "0xB0e7f0fCcD3c961C473E7c44D939C1cDb4Cec1cB", - "commit_store": "0x4B56D8d53f1A6e0117B09700067De99581aA5542", + "off_ramp": "0xb858077FbE1E55cD7a9092Eb6d5403e068c14EAf", + "commit_store": "0x0EF13C7c95C27A9EA477363a26a09Cff44ba38F9", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Kroma Sepolia": { - "off_ramp": "0xD685D2d224dd6D0Db2D56497db6270D77D9a7966", - "commit_store": "0x7e062D6880779a0347e7742058C1b1Ee4AA0B137", + "off_ramp": "0x78d8154e1216F4791086bFa078Aaf07dcD2bD3C6", + "commit_store": "0xe67AAfbE6025e730Cf47a414BEFf2106FF231dB1", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Optimism Sepolia": { - "off_ramp": "0xA5f97Bc69Bf06e7C37B93265c5457420A92c5F4b", - "commit_store": "0xd48b9213583074f518D8f4336FDf35370D450132", + "off_ramp": "0x995Fc17FC12b67f75D3cBf3bC71BD9af65671E78", + "commit_store": "0xD0825e3D8e61b67a06A93426749d38bCF73Ddb02", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Polygon Amoy": { - "off_ramp": "0x6c8f5999B06FDE17B11E4e3C1062b761766F960f", - "commit_store": "0x957c3c2056192e58A8485eF31165fC490d474239", + "off_ramp": "0xd7b5B4F8FF7a87cC92f7B3058365862859d9E057", + "commit_store": "0xa8f2bb4e831caA5E2794AaD014030E378208d4Bc", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" }, "Sepolia Testnet": { - "off_ramp": "0x8AB103843ED9D28D2C5DAf5FdB9c3e1CE2B6c876", - "commit_store": "0x7d5297c5506ee2A7Ef121Da9bE02b6a6AD30b392", + "off_ramp": "0xa7E2F97Be7798327A49CACD022f33c0E7EfD4897", + "commit_store": "0x6fe69eE4eC9FD768193a40129A3Ba3dF140b2208", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -923,20 +959,26 @@ Data = """ "ZKSync Sepolia": { "is_native_fee_token": true, "fee_token": "0x4317b2eCD41851173175005783322D29E9bAee9E", + "bridge_tokens": [ + "0xFf6d0c1518A8104611f482eb2801CaF4f13c9dEb" + ], + "bridge_tokens_pools": [ + "0xA16cfA090aA6888AE8Beb92F8bfD316DD05767C9" + ], "arm": "0x926b4f90610Aa448f27c8e0Fd0afa4A17B7305F9", "router": "0xA1fdA8aa9A8C4b945C45aD30647b01f07D7A0B16", "price_registry": "0x648B6BB09bE1C5766C8AC578B9B4aC8497eA671F", "wrapped_native": "0x4317b2eCD41851173175005783322D29E9bAee9E", "src_contracts": { "Sepolia Testnet": { - "on_ramp": "0x79a9a5e9e318e8e109776569574814bbf935125a", + "on_ramp": "0xC38536521fde8556351aB7C4D3ea23b64AFbBbab", "deployed_at": 0 } }, "dest_contracts": { "Sepolia Testnet": { - "off_ramp": "0x18FF69051479796175852578725Fc74F58E963F8", - "commit_store": "0xF694b4FD7889480dca3CD41244e8e3395a9EFBa0", + "off_ramp": "0x19Ea9A42cd3682928aF19990dDb3904250D00a1D", + "commit_store": "0x20BF9037927bFadaF028D43ae07d1afccfB8fa85", "receiver_dapp": "0xea387241d834D04CC408f4C2FE7ef2c477E4B3E7" } } @@ -969,30 +1011,54 @@ selected_networks = [ [CCIP.Groups.load] NetworkPairs = [ - 'AVALANCHE_FUJI,ARBITRUM_SEPOLIA', - 'AVALANCHE_FUJI,BASE_SEPOLIA', - 'AVALANCHE_FUJI,OPTIMISM_SEPOLIA', - 'AVALANCHE_FUJI,POLYGON_AMOY', - 'AVALANCHE_FUJI,GNOSIS_CHIADO', + 'SEPOLIA,AVALANCHE_FUJI', +# 'SEPOLIA,BSC_TESTNET', + 'SEPOLIA,CELO_ALFAJORES', + 'SEPOLIA,ARBITRUM_SEPOLIA', + 'SEPOLIA,BASE_SEPOLIA', + 'SEPOLIA,BLAST_SEPOLIA', + 'SEPOLIA,MODE_SEPOLIA', + 'SEPOLIA,OPTIMISM_SEPOLIA', + 'SEPOLIA,POLYGON_AMOY', + 'SEPOLIA,WEMIX_TESTNET', + 'SEPOLIA,GNOSIS_CHIADO', + 'SEPOLIA,METIS_SEPOLIA', + 'SEPOLIA,ZKSYNC_SEPOLIA', + +# 'AVALANCHE_FUJI,BSC_TESTNET', +# 'AVALANCHE_FUJI,ARBITRUM_SEPOLIA', +# 'AVALANCHE_FUJI,BASE_SEPOLIA', +# 'AVALANCHE_FUJI,OPTIMISM_SEPOLIA', +# 'AVALANCHE_FUJI,POLYGON_AMOY', +# 'AVALANCHE_FUJI,WEMIX_TESTNET', +# 'AVALANCHE_FUJI,GNOSIS_CHIADO', + +# 'BSC_TESTNET,BASE_SEPOLIA', +# 'BSC_TESTNET,POLYGON_AMOY', +# 'BSC_TESTNET,WEMIX_TESTNET', +# 'BSC_TESTNET,GNOSIS_CHIADO', + 'ARBITRUM_SEPOLIA,BASE_SEPOLIA', 'ARBITRUM_SEPOLIA,OPTIMISM_SEPOLIA', - 'ARBITRUM_SEPOLIA,SEPOLIA', + 'ARBITRUM_SEPOLIA,WEMIX_TESTNET', 'ARBITRUM_SEPOLIA,GNOSIS_CHIADO', + 'BASE_SEPOLIA,MODE_SEPOLIA', 'BASE_SEPOLIA,OPTIMISM_SEPOLIA', 'BASE_SEPOLIA,GNOSIS_CHIADO', - 'SEPOLIA,MODE_SEPOLIA', - 'SEPOLIA,CELO_ALFAJORES', - 'SEPOLIA,METIS_SEPOLIA', - 'SEPOLIA,BLAST_SEPOLIA', - 'SEPOLIA,ZKSYNC_SEPOLIA', - 'KROMA_SEPOLIA,WEMIX_TESTNET', + + # 'KROMA_SEPOLIA,WEMIX_TESTNET', + + 'OPTIMISM_SEPOLIA,POLYGON_AMOY', + 'OPTIMISM_SEPOLIA,WEMIX_TESTNET', 'OPTIMISM_SEPOLIA,GNOSIS_CHIADO', - 'BSC_TESTNET,GNOSIS_CHIADO', + + 'POLYGON_AMOY,WEMIX_TESTNET', + 'POLYGON_AMOY,GNOSIS_CHIADO', ] BiDirectionalLane = true -PhaseTimeout = '20m' +PhaseTimeout = '45m' ExistingDeployment = true [CCIP.Groups.load.TokenConfig] @@ -1006,7 +1072,7 @@ TestRunName = 'SoakTest_prod_testnet' FailOnFirstErrorInLoad = true [[CCIP.Groups.load.LoadProfile.MsgProfile.MsgDetails]] -MsgType = 'Data' +MsgType = 'DataWithToken' DestGasLimit = 0 DataLength = 100 NoOfTokens = 1 diff --git a/integration-tests/ccip-tests/testsetups/ccip.go b/integration-tests/ccip-tests/testsetups/ccip.go index eee424d50d..832660f090 100644 --- a/integration-tests/ccip-tests/testsetups/ccip.go +++ b/integration-tests/ccip-tests/testsetups/ccip.go @@ -35,6 +35,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/config" "github.com/smartcontractkit/chainlink-testing-framework/lib/k8s/environment" "github.com/smartcontractkit/chainlink-testing-framework/lib/networks" + "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/osutil" "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext" integrationactions "github.com/smartcontractkit/chainlink/integration-tests/actions" @@ -1147,7 +1148,14 @@ func CCIPDefaultTestSetUp( // we need to set it only once for all the lanes as the attestation path uses regex to match the path for // all messages across all lanes err = actions.SetMockServerWithUSDCAttestation(killgrave, setUpArgs.Env.MockServer) - require.NoError(t, err, "failed to set up mock server for attestation") + require.NoError(t, err, "failed to set up mock server for USDC attestation") + } + if pointer.GetBool(setUpArgs.Cfg.TestGroupInput.LBTCMockDeployment) { + // if it's a new LBTC deployment, set up mock server for attestation, + // we need to set it only once for all the lanes as the attestation path uses regex to match the path for + // all messages across all lanes + err = actions.SetMockServerWithLBTCAttestation(killgrave, setUpArgs.Env.MockServer) + require.NoError(t, err, "failed to set up mock server for LBTC attestation") } } // deploy all lane specific contracts @@ -1386,6 +1394,10 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment( t.Cleanup(func() { if configureCLNode { if ccipEnv.LocalCluster != nil { + if t.Failed() || (ccipEnv.LocalCluster.TestConfig.GetLoggingConfig() != nil && ccipEnv.LocalCluster.TestConfig.GetLoggingConfig().TestLogCollect != nil && *ccipEnv.LocalCluster.TestConfig.GetLoggingConfig().TestLogCollect) { + flushClLogs(*lggr, ccipEnv.LocalCluster) + } + err := ccipEnv.LocalCluster.Terminate() require.NoError(t, err, "Local cluster termination shouldn't fail") require.NoError(t, o.Reporter.SendReport(t, namespace, false), "Aggregating and sending report shouldn't fail") @@ -1406,6 +1418,24 @@ func (o *CCIPTestSetUpOutputs) CreateEnvironment( return chainByChainID } +func flushClLogs(l zerolog.Logger, testEnv *test_env.CLClusterTestEnv) { + l.Info().Msg("Shutting down LogStream") + logPath, err := osutil.GetAbsoluteFolderPath("logs") + if err == nil { + l.Info().Str("Absolute path", logPath).Msg("LogStream logs folder location") + } + + l.Info().Msg("Flushing LogStream logs") + // we can't do much if this fails, so we just log the error in LogStream + if err := testEnv.LogStream.FlushAndShutdown(); err != nil { + l.Error().Err(err).Msg("Error flushing and shutting down LogStream") + } + testEnv.LogStream.PrintLogTargetsLocations() + testEnv.LogStream.SaveLogLocationInTestSummary() + + l.Info().Msg("Finished shutting down LogStream") +} + func createEnvironmentConfig(t *testing.T, envName string, testConfig *CCIPTestConfig, reportPath string) *environment.Config { envConfig := &environment.Config{ NamespacePrefix: envName, diff --git a/integration-tests/go.mod b/integration-tests/go.mod index a3a0f3abd2..0ea9a6338e 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -32,7 +32,7 @@ require ( github.com/segmentio/ksuid v1.0.4 github.com/shopspring/decimal v1.4.0 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/chain-selectors v1.0.30 + github.com/smartcontractkit/chain-selectors v1.0.34 github.com/smartcontractkit/chainlink-automation v1.0.4 github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index ff4de1e4b0..3f681cf800 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -516,8 +516,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -1417,8 +1417,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/smartcontractkit/chain-selectors v1.0.30 h1:jk+xVRocgQ/uvKLSd1JzeHJ/v+EKu1BjrreaSGqKzjo= -github.com/smartcontractkit/chain-selectors v1.0.30/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4= +github.com/smartcontractkit/chain-selectors v1.0.34/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index df2c44f105..ec5269b184 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -386,7 +386,7 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/chain-selectors v1.0.30 // indirect + github.com/smartcontractkit/chain-selectors v1.0.34 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 3745234553..df9637d1ae 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -498,8 +498,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= +github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -1393,8 +1393,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/smartcontractkit/chain-selectors v1.0.30 h1:jk+xVRocgQ/uvKLSd1JzeHJ/v+EKu1BjrreaSGqKzjo= -github.com/smartcontractkit/chain-selectors v1.0.30/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.34 h1:MJ17OGu8+jjl426pcKrJkCf3fePb3eCreuAnUA3RBj4= +github.com/smartcontractkit/chain-selectors v1.0.34/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI= diff --git a/package.json b/package.json index 2a6927dc61..8fa5230c9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ccip", - "version": "2.17.0-ccip1.5.0", + "version": "2.18.0-ccip1.5.0", "description": "node of the decentralized oracle network, bridging on and off-chain computation", "main": "index.js", "scripts": {