From 99f9d86d0e433d11d4d0f9bcdd44298cba7887b6 Mon Sep 17 00:00:00 2001 From: Connor Stein Date: Tue, 7 Nov 2023 16:39:19 -0500 Subject: [PATCH] USDCPool review (#259) --- contracts/gas-snapshots/ccip.gas-snapshot | 24 +-- .../src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol | 2 + ...geReceiver.sol => IMessageTransmitter.sol} | 10 +- .../v0.8/ccip/pools/USDC/ITokenMessenger.sol | 7 +- .../v0.8/ccip/pools/USDC/USDCTokenPool.sol | 84 +++----- .../ccip/test/helpers/USDCTokenPoolHelper.sol | 8 +- ...ockUSDC.sol => MockUSDCTokenMessenger.sol} | 25 +-- .../ccip/test/mocks/MockUSDCTransmitter.sol | 33 +++ .../v0.8/ccip/test/pools/USDCTokenPool.t.sol | 194 ++++++------------ .../usdc_token_pool/usdc_token_pool.go | 106 +++++----- ...rapper-dependency-versions-do-not-edit.txt | 2 +- 11 files changed, 224 insertions(+), 271 deletions(-) rename contracts/src/v0.8/ccip/pools/USDC/{IMessageReceiver.sol => IMessageTransmitter.sol} (86%) rename contracts/src/v0.8/ccip/test/mocks/{MockUSDC.sol => MockUSDCTokenMessenger.sol} (60%) create mode 100644 contracts/src/v0.8/ccip/test/mocks/MockUSDCTransmitter.sol diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 4ef0cd5d22..5bf1b0a053 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -395,18 +395,14 @@ TokenProxy_getFee:testGetFeeGasShouldBeZeroReverts() (gas: 16746) TokenProxy_getFee:testGetFeeInvalidTokenReverts() (gas: 12628) TokenProxy_getFee:testGetFeeNoDataAllowedReverts() (gas: 15775) TokenProxy_getFee:testGetFeeSuccess() (gas: 74453) -USDCTokenPool__validateMessage:testValidateInvalidMessageReverts() (gas: 25338) -USDCTokenPool_lockOrBurn:testLockOrBurnWithAllowListReverts() (gas: 21968) -USDCTokenPool_lockOrBurn:testPermissionsErrorReverts() (gas: 12498) -USDCTokenPool_lockOrBurn:testUnknownDomainReverts() (gas: 183561) -USDCTokenPool_releaseOrMint:testReleaseOrMintRealTxSuccess() (gas: 56035) -USDCTokenPool_releaseOrMint:testTokenMaxCapacityExceededReverts() (gas: 27922) -USDCTokenPool_releaseOrMint:testUnlockingUSDCFailedReverts() (gas: 50764) -USDCTokenPool_setConfig:testInvalidConfigReverts() (gas: 15241) -USDCTokenPool_setConfig:testInvalidMessageVersionReverts() (gas: 11741) -USDCTokenPool_setConfig:testInvalidTokenMessengerVersionReverts() (gas: 287496) -USDCTokenPool_setConfig:testOnlyOwnerReverts() (gas: 15709) -USDCTokenPool_setConfig:testSetConfigSuccess() (gas: 352451) -USDCTokenPool_setDomains:testInvalidDomainReverts() (gas: 66100) -USDCTokenPool_setDomains:testOnlyOwnerReverts() (gas: 15427) +USDCTokenPool__validateMessage:testValidateInvalidMessageReverts() (gas: 25228) +USDCTokenPool_lockOrBurn:testLockOrBurnSuccess() (gas: 116047) +USDCTokenPool_lockOrBurn:testLockOrBurnWithAllowListReverts() (gas: 21898) +USDCTokenPool_lockOrBurn:testPermissionsErrorReverts() (gas: 12452) +USDCTokenPool_lockOrBurn:testUnknownDomainReverts() (gas: 183683) +USDCTokenPool_releaseOrMint:testReleaseOrMintRealTxSuccess() (gas: 53908) +USDCTokenPool_releaseOrMint:testTokenMaxCapacityExceededReverts() (gas: 27874) +USDCTokenPool_releaseOrMint:testUnlockingUSDCFailedReverts() (gas: 45849) +USDCTokenPool_setDomains:testInvalidDomainReverts() (gas: 66064) +USDCTokenPool_setDomains:testOnlyOwnerReverts() (gas: 15415) USDCTokenPool_supportsInterface:testSupportsInterfaceSuccess() (gas: 8405) \ No newline at end of file diff --git a/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol b/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol index 451b6d7ffe..b789bc0d22 100644 --- a/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/EVM2EVMOnRamp.sol @@ -351,6 +351,8 @@ contract EVM2EVMOnRamp is IEVM2AnyOnRamp, ILinkAvailable, AggregateRateLimiter, newMessage.messageId = Internal._hash(newMessage, i_metadataHash); // Emit message request + // Note this must happen after pools, some tokens (eg USDC) emit events that we + // expect to directly precede this event. emit CCIPSendRequested(newMessage); return newMessage.messageId; } diff --git a/contracts/src/v0.8/ccip/pools/USDC/IMessageReceiver.sol b/contracts/src/v0.8/ccip/pools/USDC/IMessageTransmitter.sol similarity index 86% rename from contracts/src/v0.8/ccip/pools/USDC/IMessageReceiver.sol rename to contracts/src/v0.8/ccip/pools/USDC/IMessageTransmitter.sol index 874a01b055..1b2a0f9021 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/IMessageReceiver.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/IMessageTransmitter.sol @@ -15,7 +15,7 @@ */ pragma solidity ^0.8.0; -interface IMessageReceiver { +interface IMessageTransmitter { /// @notice Unlocks USDC tokens on the destination chain /// @param message The original message on the source chain /// * Message format: @@ -35,4 +35,12 @@ interface IMessageReceiver { /// If incorrect number of signatures or duplicate signatures are supplied, /// signature verification will fail. function receiveMessage(bytes calldata message, bytes calldata attestation) external returns (bool success); + + /// Returns domain of chain on which the contract is deployed. + /// @dev immutable + function localDomain() external view returns (uint32); + + /// Returns message format version. + /// @dev immutable + function version() external view returns (uint32); } diff --git a/contracts/src/v0.8/ccip/pools/USDC/ITokenMessenger.sol b/contracts/src/v0.8/ccip/pools/USDC/ITokenMessenger.sol index ecf172b2dd..ce5923cfdc 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/ITokenMessenger.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/ITokenMessenger.sol @@ -56,5 +56,10 @@ interface ITokenMessenger { /// Returns the version of the message body format. /// @dev immutable - function messageBodyVersion() external returns (uint32); + function messageBodyVersion() external view returns (uint32); + + /// Returns local Message Transmitter responsible for sending and receiving messages + /// to/from remote domainsmessage transmitter for this token messenger. + /// @dev immutable + function localMessageTransmitter() external view returns (address); } diff --git a/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol b/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol index c7f05d2463..49ad267f0a 100644 --- a/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol +++ b/contracts/src/v0.8/ccip/pools/USDC/USDCTokenPool.sol @@ -2,14 +2,14 @@ pragma solidity 0.8.19; import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol"; -import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import {ITokenMessenger} from "./ITokenMessenger.sol"; -import {IMessageReceiver} from "./IMessageReceiver.sol"; +import {IMessageTransmitter} from "./IMessageTransmitter.sol"; import {TokenPool} from "../TokenPool.sol"; import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/introspection/IERC165.sol"; /// @notice This pool mints and burns USDC tokens through the Cross Chain Transfer /// Protocol (CCTP). @@ -17,7 +17,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { using SafeERC20 for IERC20; event DomainsSet(DomainUpdate[]); - event ConfigSet(USDCConfig); + event ConfigSet(address tokenMessenger); error UnknownDomain(uint64 domain); error UnlockingUSDCFailed(); @@ -44,13 +44,6 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { bool enabled; // ─────────────╯ Whether the domain is enabled } - // Contains the contracts for sending and receiving USDC tokens - struct USDCConfig { - uint32 version; // ──────────╮ CCTP internal version - address tokenMessenger; // ──╯ Contract to burn tokens - address messageTransmitter; // Contract to mint tokens - } - struct SourceTokenDataPayload { uint64 nonce; uint32 sourceDomain; @@ -59,16 +52,20 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { // solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables string public constant override typeAndVersion = "USDCTokenPool 1.2.0"; - uint32 public immutable i_localDomainIdentifier; + // We restrict to the first version. New pool may be required for subsequent versions. uint32 public constant SUPPORTED_USDC_VERSION = 0; // The local USDC config - USDCConfig private s_config; + ITokenMessenger public immutable i_tokenMessenger; + IMessageTransmitter public immutable i_messageTransmitter; + uint32 public immutable i_localDomainIdentifier; // The unique USDC pool flag to signal through EIP 165 that this is a USDC token pool. bytes4 private constant USDC_INTERFACE_ID = bytes4(keccak256("USDC")); - // A domain is a USDC representation of a chain. + /// A domain is a USDC representation of a destination chain. + /// @dev Zero is a valid domain identifier. + /// @dev The address to mint on the destination chain is the corresponding USDC pool. struct Domain { bytes32 allowedCaller; // Address allowed to mint on the domain uint32 domainIdentifier; // ─╮ Unique domain ID @@ -79,14 +76,23 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { mapping(uint64 chainSelector => Domain CCTPDomain) private s_chainToDomain; constructor( - USDCConfig memory config, - IBurnMintERC20 token, + ITokenMessenger tokenMessenger, + IERC20 token, address[] memory allowlist, - address armProxy, - uint32 localDomainIdentifier + address armProxy ) TokenPool(token, allowlist, armProxy) { - _setConfig(config); - i_localDomainIdentifier = localDomainIdentifier; + if (address(tokenMessenger) == address(0)) revert InvalidConfig(); + IMessageTransmitter transmitter = IMessageTransmitter(tokenMessenger.localMessageTransmitter()); + uint32 transmitterVersion = transmitter.version(); + if (transmitterVersion != SUPPORTED_USDC_VERSION) revert InvalidMessageVersion(transmitterVersion); + uint32 tokenMessengerVersion = tokenMessenger.messageBodyVersion(); + if (tokenMessengerVersion != SUPPORTED_USDC_VERSION) revert InvalidTokenMessengerVersion(tokenMessengerVersion); + + i_tokenMessenger = tokenMessenger; + i_messageTransmitter = transmitter; + i_localDomainIdentifier = transmitter.localDomain(); + i_token.safeApprove(address(i_tokenMessenger), type(uint256).max); + emit ConfigSet(address(tokenMessenger)); } /// @notice returns the USDC interface flag used for EIP165 identification. @@ -94,7 +100,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { return USDC_INTERFACE_ID; } - // @inheritdoc IERC165 + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { return interfaceId == USDC_INTERFACE_ID || super.supportsInterface(interfaceId); } @@ -104,6 +110,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { /// Benefits of rate limiting here does not justify the extra gas cost. /// @param amount Amount to burn /// @dev emits ITokenMessenger.DepositForBurn + /// @dev Assumes caller has validated destinationReceiver function lockOrBurn( address originalSender, bytes calldata destinationReceiver, @@ -118,7 +125,7 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { // Since this pool is the msg sender of the CCTP transaction, only this contract // is able to call replaceDepositForBurn. Since this contract does not implement // replaceDepositForBurn, the tokens cannot be maliciously re-routed to another address. - uint64 nonce = ITokenMessenger(s_config.tokenMessenger).depositForBurnWithCaller( + uint64 nonce = i_tokenMessenger.depositForBurnWithCaller( amount, domain.domainIdentifier, receiver, @@ -157,12 +164,8 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { _validateMessage(msgAndAttestation.message, sourceTokenData); - if ( - !IMessageReceiver(s_config.messageTransmitter).receiveMessage( - msgAndAttestation.message, - msgAndAttestation.attestation - ) - ) revert UnlockingUSDCFailed(); + if (!i_messageTransmitter.receiveMessage(msgAndAttestation.message, msgAndAttestation.attestation)) + revert UnlockingUSDCFailed(); emit Minted(msg.sender, receiver, amount); } @@ -215,38 +218,13 @@ contract USDCTokenPool is TokenPool, ITypeAndVersion { // │ Config │ // ================================================================ - /// @notice Gets the current config - function getConfig() external view returns (USDCConfig memory) { - return s_config; - } - - /// @notice Sets the config - function setConfig(USDCConfig memory config) external onlyOwner { - _setConfig(config); - } - - /// @notice Sets the config - function _setConfig(USDCConfig memory config) internal { - if (config.version != SUPPORTED_USDC_VERSION) revert InvalidMessageVersion(config.version); - if (config.messageTransmitter == address(0) || config.tokenMessenger == address(0)) revert InvalidConfig(); - uint32 tokenMessengerVersion = ITokenMessenger(config.tokenMessenger).messageBodyVersion(); - if (tokenMessengerVersion != SUPPORTED_USDC_VERSION) revert InvalidTokenMessengerVersion(tokenMessengerVersion); - - // Revoke approval for previous token messenger - if (s_config.tokenMessenger != address(0)) i_token.safeApprove(s_config.tokenMessenger, 0); - // Approve new token messenger. New tokenMessenger must have an allowance of 0, otherwise safeApprove reverts. - // Since we set allowance to 0 for existing tokenMessenger before approving a new one, this condition is always met. - i_token.safeApprove(config.tokenMessenger, type(uint256).max); - s_config = config; - emit ConfigSet(config); - } - /// @notice Gets the CCTP domain for a given CCIP chain selector. 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 { for (uint256 i = 0; i < domains.length; ++i) { DomainUpdate memory domain = domains[i]; diff --git a/contracts/src/v0.8/ccip/test/helpers/USDCTokenPoolHelper.sol b/contracts/src/v0.8/ccip/test/helpers/USDCTokenPoolHelper.sol index f8508485a4..dc5e28d9a4 100644 --- a/contracts/src/v0.8/ccip/test/helpers/USDCTokenPoolHelper.sol +++ b/contracts/src/v0.8/ccip/test/helpers/USDCTokenPoolHelper.sol @@ -4,15 +4,15 @@ pragma solidity 0.8.19; import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import {USDCTokenPool} from "../../pools/USDC/USDCTokenPool.sol"; +import {ITokenMessenger} from "../../pools/USDC/ITokenMessenger.sol"; contract USDCTokenPoolHelper is USDCTokenPool { constructor( - USDCConfig memory config, + ITokenMessenger tokenMessenger, IBurnMintERC20 token, address[] memory allowlist, - address armProxy, - uint32 localDomainIdentifier - ) USDCTokenPool(config, token, allowlist, armProxy, localDomainIdentifier) {} + address armProxy + ) USDCTokenPool(tokenMessenger, token, allowlist, armProxy) {} function validateMessage(bytes memory usdcMessage, SourceTokenDataPayload memory sourceTokenData) external view { return _validateMessage(usdcMessage, sourceTokenData); diff --git a/contracts/src/v0.8/ccip/test/mocks/MockUSDC.sol b/contracts/src/v0.8/ccip/test/mocks/MockUSDCTokenMessenger.sol similarity index 60% rename from contracts/src/v0.8/ccip/test/mocks/MockUSDC.sol rename to contracts/src/v0.8/ccip/test/mocks/MockUSDCTokenMessenger.sol index 888e9cba22..d5cabf5fdd 100644 --- a/contracts/src/v0.8/ccip/test/mocks/MockUSDC.sol +++ b/contracts/src/v0.8/ccip/test/mocks/MockUSDCTokenMessenger.sol @@ -2,22 +2,21 @@ pragma solidity 0.8.19; import {ITokenMessenger} from "../../pools/USDC/ITokenMessenger.sol"; -import {IMessageReceiver} from "../../pools/USDC/IMessageReceiver.sol"; +import {IMessageTransmitter} from "../../pools/USDC/IMessageTransmitter.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; -// This contract mocks both the ITokenMessenger and IMessageReceiver +// This contract mocks both the ITokenMessenger and IMessageTransmitter // contracts involved with the Cross Chain Token Protocol. -contract MockUSDC is ITokenMessenger, IMessageReceiver { +contract MockUSDCTokenMessenger is ITokenMessenger { uint32 private immutable i_messageBodyVersion; bytes32 public constant i_destinationTokenMessenger = keccak256("i_destinationTokenMessenger"); - - // Indicated whether the receiveMessage() call should succeed. - bool public s_shouldSucceed; uint64 public s_nonce; + address private i_transmitter; - constructor(uint32 version) { + constructor(uint32 version, address transmitter) { i_messageBodyVersion = version; s_nonce = 1; - s_shouldSucceed = true; + i_transmitter = transmitter; } function depositForBurnWithCaller( @@ -27,6 +26,8 @@ contract MockUSDC is ITokenMessenger, IMessageReceiver { address burnToken, bytes32 destinationCaller ) external returns (uint64) { + IBurnMintERC20(burnToken).transferFrom(msg.sender, address(this), amount); + IBurnMintERC20(burnToken).burn(amount); emit DepositForBurn( s_nonce, burnToken, @@ -40,15 +41,11 @@ contract MockUSDC is ITokenMessenger, IMessageReceiver { return s_nonce++; } - function receiveMessage(bytes calldata, bytes calldata) external view returns (bool success) { - return s_shouldSucceed; - } - function messageBodyVersion() external view returns (uint32) { return i_messageBodyVersion; } - function setShouldSucceed(bool shouldSucceed) external { - s_shouldSucceed = shouldSucceed; + function localMessageTransmitter() external view returns (address) { + return i_transmitter; } } diff --git a/contracts/src/v0.8/ccip/test/mocks/MockUSDCTransmitter.sol b/contracts/src/v0.8/ccip/test/mocks/MockUSDCTransmitter.sol new file mode 100644 index 0000000000..e9b00090f6 --- /dev/null +++ b/contracts/src/v0.8/ccip/test/mocks/MockUSDCTransmitter.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import "../../pools/USDC/IMessageTransmitter.sol"; + +contract MockUSDCTransmitter is IMessageTransmitter { + // Indicated whether the receiveMessage() call should succeed. + bool public s_shouldSucceed; + uint32 private immutable i_version; + uint32 private immutable i_localDomain; + + constructor(uint32 version, uint32 localDomain) { + i_version = version; + i_localDomain = localDomain; + s_shouldSucceed = true; + } + + function receiveMessage(bytes calldata, bytes calldata) external view returns (bool success) { + return s_shouldSucceed; + } + + function setShouldSucceed(bool shouldSucceed) external { + s_shouldSucceed = shouldSucceed; + } + + function version() external view returns (uint32) { + return i_version; + } + + function localDomain() external view returns (uint32) { + return i_localDomain; + } +} diff --git a/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol b/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol index 13e5a61ace..4c6ee49396 100644 --- a/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/USDCTokenPool.t.sol @@ -4,18 +4,20 @@ pragma solidity 0.8.19; import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import "../BaseTest.t.sol"; +import "../mocks/MockUSDCTransmitter.sol"; import {TokenPool} from "../../pools/TokenPool.sol"; import {Router} from "../../Router.sol"; import {USDCTokenPool} from "../../pools/USDC/USDCTokenPool.sol"; import {BurnMintERC677} from "../../../shared/token/ERC677/BurnMintERC677.sol"; -import {MockUSDC} from "../mocks/MockUSDC.sol"; +import {MockUSDCTokenMessenger} from "../mocks/MockUSDCTokenMessenger.sol"; import {USDCTokenPoolHelper} from "../helpers/USDCTokenPoolHelper.sol"; import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/introspection/IERC165.sol"; contract USDCTokenPoolSetup is BaseTest { IBurnMintERC20 internal s_token; - MockUSDC internal s_mockUSDC; + MockUSDCTokenMessenger internal s_mockUSDC; + MockUSDCTransmitter internal s_mockUSDCTransmitter; struct USDCMessage { uint32 version; @@ -44,34 +46,19 @@ contract USDCTokenPoolSetup is BaseTest { function setUp() public virtual override { BaseTest.setUp(); - s_token = new BurnMintERC677("LINK", "LNK", 18, 0); + BurnMintERC677 linkToken = new BurnMintERC677("LINK", "LNK", 18, 0); + s_token = linkToken; deal(address(s_token), OWNER, type(uint256).max); setUpRamps(); - s_mockUSDC = new MockUSDC(0); + s_mockUSDCTransmitter = new MockUSDCTransmitter(0, DEST_DOMAIN_IDENTIFIER); + s_mockUSDC = new MockUSDCTokenMessenger(0, address(s_mockUSDCTransmitter)); - USDCTokenPool.USDCConfig memory config = USDCTokenPool.USDCConfig({ - version: s_mockUSDC.messageBodyVersion(), - tokenMessenger: address(s_mockUSDC), - messageTransmitter: address(s_mockUSDC) - }); - - s_usdcTokenPool = new USDCTokenPoolHelper( - config, - s_token, - new address[](0), - address(s_mockARM), - DEST_DOMAIN_IDENTIFIER - ); + s_usdcTokenPool = new USDCTokenPoolHelper(s_mockUSDC, s_token, new address[](0), address(s_mockARM)); + linkToken.grantMintAndBurnRoles(address(s_mockUSDC)); s_allowedList.push(USER_1); - s_usdcTokenPoolWithAllowList = new USDCTokenPoolHelper( - config, - s_token, - s_allowedList, - address(s_mockARM), - DEST_DOMAIN_IDENTIFIER - ); + s_usdcTokenPoolWithAllowList = new USDCTokenPoolHelper(s_mockUSDC, s_token, s_allowedList, address(s_mockARM)); TokenPool.RampUpdate[] memory onRamps = new TokenPool.RampUpdate[](1); onRamps[0] = TokenPool.RampUpdate({ @@ -146,11 +133,49 @@ contract USDCTokenPool_lockOrBurn is USDCTokenPoolSetup { event Burned(address indexed sender, uint256 amount); event TokensConsumed(uint256 tokens); + // Base test case, included for PR gas comparisons as fuzz tests are excluded from forge snapshot due to being flaky. + function testLockOrBurnSuccess() public { + bytes32 receiver = bytes32(uint256(uint160(STRANGER))); + uint256 amount = 1; + s_token.transfer(address(s_usdcTokenPool), amount); + changePrank(s_routerAllowedOnRamp); + + USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_ID); + + vm.expectEmit(); + emit TokensConsumed(amount); + + vm.expectEmit(); + emit DepositForBurn( + s_mockUSDC.s_nonce(), + address(s_token), + amount, + address(s_usdcTokenPool), + receiver, + expectedDomain.domainIdentifier, + s_mockUSDC.i_destinationTokenMessenger(), + expectedDomain.allowedCaller + ); + + vm.expectEmit(); + emit Burned(s_routerAllowedOnRamp, amount); + + bytes memory encodedNonce = s_usdcTokenPool.lockOrBurn( + OWNER, + abi.encodePacked(receiver), + amount, + DEST_CHAIN_ID, + bytes("") + ); + uint64 nonce = abi.decode(encodedNonce, (uint64)); + assertEq(s_mockUSDC.s_nonce() - 1, nonce); + } + function testFuzz_LockOrBurnSuccess(bytes32 destinationReceiver, uint256 amount) public { - vm.assume(amount < rateLimiterConfig().capacity); - vm.assume(amount > 0); + vm.assume(destinationReceiver != bytes32(0)); + amount = bound(amount, 1, rateLimiterConfig().capacity); + s_token.transfer(address(s_usdcTokenPool), amount); changePrank(s_routerAllowedOnRamp); - s_token.approve(address(s_usdcTokenPool), amount); USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPool.getDomain(DEST_CHAIN_ID); @@ -184,10 +209,10 @@ contract USDCTokenPool_lockOrBurn is USDCTokenPoolSetup { } function testFuzz_LockOrBurnWithAllowListSuccess(bytes32 destinationReceiver, uint256 amount) public { - vm.assume(amount < rateLimiterConfig().capacity); - vm.assume(amount > 0); + vm.assume(destinationReceiver != bytes32(0)); + amount = bound(amount, 1, rateLimiterConfig().capacity); + s_token.transfer(address(s_usdcTokenPoolWithAllowList), amount); changePrank(s_routerAllowedOnRamp); - s_token.approve(address(s_usdcTokenPoolWithAllowList), amount); USDCTokenPool.Domain memory expectedDomain = s_usdcTokenPoolWithAllowList.getDomain(DEST_CHAIN_ID); @@ -277,7 +302,10 @@ contract USDCTokenPool_releaseOrMint is USDCTokenPoolSetup { vm.expectEmit(); emit Minted(s_routerAllowedOffRamp, recipient, amount); - vm.expectCall(address(s_mockUSDC), abi.encodeWithSelector(MockUSDC.receiveMessage.selector, message, attestation)); + vm.expectCall( + address(s_mockUSDCTransmitter), + abi.encodeWithSelector(MockUSDCTransmitter.receiveMessage.selector, message, attestation) + ); changePrank(s_routerAllowedOffRamp); s_usdcTokenPool.releaseOrMint(abi.encode(OWNER), recipient, amount, SOURCE_CHAIN_ID, extraData); @@ -298,8 +326,8 @@ contract USDCTokenPool_releaseOrMint is USDCTokenPoolSetup { ); vm.expectCall( - address(s_mockUSDC), - abi.encodeWithSelector(MockUSDC.receiveMessage.selector, encodedUsdcMessage, attestation) + address(s_mockUSDCTransmitter), + abi.encodeWithSelector(MockUSDCTransmitter.receiveMessage.selector, encodedUsdcMessage, attestation) ); changePrank(s_routerAllowedOffRamp); @@ -309,7 +337,7 @@ contract USDCTokenPool_releaseOrMint is USDCTokenPoolSetup { // Reverts function testUnlockingUSDCFailedReverts() public { changePrank(s_routerAllowedOffRamp); - s_mockUSDC.setShouldSucceed(false); + s_mockUSDCTransmitter.setShouldSucceed(false); uint256 amount = 13255235235; @@ -450,104 +478,6 @@ contract USDCTokenPool_setDomains is USDCTokenPoolSetup { } } -contract USDCTokenPool_setConfig is USDCTokenPoolSetup { - event ConfigSet(USDCTokenPool.USDCConfig); - - function testSetConfigSuccess() public { - // Assert existing approval - assertEq(type(uint256).max, s_usdcTokenPool.getToken().allowance(address(s_usdcTokenPool), address(s_mockUSDC))); - - MockUSDC newMockUSDC = new MockUSDC(0); - - USDCTokenPool.USDCConfig memory newConfig = USDCTokenPool.USDCConfig({ - version: 0, - tokenMessenger: address(newMockUSDC), - messageTransmitter: address(123456789) - }); - - USDCTokenPool.USDCConfig memory oldConfig = s_usdcTokenPool.getConfig(); - - vm.expectCall( - address(s_usdcTokenPool.getToken()), - abi.encodeWithSelector(IERC20.approve.selector, oldConfig.tokenMessenger, 0) - ); - vm.expectCall( - address(s_usdcTokenPool.getToken()), - abi.encodeWithSelector(IERC20.approve.selector, newMockUSDC, type(uint256).max) - ); - - vm.expectEmit(); - emit ConfigSet(newConfig); - s_usdcTokenPool.setConfig(newConfig); - - USDCTokenPool.USDCConfig memory gotConfig = s_usdcTokenPool.getConfig(); - assertEq(gotConfig.tokenMessenger, newConfig.tokenMessenger); - assertEq(gotConfig.messageTransmitter, newConfig.messageTransmitter); - assertEq(gotConfig.version, newConfig.version); - - assertEq(0, s_usdcTokenPool.getToken().allowance(address(s_usdcTokenPool), oldConfig.tokenMessenger)); - assertEq( - type(uint256).max, - s_usdcTokenPool.getToken().allowance(address(s_usdcTokenPool), gotConfig.tokenMessenger) - ); - // Assert old approval is removed - assertEq(0, s_usdcTokenPool.getToken().allowance(address(s_usdcTokenPool), address(s_mockUSDC))); - } - - // Reverts - - function testInvalidMessageVersionReverts() public { - USDCTokenPool.USDCConfig memory newConfig = USDCTokenPool.USDCConfig({ - version: 1, - tokenMessenger: address(100), - messageTransmitter: address(1) - }); - - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidMessageVersion.selector, newConfig.version)); - s_usdcTokenPool.setConfig(newConfig); - } - - function testInvalidTokenMessengerVersionReverts() public { - uint32 wrongVersion = 5; - MockUSDC newMockUSDC = new MockUSDC(wrongVersion); - - USDCTokenPool.USDCConfig memory newConfig = USDCTokenPool.USDCConfig({ - version: 0, - tokenMessenger: address(newMockUSDC), - messageTransmitter: address(1) - }); - - vm.expectRevert(abi.encodeWithSelector(USDCTokenPool.InvalidTokenMessengerVersion.selector, wrongVersion)); - s_usdcTokenPool.setConfig(newConfig); - } - - function testInvalidConfigReverts() public { - USDCTokenPool.USDCConfig memory newConfig = USDCTokenPool.USDCConfig({ - version: 0, - tokenMessenger: address(0), - messageTransmitter: address(123456789) - }); - - vm.expectRevert(USDCTokenPool.InvalidConfig.selector); - s_usdcTokenPool.setConfig(newConfig); - - newConfig.tokenMessenger = address(235); - newConfig.messageTransmitter = address(0); - - vm.expectRevert(USDCTokenPool.InvalidConfig.selector); - s_usdcTokenPool.setConfig(newConfig); - } - - function testOnlyOwnerReverts() public { - changePrank(STRANGER); - vm.expectRevert("Only callable by owner"); - - s_usdcTokenPool.setConfig( - USDCTokenPool.USDCConfig({version: 0, tokenMessenger: address(100), messageTransmitter: address(1)}) - ); - } -} - contract USDCTokenPool__validateMessage is USDCTokenPoolSetup { function testFuzz_ValidateMessageSuccess(uint32 sourceDomain, uint64 nonce) public { vm.pauseGasMetering(); 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 0bc87a2911..11ede16be0 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 @@ -63,22 +63,16 @@ type USDCTokenPoolDomainUpdate struct { Enabled bool } -type USDCTokenPoolUSDCConfig struct { - Version uint32 - TokenMessenger common.Address - MessageTransmitter common.Address -} - var USDCTokenPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageTransmitter\",\"type\":\"address\"}],\"internalType\":\"structUSDCTokenPool.USDCConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"contractIBurnMintERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"armProxy\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"localDomainIdentifier\",\"type\":\"uint32\"}],\"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\":\"BadARMSignal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"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\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidSourceDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidTokenMessengerVersion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"}],\"name\":\"NonExistentRamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionsError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"}],\"name\":\"RampAlreadyExists\",\"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\":\"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\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageTransmitter\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structUSDCTokenPool.USDCConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OffRampAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OffRampConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"OffRampRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OnRampAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OnRampConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"OnRampRemoved\",\"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\"},{\"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\":\"address\",\"name\":\"ramp\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"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\"}],\"internalType\":\"structTokenPool.RampUpdate[]\",\"name\":\"onRamps\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"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\"}],\"internalType\":\"structTokenPool.RampUpdate[]\",\"name\":\"offRamps\",\"type\":\"tuple[]\"}],\"name\":\"applyRampUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"currentOffRampRateLimiterState\",\"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\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"currentOnRampRateLimiterState\",\"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\":\"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\":[],\"name\":\"getArmProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"armProxy\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageTransmitter\",\"type\":\"address\"}],\"internalType\":\"structUSDCTokenPool.USDCConfig\",\"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\":\"getOffRamps\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOnRamps\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUSDCInterfaceId\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_localDomainIdentifier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"isOffRamp\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"isOnRamp\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"destinationReceiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"releaseOrMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"messageTransmitter\",\"type\":\"address\"}],\"internalType\":\"structUSDCTokenPool.USDCConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"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\":\"offRamp\",\"type\":\"address\"},{\"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\":\"setOffRampRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"setOnRampRateLimiterConfig\",\"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: "0x6101006040523480156200001257600080fd5b506040516200495038038062004950833981016040819052620000359162000bce565b83838333806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c28162000150565b5050506001600160a01b038316620000ed576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808416608052811660a052815115801560c0526200012857604080516000815260208101909152620001289083620001fb565b5050506200013c856200036c60201b60201c565b63ffffffff1660e0525062000e1492505050565b336001600160a01b03821603620001aa5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c0516200021c576040516335f4a7b360e01b815260040160405180910390fd5b60005b8251811015620002b157600083828151811062000240576200024062000cc4565b602090810291909101015190506200025a60028262000588565b156200029d576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50620002a98162000cf0565b90506200021f565b5060005b815181101562000367576000828281518110620002d657620002d662000cc4565b6020026020010151905060006001600160a01b0316816001600160a01b03160362000302575062000354565b6200030f600282620005a8565b1562000352576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b6200035f8162000cf0565b9050620002b5565b505050565b805163ffffffff16156200039f5780516040516334697c6b60e11b815263ffffffff909116600482015260240162000086565b60408101516001600160a01b03161580620003c5575060208101516001600160a01b0316155b15620003e4576040516306b7c75960e31b815260040160405180910390fd5b600081602001516001600160a01b0316639cdbb1816040518163ffffffff1660e01b81526004016020604051808303816000875af11580156200042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000451919062000d0c565b905063ffffffff81161562000482576040516316ba39c560e31b815263ffffffff8216600482015260240162000086565b600a5464010000000090046001600160a01b031615620004c557600a54608051620004c5916001600160a01b0391821691640100000000909104166000620005bf565b6020820151608051620004e7916001600160a01b0390911690600019620005bf565b8151600a80546020808601805163ffffffff9095166001600160c01b031990931683176401000000006001600160a01b03968716021790935560408087018051600b80546001600160a01b031916918816919091179055815193845293518516918301919091529151909216908201527f33a7d35707e0c8e46d6fa8dd98b73765c14247a559106927070b1cfd2933f4039060600160405180910390a15050565b60006200059f836001600160a01b03841662000709565b90505b92915050565b60006200059f836001600160a01b0384166200080d565b8015806200063d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200063b919062000d2a565b155b620006b15760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000086565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620003679185916200085f16565b60008181526001830160205260408120548015620008025760006200073060018362000d44565b8554909150600090620007469060019062000d44565b9050818114620007b25760008660000182815481106200076a576200076a62000cc4565b906000526020600020015490508087600001848154811062000790576200079062000cc4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080620007c657620007c662000d5a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050620005a2565b6000915050620005a2565b60008181526001830160205260408120546200085657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005a2565b506000620005a2565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490820152600090620008ae906001600160a01b03851690849062000930565b805190915015620003675780806020019051810190620008cf919062000d70565b620003675760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000086565b606062000941848460008562000949565b949350505050565b606082471015620009ac5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000086565b600080866001600160a01b03168587604051620009ca919062000dc1565b60006040518083038185875af1925050503d806000811462000a09576040519150601f19603f3d011682016040523d82523d6000602084013e62000a0e565b606091505b50909250905062000a228783838762000a2d565b979650505050505050565b6060831562000aa157825160000362000a99576001600160a01b0385163b62000a995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000086565b508162000941565b62000941838381511562000ab85781518083602001fd5b8060405162461bcd60e51b815260040162000086919062000ddf565b634e487b7160e01b600052604160045260246000fd5b805163ffffffff8116811462000aff57600080fd5b919050565b6001600160a01b038116811462000b1a57600080fd5b50565b805162000aff8162000b04565b600082601f83011262000b3c57600080fd5b815160206001600160401b038083111562000b5b5762000b5b62000ad4565b8260051b604051601f19603f8301168101818110848211171562000b835762000b8362000ad4565b60405293845285810183019383810192508785111562000ba257600080fd5b83870191505b8482101562000a2257815162000bbe8162000b04565b8352918301919083019062000ba8565b600080600080600085870360e081121562000be857600080fd5b606081121562000bf757600080fd5b50604051606081016001600160401b03808211838310171562000c1e5762000c1e62000ad4565b8160405262000c2d8962000aea565b83526020890151915062000c418262000b04565b8160208401526040890151915062000c598262000b04565b81604084015282975062000c7060608a0162000b1d565b9650608089015192508083111562000c8757600080fd5b505062000c978882890162000b2a565b93505062000ca860a0870162000b1d565b915062000cb860c0870162000aea565b90509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000d055762000d0562000cda565b5060010190565b60006020828403121562000d1f57600080fd5b6200059f8262000aea565b60006020828403121562000d3d57600080fd5b5051919050565b81810381811115620005a257620005a262000cda565b634e487b7160e01b600052603160045260246000fd5b60006020828403121562000d8357600080fd5b8151801515811462000d9457600080fd5b9392505050565b60005b8381101562000db857818101518382015260200162000d9e565b50506000910152565b6000825162000dd581846020870162000d9b565b9190910192915050565b602081526000825180602084015262000e0081604085016020870162000d9b565b601f01601f19169190910160400192915050565b60805160a05160c05160e051613abc62000e94600039600081816102f90152818161101401528181611be40152611c420152600081816105f501528181610d9601526116c8015260006102bd01526000818161026301528181610f2f01528181611556015281816115a801528181611b080152611d000152613abc6000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80638627fad6116100f9578063b3a3fb4111610097578063d612b94511610071578063d612b94514610542578063dfadfa3514610555578063e0351e13146105f3578063f2fde38b1461061957600080fd5b8063b3a3fb411461046c578063c3f909d41461047f578063c49907b51461052f57600080fd5b806396875445116100d357806396875445146104415780639fdf13ff14610454578063a40e69c71461045c578063a7cd63b71461046457600080fd5b80638627fad6146103fb578063873813141461040e5780638da5cb5b1461042357600080fd5b806354c8a4f3116101665780636f32b872116101405780636f32b8721461035e5780637448b3c7146103715780637787e7ab1461038457806379ba5097146103f357600080fd5b806354c8a4f3146102e15780636b716b0d146102f45780636d1081391461033057600080fd5b80631d7a74a0116101a25780631d7a74a01461024e57806321df0da714610261578063263a890a146102a85780635246492f146102bb57600080fd5b806241d3c1146101c857806301ffc9a7146101dd578063181f5a7714610205575b600080fd5b6101db6101d6366004612da4565b61062c565b005b6101f06101eb366004612e19565b6107d3565b60405190151581526020015b60405180910390f35b6102416040518060400160405280601381526020017f55534443546f6b656e506f6f6c20312e322e300000000000000000000000000081525081565b6040516101fc9190612ec9565b6101f061025c366004612f05565b61082f565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fc565b6101db6102b6366004612ffc565b61083c565b7f0000000000000000000000000000000000000000000000000000000000000000610283565b6101db6102ef366004613098565b610850565b61031b7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fc565b6040517fd6aca1be0000000000000000000000000000000000000000000000000000000081526020016101fc565b6101f061036c366004612f05565b6108cb565b6101db61037f366004613183565b6108d8565b610397610392366004612f05565b610997565b6040516101fc919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b6101db610a75565b6101db610409366004613269565b610b72565b610416610d41565b6040516101fc91906132fc565b60005473ffffffffffffffffffffffffffffffffffffffff16610283565b61024161044f366004613398565b610d52565b61031b600081565b61041661106c565b610416611078565b61039761047a366004612f05565b611084565b6104e960408051606081018252600080825260208201819052918101919091525060408051606081018252600a5463ffffffff8116825273ffffffffffffffffffffffffffffffffffffffff64010000000090910481166020830152600b54169181019190915290565b60408051825163ffffffff16815260208084015173ffffffffffffffffffffffffffffffffffffffff9081169183019190915292820151909216908201526060016101fc565b6101db61053d36600461347c565b611162565b6101db610550366004613183565b611176565b6105c96105633660046134dc565b60408051606080820183526000808352602080840182905292840181905267ffffffffffffffff949094168452600c82529282902082519384018352805484526001015463ffffffff811691840191909152640100000000900460ff1615159082015290565b604080518251815260208084015163ffffffff1690820152918101511515908201526060016101fc565b7f00000000000000000000000000000000000000000000000000000000000000006101f0565b6101db610627366004612f05565b611235565b610634611246565b60005b81811015610795576000838383818110610653576106536134f9565b9050608002018036038101906106699190613528565b805190915015806106865750604081015167ffffffffffffffff16155b156106f557604080517fa087bd2900000000000000000000000000000000000000000000000000000000815282516004820152602083015163ffffffff1660248201529082015167ffffffffffffffff1660448201526060820151151560648201526084015b60405180910390fd5b60408051606080820183528351825260208085015163ffffffff9081168285019081529286015115158486019081529585015167ffffffffffffffff166000908152600c90925293902091518255516001909101805493511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909416919092161791909117905561078e816135d3565b9050610637565b507f1889010d2535a0ab1643678d1da87fbbe8b87b2f585b47ddb72ec622aef9ee5682826040516107c792919061360b565b60405180910390a15050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd6aca1be0000000000000000000000000000000000000000000000000000000014806108295750610829826112c9565b92915050565b6000610829600783611361565b610844611246565b61084d81611393565b50565b610858611246565b6108c5848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040805160208088028281018201909352878252909350879250869182918501908490808284376000920191909152506116c692505050565b50505050565b6000610829600483611361565b6108e0611246565b6108e9826108cb565b610937576040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024016106ec565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206109669082611891565b7f578db78e348076074dbff64a94073a83e9a65aa6766b8c75fdc89282b0e30ed682826040516107c7929190613694565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915273ffffffffffffffffffffffffffffffffffffffff8216600090815260066020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261082990611a40565b60015473ffffffffffffffffffffffffffffffffffffffff163314610af6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016106ec565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b7b3361082f565b610bb1576040517f5307f5ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bba83611af2565b60008082806020019051810190610bd19190613731565b91509150600082806020019051810190610beb9190613795565b9050600082806020019051810190610c0391906137d6565b9050610c13816000015183611b2c565b600b54815160208301516040517f57ecfd2800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909316926357ecfd2892610c70929091600401613867565b6020604051808303816000875af1158015610c8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb39190613895565b610ce9576040517fbf969f2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405187815273ffffffffffffffffffffffffffffffffffffffff89169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f09060200160405180910390a3505050505050505050565b6060610d4d6004611cdd565b905090565b6060610d5d336108cb565b610d93576040517f5307f5ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b877f00000000000000000000000000000000000000000000000000000000000000008015610dc95750610dc7600282611361565b155b15610e18576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016106ec565b67ffffffffffffffff85166000908152600c602090815260409182902082516060810184528154815260019091015463ffffffff81169282019290925264010000000090910460ff16151591810182905290610eac576040517fd201c48a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff871660048201526024016106ec565b610eb587611cea565b6000610ec46020828b8d6138b2565b610ecd916138dc565b600a54602084015184516040517ff856ddb6000000000000000000000000000000000000000000000000000000008152600481018d905263ffffffff90921660248301526044820184905273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116606484015260848301919091529293506000926401000000009092049091169063f856ddb69060a4016020604051808303816000875af1158015610f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fbc9190613918565b6040518a815290915033907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a260408051808201825267ffffffffffffffff9290921680835263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602094850190815283519485019290925290511682820152805180830382018152606090920190529b9a5050505050505050505050565b6060610d4d6007611cdd565b6060610d4d6002611cdd565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915273ffffffffffffffffffffffffffffffffffffffff8216600090815260096020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff16151594820194909452600190910154808416606083015291909104909116608082015261082990611a40565b61116a611246565b6108c584848484611d24565b61117e611246565b6111878261082f565b6111d5576040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831660048201526024016106ec565b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090206112049082611891565b7fb3ba339cfbb8ef80d7a29ce5493051cb90e64fcfa85d7124efc1adfa4c68399f82826040516107c7929190613694565b61123d611246565b61084d816122d4565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016106ec565b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f317fa33400000000000000000000000000000000000000000000000000000000148061082957507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415155b9392505050565b805163ffffffff16156113dd5780516040517f68d2f8d600000000000000000000000000000000000000000000000000000000815263ffffffff90911660048201526024016106ec565b604081015173ffffffffffffffffffffffffffffffffffffffff16158061141c5750602081015173ffffffffffffffffffffffffffffffffffffffff16155b15611453576040517f35be3ac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816020015173ffffffffffffffffffffffffffffffffffffffff16639cdbb1816040518163ffffffff1660e01b81526004016020604051808303816000875af11580156114a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ca9190613935565b905063ffffffff811615611512576040517fb5d1ce2800000000000000000000000000000000000000000000000000000000815263ffffffff821660048201526024016106ec565b600a54640100000000900473ffffffffffffffffffffffffffffffffffffffff161561158857600a546115889073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169164010000000090041660006123c9565b60208201516115ef9073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6123c9565b8151600a80546020808601805163ffffffff9095167fffffffffffffffff000000000000000000000000000000000000000000000000909316831764010000000073ffffffffffffffffffffffffffffffffffffffff968716021790935560408087018051600b80547fffffffffffffffffffffffff000000000000000000000000000000000000000016918816919091179055815193845293518516918301919091529151909216908201527f33a7d35707e0c8e46d6fa8dd98b73765c14247a559106927070b1cfd2933f403906060016107c7565b7f000000000000000000000000000000000000000000000000000000000000000061171d576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82518110156117bb57600083828151811061173d5761173d6134f9565b6020026020010151905061175b81600261258290919063ffffffff16565b156117aa5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b506117b4816135d3565b9050611720565b5060005b815181101561188c5760008282815181106117dc576117dc6134f9565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611820575061187c565b61182b6002826125a4565b1561187a5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b611885816135d3565b90506117bf565b505050565b81546000906118ba90700100000000000000000000000000000000900463ffffffff1642613952565b9050801561195c5760018301548354611902916fffffffffffffffffffffffffffffffff808216928116918591700100000000000000000000000000000000909104166125c6565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b60208201518354611982916fffffffffffffffffffffffffffffffff90811691166125f0565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c1990611a33908490613965565b60405180910390a1505050565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152611ace82606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff1642611ab29190613952565b85608001516fffffffffffffffffffffffffffffffff166125c6565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b33600090815260096020526040902061084d90827f0000000000000000000000000000000000000000000000000000000000000000612606565b600482015163ffffffff811615611b77576040517f68d2f8d600000000000000000000000000000000000000000000000000000000815263ffffffff821660048201526024016106ec565b6008830151600c8401516014850151602085015163ffffffff808516911614611be25760208501516040517fe366a11700000000000000000000000000000000000000000000000000000000815263ffffffff918216600482015290841660248201526044016106ec565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168263ffffffff1614611c77576040517f77e4802600000000000000000000000000000000000000000000000000000000815263ffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152831660248201526044016106ec565b845167ffffffffffffffff828116911614611cd55784516040517ff917ffea00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff918216600482015290821660248201526044016106ec565b505050505050565b6060600061138c83612989565b33600090815260066020526040902061084d90827f0000000000000000000000000000000000000000000000000000000000000000612606565b611d2c611246565b60005b83811015612049576000858583818110611d4b57611d4b6134f9565b905060a00201803603810190611d6191906139a1565b9050806020015115611f39578051611d7b906004906125a4565b15611eec576040805160a08101825282820180516020908101516fffffffffffffffffffffffffffffffff908116845263ffffffff4281168386019081528451511515868801908152855185015184166060880190815286518901518516608089019081528a5173ffffffffffffffffffffffffffffffffffffffff1660009081526006909752958990209751885493519251151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff939095167001000000000000000000000000000000009081027fffffffffffffffffffffffff0000000000000000000000000000000000000000909516918716919091179390931791909116929092178655905192518216029116176001909201919091558251905191517f0b594bb0555ff7b252e0c789ccc9d8903fec294172064308727d570505cee1ac92611edf9291613694565b60405180910390a1612038565b80516040517fd3eb6bc500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106ec565b8051611f4790600490612582565b15611feb57805173ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604080822080547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560010191909155815190517f7fd064821314ad863a0714a3f1229375ace6b6427ed5544b7b2ba1c47b1b529491611edf9173ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b80516040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024016106ec565b50612042816135d3565b9050611d2f565b5060005b818110156122cd576000838383818110612069576120696134f9565b905060a0020180360381019061207f91906139a1565b905080602001511561220a578051612099906007906125a4565b15611eec576040805160a08101825282820180516020908101516fffffffffffffffffffffffffffffffff908116845263ffffffff4281168386019081528451511515868801908152855185015184166060880190815286518901518516608089019081528a5173ffffffffffffffffffffffffffffffffffffffff1660009081526009909752958990209751885493519251151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff939095167001000000000000000000000000000000009081027fffffffffffffffffffffffff0000000000000000000000000000000000000000909516918716919091179390931791909116929092178655905192518216029116176001909201919091558251905191517f395b7374909d2b54e5796f53c898ebf41d767c86c78ea86519acf2b805852d88926121fd9291613694565b60405180910390a16122bc565b805161221890600790612582565b15611feb57805173ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604080822080547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560010191909155815190517fcf91daec21e3510e2f2aea4b09d08c235d5c6844980be709f282ef591dbf420c916121fd9173ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b506122c6816135d3565b905061204d565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603612353576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016106ec565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80158061246957506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246791906139e6565b155b6124f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016106ec565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905261188c9084906129e5565b600061138c8373ffffffffffffffffffffffffffffffffffffffff8416612af1565b600061138c8373ffffffffffffffffffffffffffffffffffffffff8416612be4565b60006125e5856125d684866139ff565b6125e09087613a16565b6125f0565b90505b949350505050565b60008183106125ff578161138c565b5090919050565b825474010000000000000000000000000000000000000000900460ff16158061262d575081155b1561263757505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061267d90700100000000000000000000000000000000900463ffffffff1642613952565b9050801561273d57818311156126bf576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546126f99083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff166125c6565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156127f45773ffffffffffffffffffffffffffffffffffffffff841661279c576040517ff94ebcd100000000000000000000000000000000000000000000000000000000815260048101839052602481018690526044016106ec565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff851660448201526064016106ec565b848310156129075760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169060009082906128389082613952565b612842878a613952565b61284c9190613a16565b6128569190613a29565b905073ffffffffffffffffffffffffffffffffffffffff86166128af576040517f15279c0800000000000000000000000000000000000000000000000000000000815260048101829052602481018690526044016106ec565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff871660448201526064016106ec565b6129118584613952565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156129d957602002820191906000526020600020905b8154815260200190600101908083116129c5575b50505050509050919050565b6000612a47826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c339092919063ffffffff16565b80519091501561188c5780806020019051810190612a659190613895565b61188c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106ec565b60008181526001830160205260408120548015612bda576000612b15600183613952565b8554909150600090612b2990600190613952565b9050818114612b8e576000866000018281548110612b4957612b496134f9565b9060005260206000200154905080876000018481548110612b6c57612b6c6134f9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612b9f57612b9f613a64565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610829565b6000915050610829565b6000818152600183016020526040812054612c2b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610829565b506000610829565b60606125e88484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051612c679190613a93565b60006040518083038185875af1925050503d8060008114612ca4576040519150601f19603f3d011682016040523d82523d6000602084013e612ca9565b606091505b5091509150612cba87838387612cc5565b979650505050505050565b60608315612d5b578251600003612d545773ffffffffffffffffffffffffffffffffffffffff85163b612d54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106ec565b50816125e8565b6125e88383815115612d705781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ec9190612ec9565b60008060208385031215612db757600080fd5b823567ffffffffffffffff80821115612dcf57600080fd5b818501915085601f830112612de357600080fd5b813581811115612df257600080fd5b8660208260071b8501011115612e0757600080fd5b60209290920196919550909350505050565b600060208284031215612e2b57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461138c57600080fd5b60005b83811015612e76578181015183820152602001612e5e565b50506000910152565b60008151808452612e97816020860160208601612e5b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061138c6020830184612e7f565b803573ffffffffffffffffffffffffffffffffffffffff81168114612f0057600080fd5b919050565b600060208284031215612f1757600080fd5b61138c82612edc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715612f7257612f72612f20565b60405290565b6040805190810167ffffffffffffffff81118282101715612f7257612f72612f20565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612fe257612fe2612f20565b604052919050565b63ffffffff8116811461084d57600080fd5b60006060828403121561300e57600080fd5b613016612f4f565b823561302181612fea565b815261302f60208401612edc565b602082015261304060408401612edc565b60408201529392505050565b60008083601f84011261305e57600080fd5b50813567ffffffffffffffff81111561307657600080fd5b6020830191508360208260051b850101111561309157600080fd5b9250929050565b600080600080604085870312156130ae57600080fd5b843567ffffffffffffffff808211156130c657600080fd5b6130d28883890161304c565b909650945060208701359150808211156130eb57600080fd5b506130f88782880161304c565b95989497509550505050565b801515811461084d57600080fd5b80356fffffffffffffffffffffffffffffffff81168114612f0057600080fd5b60006060828403121561314457600080fd5b61314c612f4f565b9050813561315981613104565b815261316760208301613112565b602082015261317860408301613112565b604082015292915050565b6000806080838503121561319657600080fd5b61319f83612edc565b91506131ae8460208501613132565b90509250929050565b600067ffffffffffffffff8211156131d1576131d1612f20565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261320e57600080fd5b813561322161321c826131b7565b612f9b565b81815284602083860101111561323657600080fd5b816020850160208301376000918101602001919091529392505050565b67ffffffffffffffff8116811461084d57600080fd5b600080600080600060a0868803121561328157600080fd5b853567ffffffffffffffff8082111561329957600080fd5b6132a589838a016131fd565b96506132b360208901612edc565b955060408801359450606088013591506132cc82613253565b909250608087013590808211156132e257600080fd5b506132ef888289016131fd565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b8181101561334a57835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101613318565b50909695505050505050565b60008083601f84011261336857600080fd5b50813567ffffffffffffffff81111561338057600080fd5b60208301915083602082850101111561309157600080fd5b600080600080600080600060a0888a0312156133b357600080fd5b6133bc88612edc565b9650602088013567ffffffffffffffff808211156133d957600080fd5b6133e58b838c01613356565b909850965060408a0135955060608a0135915061340182613253565b9093506080890135908082111561341757600080fd5b506134248a828b01613356565b989b979a50959850939692959293505050565b60008083601f84011261344957600080fd5b50813567ffffffffffffffff81111561346157600080fd5b60208301915083602060a08302850101111561309157600080fd5b6000806000806040858703121561349257600080fd5b843567ffffffffffffffff808211156134aa57600080fd5b6134b688838901613437565b909650945060208701359150808211156134cf57600080fd5b506130f887828801613437565b6000602082840312156134ee57600080fd5b813561138c81613253565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006080828403121561353a57600080fd5b6040516080810181811067ffffffffffffffff8211171561355d5761355d612f20565b60405282358152602083013561357281612fea565b6020820152604083013561358581613253565b6040820152606083013561359881613104565b60608201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613604576136046135a4565b5060010190565b6020808252818101839052600090604080840186845b8781101561368757813583528482013561363a81612fea565b63ffffffff16838601528184013561365181613253565b67ffffffffffffffff168385015260608281013561366e81613104565b1515908401526080928301929190910190600101613621565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff831681526080810161138c60208301848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600082601f8301126136fd57600080fd5b815161370b61321c826131b7565b81815284602083860101111561372057600080fd5b6125e8826020830160208701612e5b565b6000806040838503121561374457600080fd5b825167ffffffffffffffff8082111561375c57600080fd5b613768868387016136ec565b9350602085015191508082111561377e57600080fd5b5061378b858286016136ec565b9150509250929050565b6000604082840312156137a757600080fd5b6137af612f78565b82516137ba81613253565b815260208301516137ca81612fea565b60208201529392505050565b6000602082840312156137e857600080fd5b815167ffffffffffffffff8082111561380057600080fd5b908301906040828603121561381457600080fd5b61381c612f78565b82518281111561382b57600080fd5b613837878286016136ec565b82525060208301518281111561384c57600080fd5b613858878286016136ec565b60208301525095945050505050565b60408152600061387a6040830185612e7f565b828103602084015261388c8185612e7f565b95945050505050565b6000602082840312156138a757600080fd5b815161138c81613104565b600080858511156138c257600080fd5b838611156138cf57600080fd5b5050820193919092039150565b80356020831015610829577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60006020828403121561392a57600080fd5b815161138c81613253565b60006020828403121561394757600080fd5b815161138c81612fea565b81810381811115610829576108296135a4565b6060810161082982848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600060a082840312156139b357600080fd5b6139bb612f4f565b6139c483612edc565b815260208301356139d481613104565b60208201526130408460408501613132565b6000602082840312156139f857600080fd5b5051919050565b8082028115828204841417610829576108296135a4565b80820180821115610829576108296135a4565b600082613a5f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60008251613aa5818460208701612e5b565b919091019291505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractITokenMessenger\",\"name\":\"tokenMessenger\",\"type\":\"address\"},{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"allowlist\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"armProxy\",\"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\":\"BadARMSignal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BucketOverfilled\",\"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\":[{\"internalType\":\"uint32\",\"name\":\"expected\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"got\",\"type\":\"uint32\"}],\"name\":\"InvalidSourceDomain\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"}],\"name\":\"InvalidTokenMessengerVersion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"}],\"name\":\"NonExistentRamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PermissionsError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"}],\"name\":\"RampAlreadyExists\",\"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\":\"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\":\"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\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OffRampAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OffRampConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"OffRampRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OnRampAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"rateLimiterConfig\",\"type\":\"tuple\"}],\"name\":\"OnRampConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"OnRampRemoved\",\"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\"},{\"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\":\"address\",\"name\":\"ramp\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"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\"}],\"internalType\":\"structTokenPool.RampUpdate[]\",\"name\":\"onRamps\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"ramp\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"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\"}],\"internalType\":\"structTokenPool.RampUpdate[]\",\"name\":\"offRamps\",\"type\":\"tuple[]\"}],\"name\":\"applyRampUpdates\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"currentOffRampRateLimiterState\",\"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\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"currentOnRampRateLimiterState\",\"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\":\"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\":[],\"name\":\"getArmProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"armProxy\",\"type\":\"address\"}],\"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\":\"getOffRamps\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOnRamps\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getToken\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"token\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUSDCInterfaceId\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"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\":\"address\",\"name\":\"offRamp\",\"type\":\"address\"}],\"name\":\"isOffRamp\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"}],\"name\":\"isOnRamp\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"originalSender\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"destinationReceiver\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"destChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"lockOrBurn\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"releaseOrMint\",\"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\":\"offRamp\",\"type\":\"address\"},{\"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\":\"setOffRampRateLimiterConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"onRamp\",\"type\":\"address\"},{\"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\":\"setOnRampRateLimiterConfig\",\"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: "0x6101406040523480156200001257600080fd5b506040516200410438038062004104833981016040819052620000359162000b80565b82828233806000816200008f5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c257620000c281620003d7565b5050506001600160a01b038316620000ed576040516342bcdf7f60e11b815260040160405180910390fd5b6001600160a01b03808416608052811660a052815115801560c052620001285760408051600081526020810190915262000128908362000482565b5050506001600160a01b03841662000153576040516306b7c75960e31b815260040160405180910390fd5b6000846001600160a01b0316632c1219216040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000194573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ba919062000c93565b90506000816001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000223919062000cba565b905063ffffffff81161562000254576040516334697c6b60e11b815263ffffffff8216600482015260240162000086565b6000866001600160a01b0316639cdbb1816040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000295573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002bb919062000cba565b905063ffffffff811615620002ec576040516316ba39c560e31b815263ffffffff8216600482015260240162000086565b6001600160a01b0380881660e05283166101008190526040805163234d8e3d60e21b81529051638d3638f4916004808201926020929091908290030181865afa1580156200033e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000364919062000cba565b63ffffffff166101205260e0516080516200038e916001600160a01b0390911690600019620005f3565b6040516001600160a01b03881681527f2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea95449060200160405180910390a15050505050505062000e0d565b336001600160a01b03821603620004315760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000086565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60c051620004a3576040516335f4a7b360e01b815260040160405180910390fd5b60005b825181101562000538576000838281518110620004c757620004c762000ce2565b60209081029190910101519050620004e16002826200073d565b1562000524576040516001600160a01b03821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b50620005308162000d0e565b9050620004a6565b5060005b8151811015620005ee5760008282815181106200055d576200055d62000ce2565b6020026020010151905060006001600160a01b0316816001600160a01b031603620005895750620005db565b620005966002826200075d565b15620005d9576040516001600160a01b03821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b620005e68162000d0e565b90506200053c565b505050565b801580620006715750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000649573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200066f919062000d2a565b155b620006e55760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606482015260840162000086565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620005ee9185916200077416565b600062000754836001600160a01b03841662000845565b90505b92915050565b600062000754836001600160a01b03841662000949565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490820152600090620007c3906001600160a01b0385169084906200099b565b805190915015620005ee5780806020019051810190620007e4919062000d44565b620005ee5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000086565b600081815260018301602052604081205480156200093e5760006200086c60018362000d68565b8554909150600090620008829060019062000d68565b9050818114620008ee576000866000018281548110620008a657620008a662000ce2565b9060005260206000200154905080876000018481548110620008cc57620008cc62000ce2565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000902576200090262000d7e565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505062000757565b600091505062000757565b6000818152600183016020526040812054620009925750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000757565b50600062000757565b6060620009ac8484600085620009b4565b949350505050565b60608247101562000a175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840162000086565b600080866001600160a01b0316858760405162000a35919062000dba565b60006040518083038185875af1925050503d806000811462000a74576040519150601f19603f3d011682016040523d82523d6000602084013e62000a79565b606091505b50909250905062000a8d8783838762000a98565b979650505050505050565b6060831562000b0c57825160000362000b04576001600160a01b0385163b62000b045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000086565b5081620009ac565b620009ac838381511562000b235781518083602001fd5b8060405162461bcd60e51b815260040162000086919062000dd8565b6001600160a01b038116811462000b5557600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b805162000b7b8162000b3f565b919050565b6000806000806080858703121562000b9757600080fd5b845162000ba48162000b3f565b8094505060208086015162000bb98162000b3f565b60408701519094506001600160401b038082111562000bd757600080fd5b818801915088601f83011262000bec57600080fd5b81518181111562000c015762000c0162000b58565b8060051b604051601f19603f8301168101818110858211171562000c295762000c2962000b58565b60405291825284820192508381018501918b83111562000c4857600080fd5b938501935b8285101562000c715762000c618562000b6e565b8452938501939285019262000c4d565b80975050505050505062000c886060860162000b6e565b905092959194509250565b60006020828403121562000ca657600080fd5b815162000cb38162000b3f565b9392505050565b60006020828403121562000ccd57600080fd5b815163ffffffff8116811462000cb357600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000d235762000d2362000cf8565b5060010190565b60006020828403121562000d3d57600080fd5b5051919050565b60006020828403121562000d5757600080fd5b8151801515811462000cb357600080fd5b8181038181111562000757576200075762000cf8565b634e487b7160e01b600052603160045260246000fd5b60005b8381101562000db157818101518382015260200162000d97565b50506000910152565b6000825162000dce81846020870162000d94565b9190910192915050565b602081526000825180602084015262000df981604085016020870162000d94565b601f01601f19169190910160400192915050565b60805160a05160c05160e051610100516101205161326162000ea36000396000818161030d01528181610fb80152818161185801526118b60152600081816105950152610bce0152600081816102e60152610ef301526000818161055901528181610d27015261133c015260006102aa01526000818161026301528181610ebd0152818161177c015261197401526132616000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80638627fad6116100f9578063b3a3fb4111610097578063dfadfa3511610071578063dfadfa35146104b9578063e0351e1314610557578063f2fde38b1461057d578063fbf84dd71461059057600080fd5b8063b3a3fb4114610480578063c49907b514610493578063d612b945146104a657600080fd5b806396875445116100d357806396875445146104555780639fdf13ff14610468578063a40e69c714610470578063a7cd63b71461047857600080fd5b80638627fad61461040f57806387381314146104225780638da5cb5b1461043757600080fd5b80636155cda0116101665780636f32b872116101405780636f32b872146103725780637448b3c7146103855780637787e7ab1461039857806379ba50971461040757600080fd5b80636155cda0146102e15780636b716b0d146103085780636d1081391461034457600080fd5b80631d7a74a0116101a25780631d7a74a01461024e57806321df0da7146102615780635246492f146102a857806354c8a4f3146102ce57600080fd5b806241d3c1146101c857806301ffc9a7146101dd578063181f5a7714610205575b600080fd5b6101db6101d63660046125e0565b6105b7565b005b6101f06101eb366004612655565b61075e565b60405190151581526020015b60405180910390f35b6102416040518060400160405280601381526020017f55534443546f6b656e506f6f6c20312e322e300000000000000000000000000081525081565b6040516101fc9190612705565b6101f061025c366004612741565b6107ba565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fc565b7f0000000000000000000000000000000000000000000000000000000000000000610283565b6101db6102dc3660046127a8565b6107c7565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b61032f7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101fc565b6040517fd6aca1be0000000000000000000000000000000000000000000000000000000081526020016101fc565b6101f0610380366004612741565b610842565b6101db61039336600461295d565b61084f565b6103ab6103a6366004612741565b61090e565b6040516101fc919081516fffffffffffffffffffffffffffffffff908116825260208084015163ffffffff1690830152604080840151151590830152606080840151821690830152608092830151169181019190915260a00190565b6101db6109ec565b6101db61041d366004612a43565b610ae9565b61042a610cd2565b6040516101fc9190612ad6565b60005473ffffffffffffffffffffffffffffffffffffffff16610283565b610241610463366004612b72565b610ce3565b61032f600081565b61042a611010565b61042a61101c565b6103ab61048e366004612741565b611028565b6101db6104a1366004612c56565b611106565b6101db6104b436600461295d565b61111a565b61052d6104c7366004612cb6565b60408051606080820183526000808352602080840182905292840181905267ffffffffffffffff949094168452600a82529282902082519384018352805484526001015463ffffffff811691840191909152640100000000900460ff1615159082015290565b604080518251815260208084015163ffffffff1690820152918101511515908201526060016101fc565b7f00000000000000000000000000000000000000000000000000000000000000006101f0565b6101db61058b366004612741565b6111d9565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b6105bf6111ed565b60005b818110156107205760008383838181106105de576105de612cd3565b9050608002018036038101906105f49190612d14565b805190915015806106115750604081015167ffffffffffffffff16155b1561068057604080517fa087bd2900000000000000000000000000000000000000000000000000000000815282516004820152602083015163ffffffff1660248201529082015167ffffffffffffffff1660448201526060820151151560648201526084015b60405180910390fd5b60408051606080820183528351825260208085015163ffffffff9081168285019081529286015115158486019081529585015167ffffffffffffffff166000908152600a90925293902091518255516001909101805493511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909416919092161791909117905561071981612dbf565b90506105c2565b507f1889010d2535a0ab1643678d1da87fbbe8b87b2f585b47ddb72ec622aef9ee568282604051610752929190612df7565b60405180910390a15050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd6aca1be0000000000000000000000000000000000000000000000000000000014806107b457506107b482611270565b92915050565b60006107b4600783611308565b6107cf6111ed565b61083c8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060408051602080880282810182019093528782529093508792508691829185019084908082843760009201919091525061133a92505050565b50505050565b60006107b4600483611308565b6108576111ed565b61086082610842565b6108ae576040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610677565b73ffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090206108dd9082611505565b7f578db78e348076074dbff64a94073a83e9a65aa6766b8c75fdc89282b0e30ed68282604051610752929190612e80565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915273ffffffffffffffffffffffffffffffffffffffff8216600090815260066020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526107b4906116b4565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610677565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610af2336107ba565b610b28576040517f5307f5ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b3183611766565b60008082806020019051810190610b489190612f25565b91509150600082806020019051810190610b629190612f89565b9050600082806020019051810190610b7a9190612fca565b9050610b8a8160000151836117a0565b805160208201516040517f57ecfd2800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016926357ecfd2892610c019260040161305b565b6020604051808303816000875af1158015610c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c449190613080565b610c7a576040517fbf969f2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405187815273ffffffffffffffffffffffffffffffffffffffff89169033907f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f09060200160405180910390a3505050505050505050565b6060610cde6004611951565b905090565b6060610cee33610842565b610d24576040517f5307f5ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b877f00000000000000000000000000000000000000000000000000000000000000008015610d5a5750610d58600282611308565b155b15610da9576040517fd0d2597600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610677565b67ffffffffffffffff85166000908152600a602090815260409182902082516060810184528154815260019091015463ffffffff81169282019290925264010000000090910460ff16151591810182905290610e3d576040517fd201c48a00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff87166004820152602401610677565b610e468761195e565b6000610e556020828b8d61309d565b610e5e916130c7565b602083015183516040517ff856ddb6000000000000000000000000000000000000000000000000000000008152600481018c905263ffffffff90921660248301526044820183905273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116606484015260848301919091529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063f856ddb69060a4016020604051808303816000875af1158015610f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f609190613103565b6040518a815290915033907f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df79060200160405180910390a260408051808201825267ffffffffffffffff9290921680835263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602094850190815283519485019290925290511682820152805180830382018152606090920190529b9a5050505050505050505050565b6060610cde6007611951565b6060610cde6002611951565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915273ffffffffffffffffffffffffffffffffffffffff8216600090815260096020908152604091829020825160a08101845281546fffffffffffffffffffffffffffffffff808216835270010000000000000000000000000000000080830463ffffffff16958401959095527401000000000000000000000000000000000000000090910460ff1615159482019490945260019091015480841660608301529190910490911660808201526107b4906116b4565b61110e6111ed565b61083c84848484611998565b6111226111ed565b61112b826107ba565b611179576040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610677565b73ffffffffffffffffffffffffffffffffffffffff821660009081526009602052604090206111a89082611505565b7fb3ba339cfbb8ef80d7a29ce5493051cb90e64fcfa85d7124efc1adfa4c68399f8282604051610752929190612e80565b6111e16111ed565b6111ea81611f48565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461126e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610677565b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f317fa3340000000000000000000000000000000000000000000000000000000014806107b457507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a7000000000000000000000000000000000000000000000000000000001492915050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260018301602052604081205415155b9392505050565b7f0000000000000000000000000000000000000000000000000000000000000000611391576040517f35f4a7b300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b825181101561142f5760008382815181106113b1576113b1612cd3565b602002602001015190506113cf81600261203d90919063ffffffff16565b1561141e5760405173ffffffffffffffffffffffffffffffffffffffff821681527f800671136ab6cfee9fbe5ed1fb7ca417811aca3cf864800d127b927adedf75669060200160405180910390a15b5061142881612dbf565b9050611394565b5060005b815181101561150057600082828151811061145057611450612cd3565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361149457506114f0565b61149f60028261205f565b156114ee5760405173ffffffffffffffffffffffffffffffffffffffff821681527f2640d4d76caf8bf478aabfa982fa4e1c4eb71a37f93cd15e80dbc657911546d89060200160405180910390a15b505b6114f981612dbf565b9050611433565b505050565b815460009061152e90700100000000000000000000000000000000900463ffffffff1642613120565b905080156115d05760018301548354611576916fffffffffffffffffffffffffffffffff80821692811691859170010000000000000000000000000000000090910416612081565b83546fffffffffffffffffffffffffffffffff919091167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116177001000000000000000000000000000000004263ffffffff16021783555b602082015183546115f6916fffffffffffffffffffffffffffffffff90811691166120a9565b83548351151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffff000000000000000000000000000000009091166fffffffffffffffffffffffffffffffff92831617178455602083015160408085015183167001000000000000000000000000000000000291909216176001850155517f9ea3374b67bf275e6bb9c8ae68f9cae023e1c528b4b27e092f0bb209d3531c19906116a7908490613133565b60405180910390a1505050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915261174282606001516fffffffffffffffffffffffffffffffff1683600001516fffffffffffffffffffffffffffffffff16846020015163ffffffff16426117269190613120565b85608001516fffffffffffffffffffffffffffffffff16612081565b6fffffffffffffffffffffffffffffffff1682525063ffffffff4216602082015290565b3360009081526009602052604090206111ea90827f00000000000000000000000000000000000000000000000000000000000000006120bf565b600482015163ffffffff8116156117eb576040517f68d2f8d600000000000000000000000000000000000000000000000000000000815263ffffffff82166004820152602401610677565b6008830151600c8401516014850151602085015163ffffffff8085169116146118565760208501516040517fe366a11700000000000000000000000000000000000000000000000000000000815263ffffffff91821660048201529084166024820152604401610677565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168263ffffffff16146118eb576040517f77e4802600000000000000000000000000000000000000000000000000000000815263ffffffff7f00000000000000000000000000000000000000000000000000000000000000008116600483015283166024820152604401610677565b845167ffffffffffffffff8281169116146119495784516040517ff917ffea00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff91821660048201529082166024820152604401610677565b505050505050565b6060600061133383612442565b3360009081526006602052604090206111ea90827f00000000000000000000000000000000000000000000000000000000000000006120bf565b6119a06111ed565b60005b83811015611cbd5760008585838181106119bf576119bf612cd3565b905060a002018036038101906119d5919061316f565b9050806020015115611bad5780516119ef9060049061205f565b15611b60576040805160a08101825282820180516020908101516fffffffffffffffffffffffffffffffff908116845263ffffffff4281168386019081528451511515868801908152855185015184166060880190815286518901518516608089019081528a5173ffffffffffffffffffffffffffffffffffffffff1660009081526006909752958990209751885493519251151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff939095167001000000000000000000000000000000009081027fffffffffffffffffffffffff0000000000000000000000000000000000000000909516918716919091179390931791909116929092178655905192518216029116176001909201919091558251905191517f0b594bb0555ff7b252e0c789ccc9d8903fec294172064308727d570505cee1ac92611b539291612e80565b60405180910390a1611cac565b80516040517fd3eb6bc500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610677565b8051611bbb9060049061203d565b15611c5f57805173ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604080822080547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560010191909155815190517f7fd064821314ad863a0714a3f1229375ace6b6427ed5544b7b2ba1c47b1b529491611b539173ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b80516040517f498f12f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610677565b50611cb681612dbf565b90506119a3565b5060005b81811015611f41576000838383818110611cdd57611cdd612cd3565b905060a00201803603810190611cf3919061316f565b9050806020015115611e7e578051611d0d9060079061205f565b15611b60576040805160a08101825282820180516020908101516fffffffffffffffffffffffffffffffff908116845263ffffffff4281168386019081528451511515868801908152855185015184166060880190815286518901518516608089019081528a5173ffffffffffffffffffffffffffffffffffffffff1660009081526009909752958990209751885493519251151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff939095167001000000000000000000000000000000009081027fffffffffffffffffffffffff0000000000000000000000000000000000000000909516918716919091179390931791909116929092178655905192518216029116176001909201919091558251905191517f395b7374909d2b54e5796f53c898ebf41d767c86c78ea86519acf2b805852d8892611e719291612e80565b60405180910390a1611f30565b8051611e8c9060079061203d565b15611c5f57805173ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604080822080547fffffffffffffffffffffff00000000000000000000000000000000000000000016815560010191909155815190517fcf91daec21e3510e2f2aea4b09d08c235d5c6844980be709f282ef591dbf420c91611e719173ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b50611f3a81612dbf565b9050611cc1565b5050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603611fc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610677565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006113338373ffffffffffffffffffffffffffffffffffffffff841661249e565b60006113338373ffffffffffffffffffffffffffffffffffffffff8416612591565b60006120a08561209184866131c0565b61209b90876131d7565b6120a9565b95945050505050565b60008183106120b85781611333565b5090919050565b825474010000000000000000000000000000000000000000900460ff1615806120e6575081155b156120f057505050565b825460018401546fffffffffffffffffffffffffffffffff8083169291169060009061213690700100000000000000000000000000000000900463ffffffff1642613120565b905080156121f65781831115612178576040517f9725942a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018601546121b29083908590849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16612081565b86547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff167001000000000000000000000000000000004263ffffffff160217875592505b848210156122ad5773ffffffffffffffffffffffffffffffffffffffff8416612255576040517ff94ebcd10000000000000000000000000000000000000000000000000000000081526004810183905260248101869052604401610677565b6040517f1a76572a000000000000000000000000000000000000000000000000000000008152600481018390526024810186905273ffffffffffffffffffffffffffffffffffffffff85166044820152606401610677565b848310156123c05760018681015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff169060009082906122f19082613120565b6122fb878a613120565b61230591906131d7565b61230f91906131ea565b905073ffffffffffffffffffffffffffffffffffffffff8616612368576040517f15279c080000000000000000000000000000000000000000000000000000000081526004810182905260248101869052604401610677565b6040517fd0c8d23a000000000000000000000000000000000000000000000000000000008152600481018290526024810186905273ffffffffffffffffffffffffffffffffffffffff87166044820152606401610677565b6123ca8584613120565b86547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff82161787556040518681529093507f1871cdf8010e63f2eb8384381a68dfa7416dc571a5517e66e88b2d2d0c0a690a9060200160405180910390a1505050505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561249257602002820191906000526020600020905b81548152602001906001019080831161247e575b50505050509050919050565b600081815260018301602052604081205480156125875760006124c2600183613120565b85549091506000906124d690600190613120565b905081811461253b5760008660000182815481106124f6576124f6612cd3565b906000526020600020015490508087600001848154811061251957612519612cd3565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061254c5761254c613225565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107b4565b60009150506107b4565b60008181526001830160205260408120546125d8575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107b4565b5060006107b4565b600080602083850312156125f357600080fd5b823567ffffffffffffffff8082111561260b57600080fd5b818501915085601f83011261261f57600080fd5b81358181111561262e57600080fd5b8660208260071b850101111561264357600080fd5b60209290920196919550909350505050565b60006020828403121561266757600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461133357600080fd5b60005b838110156126b257818101518382015260200161269a565b50506000910152565b600081518084526126d3816020860160208601612697565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061133360208301846126bb565b803573ffffffffffffffffffffffffffffffffffffffff8116811461273c57600080fd5b919050565b60006020828403121561275357600080fd5b61133382612718565b60008083601f84011261276e57600080fd5b50813567ffffffffffffffff81111561278657600080fd5b6020830191508360208260051b85010111156127a157600080fd5b9250929050565b600080600080604085870312156127be57600080fd5b843567ffffffffffffffff808211156127d657600080fd5b6127e28883890161275c565b909650945060208701359150808211156127fb57600080fd5b506128088782880161275c565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561286657612866612814565b60405290565b6040805190810167ffffffffffffffff8111828210171561286657612866612814565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156128d6576128d6612814565b604052919050565b80151581146111ea57600080fd5b80356fffffffffffffffffffffffffffffffff8116811461273c57600080fd5b60006060828403121561291e57600080fd5b612926612843565b90508135612933816128de565b8152612941602083016128ec565b6020820152612952604083016128ec565b604082015292915050565b6000806080838503121561297057600080fd5b61297983612718565b9150612988846020850161290c565b90509250929050565b600067ffffffffffffffff8211156129ab576129ab612814565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f8301126129e857600080fd5b81356129fb6129f682612991565b61288f565b818152846020838601011115612a1057600080fd5b816020850160208301376000918101602001919091529392505050565b67ffffffffffffffff811681146111ea57600080fd5b600080600080600060a08688031215612a5b57600080fd5b853567ffffffffffffffff80821115612a7357600080fd5b612a7f89838a016129d7565b9650612a8d60208901612718565b95506040880135945060608801359150612aa682612a2d565b90925060808701359080821115612abc57600080fd5b50612ac9888289016129d7565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b81811015612b2457835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101612af2565b50909695505050505050565b60008083601f840112612b4257600080fd5b50813567ffffffffffffffff811115612b5a57600080fd5b6020830191508360208285010111156127a157600080fd5b600080600080600080600060a0888a031215612b8d57600080fd5b612b9688612718565b9650602088013567ffffffffffffffff80821115612bb357600080fd5b612bbf8b838c01612b30565b909850965060408a0135955060608a01359150612bdb82612a2d565b90935060808901359080821115612bf157600080fd5b50612bfe8a828b01612b30565b989b979a50959850939692959293505050565b60008083601f840112612c2357600080fd5b50813567ffffffffffffffff811115612c3b57600080fd5b60208301915083602060a0830285010111156127a157600080fd5b60008060008060408587031215612c6c57600080fd5b843567ffffffffffffffff80821115612c8457600080fd5b612c9088838901612c11565b90965094506020870135915080821115612ca957600080fd5b5061280887828801612c11565b600060208284031215612cc857600080fd5b813561133381612a2d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b63ffffffff811681146111ea57600080fd5b600060808284031215612d2657600080fd5b6040516080810181811067ffffffffffffffff82111715612d4957612d49612814565b604052823581526020830135612d5e81612d02565b60208201526040830135612d7181612a2d565b60408201526060830135612d84816128de565b60608201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612df057612df0612d90565b5060010190565b6020808252818101839052600090604080840186845b87811015612e73578135835284820135612e2681612d02565b63ffffffff168386015281840135612e3d81612a2d565b67ffffffffffffffff1683850152606082810135612e5a816128de565b1515908401526080928301929190910190600101612e0d565b5090979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff831681526080810161133360208301848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600082601f830112612ee957600080fd5b8151612ef76129f682612991565b818152846020838601011115612f0c57600080fd5b612f1d826020830160208701612697565b949350505050565b60008060408385031215612f3857600080fd5b825167ffffffffffffffff80821115612f5057600080fd5b612f5c86838701612ed8565b93506020850151915080821115612f7257600080fd5b50612f7f85828601612ed8565b9150509250929050565b600060408284031215612f9b57600080fd5b612fa361286c565b8251612fae81612a2d565b81526020830151612fbe81612d02565b60208201529392505050565b600060208284031215612fdc57600080fd5b815167ffffffffffffffff80821115612ff457600080fd5b908301906040828603121561300857600080fd5b61301061286c565b82518281111561301f57600080fd5b61302b87828601612ed8565b82525060208301518281111561304057600080fd5b61304c87828601612ed8565b60208301525095945050505050565b60408152600061306e60408301856126bb565b82810360208401526120a081856126bb565b60006020828403121561309257600080fd5b8151611333816128de565b600080858511156130ad57600080fd5b838611156130ba57600080fd5b5050820193919092039150565b803560208310156107b4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b60006020828403121561311557600080fd5b815161133381612a2d565b818103818111156107b4576107b4612d90565b606081016107b482848051151582526020808201516fffffffffffffffffffffffffffffffff9081169184019190915260409182015116910152565b600060a0828403121561318157600080fd5b613189612843565b61319283612718565b815260208301356131a2816128de565b60208201526131b4846040850161290c565b60408201529392505050565b80820281158282048414176107b4576107b4612d90565b808201808211156107b4576107b4612d90565b600082613220577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000813000a", } var USDCTokenPoolABI = USDCTokenPoolMetaData.ABI var USDCTokenPoolBin = USDCTokenPoolMetaData.Bin -func DeployUSDCTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, config USDCTokenPoolUSDCConfig, token common.Address, allowlist []common.Address, armProxy common.Address, localDomainIdentifier uint32) (common.Address, *types.Transaction, *USDCTokenPool, error) { +func DeployUSDCTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, tokenMessenger common.Address, token common.Address, allowlist []common.Address, armProxy common.Address) (common.Address, *types.Transaction, *USDCTokenPool, error) { parsed, err := USDCTokenPoolMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -87,7 +81,7 @@ func DeployUSDCTokenPool(auth *bind.TransactOpts, backend bind.ContractBackend, return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(USDCTokenPoolBin), backend, config, token, allowlist, armProxy, localDomainIdentifier) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(USDCTokenPoolBin), backend, tokenMessenger, token, allowlist, armProxy) if err != nil { return common.Address{}, nil, nil, err } @@ -342,28 +336,6 @@ func (_USDCTokenPool *USDCTokenPoolCallerSession) GetArmProxy() (common.Address, return _USDCTokenPool.Contract.GetArmProxy(&_USDCTokenPool.CallOpts) } -func (_USDCTokenPool *USDCTokenPoolCaller) GetConfig(opts *bind.CallOpts) (USDCTokenPoolUSDCConfig, error) { - var out []interface{} - err := _USDCTokenPool.contract.Call(opts, &out, "getConfig") - - if err != nil { - return *new(USDCTokenPoolUSDCConfig), err - } - - out0 := *abi.ConvertType(out[0], new(USDCTokenPoolUSDCConfig)).(*USDCTokenPoolUSDCConfig) - - return out0, err - -} - -func (_USDCTokenPool *USDCTokenPoolSession) GetConfig() (USDCTokenPoolUSDCConfig, error) { - return _USDCTokenPool.Contract.GetConfig(&_USDCTokenPool.CallOpts) -} - -func (_USDCTokenPool *USDCTokenPoolCallerSession) GetConfig() (USDCTokenPoolUSDCConfig, error) { - return _USDCTokenPool.Contract.GetConfig(&_USDCTokenPool.CallOpts) -} - func (_USDCTokenPool *USDCTokenPoolCaller) GetDomain(opts *bind.CallOpts, chainSelector uint64) (USDCTokenPoolDomain, error) { var out []interface{} err := _USDCTokenPool.contract.Call(opts, &out, "getDomain", chainSelector) @@ -496,6 +468,50 @@ func (_USDCTokenPool *USDCTokenPoolCallerSession) ILocalDomainIdentifier() (uint return _USDCTokenPool.Contract.ILocalDomainIdentifier(&_USDCTokenPool.CallOpts) } +func (_USDCTokenPool *USDCTokenPoolCaller) IMessageTransmitter(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _USDCTokenPool.contract.Call(opts, &out, "i_messageTransmitter") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_USDCTokenPool *USDCTokenPoolSession) IMessageTransmitter() (common.Address, error) { + return _USDCTokenPool.Contract.IMessageTransmitter(&_USDCTokenPool.CallOpts) +} + +func (_USDCTokenPool *USDCTokenPoolCallerSession) IMessageTransmitter() (common.Address, error) { + return _USDCTokenPool.Contract.IMessageTransmitter(&_USDCTokenPool.CallOpts) +} + +func (_USDCTokenPool *USDCTokenPoolCaller) ITokenMessenger(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _USDCTokenPool.contract.Call(opts, &out, "i_tokenMessenger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_USDCTokenPool *USDCTokenPoolSession) ITokenMessenger() (common.Address, error) { + return _USDCTokenPool.Contract.ITokenMessenger(&_USDCTokenPool.CallOpts) +} + +func (_USDCTokenPool *USDCTokenPoolCallerSession) ITokenMessenger() (common.Address, error) { + return _USDCTokenPool.Contract.ITokenMessenger(&_USDCTokenPool.CallOpts) +} + func (_USDCTokenPool *USDCTokenPoolCaller) IsOffRamp(opts *bind.CallOpts, offRamp common.Address) (bool, error) { var out []interface{} err := _USDCTokenPool.contract.Call(opts, &out, "isOffRamp", offRamp) @@ -666,18 +682,6 @@ func (_USDCTokenPool *USDCTokenPoolTransactorSession) ReleaseOrMint(arg0 []byte, return _USDCTokenPool.Contract.ReleaseOrMint(&_USDCTokenPool.TransactOpts, arg0, receiver, amount, arg3, extraData) } -func (_USDCTokenPool *USDCTokenPoolTransactor) SetConfig(opts *bind.TransactOpts, config USDCTokenPoolUSDCConfig) (*types.Transaction, error) { - return _USDCTokenPool.contract.Transact(opts, "setConfig", config) -} - -func (_USDCTokenPool *USDCTokenPoolSession) SetConfig(config USDCTokenPoolUSDCConfig) (*types.Transaction, error) { - return _USDCTokenPool.Contract.SetConfig(&_USDCTokenPool.TransactOpts, config) -} - -func (_USDCTokenPool *USDCTokenPoolTransactorSession) SetConfig(config USDCTokenPoolUSDCConfig) (*types.Transaction, error) { - return _USDCTokenPool.Contract.SetConfig(&_USDCTokenPool.TransactOpts, config) -} - func (_USDCTokenPool *USDCTokenPoolTransactor) SetDomains(opts *bind.TransactOpts, domains []USDCTokenPoolDomainUpdate) (*types.Transaction, error) { return _USDCTokenPool.contract.Transact(opts, "setDomains", domains) } @@ -1149,8 +1153,8 @@ func (it *USDCTokenPoolConfigSetIterator) Close() error { } type USDCTokenPoolConfigSet struct { - Arg0 USDCTokenPoolUSDCConfig - Raw types.Log + TokenMessenger common.Address + Raw types.Log } func (_USDCTokenPool *USDCTokenPoolFilterer) FilterConfigSet(opts *bind.FilterOpts) (*USDCTokenPoolConfigSetIterator, error) { @@ -2755,7 +2759,7 @@ func (USDCTokenPoolBurned) Topic() common.Hash { } func (USDCTokenPoolConfigSet) Topic() common.Hash { - return common.HexToHash("0x33a7d35707e0c8e46d6fa8dd98b73765c14247a559106927070b1cfd2933f403") + return common.HexToHash("0x2e902d38f15b233cbb63711add0fca4545334d3a169d60c0a616494d7eea9544") } func (USDCTokenPoolDomainsSet) Topic() common.Hash { @@ -2823,8 +2827,6 @@ type USDCTokenPoolInterface interface { GetArmProxy(opts *bind.CallOpts) (common.Address, error) - GetConfig(opts *bind.CallOpts) (USDCTokenPoolUSDCConfig, error) - GetDomain(opts *bind.CallOpts, chainSelector uint64) (USDCTokenPoolDomain, error) GetOffRamps(opts *bind.CallOpts) ([]common.Address, error) @@ -2837,6 +2839,10 @@ type USDCTokenPoolInterface interface { ILocalDomainIdentifier(opts *bind.CallOpts) (uint32, error) + IMessageTransmitter(opts *bind.CallOpts) (common.Address, error) + + ITokenMessenger(opts *bind.CallOpts) (common.Address, error) + IsOffRamp(opts *bind.CallOpts, offRamp common.Address) (bool, error) IsOnRamp(opts *bind.CallOpts, onRamp common.Address) (bool, error) @@ -2857,8 +2863,6 @@ type USDCTokenPoolInterface interface { ReleaseOrMint(opts *bind.TransactOpts, arg0 []byte, receiver common.Address, amount *big.Int, arg3 uint64, extraData []byte) (*types.Transaction, error) - SetConfig(opts *bind.TransactOpts, config USDCTokenPoolUSDCConfig) (*types.Transaction, error) - SetDomains(opts *bind.TransactOpts, domains []USDCTokenPoolDomainUpdate) (*types.Transaction, error) SetOffRampRateLimiterConfig(opts *bind.TransactOpts, offRamp common.Address, config RateLimiterConfig) (*types.Transaction, 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 b904d92db8..ba1199dc4b 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 @@ -14,5 +14,5 @@ mock_arm_contract: ../../../contracts/solc/v0.8.19/MockARM.abi ../../../contract ping_pong_demo: ../../../contracts/solc/v0.8.19/PingPongDemo.abi ../../../contracts/solc/v0.8.19/PingPongDemo.bin f2972aa082cee8b461122f79773ce247d23b551ddc2ca9926ae90624134cfb23 price_registry: ../../../contracts/solc/v0.8.19/PriceRegistry.abi ../../../contracts/solc/v0.8.19/PriceRegistry.bin 36e8d2c44a16fefb5258557cb1eae25eca1cc12efcd3c3270f91a90a5f81e7ea router: ../../../contracts/solc/v0.8.19/Router.abi ../../../contracts/solc/v0.8.19/Router.bin d990e74b6032d4f75ef6e733e31ac5d34a3ac3f453b14f8c3a71367bb011c6db -usdc_token_pool: ../../../contracts/solc/v0.8.19/USDCTokenPool.abi ../../../contracts/solc/v0.8.19/USDCTokenPool.bin 1b96c5a03654d5c9167b21678b0f41dbd3ff4713dffeb255bdaa840ea80570e1 +usdc_token_pool: ../../../contracts/solc/v0.8.19/USDCTokenPool.abi ../../../contracts/solc/v0.8.19/USDCTokenPool.bin 855b633851201fba6bdad7667115a1ba097c45b0c8234ae35f7a76efcb37b27a weth9: ../../../contracts/solc/v0.8.19/WETH9.abi ../../../contracts/solc/v0.8.19/WETH9.bin 5a7d64fb19b62ec523c7667ce4c2983295c05f74935b5f994c06a6f70d440f8b