{"file_path":"src/protocol/sreusd/sreUSD.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.28;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { OFTCore } from \"@layerzerolabs/oft-evm/contracts/OFTCore.sol\";\nimport { IERC20Metadata } from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport { SafeCastLib } from \"src/libraries/solmate/SafeCastLib.sol\";\nimport { LinearRewardsErc4626, ERC20 } from \"./LinearRewardsErc4626.sol\";\n\n/**\n * @title Savings reUSD\n * @notice ERC4626 Vault implementation with linear rewards, adapted from code from Frax Finance's sfrxUSD\n */\ncontract SavingsReUSD is LinearRewardsErc4626, OFTCore {\n    using SafeCastLib for *;\n\n    /// @notice The maximum amount of rewards that can be distributed per second per 1e18 asset\n    uint256 public maxDistributionPerSecondPerAsset;\n\n    /// @param _core The core address\n    /// @param _registry The registry address\n    /// @param _lzEndpoint The layerzero endpoint address\n    /// @param _underlying The erc20 asset deposited\n    /// @param _name The name of the vault\n    /// @param _symbol The symbol of the vault\n    /// @param _maxDistributionPerSecondPerAsset The maximum amount of rewards that can be distributed per second per 1e18 asset\n    constructor(\n        address _core,\n        address _registry,\n        address _lzEndpoint,\n        address _underlying,\n        string memory _name,\n        string memory _symbol,\n        uint256 _maxDistributionPerSecondPerAsset\n    )\n        LinearRewardsErc4626(_core, _registry, _underlying, _name, _symbol, 7 days)\n        OFTCore(IERC20Metadata(_underlying).decimals(), _lzEndpoint, _core)\n        Ownable(_core)\n    {\n        if (_maxDistributionPerSecondPerAsset > type(uint64).max) _maxDistributionPerSecondPerAsset = type(uint64).max;\n        maxDistributionPerSecondPerAsset = _maxDistributionPerSecondPerAsset;\n        emit SetMaxDistributionPerSecondPerAsset(0, _maxDistributionPerSecondPerAsset);\n    }\n\n    function core() external view returns(address) {\n        return owner();\n    }\n\n    function _transferOwnership(address newOwner) internal override {\n        if(owner() == address(0)){\n            super._transferOwnership(newOwner);\n        }else{\n            revert OwnableInvalidOwner(newOwner);\n        }\n    }\n\n    /// @notice The ```SetMaxDistributionPerSecondPerAsset``` event is emitted when the maxDistributionPerSecondPerAsset is set\n    /// @param oldMax The old maxDistributionPerSecondPerAsset value\n    /// @param newMax The new maxDistributionPerSecondPerAsset value\n    event SetMaxDistributionPerSecondPerAsset(uint256 oldMax, uint256 newMax);\n\n    /// @notice The ```setMaxDistributionPerSecondPerAsset``` function sets the maxDistributionPerSecondPerAsset\n    /// @dev This function can only be called by the Owner, caps the value to type(uint64).max\n    /// @param _maxDistributionPerSecondPerAsset The maximum amount of rewards that can be distributed per second per 1e18 asset\n    function setMaxDistributionPerSecondPerAsset(uint256 _maxDistributionPerSecondPerAsset) external onlyOwner{\n        syncRewardsAndDistribution();\n\n        // NOTE: prevents bricking the contract via overflow\n        if (_maxDistributionPerSecondPerAsset > type(uint64).max) {\n            _maxDistributionPerSecondPerAsset = type(uint64).max;\n        }\n\n        emit SetMaxDistributionPerSecondPerAsset({\n            oldMax: maxDistributionPerSecondPerAsset,\n            newMax: _maxDistributionPerSecondPerAsset\n        });\n\n        maxDistributionPerSecondPerAsset = _maxDistributionPerSecondPerAsset;\n    }\n\n    /// @notice The ```calculateRewardsToDistribute``` function calculates the amount of rewards to distribute based on the rewards cycle data and the time passed\n    /// @param _rewardsCycleData The rewards cycle data\n    /// @param _deltaTime The time passed since the last rewards distribution\n    /// @return _rewardToDistribute The amount of rewards to distribute\n    function calculateRewardsToDistribute(\n        RewardsCycleData memory _rewardsCycleData,\n        uint256 _deltaTime\n    ) public view override returns (uint256 _rewardToDistribute) {\n        _rewardToDistribute = super.calculateRewardsToDistribute({\n            _rewardsCycleData: _rewardsCycleData,\n            _deltaTime: _deltaTime\n        });\n\n        // Cap rewards\n        uint256 _maxDistribution = (maxDistributionPerSecondPerAsset * _deltaTime * storedTotalAssets) / PRECISION;\n        if (_rewardToDistribute > _maxDistribution) {\n            _rewardToDistribute = _maxDistribution;\n        }\n    }\n\n\n\n    ////////////////\n    // OFT Implementation\n    ////////////////\n\n    /**\n     * @dev Retrieves the address of the underlying ERC20 implementation.\n     * @return The address of the OFT token.\n     *\n     * @dev In the case of OFT, address(this) and erc20 are the same contract.\n     */\n    function token() public view returns (address) {\n        return address(this);\n    }\n\n    /**\n     * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.\n     * @return requiresApproval Needs approval of the underlying token implementation.\n     *\n     * @dev In the case of OFT where the contract IS the token, approval is NOT required.\n     */\n    function approvalRequired() external pure virtual returns (bool) {\n        return false;\n    }\n\n    /**\n     * @dev Burns tokens from the sender's specified balance.\n     * @param _from The address to debit the tokens from.\n     * @param _amountLD The amount of tokens to send in local decimals.\n     * @param _minAmountLD The minimum amount to send in local decimals.\n     * @param _dstEid The destination chain ID.\n     * @return amountSentLD The amount sent in local decimals.\n     * @return amountReceivedLD The amount received in local decimals on the remote.\n     */\n    function _debit(\n        address _from,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        uint32 _dstEid\n    ) internal virtual override returns (uint256 amountSentLD, uint256 amountReceivedLD) {\n        (amountSentLD, amountReceivedLD) = _debitView(_amountLD, _minAmountLD, _dstEid);\n\n        // @dev In NON-default OFT, amountSentLD could be 100, with a 10% fee, the amountReceivedLD amount is 90,\n        // therefore amountSentLD CAN differ from amountReceivedLD.\n\n        //for 4626 vault we cant burn/mint and change supply\n        //transfer the tokens to this contract instead\n\n        //reduce balance of _from\n        balanceOf[_from] -= amountSentLD;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[address(this)] += amountSentLD;\n        }\n\n        emit Transfer(_from, address(this), amountSentLD);\n    }\n\n    /**\n     * @dev Credits tokens to the specified address.\n     * @param _to The address to credit the tokens to.\n     * @param _amountLD The amount of tokens to credit in local decimals.\n     * @dev _srcEid The source chain ID.\n     * @return amountReceivedLD The amount of tokens ACTUALLY received in local decimals.\n     */\n    function _credit(\n        address _to,\n        uint256 _amountLD,\n        uint32 /*_srcEid*/\n    ) internal virtual override returns (uint256 amountReceivedLD) {\n        if (_to == address(0x0)) _to = address(0xdead); // _mint(...) does not support address(0x0)\n\n        //for 4626 vault we cant burn/mint and change supply\n        //transfer tokens from this contract instead\n        //reduce balance of this contract, will revert if there is not enough cached\n        balanceOf[address(this)] -= _amountLD;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            //increase balance of _to\n            balanceOf[_to] += _amountLD;\n        }\n\n        emit Transfer(address(this), _to, _amountLD);\n\n        // @dev In the case of NON-default OFT, the _amountLD MIGHT not be == amountReceivedLD.\n        return _amountLD;\n    }\n}\n","deployed_bytecode":"0x60806040526004361015610011575f80fd5b5f3560e01c806301e1d114146104f657806306fdde03146104f157806307a2d13a1461048d578063095ea7b3146104ec5780630a28a477146104e75780630d35b415146104e2578063111ecdad146104dd57806313137d65146104d8578063134d4f25146104d3578063156a0d0f146104ce57806317442b70146104c957806318160ddd146104c45780631f5e1334146104bf57806323b872dd146104ba5780632af98d6d146104b5578063313ce567146104b05780633400288b146104ab578063358245fc146104a65780633644e515146104a157806338d52e0f1461049c5780633b6f743b14610497578063402d267d146103cf57806348f76e0f146104925780634cdad5061461048d57806352ae28791461038e578063536b7a43146104885780635535d4611461048357806356caf6051461047e57806357d775f8146104795780635a0dfe4d146104745780635e280f111461046f5780635ebae5661461046a57806361c1c5e9146104655780636e553f65146104605780636fc1b31e1461045b57806370a08231146103a7578063715018a614610456578063757991a81461045157806375e077c31461044c57806378e97925146104475780637b103999146104425780637d25a05e1461043d5780637ecebe001461043857806382413eac14610433578063857749b01461042e5780638da5cb5b146103985780638f765d591461042957806394bf804d1461042457806395d89b411461041f578063963efcaa1461041a57806399530b06146104155780639f68b96414610410578063a80e75471461040b578063a9059cbb14610406578063aaf5eb6814610401578063b3d7f6b9146103fc578063b460af94146103f7578063b731ea0a146103f2578063b98bd070146103ed578063ba087652146103e8578063bb0b6a53146103e3578063bc70b354146103de578063bd6f3603146103d9578063bd815db0146103d4578063c63d75b6146103cf578063c6e6f5921461039d578063c7c7f5b3146103ca578063ca5eb5e1146103c5578063ce96cb77146103c0578063d045a0dc146103bb578063d4243885146103b6578063d505accf146103b1578063d71356e6146103ac578063d905777e146103a7578063dd62ed3e146103a2578063ef8b30f71461039d578063f2f4eb2614610398578063f2fde38b14610393578063fc0c546a1461038e5763ff7bd03d14610389575f80fd5b612924565b611244565b612894565b6119c8565b6122cc565b612835565b611690565b61281d565b612626565b6125b6565b612585565b61254a565b6124ad565b61233b565b6111a3565b612178565b61215b565b612107565b6120ce565b611fd2565b611eed565b611e73565b611d4c565b611d05565b611ce3565b611c6b565b611c31565b611c17565b611bdc565b611ba2565b611afd565b611a34565b6119f0565b6119ad565b61194f565b611914565b6118ee565b6118aa565b611870565b61176e565b611744565b6116cb565b611620565b6115f6565b6115d9565b61159e565b61155a565b611514565b6114da565b6114a0565b611425565b61127c565b6106e2565b6111ca565b610ff0565b610fa2565b610f88565b610f6e565b610ee9565b610e9e565b610e81565b610d43565b610d28565b610d0b565b610cea565b610cc4565b610ca9565b610a8b565b6109b8565b610869565b61079d565b610711565b61060b565b610509565b5f91031261050557565b5f80fd5b34610505575f36600319011261050557602061052361298a565b604051908152f35b90600182811c92168015610559575b602083101461054557565b634e487b7160e01b5f52602260045260245ffd5b91607f169161053a565b634e487b7160e01b5f52604160045260245ffd5b606081019081106001600160401b0382111761059257604052565b610563565b604081019081106001600160401b0382111761059257604052565b90601f801991011681019081106001600160401b0382111761059257604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9060206106089281815201906105d3565b90565b34610505575f366003190112610505576040515f5f5461062a8161052b565b80845290600181169081156106be5750600114610662575b61065e83610652818503826105b2565b604051918291826105f7565b0390f35b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b8082106106a457509091508101602001610652610642565b91926001816020925483858801015201910190929161068c565b60ff191660208086019190915291151560051b840190910191506106529050610642565b346105055760203660031901126105055760206105236004356129a2565b6001600160a01b0381160361050557565b346105055760403660031901126105055760043561072e81610700565b60243590335f526004602052816107588260405f209060018060a01b03165f5260205260405f2090565b556040519182526001600160a01b03169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590602090a360405160018152602090f35b346105055760203660031901126105055760206105236004356129c0565b908160e09103126105055790565b939291906107e58560a081019260208091805184520151910152565b60a06040860152815180915260c0850190602060c08260051b8801019301915f905b82821061082d575050505090606061082b9294019060208091805184520151910152565b565b9091929360208061085b60019360bf198c82030186526040838a5180518452015191818582015201906105d3565b960192019201909291610807565b34610505576020366003190112610505576004356001600160401b038111610505576108999036906004016107bb565b6108a16129df565b506108aa6129df565b50604051637e062a3560e11b8152602081600481305afa908115610986576004916020915f9161098b575b506040516318160ddd60e01b815292839182906001600160a01b03165afa908115610986575f91610957575b5061090a61125e565b905f8252602082015261065e61093b610921612a3d565b936040810135610935606083013592612a83565b506133cd565b61094361125e565b9182526020820152604051938493846107c9565b610979915060203d60201161097f575b61097181836105b2565b810190612a17565b5f610901565b503d610967565b612a0c565b6109ab9150823d84116109b1575b6109a381836105b2565b8101906129f7565b5f6108d5565b503d610999565b34610505575f36600319011261050557600e546040516001600160a01b039091168152602090f35b606090600319011261050557600490565b9181601f84011215610505578235916001600160401b038311610505576020838186019501011161050557565b90600319820160e081126105055760601361050557600491606435916084356001600160401b0381116105055782610a58916004016109f1565b9290929160a435610a6881610700565b9160c435906001600160401b03821161050557610a87916004016109f1565b9091565b610a9436610a1e565b50919492915050337f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031603610c96578135610ad681610edb565b610adf8161341f565b906020840135809203610c71575050610b07610afb8583613af6565b6001600160a01b031690565b93610b2d610b1d610b188385613b02565b613b14565b610b2685612a83565b5086613b48565b91610b388260281090565b610b96575b5050610b697fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c92612a83565b6040805163ffffffff909216825260208201929092526001600160a01b039094169390819081015b0390a3005b9082610bc192610bbb610bab6040880161344f565b93610bb588612a83565b92613bb5565b92613bd1565b917f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b0316803b1561050557604051633e5ac80960e11b8152935f918591829084908290610c1a908b8d60048501613459565b03925af1908115610986577fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c93610b6992610c57575b5092610b3d565b80610c655f610c6b936105b2565b806104fb565b5f610c50565b80610c8063ffffffff92610edb565b63309afaf360e21b5f521660045260245260445ffd5b6391ac5e4f60e01b5f523360045260245ffd5b34610505575f36600319011261050557602060405160028152f35b34610505575f366003190112610505576040805162b9270b60e21b815260016020820152f35b34610505575f36600319011261050557604080516001815260026020820152f35b34610505575f366003190112610505576020600254604051908152f35b34610505575f36600319011261050557602060405160018152f35b3461050557606036600319011261050557600435610d6081610700565b60243590610d6d82610700565b6001600160a01b0381165f8181526004602090815260408083203384529091529020546044359391929060018101610e1e575b506001600160a01b03165f9081526003602052604090205f51602061420c5f395f51905f5291610e0f915b610dd6868254612a8d565b90556001600160a01b0381165f9081526003602052604090208054860190556040519485526001600160a01b0316939081906020820190565b0390a360405160018152602090f35b91848303928311610e7c57610dcb610e0f925f51602061420c5f395f51905f5294610e7233610e5d8460018060a01b03165f52600460205260405f2090565b9060018060a01b03165f5260205260405f2090565b5592505091610da0565b612969565b34610505575f366003190112610505576020600f54604051908152f35b34610505575f36600319011261050557602060405160ff7f0000000000000000000000000000000000000000000000000000000000000012168152f35b63ffffffff81160361050557565b34610505576040366003190112610505577f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b600435610f2781610edb565b60243590610f33613483565b63ffffffff81165f52600b6020528160405f2055610f69604051928392836020909392919363ffffffff60408201951681520152565b0390a1005b34610505575f366003190112610505576020610523612ac9565b34610505575f366003190112610505576020610523612b31565b34610505575f366003190112610505576040517f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec6001600160a01b03168152602090f35b8015150361050557565b34610505576040366003190112610505576004356001600160401b038111610505576110209036906004016107bb565b60243561102c81610fe6565b6110346129df565b5081359160608101359061107f604082013561104f86610edb565b61107a7f000000000000000000000000000000000000000000000000000000e8d4a510008092612c1d565b612c0a565b9180831061118d576111006040866110e58761109b88886134fc565b906110a585610edb565b6110ad6129df565b506110b78561341f565b6110ce6110c261126d565b63ffffffff9097168752565b602086015285850152606084015215156080830152565b815180938192631bb8518b60e31b8352309060048401613647565b03817f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03165afa80156109865761065e915f9161115e575b5060405191829182815181526020918201519181019190915260400190565b611180915060403d604011611186575b61117881836105b2565b810190613633565b8261113f565b503d61116e565b826371c4efed60e01b5f5260045260245260445ffd5b34610505576020366003190112610505576111bf600435610700565b60206040515f198152f35b34610505576020366003190112610505576004356111e6613483565b6001600160401b03816111f761333e565b11611236575b600f5460408051918252602082018390527f05d530f0fd6974b7d995fd3b71870f5301bb9fe086180bdd0bd36526728f5c6b91a1600f55005b506001600160401b036111fd565b34610505575f366003190112610505576020604051308152f35b6040519061082b6040836105b2565b6040519061082b60a0836105b2565b346105055736600319016080811261050557606013610505576040516112a181610577565b60043564ffffffffff8116810361050557815260243564ffffffffff811681036105055781610523916020809401526112d960443590565b604082015260643590612c3b565b6024359061ffff8216820361050557565b359061ffff8216820361050557565b905f915f54906113168261052b565b80825291600181169081156113885750600114611331575050565b5f8080529293509091907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83831061136e575060209250010190565b60018160209294939454838587010152019101919061135d565b9050602093945060ff929192191683830152151560051b010190565b5f92918154916113b38361052b565b808352926001811690811561140857506001146113cf57505050565b5f9081526020812093945091925b8383106113ee575060209250010190565b6001816020929493945483858701015201910191906113dd565b915050602093945060ff929192191683830152151560051b010190565b346105055760403660031901126105055761065e61148561148c61147960043561144e81610edb565b63ffffffff61145b6112e7565b91165f52600d60205260405f209061ffff165f5260205260405f2090565b604051928380926113a4565b03826105b2565b6040519182916020835260208301906105d3565b34610505575f3660031901126105055760206040517f0000000000000000000000000000000000000000000000000000000000093a808152f35b34610505575f3660031901126105055760206040517f0000000000000000000000000000000000000000000000000000000000093a808152f35b3461050557604036600319011261050557602061155060043561153681610edb565b6024359063ffffffff165f52600b60205260405f20541490565b6040519015158152f35b34610505575f366003190112610505576040517f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03168152602090f35b34610505575f366003190112610505576006546007546040805164ffffffffff808516825260289490941c9093166020840152820152606090f35b34610505575f366003190112610505576020600954604051908152f35b3461050557604036600319011261050557602061052360243560043561161b82610700565b612cad565b34610505576020366003190112610505577ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197602060043561166081610700565b611668613483565b600e80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b34610505576020366003190112610505576004356116ad81610700565b60018060a01b03165f526003602052602060405f2054604051908152f35b34610505575f366003190112610505576116e3613483565b600a546001600160a01b03811680611731575f916bffffffffffffffffffffffff60a01b16600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610505575f366003190112610505576020610523612d81565b6084359060ff8216820361050557565b346105055760e03660031901126105055760243560043561178e82610700565b6044359160643561179e81610fe6565b6117a661175e565b9360a4359160c435901561186a575f195b7f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec6001600160a01b031693843b15610505575f9460e493869260ff6040519b8c98899763d505accf60e01b89523360048a01523060248a01526044890152606488015216608486015260a485015260c48401525af19182156109865761065e9361184693611856575b50612cad565b6040519081529081906020820190565b80610c655f611864936105b2565b5f611840565b846117b7565b34610505575f3660031901126105055760206040517f0000000000000000000000000000000000000000000000000000000067d220008152f35b34610505575f366003190112610505576040517f00000000000000000000000010101010e0c3171d894b71b3400668af311e7d946001600160a01b03168152602090f35b346105055760403660031901126105055761190a600435610edb565b60206040515f8152f35b346105055760203660031901126105055760043561193181610700565b60018060a01b03165f526005602052602060405f2054604051908152f35b346105055760a036600319011261050557611969366109e0565b506064356001600160401b038111610505576119899036906004016109f1565b5050602060843561199981610700565b6040516001600160a01b0390911630148152f35b34610505575f36600319011261050557602060405160068152f35b34610505575f36600319011261050557600a546040516001600160a01b039091168152602090f35b34610505575f366003190112610505576060611a0a612e10565b604080519164ffffffffff815116835264ffffffffff602082015116602084015201516040820152f35b3461050557604036600319011261050557600435602435611a5481610700565b611a5c61333e565b611a6582612f6b565b91611a928330337f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec613c8c565b611a9c8183613d2a565b6040805184815260208101929092526001600160a01b03929092169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79190a360095490808201809211610e7c57600991909155604051908152602090f35b34610505575f366003190112610505576040515f600154611b1d8161052b565b80845290600181169081156106be5750600114611b445761065e83610652818503826105b2565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210611b8857509091508101602001610652610642565b919260018160209254838588010152019101909291611b70565b34610505575f3660031901126105055760206040517f000000000000000000000000000000000000000000000000000000e8d4a510008152f35b34610505575f3660031901126105055760206105237f0000000000000000000000000000000000000000000000000de0b6b3a76400006129a2565b34610505575f3660031901126105055760206040515f8152f35b34610505575f3660031901126105055760206040517f0000000000000000000000000000000000000000000000000de0b6b3a76400008152f35b3461050557604036600319011261050557600435611c8881610700565b60243590335f52600360205260405f20805490838203918211610e7c575560018060a01b031690815f52600360205260405f208181540190555f51602061420c5f395f51905f5260405180610e0f3394829190602083019252565b34610505575f366003190112610505576020604051670de0b6b3a76400008152f35b34610505576020366003190112610505576020610523600435612f6b565b60609060031901126105055760043590602435611d3f81610700565b9060443561060881610700565b3461050557611d5a36611d23565b91611d6361333e565b611d6c816129c0565b916001600160a01b03841633819003611e07575b908291611d9c8561065e97611d9761184697613d71565b613d83565b60408051848152602081018790526001600160a01b0384169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db91819081015b0390a47f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec613dcc565b5f81815260046020908152604080832033845290915290205460018101611e2f575b50611d80565b929190848403938411610e7c57611d9c8561065e9761184696611e6633610e5d8460018060a01b03165f52600460205260405f2090565b5597505050909192611e29565b34610505575f36600319011261050557600c546040516001600160a01b039091168152602090f35b906020600319830112610505576004356001600160401b0381116105055760040182601f82011215610505578035926001600160401b038411610505576020808301928560051b010111610505579190565b3461050557611efb36611e9b565b90611f04613483565b611f0d82612a26565b90611f1b60405192836105b2565b828252602082019260051b8101903682116105055780935b828510611f4557611f4384613867565b005b84356001600160401b038111610505578201906060823603126105055760405191611f6f83610577565b8035611f7a81610edb565b8352611f88602082016112f8565b60208401526040810135906001600160401b03821161050557019036601f8301121561050557602092611fc2849336908581359101612fa4565b6040820152815201940193611f33565b346105055761065e611846611fe636611d23565b90611ff293929361333e565b6001600160a01b03821633819003612071575b84612029612012826129a2565b968795612020871515613929565b611d9787613d71565b6040805185815260208101929092526001600160a01b0384169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db919081908101611dde565b5f818152600460209081526040808320338452909152902054856001820161209b575b5050612005565b6120a491612a8d565b6001600160a01b0384165f9081526004602052604090206120c6903390610e5d565b555f85612094565b346105055760203660031901126105055763ffffffff6004356120f081610edb565b165f52600b602052602060405f2054604051908152f35b346105055760603660031901126105055760043561212481610edb565b61212c6112e7565b604435906001600160401b0382116105055761065e9261215361148c9336906004016109f1565b929091613069565b34610505575f366003190112610505576020600854604051908152f35b61218136611e9b565b5f5b8181106121f057604051638e9e709960e01b81525f81600481335afa8015610986576121ca915f916121ce575b50604051638351eea760e01b8152918291600483016105f7565b0390fd5b6121ea91503d805f833e6121e281836105b2565b81019061320e565b826121b0565b6121fb81838561311f565b9061222b61222761220b84612a83565b60208501359063ffffffff165f52600b60205260405f20541490565b1590565b6122c35760c08201359160a0810135612248610100830183613147565b94909161225760e08501613179565b93612266610120820182613147565b959095303b15610505575f96612293926040519a8b9889978897633411683760e21b895260048901613194565b0391305af1918215610986576001926122af575b505b01612183565b80610c655f6122bd936105b2565b5f6122a7565b600191506122a9565b34610505576020366003190112610505576020610523600435613270565b91608061082b92949361232a604060c0830197805184526001600160401b0360208201511660208501520151604083019060208091805184520151910152565b019060208091805184520151910152565b6080366003190112610505576004356001600160401b038111610505576123669036906004016107bb565b60403660231901126105055760643561237e81610700565b61238661328f565b5061238f6129df565b5061239861328f565b506123a16129df565b506060820135906123ba604084013561104f8535610edb565b9180831061118d575061243290335f52600360205260405f206123de848254612a8d565b9055305f81815260036020908152604091829020805487019055905185815233915f51602061420c5f395f51905f5291a361241983856134fc565b61242286612a83565b9161242c3661399b565b92613e9e565b9061243b61125e565b928184528160208501527f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a61249b612474855193612a83565b936040519181839233978460409194939263ffffffff606083019616825260208201520152565b0390a361065e604051928392836122ea565b34610505575f6020366003190112610505576004356124cb81610700565b6124d3613483565b7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031690813b156105055760405163ca5eb5e160e01b81526001600160a01b039091166004820152905f908290602490829084905af180156109865761253e575080f35b611f4391505f906105b2565b346105055760203660031901126105055760043561256781610700565b60018060a01b03165f526003602052602061052360405f20546129a2565b61258e36610a1e565b50505092903033036125a757610b07610afb8583613af6565b63029a949d60e31b5f5260045ffd5b34610505576020366003190112610505577fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776060206004356125f681610700565b6125fe613483565b600c80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b346105055760e03660031901126105055760043561264381610700565b60243561264f81610700565b6044359060205f60643561266161175e565b9061277960a4359160c43590612679428210156132b5565b61271861274f8b8b6127268c612718612690612b31565b6001600160a01b0386165f90815260056020526040902090989080549060018201905560405195602094879586019889919260a093969594919660c08401977f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98552600180871b03166020850152600180861b03166040840152606083015260808201520152565b03601f1981018352826105b2565b5190206040519283918b83019586909160429261190160f01b8352600283015260228201520190565b51902092604051948594859094939260ff6060936080840197845216602083015260408201520152565b838052039060015afa1561098657610b9181836127eb7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92594610e5d5f516127d260018060a01b038216801515908161280a575b50613301565b6001600160a01b03165f90815260046020526040902090565b556040519384526001600160a01b039081169416929081906020820190565b6001600160a01b038d161490505f6127cc565b34610505575f36600319011261050557611f4361333e565b3461050557604036600319011261050557602061288b60043561285781610700565b6024359061286482610700565b60018060a01b03165f526004835260405f209060018060a01b03165f5260205260405f2090565b54604051908152f35b34610505576020366003190112610505576004356128b181610700565b6128b9613483565b6001600160a01b0316801561173157600a546001600160a01b03811690829082612911576001600160a01b03191617600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b50631e4fbdf760e01b5f5260045260245ffd5b34610505576060366003190112610505576020612940366109e0565b63ffffffff813561295081610edb565b165f52600b82528160405f205491013560405191148152f35b634e487b7160e01b5f52601160045260245ffd5b91908201809211610e7c57565b612992612ac9565b600954908101809111610e7c5790565b600254806129ae575090565b610608916129ba61298a565b9061339b565b600254806129cc575090565b90610608916129d961298a565b916133b0565b604051906129ec82610597565b5f6020838281520152565b90816020910312610505575161060881610700565b6040513d5f823e3d90fd5b90816020910312610505575190565b6001600160401b0381116105925760051b60200190565b60405190612a4c6020836105b2565b5f80835282815b828110612a5f57505050565b602090604051612a6e81610597565b5f815260608382015282828501015201612a53565b3561060881610edb565b91908203918211610e7c57565b60405190612aa782610577565b8164ffffffffff600654818116835260281c1660208201526040600754910152565b612ad1612a9a565b60085490428214612b2b57612ae5426134aa565b815164ffffffffff9182169116811115612b17575064ffffffffff815116918203918211610e7c576106089190612c3b565b918203918211610e7c576106089190612c3b565b50505f90565b467f000000000000000000000000000000000000000000000000000000000000000103612b7c577fdf162839f94a0952e9fc933594bf8b0f29cb54e94e4e9593e122ef43a706196b90565b604051612b8c8161148581611307565b6020815191012060405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a08152612c0460c0826105b2565b51902090565b81810292918115918404141715610e7c57565b8115612c27570490565b634e487b7160e01b5f52601260045260245ffd5b919091612c4c836040830151612c0a565b9064ffffffffff60208183511692015116900364ffffffffff8111610e7c57612c95612c8c670de0b6b3a76400009364ffffffffff612c9e941690612c1d565b94600f54612c0a565b60095490612c0a565b04808311612ca95750565b9150565b612cb561333e565b612cbe81613270565b918215612d4e57612cf18230337f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec613c8c565b612cfb8382613d2a565b60408051838152602081018590526001600160a01b03929092169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791a3600954908101809111610e7c5760095590565b60405162461bcd60e51b815260206004820152600b60248201526a5a45524f5f53484152455360a81b6044820152606490fd5b7f0000000000000000000000000000000000000000000000000000000067d220004203428111610e7c57610608907f0000000000000000000000000000000000000000000000000000000000093a8090612c1d565b60405190612de382610577565b5f6040838281528260208201520152565b9064ffffffffff8091169116019064ffffffffff8211610e7c57565b612e18612dd6565b50612e21612a9a565b612e3d612e33825164ffffffffff1690565b64ffffffffff1690565b421115610608576040516370a0823160e01b81523060048201526020816024816001600160a01b037f00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec165afa9081156109865761060891612ea9915f91612f4c575b5060095490612a8d565b7f0000000000000000000000000000000000000000000000000000000000093a8090612eea612ee58361107a81612ee0814261297d565b612c1d565b6134aa565b91612efc4264ffffffffff8516612a8d565b6028820411612f31575b506040840152612f26612f18426134aa565b64ffffffffff166020850152565b64ffffffffff168252565b91612f3f612f4592936134aa565b90612df4565b905f612f06565b612f65915060203d60201161097f5761097181836105b2565b5f612e9f565b60025480612f77575090565b61060891612f8361298a565b906133b0565b6001600160401b03811161059257601f01601f191660200190565b929192612fb082612f89565b91612fbe60405193846105b2565b829481845281830111610505578281602093845f960137010152565b909291928360021161050557831161050557600201916001190190565b805191908290602001825e015f815290565b613023939261082b92816040519687946020860190612ff7565b918237015f815203601f1981018452836105b2565b908060209392818452848401375f828201840152601f01601f1916010190565b916020610608938181520191613038565b6114796114859263ffffffff61309a9397959697165f52600d60205260405f209061ffff165f5260205260405f2090565b8051156130fd5783156130f75760028410156130ce5750506121ca604051928392639a6d49cd60e01b845260048401613058565b9092806130f191610608946130ec6130e7368484612fa4565b613963565b612fda565b91613009565b92509050565b509190610608913691612fa4565b634e487b7160e01b5f52603260045260245ffd5b91908110156131425760051b8101359061013e1981360301821215610505570190565b61310b565b903590601e198136030182121561050557018035906001600160401b0382116105055760200191813603831361050557565b3561060881610700565b6001600160401b0381160361050557565b9290936131f0926001600160401b0360406106089a98999763ffffffff81356131bc81610edb565b1688526020810135602089015201356131d481613183565b166040860152606085015260e0608085015260e0840191613038565b6001600160a01b0390941660a082015280840360c090910152613038565b602081830312610505578051906001600160401b038211610505570181601f820112156105055780519061324182612f89565b9261324f60405194856105b2565b8284526020838301011161050557815f9260208093018386015e8301015290565b6002548061327c575090565b906106089161328961298a565b9161339b565b6040519061329c82610577565b815f81525f602082015260406132b06129df565b910152565b156132bc57565b60405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606490fd5b1561330857565b60405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606490fd5b613346612ac9565b80613359575b504260085561082b6139c3565b600954818101809111610e7c577fb9d196a585c1a894f648393ec7d52cc59ff6d94191579d073ba32b0a74d7f7a691602091600955604051908152a15f61334c565b815f1904811182021583021561050557020490565b815f19048111820215830215610505570290808204910615150190565b6133fc9061107a7f000000000000000000000000000000000000000000000000000000e8d4a510008092612c1d565b9182918084106134095750565b836371c4efed60e01b5f5260045260245260445ffd5b63ffffffff16805f52600b60205260405f205490811561343d575090565b63f6ff4fb760e01b5f5260045260245ffd5b3561060881613183565b610608939260809260018060a01b0316825260208201525f604082015281606082015201906105d3565b600a546001600160a01b0316330361349757565b63118cdaa760e01b5f523360045260245ffd5b650100000000008110156105055764ffffffffff1690565b90816020910312610505575161060881610fe6565b90916134ee610608936040845260408401906105d3565b9160208184039101526105d3565b9091613561613587936135446135386020860135927f000000000000000000000000000000000000000000000000000000e8d4a5100090612c1d565b6001600160401b031690565b61355b61355460a0870187613147565b3691612fa4565b91613c17565b93909283945f14613603576002905b61215361357c82612a83565b916080810190613147565b600e5490926001600160a01b039091169083826135a357505050565b60405163043a78eb60e01b8152926020928492839182916135c791600484016134d7565b03915afa8015610986576135d85750565b6135f99060203d6020116135fc575b6135f181836105b2565b8101906134c2565b50565b503d6135e7565b600190613570565b91908260409103126105055760405161362381610597565b6020808294805184520151910152565b90604082820312610505576106089161360b565b906020909392936040835263ffffffff8151166040840152818101516060840152608061369b613685604084015160a08488015260e08701906105d3565b6060840151868203603f190160a08801526105d3565b910151151560c08401526001600160a01b03909416910152565b80518210156131425760209160051b010190565b601f82116136d657505050565b5f5260205f20906020601f840160051c8301931061370e575b601f0160051c01905b818110613703575050565b5f81556001016136f8565b90915081906136ef565b91909182516001600160401b0381116105925761373f81613739845461052b565b846136c9565b6020601f821160011461377e57819061376f9394955f92613773575b50508160011b915f199060031b1c19161790565b9055565b015190505f8061375b565b601f19821690613791845f5260205f2090565b915f5b8181106137cb575095836001959697106137b3575b505050811b019055565b01515f1960f88460031b161c191690555f80806137a9565b9192602060018192868b015181550194019201613794565b602081016020825282518091526040820191602060408360051b8301019401925f915b83831061381557505050505090565b9091929394602080613858600193603f19868203018752606060408b5163ffffffff815116845261ffff86820151168685015201519181604082015201906105d3565b97019301930191939290613806565b5f5b81518110156138f2578061388c6040613884600194866136b5565b510151613963565b6138ec604061389b83866136b5565b51015163ffffffff6138ad84876136b5565b5151165f52600d6020526138e760405f206138d760206138cd878a6136b5565b51015161ffff1690565b61ffff165f5260205260405f2090565b613718565b01613869565b506139247fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b67491604051918291826137e3565b0390a1565b1561393057565b60405162461bcd60e51b815260206004820152600b60248201526a5a45524f5f41535345545360a81b6044820152606490fd5b600361ffff600283015116036139765750565b604051639a6d49cd60e01b8152602060048201529081906121ca9060248301906105d3565b604090602319011261050557604051906139b482610597565b60243582526044356020830152565b60065464ffffffffff1642111561082b576139dc613f8e565b6139e4612e10565b6139ed426134aa565b64ffffffffff613a05602084015164ffffffffff1690565b9164ffffffffff8316911681149081613ad1575b50613a22575050565b81613a947f25fad6026c7eaed7508799768642cd3708b71f85d3a322da4b6051df097f8ffe9360409064ffffffffff815116600654908064ffffffffff1983161760065569ffffffffff0000000000602084015160281b169169ffffffffffffffffffff191617176006550151600755565b6139246040613aa8835164ffffffffff1690565b9201516040519384938464ffffffffff6040929594938160608401971683521660208201520152565b905064ffffffffff613aed60065464ffffffffff9060281c1690565b1614155f613a19565b90602011610505573590565b90602811610505576020013560c01c90565b610608906001600160401b037f000000000000000000000000000000000000000000000000000000e8d4a510009116612c0a565b6001600160a01b03811615613bac575b305f52600360205260405f20805490838203918211610e7c57556001600160a01b03165f81815260036020908152604091829020805485019055905183815230915f51602061420c5f395f51905f5291a390565b5061dead613b58565b9080602811610505576106089136916027190190602801612fa4565b909261271890610608936040519586946001600160401b0360c01b9060c01b16602086015263ffffffff60e01b9060e01b166028850152602c840152604c830190612ff7565b82511580159390613c5d5790612718613c5a9260405194859360208501526001600160401b0360c01b9060c01b1660408401523360488401526068830190612ff7565b91565b50906040519160208301526001600160401b0360c01b9060c01b16604082015260288152613c5a6048826105b2565b6040516323b872dd60e01b81526001600160a01b03928316600482015292909116602483015260448201929092526020905f9060649082855af19081601f3d1160015f5114161516613d1d575b5015613ce157565b60405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606490fd5b3b153d171590505f613cd9565b60025490828201809211610e7c5760205f51602061420c5f395f51905f52915f9360025560018060a01b0316938484526003825260408420818154019055604051908152a3565b600954908103908111610e7c57600955565b6001600160a01b03165f818152600360205260409020805483810391908211610e7c575f935f51602061420c5f395f51905f5292602092558060025403600255604051908152a3565b60405163a9059cbb60e01b81526001600160a01b03909216600483015260248201929092526020905f9060449082855af19081601f3d1160015f5114161516613e4f575b5015613e1857565b60405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606490fd5b3b153d171590505f613e10565b9060808282031261050557613e96906040805193613e7985610577565b805185526020810151613e8b81613183565b60208601520161360b565b604082015290565b613efb60809492613f179694613eb261328f565b506020613ebf86516140e5565b950191825180613f7f575b50613ed48561341f565b9251151592613ee46110c261126d565b602086015260408501526060840152151585830152565b6040518095819482936302637a4560e41b845260048401613647565b03917f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03165af1908115610986575f91613f56575090565b610608915060803d608011613f78575b613f7081836105b2565b810190613e5c565b503d613f66565b613f8890614102565b5f613eca565b604051630abca72960e41b81526020816004817f00000000000000000000000010101010e0c3171d894b71b3400668af311e7d946001600160a01b03165afa908115610986575f916140c6575b506040516379bd9e4160e01b81526001600160a01b039190911690602081600481855afa908115610986575f916140a7575b50614016612d81565b1161401e5750565b60206004916040519283809263570ca73560e01b82525afa908115610986575f91614088575b506001600160a01b0316803b15610505575f809160046040518094819363e4fc6b6d60e01b83525af180156109865761407a5750565b80610c655f61082b936105b2565b6140a1915060203d6020116109b1576109a381836105b2565b5f614044565b6140c0915060203d60201161097f5761097181836105b2565b5f61400d565b6140df915060203d6020116109b1576109a381836105b2565b5f613fdb565b8034036140ef5790565b6304fb820960e51b5f523460045260245ffd5b60405163393f876560e21b81527f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031690602081600481855afa908115610986575f916141ec575b506001600160a01b03169182156141dd57604051916323b872dd60e01b5f523360045260245260445260205f60648180865af160015f51148116156141be575b6040919091525f606052156141a35750565b635274afe760e01b5f526001600160a01b031660045260245ffd5b60018115166141d4573d15833b15151616614191565b503d5f823e3d90fd5b6329b99a9560e11b5f5260045ffd5b614205915060203d6020116109b1576109a381836105b2565b5f61415156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa164736f6c634300081c000a","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":200},"remappings":[":@axelar-network/=node_modules/@axelar-network/",":@chainlink/=node_modules/@chainlink/",":@eth-optimism/=node_modules/@eth-optimism/",":@layerzerolabs/=node_modules/@layerzerolabs/",":@mean-finance/=node_modules/@mean-finance/",":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",":@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",":@openzeppelin/foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",":@rari-capital/=node_modules/@rari-capital/",":@uniswap/=node_modules/@uniswap/",":base64-sol/=node_modules/base64-sol/",":ds-test/=node_modules/ds-test/src/",":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":frax-standard-solidity/=node_modules/frax-standard-solidity/",":frax-std/=node_modules/frax-standard-solidity/src/",":halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",":hardhat-deploy/=node_modules/hardhat-deploy/",":hardhat/=node_modules/hardhat/",":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",":openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/",":openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",":solidity-bytes-utils/=node_modules/solidity-bytes-utils/",":solidity-stringutils/=lib/surl/lib/solidity-stringutils/",":surl/=lib/surl/"],"viaIR":true},"optimization_runs":200,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/partial_match/1/0x557AB1e003951A73c12D16F0fEA8490E39C33C35/","decoded_constructor_args":[["0xc07e000044F95655c11fda4cD37F70A94d7e0a7d",{"internalType":"address","name":"_core","type":"address"}],["0x10101010E0C3171D894B71B3400668aF311e7D94",{"internalType":"address","name":"_registry","type":"address"}],["0x1a44076050125825900e736c501f859c50fE728c",{"internalType":"address","name":"_lzEndpoint","type":"address"}],["0x57aB1E0003F623289CD798B1824Be09a793e4Bec",{"internalType":"address","name":"_underlying","type":"address"}],["Savings reUSD",{"internalType":"string","name":"_name","type":"string"}],["sreUSD",{"internalType":"string","name":"_symbol","type":"string"}],["0",{"internalType":"uint256","name":"_maxDistributionPerSecondPerAsset","type":"uint256"}]],"compiler_version":"0.8.28+commit.7893614a","is_verified_via_verifier_alliance":false,"verified_at":"2025-08-24T14:56:42.314207Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x6101e0806040523461056c575f9061515a803803809161001f82856108ea565b833981019060e08183031261056c576100378161090d565b916100446020830161090d565b6100506040840161090d565b9061005d6060850161090d565b60808501519095906001600160401b03811161056c578461007f918701610921565b60a08601519094906001600160401b03811161056c5760c0916100a3918801610921565b95015160405163313ce56760e01b8152909690956001600160a01b039091169490602087600481895afa968715610561575f976108ae575b5060405163313ce56760e01b8152916020836004818a5afa928315610561575f9361088d575b508051906001600160401b0382116107b157819061011f5f546109b4565b601f8111610833575b50602090601f83116001146107d0575f926107c5575b50508160011b915f199060031b1c1916175f555b8051906001600160401b0382116107b15781906101706001546109b4565b601f8111610743575b50602090601f83116001146106dd575f926106d2575b50508160011b915f199060031b1c1916176001555b6080524660a0526040515f905f5491816101bd846109b4565b9182825260208201946001811690815f146106b6575060011461066c575b6101e7925003826108ea565b51902060405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815261025b60c0826108ea565b51902060c05260e08490526040516378e9792560e01b81526001600160a01b03919091169390602081600481885afa908115610561575f9161063a575b5061010052604051630afaeebf60e31b8152602081600481885afa908115610561575f91610605575b5090600492602092610120526101405262093a80610160526040519283809263313ce56760e01b82525afa801561056157610303915f916105d6575b5061098f565b6101805261030f6109ec565b610317610e36565b80610596575b5042600855811561058357600a546001600160a01b0381169081610570576001600160a01b0319168317600a5582907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a36001600160a01b03166101a081905290813b1561056c575f9160248392604051948593849263ca5eb5e160e01b845260048401525af180156105615761054b575b5060ff166006811061053c576005190160ff811161052857916040916103f77f05d530f0fd6974b7d995fd3b71870f5301bb9fe086180bdd0bd36526728f5c6b9461098f565b6101c052600180841b03811161051c575b80600f5582519182526020820152a16040516142389081610f02823960805181610eb7015260a05181612b34015260c05181612b5a015260e051818181610fb7015281816117b901528181611a6e01528181611de301528181612ccd0152612e670152610100518181816118870152612d830152610120518181816114f10152612db10152610140518181816118bf0152613fa30152610160518181816114b70152612eab015261018051818181611bf30152611c4801526101a051818181610a9e01528181610bc4015281816111040152818161156f015281816124d501528181613f1b015261411101526101c05181818161105401528181611bb9015281816133d6015281816135130152613b220152f35b50600180831b03610408565b634e487b7160e01b83526011600452602483fd5b6301e9714b60e41b8352600483fd5b6105589193505f906108ea565b5f9160ff6103b1565b6040513d5f823e3d90fd5b5f80fd5b83631e4fbdf760e01b5f5260045260245ffd5b631e4fbdf760e01b5f525f60045260245ffd5b6020816105c67fb9d196a585c1a894f648393ec7d52cc59ff6d94191579d073ba32b0a74d7f7a693600954610c50565b600955604051908152a15f61031d565b6105f8915060203d6020116105fe575b6105f081836108ea565b810190610976565b5f6102fd565b503d6105e6565b9190506020823d602011610632575b81610621602093836108ea565b8101031261056c57905160046102c1565b3d9150610614565b90506020813d602011610664575b81610655602093836108ea565b8101031261056c57515f610298565b3d9150610648565b505f80805290915f51602061513a5f395f51905f525b81831061069a5750509060206101e7928201016101db565b6020919350806001915483858801015201910190918392610682565b60ff19168652506101e792151560051b820160200190506101db565b015190505f8061018f565b60015f9081528281209350601f198516905b81811061072b5750908460019594939210610713575b505050811b016001556101a4565b01515f1960f88460031b161c191690555f8080610705565b929360206001819287860151815501950193016106ef565b60015f529091507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f840160051c810191602085106107a7575b90601f859493920160051c01905b8181106107995750610179565b5f815584935060010161078c565b909150819061077e565b634e487b7160e01b5f52604160045260245ffd5b015190505f8061013e565b5f8080528281209350601f198516905b81811061081b5750908460019594939210610803575b505050811b015f55610152565b01515f1960f88460031b161c191690555f80806107f6565b929360206001819287860151815501950193016107e0565b5f80529091505f51602061513a5f395f51905f52601f840160051c81019160208510610883575b90601f859493920160051c01905b8181106108755750610128565b5f8155849350600101610868565b909150819061085a565b6108a791935060203d6020116105fe576105f081836108ea565b915f610101565b6108c891975060203d6020116105fe576105f081836108ea565b955f6100db565b606081019081106001600160401b038211176107b157604052565b601f909101601f19168101906001600160401b038211908210176107b157604052565b51906001600160a01b038216820361056c57565b81601f8201121561056c578051906001600160401b0382116107b15760405192610955601f8401601f1916602001856108ea565b8284526020838301011161056c57815f9260208093018386015e8301015290565b9081602091031261056c575160ff8116810361056c5790565b60ff16604d81116109a057600a0a90565b634e487b7160e01b5f52601160045260245ffd5b90600182811c921680156109e2575b60208310146109ce57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916109c3565b64ffffffffff60065416421115610c4e5761014051604051630abca72960e41b815290602090829060049082906001600160a01b03165afa908115610561575f91610c14575b506040516379bd9e4160e01b81526001600160a01b039190911690602081600481855afa908115610561575f91610be2575b50610a7f610a756101005142610c8c565b6101205190610c99565b11610b3e575b5064ffffffffff610a94610cca565b610a9d42610e1e565b602082015190838216938491161480610b28575b610aba57505050565b7f25fad6026c7eaed7508799768642cd3708b71f85d3a322da4b6051df097f8ffe9260408364ffffffffff6060955116938469ffffffffff00000000006006549260281b169160018060501b03191617176006550151908160075560405192835260208301526040820152a1565b508264ffffffffff60065460281c161415610ab1565b60206004916040519283809263570ca73560e01b82525afa908115610561575f91610ba8575b506001600160a01b0316803b1561056c575f809160046040518094819363e4fc6b6d60e01b83525af180156105615715610a85575f610ba2916108ea565b5f610a85565b90506020813d602011610bda575b81610bc3602093836108ea565b8101031261056c57610bd49061090d565b5f610b64565b3d9150610bb6565b90506020813d602011610c0c575b81610bfd602093836108ea565b8101031261056c57515f610a64565b3d9150610bf0565b90506020813d602011610c46575b81610c2f602093836108ea565b8101031261056c57610c409061090d565b5f610a32565b3d9150610c22565b565b919082018092116109a057565b60405190610c6a826108cf565b8164ffffffffff600654818116835260281c1660208201526040600754910152565b919082039182116109a057565b8115610ca3570490565b634e487b7160e01b5f52601260045260245ffd5b818102929181159184041417156109a057565b604051610cd6816108cf565b5f81525f60208201525f604082015250610cee610c5d565b64ffffffffff815116421115610e1b5760e0516040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa8015610561575f90610de7575b610d45915060095490610c8c565b610d74610d6f610d65610d5b6101605142610c50565b6101605190610c99565b6101605190610cb7565b610e1e565b64ffffffffff8116610d864282610c8c565b61016051906028820411610db9575b505064ffffffffff91604084015281610dad42610e1e565b16602084015216815290565b64ffffffffff919250610dcb90610e1e565b16019064ffffffffff82116109a0579064ffffffffff5f610d95565b506020813d602011610e13575b81610e01602093836108ea565b8101031261056c57610d459051610d37565b3d9150610df4565b90565b6501000000000081101561056c5764ffffffffff1690565b610e3e610c5d565b600854428114610efb57610e5142610e1e565b825164ffffffffff918216929116821115610eec57610e79915064ffffffffff835116610c8c565b905b610e89826040830151610cb7565b9064ffffffffff60208183511692015116900364ffffffffff81116109a057610ed2610ec9670de0b6b3a76400009364ffffffffff610edb941690610c99565b93600f54610cb7565b60095490610cb7565b04808211610ee7575090565b905090565b610ef591610c8c565b90610e7b565b50505f9056fe60806040526004361015610011575f80fd5b5f3560e01c806301e1d114146104f657806306fdde03146104f157806307a2d13a1461048d578063095ea7b3146104ec5780630a28a477146104e75780630d35b415146104e2578063111ecdad146104dd57806313137d65146104d8578063134d4f25146104d3578063156a0d0f146104ce57806317442b70146104c957806318160ddd146104c45780631f5e1334146104bf57806323b872dd146104ba5780632af98d6d146104b5578063313ce567146104b05780633400288b146104ab578063358245fc146104a65780633644e515146104a157806338d52e0f1461049c5780633b6f743b14610497578063402d267d146103cf57806348f76e0f146104925780634cdad5061461048d57806352ae28791461038e578063536b7a43146104885780635535d4611461048357806356caf6051461047e57806357d775f8146104795780635a0dfe4d146104745780635e280f111461046f5780635ebae5661461046a57806361c1c5e9146104655780636e553f65146104605780636fc1b31e1461045b57806370a08231146103a7578063715018a614610456578063757991a81461045157806375e077c31461044c57806378e97925146104475780637b103999146104425780637d25a05e1461043d5780637ecebe001461043857806382413eac14610433578063857749b01461042e5780638da5cb5b146103985780638f765d591461042957806394bf804d1461042457806395d89b411461041f578063963efcaa1461041a57806399530b06146104155780639f68b96414610410578063a80e75471461040b578063a9059cbb14610406578063aaf5eb6814610401578063b3d7f6b9146103fc578063b460af94146103f7578063b731ea0a146103f2578063b98bd070146103ed578063ba087652146103e8578063bb0b6a53146103e3578063bc70b354146103de578063bd6f3603146103d9578063bd815db0146103d4578063c63d75b6146103cf578063c6e6f5921461039d578063c7c7f5b3146103ca578063ca5eb5e1146103c5578063ce96cb77146103c0578063d045a0dc146103bb578063d4243885146103b6578063d505accf146103b1578063d71356e6146103ac578063d905777e146103a7578063dd62ed3e146103a2578063ef8b30f71461039d578063f2f4eb2614610398578063f2fde38b14610393578063fc0c546a1461038e5763ff7bd03d14610389575f80fd5b612924565b611244565b612894565b6119c8565b6122cc565b612835565b611690565b61281d565b612626565b6125b6565b612585565b61254a565b6124ad565b61233b565b6111a3565b612178565b61215b565b612107565b6120ce565b611fd2565b611eed565b611e73565b611d4c565b611d05565b611ce3565b611c6b565b611c31565b611c17565b611bdc565b611ba2565b611afd565b611a34565b6119f0565b6119ad565b61194f565b611914565b6118ee565b6118aa565b611870565b61176e565b611744565b6116cb565b611620565b6115f6565b6115d9565b61159e565b61155a565b611514565b6114da565b6114a0565b611425565b61127c565b6106e2565b6111ca565b610ff0565b610fa2565b610f88565b610f6e565b610ee9565b610e9e565b610e81565b610d43565b610d28565b610d0b565b610cea565b610cc4565b610ca9565b610a8b565b6109b8565b610869565b61079d565b610711565b61060b565b610509565b5f91031261050557565b5f80fd5b34610505575f36600319011261050557602061052361298a565b604051908152f35b90600182811c92168015610559575b602083101461054557565b634e487b7160e01b5f52602260045260245ffd5b91607f169161053a565b634e487b7160e01b5f52604160045260245ffd5b606081019081106001600160401b0382111761059257604052565b610563565b604081019081106001600160401b0382111761059257604052565b90601f801991011681019081106001600160401b0382111761059257604052565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b9060206106089281815201906105d3565b90565b34610505575f366003190112610505576040515f5f5461062a8161052b565b80845290600181169081156106be5750600114610662575b61065e83610652818503826105b2565b604051918291826105f7565b0390f35b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b8082106106a457509091508101602001610652610642565b91926001816020925483858801015201910190929161068c565b60ff191660208086019190915291151560051b840190910191506106529050610642565b346105055760203660031901126105055760206105236004356129a2565b6001600160a01b0381160361050557565b346105055760403660031901126105055760043561072e81610700565b60243590335f526004602052816107588260405f209060018060a01b03165f5260205260405f2090565b556040519182526001600160a01b03169033907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590602090a360405160018152602090f35b346105055760203660031901126105055760206105236004356129c0565b908160e09103126105055790565b939291906107e58560a081019260208091805184520151910152565b60a06040860152815180915260c0850190602060c08260051b8801019301915f905b82821061082d575050505090606061082b9294019060208091805184520151910152565b565b9091929360208061085b60019360bf198c82030186526040838a5180518452015191818582015201906105d3565b960192019201909291610807565b34610505576020366003190112610505576004356001600160401b038111610505576108999036906004016107bb565b6108a16129df565b506108aa6129df565b50604051637e062a3560e11b8152602081600481305afa908115610986576004916020915f9161098b575b506040516318160ddd60e01b815292839182906001600160a01b03165afa908115610986575f91610957575b5061090a61125e565b905f8252602082015261065e61093b610921612a3d565b936040810135610935606083013592612a83565b506133cd565b61094361125e565b9182526020820152604051938493846107c9565b610979915060203d60201161097f575b61097181836105b2565b810190612a17565b5f610901565b503d610967565b612a0c565b6109ab9150823d84116109b1575b6109a381836105b2565b8101906129f7565b5f6108d5565b503d610999565b34610505575f36600319011261050557600e546040516001600160a01b039091168152602090f35b606090600319011261050557600490565b9181601f84011215610505578235916001600160401b038311610505576020838186019501011161050557565b90600319820160e081126105055760601361050557600491606435916084356001600160401b0381116105055782610a58916004016109f1565b9290929160a435610a6881610700565b9160c435906001600160401b03821161050557610a87916004016109f1565b9091565b610a9436610a1e565b50919492915050337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031603610c96578135610ad681610edb565b610adf8161341f565b906020840135809203610c71575050610b07610afb8583613af6565b6001600160a01b031690565b93610b2d610b1d610b188385613b02565b613b14565b610b2685612a83565b5086613b48565b91610b388260281090565b610b96575b5050610b697fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c92612a83565b6040805163ffffffff909216825260208201929092526001600160a01b039094169390819081015b0390a3005b9082610bc192610bbb610bab6040880161344f565b93610bb588612a83565b92613bb5565b92613bd1565b917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b1561050557604051633e5ac80960e11b8152935f918591829084908290610c1a908b8d60048501613459565b03925af1908115610986577fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c93610b6992610c57575b5092610b3d565b80610c655f610c6b936105b2565b806104fb565b5f610c50565b80610c8063ffffffff92610edb565b63309afaf360e21b5f521660045260245260445ffd5b6391ac5e4f60e01b5f523360045260245ffd5b34610505575f36600319011261050557602060405160028152f35b34610505575f366003190112610505576040805162b9270b60e21b815260016020820152f35b34610505575f36600319011261050557604080516001815260026020820152f35b34610505575f366003190112610505576020600254604051908152f35b34610505575f36600319011261050557602060405160018152f35b3461050557606036600319011261050557600435610d6081610700565b60243590610d6d82610700565b6001600160a01b0381165f8181526004602090815260408083203384529091529020546044359391929060018101610e1e575b506001600160a01b03165f9081526003602052604090205f51602061420c5f395f51905f5291610e0f915b610dd6868254612a8d565b90556001600160a01b0381165f9081526003602052604090208054860190556040519485526001600160a01b0316939081906020820190565b0390a360405160018152602090f35b91848303928311610e7c57610dcb610e0f925f51602061420c5f395f51905f5294610e7233610e5d8460018060a01b03165f52600460205260405f2090565b9060018060a01b03165f5260205260405f2090565b5592505091610da0565b612969565b34610505575f366003190112610505576020600f54604051908152f35b34610505575f36600319011261050557602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b63ffffffff81160361050557565b34610505576040366003190112610505577f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b600435610f2781610edb565b60243590610f33613483565b63ffffffff81165f52600b6020528160405f2055610f69604051928392836020909392919363ffffffff60408201951681520152565b0390a1005b34610505575f366003190112610505576020610523612ac9565b34610505575f366003190112610505576020610523612b31565b34610505575f366003190112610505576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b8015150361050557565b34610505576040366003190112610505576004356001600160401b038111610505576110209036906004016107bb565b60243561102c81610fe6565b6110346129df565b5081359160608101359061107f604082013561104f86610edb565b61107a7f00000000000000000000000000000000000000000000000000000000000000008092612c1d565b612c0a565b9180831061118d576111006040866110e58761109b88886134fc565b906110a585610edb565b6110ad6129df565b506110b78561341f565b6110ce6110c261126d565b63ffffffff9097168752565b602086015285850152606084015215156080830152565b815180938192631bb8518b60e31b8352309060048401613647565b03817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156109865761065e915f9161115e575b5060405191829182815181526020918201519181019190915260400190565b611180915060403d604011611186575b61117881836105b2565b810190613633565b8261113f565b503d61116e565b826371c4efed60e01b5f5260045260245260445ffd5b34610505576020366003190112610505576111bf600435610700565b60206040515f198152f35b34610505576020366003190112610505576004356111e6613483565b6001600160401b03816111f761333e565b11611236575b600f5460408051918252602082018390527f05d530f0fd6974b7d995fd3b71870f5301bb9fe086180bdd0bd36526728f5c6b91a1600f55005b506001600160401b036111fd565b34610505575f366003190112610505576020604051308152f35b6040519061082b6040836105b2565b6040519061082b60a0836105b2565b346105055736600319016080811261050557606013610505576040516112a181610577565b60043564ffffffffff8116810361050557815260243564ffffffffff811681036105055781610523916020809401526112d960443590565b604082015260643590612c3b565b6024359061ffff8216820361050557565b359061ffff8216820361050557565b905f915f54906113168261052b565b80825291600181169081156113885750600114611331575050565b5f8080529293509091907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83831061136e575060209250010190565b60018160209294939454838587010152019101919061135d565b9050602093945060ff929192191683830152151560051b010190565b5f92918154916113b38361052b565b808352926001811690811561140857506001146113cf57505050565b5f9081526020812093945091925b8383106113ee575060209250010190565b6001816020929493945483858701015201910191906113dd565b915050602093945060ff929192191683830152151560051b010190565b346105055760403660031901126105055761065e61148561148c61147960043561144e81610edb565b63ffffffff61145b6112e7565b91165f52600d60205260405f209061ffff165f5260205260405f2090565b604051928380926113a4565b03826105b2565b6040519182916020835260208301906105d3565b34610505575f3660031901126105055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610505575f3660031901126105055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461050557604036600319011261050557602061155060043561153681610edb565b6024359063ffffffff165f52600b60205260405f20541490565b6040519015158152f35b34610505575f366003190112610505576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610505575f366003190112610505576006546007546040805164ffffffffff808516825260289490941c9093166020840152820152606090f35b34610505575f366003190112610505576020600954604051908152f35b3461050557604036600319011261050557602061052360243560043561161b82610700565b612cad565b34610505576020366003190112610505577ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197602060043561166081610700565b611668613483565b600e80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b34610505576020366003190112610505576004356116ad81610700565b60018060a01b03165f526003602052602060405f2054604051908152f35b34610505575f366003190112610505576116e3613483565b600a546001600160a01b03811680611731575f916bffffffffffffffffffffffff60a01b16600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b631e4fbdf760e01b5f525f60045260245ffd5b34610505575f366003190112610505576020610523612d81565b6084359060ff8216820361050557565b346105055760e03660031901126105055760243560043561178e82610700565b6044359160643561179e81610fe6565b6117a661175e565b9360a4359160c435901561186a575f195b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693843b15610505575f9460e493869260ff6040519b8c98899763d505accf60e01b89523360048a01523060248a01526044890152606488015216608486015260a485015260c48401525af19182156109865761065e9361184693611856575b50612cad565b6040519081529081906020820190565b80610c655f611864936105b2565b5f611840565b846117b7565b34610505575f3660031901126105055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610505575f366003190112610505576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346105055760403660031901126105055761190a600435610edb565b60206040515f8152f35b346105055760203660031901126105055760043561193181610700565b60018060a01b03165f526005602052602060405f2054604051908152f35b346105055760a036600319011261050557611969366109e0565b506064356001600160401b038111610505576119899036906004016109f1565b5050602060843561199981610700565b6040516001600160a01b0390911630148152f35b34610505575f36600319011261050557602060405160068152f35b34610505575f36600319011261050557600a546040516001600160a01b039091168152602090f35b34610505575f366003190112610505576060611a0a612e10565b604080519164ffffffffff815116835264ffffffffff602082015116602084015201516040820152f35b3461050557604036600319011261050557600435602435611a5481610700565b611a5c61333e565b611a6582612f6b565b91611a928330337f0000000000000000000000000000000000000000000000000000000000000000613c8c565b611a9c8183613d2a565b6040805184815260208101929092526001600160a01b03929092169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79190a360095490808201809211610e7c57600991909155604051908152602090f35b34610505575f366003190112610505576040515f600154611b1d8161052b565b80845290600181169081156106be5750600114611b445761065e83610652818503826105b2565b60015f9081527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6939250905b808210611b8857509091508101602001610652610642565b919260018160209254838588010152019101909291611b70565b34610505575f3660031901126105055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b34610505575f3660031901126105055760206105237f00000000000000000000000000000000000000000000000000000000000000006129a2565b34610505575f3660031901126105055760206040515f8152f35b34610505575f3660031901126105055760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461050557604036600319011261050557600435611c8881610700565b60243590335f52600360205260405f20805490838203918211610e7c575560018060a01b031690815f52600360205260405f208181540190555f51602061420c5f395f51905f5260405180610e0f3394829190602083019252565b34610505575f366003190112610505576020604051670de0b6b3a76400008152f35b34610505576020366003190112610505576020610523600435612f6b565b60609060031901126105055760043590602435611d3f81610700565b9060443561060881610700565b3461050557611d5a36611d23565b91611d6361333e565b611d6c816129c0565b916001600160a01b03841633819003611e07575b908291611d9c8561065e97611d9761184697613d71565b613d83565b60408051848152602081018790526001600160a01b0384169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db91819081015b0390a47f0000000000000000000000000000000000000000000000000000000000000000613dcc565b5f81815260046020908152604080832033845290915290205460018101611e2f575b50611d80565b929190848403938411610e7c57611d9c8561065e9761184696611e6633610e5d8460018060a01b03165f52600460205260405f2090565b5597505050909192611e29565b34610505575f36600319011261050557600c546040516001600160a01b039091168152602090f35b906020600319830112610505576004356001600160401b0381116105055760040182601f82011215610505578035926001600160401b038411610505576020808301928560051b010111610505579190565b3461050557611efb36611e9b565b90611f04613483565b611f0d82612a26565b90611f1b60405192836105b2565b828252602082019260051b8101903682116105055780935b828510611f4557611f4384613867565b005b84356001600160401b038111610505578201906060823603126105055760405191611f6f83610577565b8035611f7a81610edb565b8352611f88602082016112f8565b60208401526040810135906001600160401b03821161050557019036601f8301121561050557602092611fc2849336908581359101612fa4565b6040820152815201940193611f33565b346105055761065e611846611fe636611d23565b90611ff293929361333e565b6001600160a01b03821633819003612071575b84612029612012826129a2565b968795612020871515613929565b611d9787613d71565b6040805185815260208101929092526001600160a01b0384169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db919081908101611dde565b5f818152600460209081526040808320338452909152902054856001820161209b575b5050612005565b6120a491612a8d565b6001600160a01b0384165f9081526004602052604090206120c6903390610e5d565b555f85612094565b346105055760203660031901126105055763ffffffff6004356120f081610edb565b165f52600b602052602060405f2054604051908152f35b346105055760603660031901126105055760043561212481610edb565b61212c6112e7565b604435906001600160401b0382116105055761065e9261215361148c9336906004016109f1565b929091613069565b34610505575f366003190112610505576020600854604051908152f35b61218136611e9b565b5f5b8181106121f057604051638e9e709960e01b81525f81600481335afa8015610986576121ca915f916121ce575b50604051638351eea760e01b8152918291600483016105f7565b0390fd5b6121ea91503d805f833e6121e281836105b2565b81019061320e565b826121b0565b6121fb81838561311f565b9061222b61222761220b84612a83565b60208501359063ffffffff165f52600b60205260405f20541490565b1590565b6122c35760c08201359160a0810135612248610100830183613147565b94909161225760e08501613179565b93612266610120820182613147565b959095303b15610505575f96612293926040519a8b9889978897633411683760e21b895260048901613194565b0391305af1918215610986576001926122af575b505b01612183565b80610c655f6122bd936105b2565b5f6122a7565b600191506122a9565b34610505576020366003190112610505576020610523600435613270565b91608061082b92949361232a604060c0830197805184526001600160401b0360208201511660208501520151604083019060208091805184520151910152565b019060208091805184520151910152565b6080366003190112610505576004356001600160401b038111610505576123669036906004016107bb565b60403660231901126105055760643561237e81610700565b61238661328f565b5061238f6129df565b5061239861328f565b506123a16129df565b506060820135906123ba604084013561104f8535610edb565b9180831061118d575061243290335f52600360205260405f206123de848254612a8d565b9055305f81815260036020908152604091829020805487019055905185815233915f51602061420c5f395f51905f5291a361241983856134fc565b61242286612a83565b9161242c3661399b565b92613e9e565b9061243b61125e565b928184528160208501527f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a61249b612474855193612a83565b936040519181839233978460409194939263ffffffff606083019616825260208201520152565b0390a361065e604051928392836122ea565b34610505575f6020366003190112610505576004356124cb81610700565b6124d3613483565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b156105055760405163ca5eb5e160e01b81526001600160a01b039091166004820152905f908290602490829084905af180156109865761253e575080f35b611f4391505f906105b2565b346105055760203660031901126105055760043561256781610700565b60018060a01b03165f526003602052602061052360405f20546129a2565b61258e36610a1e565b50505092903033036125a757610b07610afb8583613af6565b63029a949d60e31b5f5260045ffd5b34610505576020366003190112610505577fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776060206004356125f681610700565b6125fe613483565b600c80546001600160a01b0319166001600160a01b03929092169182179055604051908152a1005b346105055760e03660031901126105055760043561264381610700565b60243561264f81610700565b6044359060205f60643561266161175e565b9061277960a4359160c43590612679428210156132b5565b61271861274f8b8b6127268c612718612690612b31565b6001600160a01b0386165f90815260056020526040902090989080549060018201905560405195602094879586019889919260a093969594919660c08401977f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98552600180871b03166020850152600180861b03166040840152606083015260808201520152565b03601f1981018352826105b2565b5190206040519283918b83019586909160429261190160f01b8352600283015260228201520190565b51902092604051948594859094939260ff6060936080840197845216602083015260408201520152565b838052039060015afa1561098657610b9181836127eb7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92594610e5d5f516127d260018060a01b038216801515908161280a575b50613301565b6001600160a01b03165f90815260046020526040902090565b556040519384526001600160a01b039081169416929081906020820190565b6001600160a01b038d161490505f6127cc565b34610505575f36600319011261050557611f4361333e565b3461050557604036600319011261050557602061288b60043561285781610700565b6024359061286482610700565b60018060a01b03165f526004835260405f209060018060a01b03165f5260205260405f2090565b54604051908152f35b34610505576020366003190112610505576004356128b181610700565b6128b9613483565b6001600160a01b0316801561173157600a546001600160a01b03811690829082612911576001600160a01b03191617600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b50631e4fbdf760e01b5f5260045260245ffd5b34610505576060366003190112610505576020612940366109e0565b63ffffffff813561295081610edb565b165f52600b82528160405f205491013560405191148152f35b634e487b7160e01b5f52601160045260245ffd5b91908201809211610e7c57565b612992612ac9565b600954908101809111610e7c5790565b600254806129ae575090565b610608916129ba61298a565b9061339b565b600254806129cc575090565b90610608916129d961298a565b916133b0565b604051906129ec82610597565b5f6020838281520152565b90816020910312610505575161060881610700565b6040513d5f823e3d90fd5b90816020910312610505575190565b6001600160401b0381116105925760051b60200190565b60405190612a4c6020836105b2565b5f80835282815b828110612a5f57505050565b602090604051612a6e81610597565b5f815260608382015282828501015201612a53565b3561060881610edb565b91908203918211610e7c57565b60405190612aa782610577565b8164ffffffffff600654818116835260281c1660208201526040600754910152565b612ad1612a9a565b60085490428214612b2b57612ae5426134aa565b815164ffffffffff9182169116811115612b17575064ffffffffff815116918203918211610e7c576106089190612c3b565b918203918211610e7c576106089190612c3b565b50505f90565b467f000000000000000000000000000000000000000000000000000000000000000003612b7c577f000000000000000000000000000000000000000000000000000000000000000090565b604051612b8c8161148581611307565b6020815191012060405160208101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f835260408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a08152612c0460c0826105b2565b51902090565b81810292918115918404141715610e7c57565b8115612c27570490565b634e487b7160e01b5f52601260045260245ffd5b919091612c4c836040830151612c0a565b9064ffffffffff60208183511692015116900364ffffffffff8111610e7c57612c95612c8c670de0b6b3a76400009364ffffffffff612c9e941690612c1d565b94600f54612c0a565b60095490612c0a565b04808311612ca95750565b9150565b612cb561333e565b612cbe81613270565b918215612d4e57612cf18230337f0000000000000000000000000000000000000000000000000000000000000000613c8c565b612cfb8382613d2a565b60408051838152602081018590526001600160a01b03929092169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791a3600954908101809111610e7c5760095590565b60405162461bcd60e51b815260206004820152600b60248201526a5a45524f5f53484152455360a81b6044820152606490fd5b7f00000000000000000000000000000000000000000000000000000000000000004203428111610e7c57610608907f000000000000000000000000000000000000000000000000000000000000000090612c1d565b60405190612de382610577565b5f6040838281528260208201520152565b9064ffffffffff8091169116019064ffffffffff8211610e7c57565b612e18612dd6565b50612e21612a9a565b612e3d612e33825164ffffffffff1690565b64ffffffffff1690565b421115610608576040516370a0823160e01b81523060048201526020816024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9081156109865761060891612ea9915f91612f4c575b5060095490612a8d565b7f000000000000000000000000000000000000000000000000000000000000000090612eea612ee58361107a81612ee0814261297d565b612c1d565b6134aa565b91612efc4264ffffffffff8516612a8d565b6028820411612f31575b506040840152612f26612f18426134aa565b64ffffffffff166020850152565b64ffffffffff168252565b91612f3f612f4592936134aa565b90612df4565b905f612f06565b612f65915060203d60201161097f5761097181836105b2565b5f612e9f565b60025480612f77575090565b61060891612f8361298a565b906133b0565b6001600160401b03811161059257601f01601f191660200190565b929192612fb082612f89565b91612fbe60405193846105b2565b829481845281830111610505578281602093845f960137010152565b909291928360021161050557831161050557600201916001190190565b805191908290602001825e015f815290565b613023939261082b92816040519687946020860190612ff7565b918237015f815203601f1981018452836105b2565b908060209392818452848401375f828201840152601f01601f1916010190565b916020610608938181520191613038565b6114796114859263ffffffff61309a9397959697165f52600d60205260405f209061ffff165f5260205260405f2090565b8051156130fd5783156130f75760028410156130ce5750506121ca604051928392639a6d49cd60e01b845260048401613058565b9092806130f191610608946130ec6130e7368484612fa4565b613963565b612fda565b91613009565b92509050565b509190610608913691612fa4565b634e487b7160e01b5f52603260045260245ffd5b91908110156131425760051b8101359061013e1981360301821215610505570190565b61310b565b903590601e198136030182121561050557018035906001600160401b0382116105055760200191813603831361050557565b3561060881610700565b6001600160401b0381160361050557565b9290936131f0926001600160401b0360406106089a98999763ffffffff81356131bc81610edb565b1688526020810135602089015201356131d481613183565b166040860152606085015260e0608085015260e0840191613038565b6001600160a01b0390941660a082015280840360c090910152613038565b602081830312610505578051906001600160401b038211610505570181601f820112156105055780519061324182612f89565b9261324f60405194856105b2565b8284526020838301011161050557815f9260208093018386015e8301015290565b6002548061327c575090565b906106089161328961298a565b9161339b565b6040519061329c82610577565b815f81525f602082015260406132b06129df565b910152565b156132bc57565b60405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606490fd5b1561330857565b60405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606490fd5b613346612ac9565b80613359575b504260085561082b6139c3565b600954818101809111610e7c577fb9d196a585c1a894f648393ec7d52cc59ff6d94191579d073ba32b0a74d7f7a691602091600955604051908152a15f61334c565b815f1904811182021583021561050557020490565b815f19048111820215830215610505570290808204910615150190565b6133fc9061107a7f00000000000000000000000000000000000000000000000000000000000000008092612c1d565b9182918084106134095750565b836371c4efed60e01b5f5260045260245260445ffd5b63ffffffff16805f52600b60205260405f205490811561343d575090565b63f6ff4fb760e01b5f5260045260245ffd5b3561060881613183565b610608939260809260018060a01b0316825260208201525f604082015281606082015201906105d3565b600a546001600160a01b0316330361349757565b63118cdaa760e01b5f523360045260245ffd5b650100000000008110156105055764ffffffffff1690565b90816020910312610505575161060881610fe6565b90916134ee610608936040845260408401906105d3565b9160208184039101526105d3565b9091613561613587936135446135386020860135927f000000000000000000000000000000000000000000000000000000000000000090612c1d565b6001600160401b031690565b61355b61355460a0870187613147565b3691612fa4565b91613c17565b93909283945f14613603576002905b61215361357c82612a83565b916080810190613147565b600e5490926001600160a01b039091169083826135a357505050565b60405163043a78eb60e01b8152926020928492839182916135c791600484016134d7565b03915afa8015610986576135d85750565b6135f99060203d6020116135fc575b6135f181836105b2565b8101906134c2565b50565b503d6135e7565b600190613570565b91908260409103126105055760405161362381610597565b6020808294805184520151910152565b90604082820312610505576106089161360b565b906020909392936040835263ffffffff8151166040840152818101516060840152608061369b613685604084015160a08488015260e08701906105d3565b6060840151868203603f190160a08801526105d3565b910151151560c08401526001600160a01b03909416910152565b80518210156131425760209160051b010190565b601f82116136d657505050565b5f5260205f20906020601f840160051c8301931061370e575b601f0160051c01905b818110613703575050565b5f81556001016136f8565b90915081906136ef565b91909182516001600160401b0381116105925761373f81613739845461052b565b846136c9565b6020601f821160011461377e57819061376f9394955f92613773575b50508160011b915f199060031b1c19161790565b9055565b015190505f8061375b565b601f19821690613791845f5260205f2090565b915f5b8181106137cb575095836001959697106137b3575b505050811b019055565b01515f1960f88460031b161c191690555f80806137a9565b9192602060018192868b015181550194019201613794565b602081016020825282518091526040820191602060408360051b8301019401925f915b83831061381557505050505090565b9091929394602080613858600193603f19868203018752606060408b5163ffffffff815116845261ffff86820151168685015201519181604082015201906105d3565b97019301930191939290613806565b5f5b81518110156138f2578061388c6040613884600194866136b5565b510151613963565b6138ec604061389b83866136b5565b51015163ffffffff6138ad84876136b5565b5151165f52600d6020526138e760405f206138d760206138cd878a6136b5565b51015161ffff1690565b61ffff165f5260205260405f2090565b613718565b01613869565b506139247fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b67491604051918291826137e3565b0390a1565b1561393057565b60405162461bcd60e51b815260206004820152600b60248201526a5a45524f5f41535345545360a81b6044820152606490fd5b600361ffff600283015116036139765750565b604051639a6d49cd60e01b8152602060048201529081906121ca9060248301906105d3565b604090602319011261050557604051906139b482610597565b60243582526044356020830152565b60065464ffffffffff1642111561082b576139dc613f8e565b6139e4612e10565b6139ed426134aa565b64ffffffffff613a05602084015164ffffffffff1690565b9164ffffffffff8316911681149081613ad1575b50613a22575050565b81613a947f25fad6026c7eaed7508799768642cd3708b71f85d3a322da4b6051df097f8ffe9360409064ffffffffff815116600654908064ffffffffff1983161760065569ffffffffff0000000000602084015160281b169169ffffffffffffffffffff191617176006550151600755565b6139246040613aa8835164ffffffffff1690565b9201516040519384938464ffffffffff6040929594938160608401971683521660208201520152565b905064ffffffffff613aed60065464ffffffffff9060281c1690565b1614155f613a19565b90602011610505573590565b90602811610505576020013560c01c90565b610608906001600160401b037f00000000000000000000000000000000000000000000000000000000000000009116612c0a565b6001600160a01b03811615613bac575b305f52600360205260405f20805490838203918211610e7c57556001600160a01b03165f81815260036020908152604091829020805485019055905183815230915f51602061420c5f395f51905f5291a390565b5061dead613b58565b9080602811610505576106089136916027190190602801612fa4565b909261271890610608936040519586946001600160401b0360c01b9060c01b16602086015263ffffffff60e01b9060e01b166028850152602c840152604c830190612ff7565b82511580159390613c5d5790612718613c5a9260405194859360208501526001600160401b0360c01b9060c01b1660408401523360488401526068830190612ff7565b91565b50906040519160208301526001600160401b0360c01b9060c01b16604082015260288152613c5a6048826105b2565b6040516323b872dd60e01b81526001600160a01b03928316600482015292909116602483015260448201929092526020905f9060649082855af19081601f3d1160015f5114161516613d1d575b5015613ce157565b60405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606490fd5b3b153d171590505f613cd9565b60025490828201809211610e7c5760205f51602061420c5f395f51905f52915f9360025560018060a01b0316938484526003825260408420818154019055604051908152a3565b600954908103908111610e7c57600955565b6001600160a01b03165f818152600360205260409020805483810391908211610e7c575f935f51602061420c5f395f51905f5292602092558060025403600255604051908152a3565b60405163a9059cbb60e01b81526001600160a01b03909216600483015260248201929092526020905f9060449082855af19081601f3d1160015f5114161516613e4f575b5015613e1857565b60405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606490fd5b3b153d171590505f613e10565b9060808282031261050557613e96906040805193613e7985610577565b805185526020810151613e8b81613183565b60208601520161360b565b604082015290565b613efb60809492613f179694613eb261328f565b506020613ebf86516140e5565b950191825180613f7f575b50613ed48561341f565b9251151592613ee46110c261126d565b602086015260408501526060840152151585830152565b6040518095819482936302637a4560e41b845260048401613647565b03917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1908115610986575f91613f56575090565b610608915060803d608011613f78575b613f7081836105b2565b810190613e5c565b503d613f66565b613f8890614102565b5f613eca565b604051630abca72960e41b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610986575f916140c6575b506040516379bd9e4160e01b81526001600160a01b039190911690602081600481855afa908115610986575f916140a7575b50614016612d81565b1161401e5750565b60206004916040519283809263570ca73560e01b82525afa908115610986575f91614088575b506001600160a01b0316803b15610505575f809160046040518094819363e4fc6b6d60e01b83525af180156109865761407a5750565b80610c655f61082b936105b2565b6140a1915060203d6020116109b1576109a381836105b2565b5f614044565b6140c0915060203d60201161097f5761097181836105b2565b5f61400d565b6140df915060203d6020116109b1576109a381836105b2565b5f613fdb565b8034036140ef5790565b6304fb820960e51b5f523460045260245ffd5b60405163393f876560e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602081600481855afa908115610986575f916141ec575b506001600160a01b03169182156141dd57604051916323b872dd60e01b5f523360045260245260445260205f60648180865af160015f51148116156141be575b6040919091525f606052156141a35750565b635274afe760e01b5f526001600160a01b031660045260245ffd5b60018115166141d4573d15833b15151616614191565b503d5f823e3d90fd5b6329b99a9560e11b5f5260045ffd5b614205915060203d6020116109b1576109a381836105b2565b5f61415156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa164736f6c634300081c000a290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563000000000000000000000000c07e000044f95655c11fda4cd37f70a94d7e0a7d00000000000000000000000010101010e0c3171d894b71b3400668af311e7d940000000000000000000000001a44076050125825900e736c501f859c50fe728c00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d536176696e67732072655553440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067372655553440000000000000000000000000000000000000000000000000000","name":"SavingsReUSD","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"cancun","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IOAppPreCrimeSimulator.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n// @dev Import the Origin so it's exposed to OAppPreCrimeSimulator implementers.\n// solhint-disable-next-line no-unused-import\nimport { InboundPacket, Origin } from \"../libs/Packet.sol\";\n\n/**\n * @title IOAppPreCrimeSimulator Interface\n * @dev Interface for the preCrime simulation functionality in an OApp.\n */\ninterface IOAppPreCrimeSimulator {\n    // @dev simulation result used in PreCrime implementation\n    error SimulationResult(bytes result);\n    error OnlySelf();\n\n    /**\n     * @dev Emitted when the preCrime contract address is set.\n     * @param preCrimeAddress The address of the preCrime contract.\n     */\n    event PreCrimeSet(address preCrimeAddress);\n\n    /**\n     * @dev Retrieves the address of the preCrime contract implementation.\n     * @return The address of the preCrime contract.\n     */\n    function preCrime() external view returns (address);\n\n    /**\n     * @dev Retrieves the address of the OApp contract.\n     * @return The address of the OApp contract.\n     */\n    function oApp() external view returns (address);\n\n    /**\n     * @dev Sets the preCrime contract address.\n     * @param _preCrime The address of the preCrime contract.\n     */\n    function setPreCrime(address _preCrime) external;\n\n    /**\n     * @dev Mocks receiving a packet, then reverts with a series of data to infer the state/result.\n     * @param _packets An array of LayerZero InboundPacket objects representing received packets.\n     */\n    function lzReceiveAndRevert(InboundPacket[] calldata _packets) external payable;\n\n    /**\n     * @dev checks if the specified peer is considered 'trusted' by the OApp.\n     * @param _eid The endpoint Id to check.\n     * @param _peer The peer to check.\n     * @return Whether the peer passed is considered 'trusted' by the OApp.\n     */\n    function isPeer(uint32 _eid, bytes32 _peer) external view returns (bool);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oft-evm/contracts/OFTCore.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport { OApp, Origin } from \"@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol\";\nimport { OAppOptionsType3 } from \"@layerzerolabs/oapp-evm/contracts/oapp/libs/OAppOptionsType3.sol\";\nimport { IOAppMsgInspector } from \"@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppMsgInspector.sol\";\n\nimport { OAppPreCrimeSimulator } from \"@layerzerolabs/oapp-evm/contracts/precrime/OAppPreCrimeSimulator.sol\";\n\nimport { IOFT, SendParam, OFTLimit, OFTReceipt, OFTFeeDetail, MessagingReceipt, MessagingFee } from \"./interfaces/IOFT.sol\";\nimport { OFTMsgCodec } from \"./libs/OFTMsgCodec.sol\";\nimport { OFTComposeMsgCodec } from \"./libs/OFTComposeMsgCodec.sol\";\n\n/**\n * @title OFTCore\n * @dev Abstract contract for the OftChain (OFT) token.\n */\nabstract contract OFTCore is IOFT, OApp, OAppPreCrimeSimulator, OAppOptionsType3 {\n    using OFTMsgCodec for bytes;\n    using OFTMsgCodec for bytes32;\n\n    // @notice Provides a conversion rate when swapping between denominations of SD and LD\n    //      - shareDecimals == SD == shared Decimals\n    //      - localDecimals == LD == local decimals\n    // @dev Considers that tokens have different decimal amounts on various chains.\n    // @dev eg.\n    //  For a token\n    //      - locally with 4 decimals --> 1.2345 => uint(12345)\n    //      - remotely with 2 decimals --> 1.23 => uint(123)\n    //      - The conversion rate would be 10 ** (4 - 2) = 100\n    //  @dev If you want to send 1.2345 -> (uint 12345), you CANNOT represent that value on the remote,\n    //  you can only display 1.23 -> uint(123).\n    //  @dev To preserve the dust that would otherwise be lost on that conversion,\n    //  we need to unify a denomination that can be represented on ALL chains inside of the OFT mesh\n    uint256 public immutable decimalConversionRate;\n\n    // @notice Msg types that are used to identify the various OFT operations.\n    // @dev This can be extended in child contracts for non-default oft operations\n    // @dev These values are used in things like combineOptions() in OAppOptionsType3.sol.\n    uint16 public constant SEND = 1;\n    uint16 public constant SEND_AND_CALL = 2;\n\n    // Address of an optional contract to inspect both 'message' and 'options'\n    address public msgInspector;\n    event MsgInspectorSet(address inspector);\n\n    /**\n     * @dev Constructor.\n     * @param _localDecimals The decimals of the token on the local chain (this chain).\n     * @param _endpoint The address of the LayerZero endpoint.\n     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\n     */\n    constructor(uint8 _localDecimals, address _endpoint, address _delegate) OApp(_endpoint, _delegate) {\n        if (_localDecimals < sharedDecimals()) revert InvalidLocalDecimals();\n        decimalConversionRate = 10 ** (_localDecimals - sharedDecimals());\n    }\n\n    /**\n     * @notice Retrieves interfaceID and the version of the OFT.\n     * @return interfaceId The interface ID.\n     * @return version The version.\n     *\n     * @dev interfaceId: This specific interface ID is '0x02e49c2c'.\n     * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.\n     * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.\n     * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)\n     */\n    function oftVersion() external pure virtual returns (bytes4 interfaceId, uint64 version) {\n        return (type(IOFT).interfaceId, 1);\n    }\n\n    /**\n     * @dev Retrieves the shared decimals of the OFT.\n     * @return The shared decimals of the OFT.\n     *\n     * @dev Sets an implicit cap on the amount of tokens, over uint64.max() will need some sort of outbound cap / totalSupply cap\n     * Lowest common decimal denominator between chains.\n     * Defaults to 6 decimal places to provide up to 18,446,744,073,709.551615 units (max uint64).\n     * For tokens exceeding this totalSupply(), they will need to override the sharedDecimals function with something smaller.\n     * ie. 4 sharedDecimals would be 1,844,674,407,370,955.1615\n     */\n    function sharedDecimals() public view virtual returns (uint8) {\n        return 6;\n    }\n\n    /**\n     * @dev Sets the message inspector address for the OFT.\n     * @param _msgInspector The address of the message inspector.\n     *\n     * @dev This is an optional contract that can be used to inspect both 'message' and 'options'.\n     * @dev Set it to address(0) to disable it, or set it to a contract address to enable it.\n     */\n    function setMsgInspector(address _msgInspector) public virtual onlyOwner {\n        msgInspector = _msgInspector;\n        emit MsgInspectorSet(_msgInspector);\n    }\n\n    /**\n     * @notice Provides the fee breakdown and settings data for an OFT. Unused in the default implementation.\n     * @param _sendParam The parameters for the send operation.\n     * @return oftLimit The OFT limit information.\n     * @return oftFeeDetails The details of OFT fees.\n     * @return oftReceipt The OFT receipt information.\n     */\n    function quoteOFT(\n        SendParam calldata _sendParam\n    )\n        external\n        view\n        virtual\n        returns (OFTLimit memory oftLimit, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory oftReceipt)\n    {\n        uint256 minAmountLD = 0; // Unused in the default implementation.\n        uint256 maxAmountLD = IERC20(this.token()).totalSupply(); // Unused in the default implementation.\n        oftLimit = OFTLimit(minAmountLD, maxAmountLD);\n\n        // Unused in the default implementation; reserved for future complex fee details.\n        oftFeeDetails = new OFTFeeDetail[](0);\n\n        // @dev This is the same as the send() operation, but without the actual send.\n        // - amountSentLD is the amount in local decimals that would be sent from the sender.\n        // - amountReceivedLD is the amount in local decimals that will be credited to the recipient on the remote OFT instance.\n        // @dev The amountSentLD MIGHT not equal the amount the user actually receives. HOWEVER, the default does.\n        (uint256 amountSentLD, uint256 amountReceivedLD) = _debitView(\n            _sendParam.amountLD,\n            _sendParam.minAmountLD,\n            _sendParam.dstEid\n        );\n        oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);\n    }\n\n    /**\n     * @notice Provides a quote for the send() operation.\n     * @param _sendParam The parameters for the send() operation.\n     * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.\n     * @return msgFee The calculated LayerZero messaging fee from the send() operation.\n     *\n     * @dev MessagingFee: LayerZero msg fee\n     *  - nativeFee: The native fee.\n     *  - lzTokenFee: The lzToken fee.\n     */\n    function quoteSend(\n        SendParam calldata _sendParam,\n        bool _payInLzToken\n    ) external view virtual returns (MessagingFee memory msgFee) {\n        // @dev mock the amount to receive, this is the same operation used in the send().\n        // The quote is as similar as possible to the actual send() operation.\n        (, uint256 amountReceivedLD) = _debitView(_sendParam.amountLD, _sendParam.minAmountLD, _sendParam.dstEid);\n\n        // @dev Builds the options and OFT message to quote in the endpoint.\n        (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);\n\n        // @dev Calculates the LayerZero fee for the send() operation.\n        return _quote(_sendParam.dstEid, message, options, _payInLzToken);\n    }\n\n    /**\n     * @dev Executes the send operation.\n     * @param _sendParam The parameters for the send operation.\n     * @param _fee The calculated fee for the send() operation.\n     *      - nativeFee: The native fee.\n     *      - lzTokenFee: The lzToken fee.\n     * @param _refundAddress The address to receive any excess funds.\n     * @return msgReceipt The receipt for the send operation.\n     * @return oftReceipt The OFT receipt information.\n     *\n     * @dev MessagingReceipt: LayerZero msg receipt\n     *  - guid: The unique identifier for the sent message.\n     *  - nonce: The nonce of the sent message.\n     *  - fee: The LayerZero fee incurred for the message.\n     */\n    function send(\n        SendParam calldata _sendParam,\n        MessagingFee calldata _fee,\n        address _refundAddress\n    ) external payable virtual returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) {\n        return _send(_sendParam, _fee, _refundAddress);\n    }\n\n    /**\n     * @dev Internal function to execute the send operation.\n     * @param _sendParam The parameters for the send operation.\n     * @param _fee The calculated fee for the send() operation.\n     *      - nativeFee: The native fee.\n     *      - lzTokenFee: The lzToken fee.\n     * @param _refundAddress The address to receive any excess funds.\n     * @return msgReceipt The receipt for the send operation.\n     * @return oftReceipt The OFT receipt information.\n     *\n     * @dev MessagingReceipt: LayerZero msg receipt\n     *  - guid: The unique identifier for the sent message.\n     *  - nonce: The nonce of the sent message.\n     *  - fee: The LayerZero fee incurred for the message.\n     */\n    function _send(\n        SendParam calldata _sendParam,\n        MessagingFee calldata _fee,\n        address _refundAddress\n    ) internal virtual returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) {\n        // @dev Applies the token transfers regarding this send() operation.\n        // - amountSentLD is the amount in local decimals that was ACTUALLY sent/debited from the sender.\n        // - amountReceivedLD is the amount in local decimals that will be received/credited to the recipient on the remote OFT instance.\n        (uint256 amountSentLD, uint256 amountReceivedLD) = _debit(\n            msg.sender,\n            _sendParam.amountLD,\n            _sendParam.minAmountLD,\n            _sendParam.dstEid\n        );\n\n        // @dev Builds the options and OFT message to quote in the endpoint.\n        (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);\n\n        // @dev Sends the message to the LayerZero endpoint and returns the LayerZero msg receipt.\n        msgReceipt = _lzSend(_sendParam.dstEid, message, options, _fee, _refundAddress);\n        // @dev Formulate the OFT receipt.\n        oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);\n\n        emit OFTSent(msgReceipt.guid, _sendParam.dstEid, msg.sender, amountSentLD, amountReceivedLD);\n    }\n\n    /**\n     * @dev Internal function to build the message and options.\n     * @param _sendParam The parameters for the send() operation.\n     * @param _amountLD The amount in local decimals.\n     * @return message The encoded message.\n     * @return options The encoded options.\n     */\n    function _buildMsgAndOptions(\n        SendParam calldata _sendParam,\n        uint256 _amountLD\n    ) internal view virtual returns (bytes memory message, bytes memory options) {\n        bool hasCompose;\n        // @dev This generated message has the msg.sender encoded into the payload so the remote knows who the caller is.\n        (message, hasCompose) = OFTMsgCodec.encode(\n            _sendParam.to,\n            _toSD(_amountLD),\n            // @dev Must be include a non empty bytes if you want to compose, EVEN if you dont need it on the remote.\n            // EVEN if you dont require an arbitrary payload to be sent... eg. '0x01'\n            _sendParam.composeMsg\n        );\n        // @dev Change the msg type depending if its composed or not.\n        uint16 msgType = hasCompose ? SEND_AND_CALL : SEND;\n        // @dev Combine the callers _extraOptions with the enforced options via the OAppOptionsType3.\n        options = combineOptions(_sendParam.dstEid, msgType, _sendParam.extraOptions);\n\n        // @dev Optionally inspect the message and options depending if the OApp owner has set a msg inspector.\n        // @dev If it fails inspection, needs to revert in the implementation. ie. does not rely on return boolean\n        address inspector = msgInspector; // caches the msgInspector to avoid potential double storage read\n        if (inspector != address(0)) IOAppMsgInspector(inspector).inspect(message, options);\n    }\n\n    /**\n     * @dev Internal function to handle the receive on the LayerZero endpoint.\n     * @param _origin The origin information.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address from the src chain.\n     *  - nonce: The nonce of the LayerZero message.\n     * @param _guid The unique identifier for the received LayerZero message.\n     * @param _message The encoded message.\n     * @dev _executor The address of the executor.\n     * @dev _extraData Additional data.\n     */\n    function _lzReceive(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address /*_executor*/, // @dev unused in the default implementation.\n        bytes calldata /*_extraData*/ // @dev unused in the default implementation.\n    ) internal virtual override {\n        // @dev The src sending chain doesnt know the address length on this chain (potentially non-evm)\n        // Thus everything is bytes32() encoded in flight.\n        address toAddress = _message.sendTo().bytes32ToAddress();\n        // @dev Credit the amountLD to the recipient and return the ACTUAL amount the recipient received in local decimals\n        uint256 amountReceivedLD = _credit(toAddress, _toLD(_message.amountSD()), _origin.srcEid);\n\n        if (_message.isComposed()) {\n            // @dev Proprietary composeMsg format for the OFT.\n            bytes memory composeMsg = OFTComposeMsgCodec.encode(\n                _origin.nonce,\n                _origin.srcEid,\n                amountReceivedLD,\n                _message.composeMsg()\n            );\n\n            // @dev Stores the lzCompose payload that will be executed in a separate tx.\n            // Standardizes functionality for executing arbitrary contract invocation on some non-evm chains.\n            // @dev The off-chain executor will listen and process the msg based on the src-chain-callers compose options passed.\n            // @dev The index is used when a OApp needs to compose multiple msgs on lzReceive.\n            // For default OFT implementation there is only 1 compose msg per lzReceive, thus its always 0.\n            endpoint.sendCompose(toAddress, _guid, 0 /* the index of the composed message*/, composeMsg);\n        }\n\n        emit OFTReceived(_guid, _origin.srcEid, toAddress, amountReceivedLD);\n    }\n\n    /**\n     * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.\n     * @param _origin The origin information.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address from the src chain.\n     *  - nonce: The nonce of the LayerZero message.\n     * @param _guid The unique identifier for the received LayerZero message.\n     * @param _message The LayerZero message.\n     * @param _executor The address of the off-chain executor.\n     * @param _extraData Arbitrary data passed by the msg executor.\n     *\n     * @dev Enables the preCrime simulator to mock sending lzReceive() messages,\n     * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.\n     */\n    function _lzReceiveSimulate(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) internal virtual override {\n        _lzReceive(_origin, _guid, _message, _executor, _extraData);\n    }\n\n    /**\n     * @dev Check if the peer is considered 'trusted' by the OApp.\n     * @param _eid The endpoint ID to check.\n     * @param _peer The peer to check.\n     * @return Whether the peer passed is considered 'trusted' by the OApp.\n     *\n     * @dev Enables OAppPreCrimeSimulator to check whether a potential Inbound Packet is from a trusted source.\n     */\n    function isPeer(uint32 _eid, bytes32 _peer) public view virtual override returns (bool) {\n        return peers[_eid] == _peer;\n    }\n\n    /**\n     * @dev Internal function to remove dust from the given local decimal amount.\n     * @param _amountLD The amount in local decimals.\n     * @return amountLD The amount after removing dust.\n     *\n     * @dev Prevents the loss of dust when moving amounts between chains with different decimals.\n     * @dev eg. uint(123) with a conversion rate of 100 becomes uint(100).\n     */\n    function _removeDust(uint256 _amountLD) internal view virtual returns (uint256 amountLD) {\n        return (_amountLD / decimalConversionRate) * decimalConversionRate;\n    }\n\n    /**\n     * @dev Internal function to convert an amount from shared decimals into local decimals.\n     * @param _amountSD The amount in shared decimals.\n     * @return amountLD The amount in local decimals.\n     */\n    function _toLD(uint64 _amountSD) internal view virtual returns (uint256 amountLD) {\n        return _amountSD * decimalConversionRate;\n    }\n\n    /**\n     * @dev Internal function to convert an amount from local decimals into shared decimals.\n     * @param _amountLD The amount in local decimals.\n     * @return amountSD The amount in shared decimals.\n     */\n    function _toSD(uint256 _amountLD) internal view virtual returns (uint64 amountSD) {\n        return uint64(_amountLD / decimalConversionRate);\n    }\n\n    /**\n     * @dev Internal function to mock the amount mutation from a OFT debit() operation.\n     * @param _amountLD The amount to send in local decimals.\n     * @param _minAmountLD The minimum amount to send in local decimals.\n     * @dev _dstEid The destination endpoint ID.\n     * @return amountSentLD The amount sent, in local decimals.\n     * @return amountReceivedLD The amount to be received on the remote chain, in local decimals.\n     *\n     * @dev This is where things like fees would be calculated and deducted from the amount to be received on the remote.\n     */\n    function _debitView(\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        uint32 /*_dstEid*/\n    ) internal view virtual returns (uint256 amountSentLD, uint256 amountReceivedLD) {\n        // @dev Remove the dust so nothing is lost on the conversion between chains with different decimals for the token.\n        amountSentLD = _removeDust(_amountLD);\n        // @dev The amount to send is the same as amount received in the default implementation.\n        amountReceivedLD = amountSentLD;\n\n        // @dev Check for slippage.\n        if (amountReceivedLD < _minAmountLD) {\n            revert SlippageExceeded(amountReceivedLD, _minAmountLD);\n        }\n    }\n\n    /**\n     * @dev Internal function to perform a debit operation.\n     * @param _from The address to debit.\n     * @param _amountLD The amount to send in local decimals.\n     * @param _minAmountLD The minimum amount to send in local decimals.\n     * @param _dstEid The destination endpoint ID.\n     * @return amountSentLD The amount sent in local decimals.\n     * @return amountReceivedLD The amount received in local decimals on the remote.\n     *\n     * @dev Defined here but are intended to be overriden depending on the OFT implementation.\n     * @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.\n     */\n    function _debit(\n        address _from,\n        uint256 _amountLD,\n        uint256 _minAmountLD,\n        uint32 _dstEid\n    ) internal virtual returns (uint256 amountSentLD, uint256 amountReceivedLD);\n\n    /**\n     * @dev Internal function to perform a credit operation.\n     * @param _to The address to credit.\n     * @param _amountLD The amount to credit in local decimals.\n     * @param _srcEid The source endpoint ID.\n     * @return amountReceivedLD The amount ACTUALLY received in local decimals.\n     *\n     * @dev Defined here but are intended to be overriden depending on the OFT implementation.\n     * @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.\n     */\n    function _credit(\n        address _to,\n        uint256 _amountLD,\n        uint32 _srcEid\n    ) internal virtual returns (uint256 amountReceivedLD);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppMsgInspector.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @title IOAppMsgInspector\n * @dev Interface for the OApp Message Inspector, allowing examination of message and options contents.\n */\ninterface IOAppMsgInspector {\n    // Custom error message for inspection failure\n    error InspectionFailed(bytes message, bytes options);\n\n    /**\n     * @notice Allows the inspector to examine LayerZero message contents and optionally throw a revert if invalid.\n     * @param _message The message payload to be inspected.\n     * @param _options Additional options or parameters for inspection.\n     * @return valid A boolean indicating whether the inspection passed (true) or failed (false).\n     *\n     * @dev Optionally done as a revert, OR use the boolean provided to handle the failure.\n     */\n    function inspect(bytes calldata _message, bytes calldata _options) external view returns (bool valid);\n}\n"},{"file_path":"src/protocol/sreusd/LinearRewardsErc4626.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity 0.8.28;\n\nimport { ERC20, ERC4626 } from \"src/libraries/solmate/ERC4626.sol\";\nimport { SafeCastLib } from \"src/libraries/solmate/SafeCastLib.sol\";\nimport { EpochTracker } from 'src/dependencies/EpochTracker.sol';\nimport { IFeeDeposit } from \"src/interfaces/IFeeDeposit.sol\";\nimport { IResupplyRegistry } from \"src/interfaces/IResupplyRegistry.sol\";\nimport { IFeeDepositController } from \"src/interfaces/IFeeDepositController.sol\";\n\n\n/**\n * @title LinearRewardsErc4626\n * @notice An ERC4626 Vault implementation with linear rewards, adapted from code from Frax Finance's sfrxUSD\n */\nabstract contract LinearRewardsErc4626 is ERC4626, EpochTracker {\n    using SafeCastLib for *;\n\n    address public immutable registry;\n\n    /// @notice The precision of all integer calculations\n    uint256 public constant PRECISION = 1e18;\n\n    /// @notice The rewards cycle length in seconds\n    uint256 public immutable REWARDS_CYCLE_LENGTH;\n\n    /// @notice Information about the current rewards cycle\n    struct RewardsCycleData {\n        uint40 cycleEnd; // Timestamp of the end of the current rewards cycle\n        uint40 lastSync; // Timestamp of the last time the rewards cycle was synced\n        uint256 rewardCycleAmount; // Amount of rewards to be distributed in the current cycle\n    }\n\n    /// @notice The rewards cycle data, stored in a single word to save gas\n    RewardsCycleData public rewardsCycleData;\n\n    /// @notice The timestamp of the last time rewards were distributed\n    uint256 public lastRewardsDistribution;\n\n    /// @notice The total amount of assets that have been distributed and deposited\n    uint256 public storedTotalAssets;\n\n    /// @notice The precision of the underlying asset\n    uint256 public immutable UNDERLYING_PRECISION;\n\n    /// @param _core The core address\n    /// @param _registry The registry address\n    /// @param _underlying The erc20 asset deposited\n    /// @param _name The name of the vault\n    /// @param _symbol The symbol of the vault\n    /// @param _rewardsCycleLength The length of the rewards cycle in seconds\n    constructor(\n        address _core,\n        address _registry,\n        address _underlying,\n        string memory _name,\n        string memory _symbol,\n        uint256 _rewardsCycleLength\n    ) \n        ERC4626(ERC20(_underlying), _name, _symbol) \n        EpochTracker(_core)\n    {\n        registry = _registry;\n        REWARDS_CYCLE_LENGTH = _rewardsCycleLength;\n        UNDERLYING_PRECISION = 10 ** ERC20(_underlying).decimals();\n\n        // initialize rewardsCycleEnd value\n        // NOTE: normally distribution of rewards should be done prior to _syncRewards but in this case we know there are no users or rewards yet.\n        _syncRewards();\n\n        // initialize lastRewardsDistribution value\n        _distributeRewards();\n    }\n\n    function pricePerShare() external view returns (uint256 _pricePerShare) {\n        _pricePerShare = convertToAssets(UNDERLYING_PRECISION);\n    }\n\n    /// @notice The ```calculateRewardsToDistribute``` function calculates the amount of rewards to distribute based on the rewards cycle data and the time elapsed\n    /// @param _rewardsCycleData The rewards cycle data\n    /// @param _deltaTime The time elapsed since the last rewards distribution\n    /// @return _rewardToDistribute The amount of rewards to distribute\n    function calculateRewardsToDistribute(\n        RewardsCycleData memory _rewardsCycleData,\n        uint256 _deltaTime\n    ) public view virtual returns (uint256 _rewardToDistribute) {\n        _rewardToDistribute =\n            (_rewardsCycleData.rewardCycleAmount * _deltaTime) /\n            (_rewardsCycleData.cycleEnd - _rewardsCycleData.lastSync);\n    }\n\n    /// @notice The ```previewDistributeRewards``` function is used to preview the rewards distributed at the top of the block\n    /// @return _rewardToDistribute The amount of underlying streamed since last state write\n    function previewDistributeRewards() public view virtual returns (uint256 _rewardToDistribute) {\n        // Cache state for gas savings\n        RewardsCycleData memory _rewardsCycleData = rewardsCycleData;\n        uint256 _lastRewardsDistribution = lastRewardsDistribution;\n        if (_lastRewardsDistribution == block.timestamp) return 0;\n        uint40 _timestamp = block.timestamp.safeCastTo40();\n\n        // Calculate the delta time, but only include up to the cycle end in case we are passed it\n        uint256 _deltaTime = _timestamp > _rewardsCycleData.cycleEnd\n            ? _rewardsCycleData.cycleEnd - _lastRewardsDistribution\n            : _timestamp - _lastRewardsDistribution;\n\n        // Calculate the rewards to distribute\n        _rewardToDistribute = calculateRewardsToDistribute({\n            _rewardsCycleData: _rewardsCycleData,\n            _deltaTime: _deltaTime\n        });\n    }\n\n    /// @notice The ```distributeRewards``` function distributes the rewards once per block\n    /// @return _rewardToDistribute The amount of underlying to distribute\n    function _distributeRewards() internal virtual returns (uint256 _rewardToDistribute) {\n        _rewardToDistribute = previewDistributeRewards();\n\n        // Only write to state/emit if we actually distribute rewards\n        if (_rewardToDistribute != 0) {\n            storedTotalAssets += _rewardToDistribute;\n            emit DistributeRewards({ rewardsToDistribute: _rewardToDistribute });\n        }\n        \n        lastRewardsDistribution = block.timestamp;\n    }\n\n    /// @notice The ```previewSyncRewards``` function returns the updated rewards cycle data without updating the state\n    /// @dev Amounts pending distribution via _distributeFees() will not be included in this preview\n    /// @return _newRewardsCycleData The updated rewards cycle data\n    function previewSyncRewards() public view virtual returns (RewardsCycleData memory _newRewardsCycleData) {\n        RewardsCycleData memory _rewardsCycleData = rewardsCycleData;\n\n        uint256 _timestamp = block.timestamp;\n\n        // Only sync if the previous cycle has ended\n        if (_timestamp <= _rewardsCycleData.cycleEnd) return _rewardsCycleData;\n\n        // Calculate rewards for next cycle\n        uint256 _newRewards = asset.balanceOf(address(this)) - storedTotalAssets;\n\n        // Calculate the next cycle end, this keeps cycles at the same time regardless of when sync is called\n        uint40 _cycleEnd = (((_timestamp + REWARDS_CYCLE_LENGTH) / REWARDS_CYCLE_LENGTH) * REWARDS_CYCLE_LENGTH)\n            .safeCastTo40();\n\n        // This block prevents big jumps in rewards rate in case the sync happens near the end of the cycle\n        if (_cycleEnd - _timestamp < REWARDS_CYCLE_LENGTH / 40) {\n            _cycleEnd += REWARDS_CYCLE_LENGTH.safeCastTo40();\n        }\n\n        // Write return values\n        _rewardsCycleData.rewardCycleAmount = _newRewards;\n        _rewardsCycleData.lastSync = _timestamp.safeCastTo40();\n        _rewardsCycleData.cycleEnd = _cycleEnd;\n\n        return _rewardsCycleData;\n    }\n\n    /// @notice The ```_syncRewards``` function is used to update the rewards cycle data\n    function _syncRewards() internal virtual {\n        if (block.timestamp <= rewardsCycleData.cycleEnd) return;\n        _distributeFees();\n        RewardsCycleData memory _rewardsCycleData = previewSyncRewards();\n        if (\n            // If true, then preview shows a rewards should be processed\n            // Ensures that we don't write to state twice in the same block\n            block.timestamp.safeCastTo40() == _rewardsCycleData.lastSync &&\n            rewardsCycleData.lastSync != _rewardsCycleData.lastSync\n        ) {\n            rewardsCycleData = _rewardsCycleData;\n            emit SyncRewards({\n                cycleEnd: _rewardsCycleData.cycleEnd,\n                lastSync: _rewardsCycleData.lastSync,\n                rewardCycleAmount: _rewardsCycleData.rewardCycleAmount\n            });\n        }\n    }\n\n    /// @notice The ```syncRewardsAndDistribution``` function is used to update the rewards cycle data and distribute rewards\n    /// @dev rewards must be distributed before the cycle is synced\n    function syncRewardsAndDistribution() public virtual {\n        _distributeRewards();\n        _syncRewards();\n    }\n\n    /// @notice The ```totalAssets``` function returns the total assets available in the vault\n    /// @dev This function simulates the rewards that will be distributed at the top of the block\n    /// @return _totalAssets The total assets available in the vault\n    function totalAssets() public view virtual override returns (uint256 _totalAssets) {\n        uint256 _rewardToDistribute = previewDistributeRewards();\n        _totalAssets = storedTotalAssets + _rewardToDistribute;\n    }\n\n    function afterDeposit(uint256 amount, uint256 shares) internal virtual override {\n        storedTotalAssets += amount;\n    }\n\n    /// @notice The ```deposit``` function allows a user to mint shares by depositing underlying\n    /// @param _assets The amount of underlying to deposit\n    /// @param _receiver The address to send the shares to\n    /// @return _shares The amount of shares minted\n    function deposit(uint256 _assets, address _receiver) public override returns (uint256 _shares) {\n        syncRewardsAndDistribution();\n        _shares = super.deposit({ assets: _assets, receiver: _receiver });\n    }\n\n    /// @notice The ```mint``` function allows a user to mint a given number of shares\n    /// @param _shares The amount of shares to mint\n    /// @param _receiver The address to send the shares to\n    /// @return _assets The amount of underlying deposited\n    function mint(uint256 _shares, address _receiver) public override returns (uint256 _assets) {\n        syncRewardsAndDistribution();\n        _assets = super.mint({ shares: _shares, receiver: _receiver });\n    }\n\n    function beforeWithdraw(uint256 amount, uint256 shares) internal virtual override {\n        storedTotalAssets -= amount;\n    }\n\n    /// @notice The ```withdraw``` function allows a user to withdraw a given amount of underlying\n    /// @param _assets The amount of underlying to withdraw\n    /// @param _receiver The address to send the underlying to\n    /// @param _owner The address of the owner of the shares\n    /// @return _shares The amount of shares burned\n    function withdraw(uint256 _assets, address _receiver, address _owner) public override returns (uint256 _shares) {\n        syncRewardsAndDistribution();\n\n        _shares = super.withdraw({ assets: _assets, receiver: _receiver, owner: _owner });\n    }\n\n    /// @notice The ```redeem``` function allows a user to redeem their shares for underlying\n    /// @param _shares The amount of shares to redeem\n    /// @param _receiver The address to send the underlying to\n    /// @param _owner The address of the owner of the shares\n    /// @return _assets The amount of underlying redeemed\n    function redeem(uint256 _shares, address _receiver, address _owner) public override returns (uint256 _assets) {\n        syncRewardsAndDistribution();\n\n        _assets = super.redeem({ shares: _shares, receiver: _receiver, owner: _owner });\n    }\n\n    /// @notice The ```depositWithSignature``` function allows a user to use signed approvals to deposit\n    /// @param _assets The amount of underlying to deposit\n    /// @param _receiver The address to send the shares to\n    /// @param _deadline The deadline for the signature\n    /// @param _approveMax Whether or not to approve the maximum amount\n    /// @param _v The v value of the signature\n    /// @param _r The r value of the signature\n    /// @param _s The s value of the signature\n    /// @return _shares The amount of shares minted\n    function depositWithSignature(\n        uint256 _assets,\n        address _receiver,\n        uint256 _deadline,\n        bool _approveMax,\n        uint8 _v,\n        bytes32 _r,\n        bytes32 _s\n    ) external returns (uint256 _shares) {\n        uint256 _amount = _approveMax ? type(uint256).max : _assets;\n        asset.permit({\n            owner: msg.sender,\n            spender: address(this),\n            value: _amount,\n            deadline: _deadline,\n            v: _v,\n            r: _r,\n            s: _s\n        });\n        _shares = (deposit({ _assets: _assets, _receiver: _receiver }));\n    }\n\n    function _distributeFees() internal {\n        IFeeDeposit feeDeposit = IFeeDeposit(IResupplyRegistry(registry).feeDeposit());\n        if (feeDeposit.lastDistributedEpoch() < getEpoch()) {\n            IFeeDepositController feeDepositController = IFeeDepositController(feeDeposit.operator());\n            feeDepositController.distribute();\n        }\n    }\n\n    //==============================================================================\n    // Events\n    //==============================================================================\n\n    /// @notice The ```SyncRewards``` event is emitted when the rewards cycle is synced\n    /// @param cycleEnd The timestamp of the end of the current rewards cycle\n    /// @param lastSync The timestamp of the last time the rewards cycle was synced\n    /// @param rewardCycleAmount The amount of rewards to be distributed in the current cycle\n    event SyncRewards(uint40 cycleEnd, uint40 lastSync, uint256 rewardCycleAmount);\n\n    /// @notice The ```DistributeRewards``` event is emitted when rewards are distributed to storedTotalAssets\n    /// @param rewardsToDistribute The amount of rewards that were distributed\n    event DistributeRewards(uint256 rewardsToDistribute);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OAppReceiver.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { IOAppReceiver, Origin } from \"./interfaces/IOAppReceiver.sol\";\nimport { OAppCore } from \"./OAppCore.sol\";\n\n/**\n * @title OAppReceiver\n * @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers.\n */\nabstract contract OAppReceiver is IOAppReceiver, OAppCore {\n    // Custom error message for when the caller is not the registered endpoint/\n    error OnlyEndpoint(address addr);\n\n    // @dev The version of the OAppReceiver implementation.\n    // @dev Version is bumped when changes are made to this contract.\n    uint64 internal constant RECEIVER_VERSION = 2;\n\n    /**\n     * @notice Retrieves the OApp version information.\n     * @return senderVersion The version of the OAppSender.sol contract.\n     * @return receiverVersion The version of the OAppReceiver.sol contract.\n     *\n     * @dev Providing 0 as the default for OAppSender version. Indicates that the OAppSender is not implemented.\n     * ie. this is a RECEIVE only OApp.\n     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions.\n     */\n    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {\n        return (0, RECEIVER_VERSION);\n    }\n\n    /**\n     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.\n     * @dev _origin The origin information containing the source endpoint and sender address.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address on the src chain.\n     *  - nonce: The nonce of the message.\n     * @dev _message The lzReceive payload.\n     * @param _sender The sender address.\n     * @return isSender Is a valid sender.\n     *\n     * @dev Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.\n     * @dev The default sender IS the OAppReceiver implementer.\n     */\n    function isComposeMsgSender(\n        Origin calldata /*_origin*/,\n        bytes calldata /*_message*/,\n        address _sender\n    ) public view virtual returns (bool) {\n        return _sender == address(this);\n    }\n\n    /**\n     * @notice Checks if the path initialization is allowed based on the provided origin.\n     * @param origin The origin information containing the source endpoint and sender address.\n     * @return Whether the path has been initialized.\n     *\n     * @dev This indicates to the endpoint that the OApp has enabled msgs for this particular path to be received.\n     * @dev This defaults to assuming if a peer has been set, its initialized.\n     * Can be overridden by the OApp if there is other logic to determine this.\n     */\n    function allowInitializePath(Origin calldata origin) public view virtual returns (bool) {\n        return peers[origin.srcEid] == origin.sender;\n    }\n\n    /**\n     * @notice Retrieves the next nonce for a given source endpoint and sender address.\n     * @dev _srcEid The source endpoint ID.\n     * @dev _sender The sender address.\n     * @return nonce The next nonce.\n     *\n     * @dev The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement.\n     * @dev Is required by the off-chain executor to determine the OApp expects msg execution is ordered.\n     * @dev This is also enforced by the OApp.\n     * @dev By default this is NOT enabled. ie. nextNonce is hardcoded to return 0.\n     */\n    function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public view virtual returns (uint64 nonce) {\n        return 0;\n    }\n\n    /**\n     * @dev Entry point for receiving messages or packets from the endpoint.\n     * @param _origin The origin information containing the source endpoint and sender address.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address on the src chain.\n     *  - nonce: The nonce of the message.\n     * @param _guid The unique identifier for the received LayerZero message.\n     * @param _message The payload of the received message.\n     * @param _executor The address of the executor for the received message.\n     * @param _extraData Additional arbitrary data provided by the corresponding executor.\n     *\n     * @dev Entry point for receiving msg/packet from the LayerZero endpoint.\n     */\n    function lzReceive(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) public payable virtual {\n        // Ensures that only the endpoint can attempt to lzReceive() messages to this OApp.\n        if (address(endpoint) != msg.sender) revert OnlyEndpoint(msg.sender);\n\n        // Ensure that the sender matches the expected peer for the source endpoint.\n        if (_getPeerOrRevert(_origin.srcEid) != _origin.sender) revert OnlyPeer(_origin.srcEid, _origin.sender);\n\n        // Call the internal OApp implementation of lzReceive.\n        _lzReceive(_origin, _guid, _message, _executor, _extraData);\n    }\n\n    /**\n     * @dev Internal function to implement lzReceive logic without needing to copy the basic parameter validation.\n     */\n    function _lzReceive(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) internal virtual;\n}\n"},{"file_path":"src/interfaces/IResupplyRegistry.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\ninterface IResupplyRegistry {\n    event AddPair(address pairAddress);\n    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n    event SetDeployer(address deployer, bool _bool);\n    event DefaultSwappersSet(address[] addresses);\n    event EntryUpdated(string indexed key, address indexed addr);\n    event WithdrawTo(address indexed user, uint256 amount);\n\n    // Protected keys\n    function LIQUIDATION_HANDLER() external pure returns (string memory);\n    function FEE_DEPOSIT() external pure returns (string memory);\n    function REDEMPTION_HANDLER() external pure returns (string memory);\n    function INSURANCE_POOL() external pure returns (string memory);\n    function REWARD_HANDLER() external pure returns (string memory);\n    function TREASURY() external pure returns (string memory);\n    function STAKER() external pure returns (string memory);\n    function L2_MANAGER() external pure returns (string memory);\n    function VEST_MANAGER() external pure returns (string memory);\n\n    // Other public functions\n    function token() external view returns (address);\n    function govToken() external view returns (address);\n    function getAddress(string memory key) external view returns (address);\n    function getAllKeys() external view returns (string[] memory);\n    function getAllAddresses() external view returns (address[] memory);\n    function getProtectedKeys() external pure returns (string[] memory);\n    function keyExists(string memory) external view returns (bool);\n    function hashToKey(bytes32) external view returns (string memory);\n    function setAddress(string memory key, address addr) external;\n    function acceptOwnership() external;\n    function addPair(address _pairAddress) external;\n    function registeredPairs(uint256) external view returns (address);\n    function pairsByName(string memory) external view returns (address);\n    function registeredPairsLength() external view returns (uint256);\n    function getAllPairAddresses() external view returns (address[] memory _deployedPairsArray);\n    function defaultSwappers(uint256 _index) external view returns (address);\n    function owner() external view returns (address);\n    function pendingOwner() external view returns (address);\n    function renounceOwnership() external;\n    function transferOwnership(address newOwner) external;\n    function claimFees(address _pair) external;\n    function claimRewards(address _pair) external;\n    function claimInsuranceRewards() external;\n    function withdrawTo(address _asset, uint256 _amount, address _to) external;\n    function mint(address receiver, uint256 amount) external;\n    function burn(address target, uint256 amount) external;\n    function liquidationHandler() external view returns(address);\n    function feeDeposit() external view returns(address);\n    function redemptionHandler() external view returns(address);\n    function rewardHandler() external view returns(address);\n    function insurancePool() external view returns(address);\n    function setRewardClaimer(address _newAddress) external;\n    function setRedemptionHandler(address _newAddress) external;\n    function setFeeDeposit(address _newAddress) external;\n    function setLiquidationHandler(address _newAddress) external;\n    function setInsurancePool(address _newAddress) external;\n    function setStaker(address _newAddress) external;\n    function setTreasury(address _newAddress) external;\n    function staker() external view returns(address);\n    function treasury() external view returns(address);\n    function l2manager() external view returns(address);\n    function setRewardHandler(address _newAddress) external;\n    function setVestManager(address _newAddress) external;\n    function setDefaultSwappers(address[] memory _swappers) external;\n    function collateralId(address _collateral) external view returns(uint256);\n    function core() external view returns(address);\n\n    error NameMustBeUnique();\n    error ProtectedKey(string key);\n}"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/precrime/OAppPreCrimeSimulator.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { IPreCrime } from \"./interfaces/IPreCrime.sol\";\nimport { IOAppPreCrimeSimulator, InboundPacket, Origin } from \"./interfaces/IOAppPreCrimeSimulator.sol\";\n\n/**\n * @title OAppPreCrimeSimulator\n * @dev Abstract contract serving as the base for preCrime simulation functionality in an OApp.\n */\nabstract contract OAppPreCrimeSimulator is IOAppPreCrimeSimulator, Ownable {\n    // The address of the preCrime implementation.\n    address public preCrime;\n\n    /**\n     * @dev Retrieves the address of the OApp contract.\n     * @return The address of the OApp contract.\n     *\n     * @dev The simulator contract is the base contract for the OApp by default.\n     * @dev If the simulator is a separate contract, override this function.\n     */\n    function oApp() external view virtual returns (address) {\n        return address(this);\n    }\n\n    /**\n     * @dev Sets the preCrime contract address.\n     * @param _preCrime The address of the preCrime contract.\n     */\n    function setPreCrime(address _preCrime) public virtual onlyOwner {\n        preCrime = _preCrime;\n        emit PreCrimeSet(_preCrime);\n    }\n\n    /**\n     * @dev Interface for pre-crime simulations. Always reverts at the end with the simulation results.\n     * @param _packets An array of InboundPacket objects representing received packets to be delivered.\n     *\n     * @dev WARNING: MUST revert at the end with the simulation results.\n     * @dev Gives the preCrime implementation the ability to mock sending packets to the lzReceive function,\n     * WITHOUT actually executing them.\n     */\n    function lzReceiveAndRevert(InboundPacket[] calldata _packets) public payable virtual {\n        for (uint256 i = 0; i < _packets.length; i++) {\n            InboundPacket calldata packet = _packets[i];\n\n            // Ignore packets that are not from trusted peers.\n            if (!isPeer(packet.origin.srcEid, packet.origin.sender)) continue;\n\n            // @dev Because a verifier is calling this function, it doesnt have access to executor params:\n            //  - address _executor\n            //  - bytes calldata _extraData\n            // preCrime will NOT work for OApps that rely on these two parameters inside of their _lzReceive().\n            // They are instead stubbed to default values, address(0) and bytes(\"\")\n            // @dev Calling this.lzReceiveSimulate removes ability for assembly return 0 callstack exit,\n            // which would cause the revert to be ignored.\n            this.lzReceiveSimulate{ value: packet.value }(\n                packet.origin,\n                packet.guid,\n                packet.message,\n                packet.executor,\n                packet.extraData\n            );\n        }\n\n        // @dev Revert with the simulation results. msg.sender must implement IPreCrime.buildSimulationResult().\n        revert SimulationResult(IPreCrime(msg.sender).buildSimulationResult());\n    }\n\n    /**\n     * @dev Is effectively an internal function because msg.sender must be address(this).\n     * Allows resetting the call stack for 'internal' calls.\n     * @param _origin The origin information containing the source endpoint and sender address.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address on the src chain.\n     *  - nonce: The nonce of the message.\n     * @param _guid The unique identifier of the packet.\n     * @param _message The message payload of the packet.\n     * @param _executor The executor address for the packet.\n     * @param _extraData Additional data for the packet.\n     */\n    function lzReceiveSimulate(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) external payable virtual {\n        // @dev Ensure ONLY can be called 'internally'.\n        if (msg.sender != address(this)) revert OnlySelf();\n        _lzReceiveSimulate(_origin, _guid, _message, _executor, _extraData);\n    }\n\n    /**\n     * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.\n     * @param _origin The origin information.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address from the src chain.\n     *  - nonce: The nonce of the LayerZero message.\n     * @param _guid The GUID of the LayerZero message.\n     * @param _message The LayerZero message.\n     * @param _executor The address of the off-chain executor.\n     * @param _extraData Arbitrary data passed by the msg executor.\n     *\n     * @dev Enables the preCrime simulator to mock sending lzReceive() messages,\n     * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.\n     */\n    function _lzReceiveSimulate(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) internal virtual;\n\n    /**\n     * @dev checks if the specified peer is considered 'trusted' by the OApp.\n     * @param _eid The endpoint Id to check.\n     * @param _peer The peer to check.\n     * @return Whether the peer passed is considered 'trusted' by the OApp.\n     */\n    function isPeer(uint32 _eid, bytes32 _peer) public view virtual returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol","source_code":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { Packet } from \"../../interfaces/ISendLib.sol\";\nimport { AddressCast } from \"../../libs/AddressCast.sol\";\n\nlibrary PacketV1Codec {\n    using AddressCast for address;\n    using AddressCast for bytes32;\n\n    uint8 internal constant PACKET_VERSION = 1;\n\n    // header (version + nonce + path)\n    // version\n    uint256 private constant PACKET_VERSION_OFFSET = 0;\n    //    nonce\n    uint256 private constant NONCE_OFFSET = 1;\n    //    path\n    uint256 private constant SRC_EID_OFFSET = 9;\n    uint256 private constant SENDER_OFFSET = 13;\n    uint256 private constant DST_EID_OFFSET = 45;\n    uint256 private constant RECEIVER_OFFSET = 49;\n    // payload (guid + message)\n    uint256 private constant GUID_OFFSET = 81; // keccak256(nonce + path)\n    uint256 private constant MESSAGE_OFFSET = 113;\n\n    function encode(Packet memory _packet) internal pure returns (bytes memory encodedPacket) {\n        encodedPacket = abi.encodePacked(\n            PACKET_VERSION,\n            _packet.nonce,\n            _packet.srcEid,\n            _packet.sender.toBytes32(),\n            _packet.dstEid,\n            _packet.receiver,\n            _packet.guid,\n            _packet.message\n        );\n    }\n\n    function encodePacketHeader(Packet memory _packet) internal pure returns (bytes memory) {\n        return\n            abi.encodePacked(\n                PACKET_VERSION,\n                _packet.nonce,\n                _packet.srcEid,\n                _packet.sender.toBytes32(),\n                _packet.dstEid,\n                _packet.receiver\n            );\n    }\n\n    function encodePayload(Packet memory _packet) internal pure returns (bytes memory) {\n        return abi.encodePacked(_packet.guid, _packet.message);\n    }\n\n    function header(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return _packet[0:GUID_OFFSET];\n    }\n\n    function version(bytes calldata _packet) internal pure returns (uint8) {\n        return uint8(bytes1(_packet[PACKET_VERSION_OFFSET:NONCE_OFFSET]));\n    }\n\n    function nonce(bytes calldata _packet) internal pure returns (uint64) {\n        return uint64(bytes8(_packet[NONCE_OFFSET:SRC_EID_OFFSET]));\n    }\n\n    function srcEid(bytes calldata _packet) internal pure returns (uint32) {\n        return uint32(bytes4(_packet[SRC_EID_OFFSET:SENDER_OFFSET]));\n    }\n\n    function sender(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[SENDER_OFFSET:DST_EID_OFFSET]);\n    }\n\n    function senderAddressB20(bytes calldata _packet) internal pure returns (address) {\n        return sender(_packet).toAddress();\n    }\n\n    function dstEid(bytes calldata _packet) internal pure returns (uint32) {\n        return uint32(bytes4(_packet[DST_EID_OFFSET:RECEIVER_OFFSET]));\n    }\n\n    function receiver(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[RECEIVER_OFFSET:GUID_OFFSET]);\n    }\n\n    function receiverB20(bytes calldata _packet) internal pure returns (address) {\n        return receiver(_packet).toAddress();\n    }\n\n    function guid(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[GUID_OFFSET:MESSAGE_OFFSET]);\n    }\n\n    function message(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return bytes(_packet[MESSAGE_OFFSET:]);\n    }\n\n    function payload(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return bytes(_packet[GUID_OFFSET:]);\n    }\n\n    function payloadHash(bytes calldata _packet) internal pure returns (bytes32) {\n        return keccak256(payload(_packet));\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol","source_code":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nlibrary AddressCast {\n    error AddressCast_InvalidSizeForAddress();\n    error AddressCast_InvalidAddress();\n\n    function toBytes32(bytes calldata _addressBytes) internal pure returns (bytes32 result) {\n        if (_addressBytes.length > 32) revert AddressCast_InvalidAddress();\n        result = bytes32(_addressBytes);\n        unchecked {\n            uint256 offset = 32 - _addressBytes.length;\n            result = result >> (offset * 8);\n        }\n    }\n\n    function toBytes32(address _address) internal pure returns (bytes32 result) {\n        result = bytes32(uint256(uint160(_address)));\n    }\n\n    function toBytes(bytes32 _addressBytes32, uint256 _size) internal pure returns (bytes memory result) {\n        if (_size == 0 || _size > 32) revert AddressCast_InvalidSizeForAddress();\n        result = new bytes(_size);\n        unchecked {\n            uint256 offset = 256 - _size * 8;\n            assembly {\n                mstore(add(result, 32), shl(offset, _addressBytes32))\n            }\n        }\n    }\n\n    function toAddress(bytes32 _addressBytes32) internal pure returns (address result) {\n        result = address(uint160(uint256(_addressBytes32)));\n    }\n\n    function toAddress(bytes calldata _addressBytes) internal pure returns (address result) {\n        if (_addressBytes.length != 20) revert AddressCast_InvalidAddress();\n        result = address(bytes20(_addressBytes));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OAppCore.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { IOAppCore, ILayerZeroEndpointV2 } from \"./interfaces/IOAppCore.sol\";\n\n/**\n * @title OAppCore\n * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.\n */\nabstract contract OAppCore is IOAppCore, Ownable {\n    // The LayerZero endpoint associated with the given OApp\n    ILayerZeroEndpointV2 public immutable endpoint;\n\n    // Mapping to store peers associated with corresponding endpoints\n    mapping(uint32 eid => bytes32 peer) public peers;\n\n    /**\n     * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.\n     * @param _endpoint The address of the LOCAL Layer Zero endpoint.\n     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\n     *\n     * @dev The delegate typically should be set as the owner of the contract.\n     */\n    constructor(address _endpoint, address _delegate) {\n        endpoint = ILayerZeroEndpointV2(_endpoint);\n\n        if (_delegate == address(0)) revert InvalidDelegate();\n        endpoint.setDelegate(_delegate);\n    }\n\n    /**\n     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\n     * @param _eid The endpoint ID.\n     * @param _peer The address of the peer to be associated with the corresponding endpoint.\n     *\n     * @dev Only the owner/admin of the OApp can call this function.\n     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\n     * @dev Set this to bytes32(0) to remove the peer address.\n     * @dev Peer is a bytes32 to accommodate non-evm chains.\n     */\n    function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {\n        _setPeer(_eid, _peer);\n    }\n\n    /**\n     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\n     * @param _eid The endpoint ID.\n     * @param _peer The address of the peer to be associated with the corresponding endpoint.\n     *\n     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.\n     * @dev Set this to bytes32(0) to remove the peer address.\n     * @dev Peer is a bytes32 to accommodate non-evm chains.\n     */\n    function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {\n        peers[_eid] = _peer;\n        emit PeerSet(_eid, _peer);\n    }\n\n    /**\n     * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.\n     * ie. the peer is set to bytes32(0).\n     * @param _eid The endpoint ID.\n     * @return peer The address of the peer associated with the specified endpoint.\n     */\n    function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {\n        bytes32 peer = peers[_eid];\n        if (peer == bytes32(0)) revert NoPeer(_eid);\n        return peer;\n    }\n\n    /**\n     * @notice Sets the delegate address for the OApp.\n     * @param _delegate The address of the delegate to be set.\n     *\n     * @dev Only the owner/admin of the OApp can call this function.\n     * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.\n     */\n    function setDelegate(address _delegate) public onlyOwner {\n        endpoint.setDelegate(_delegate);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/precrime/interfaces/IPreCrime.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\nstruct PreCrimePeer {\n    uint32 eid;\n    bytes32 preCrime;\n    bytes32 oApp;\n}\n\n// TODO not done yet\ninterface IPreCrime {\n    error OnlyOffChain();\n\n    // for simulate()\n    error PacketOversize(uint256 max, uint256 actual);\n    error PacketUnsorted();\n    error SimulationFailed(bytes reason);\n\n    // for preCrime()\n    error SimulationResultNotFound(uint32 eid);\n    error InvalidSimulationResult(uint32 eid, bytes reason);\n    error CrimeFound(bytes crime);\n\n    function getConfig(bytes[] calldata _packets, uint256[] calldata _packetMsgValues) external returns (bytes memory);\n\n    function simulate(\n        bytes[] calldata _packets,\n        uint256[] calldata _packetMsgValues\n    ) external payable returns (bytes memory);\n\n    function buildSimulationResult() external view returns (bytes memory);\n\n    function preCrime(\n        bytes[] calldata _packets,\n        uint256[] calldata _packetMsgValues,\n        bytes[] calldata _simulations\n    ) external;\n\n    function version() external view returns (uint64 major, uint8 minor);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { ILayerZeroEndpointV2 } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\";\n\n/**\n * @title IOAppCore\n */\ninterface IOAppCore {\n    // Custom error messages\n    error OnlyPeer(uint32 eid, bytes32 sender);\n    error NoPeer(uint32 eid);\n    error InvalidEndpointCall();\n    error InvalidDelegate();\n\n    // Event emitted when a peer (OApp) is set for a corresponding endpoint\n    event PeerSet(uint32 eid, bytes32 peer);\n\n    /**\n     * @notice Retrieves the OApp version information.\n     * @return senderVersion The version of the OAppSender.sol contract.\n     * @return receiverVersion The version of the OAppReceiver.sol contract.\n     */\n    function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);\n\n    /**\n     * @notice Retrieves the LayerZero endpoint associated with the OApp.\n     * @return iEndpoint The LayerZero endpoint as an interface.\n     */\n    function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);\n\n    /**\n     * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.\n     * @param _eid The endpoint ID.\n     * @return peer The peer address (OApp instance) associated with the corresponding endpoint.\n     */\n    function peers(uint32 _eid) external view returns (bytes32 peer);\n\n    /**\n     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.\n     * @param _eid The endpoint ID.\n     * @param _peer The address of the peer to be associated with the corresponding endpoint.\n     */\n    function setPeer(uint32 _eid, bytes32 _peer) external;\n\n    /**\n     * @notice Sets the delegate address for the OApp Core.\n     * @param _delegate The address of the delegate to be set.\n     */\n    function setDelegate(address _delegate) external;\n}\n"},{"file_path":"src/libraries/solmate/FixedPointMathLib.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Arithmetic library with operations for fixed-point numbers.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)\n/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)\nlibrary FixedPointMathLib {\n    /*//////////////////////////////////////////////////////////////\n                    SIMPLIFIED FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal constant MAX_UINT256 = 2**256 - 1;\n\n    uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\n\n    function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\n    }\n\n    function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\n    }\n\n    function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\n    }\n\n    function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\n        return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                    LOW LEVEL FIXED POINT OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function mulDivDown(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))\n            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {\n                revert(0, 0)\n            }\n\n            // Divide x * y by the denominator.\n            z := div(mul(x, y), denominator)\n        }\n    }\n\n    function mulDivUp(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))\n            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {\n                revert(0, 0)\n            }\n\n            // If x * y modulo the denominator is strictly greater than 0,\n            // 1 is added to round up the division of x * y by the denominator.\n            z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator))\n        }\n    }\n\n    function rpow(\n        uint256 x,\n        uint256 n,\n        uint256 scalar\n    ) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            switch x\n            case 0 {\n                switch n\n                case 0 {\n                    // 0 ** 0 = 1\n                    z := scalar\n                }\n                default {\n                    // 0 ** n = 0\n                    z := 0\n                }\n            }\n            default {\n                switch mod(n, 2)\n                case 0 {\n                    // If n is even, store scalar in z for now.\n                    z := scalar\n                }\n                default {\n                    // If n is odd, store x in z for now.\n                    z := x\n                }\n\n                // Shifting right by 1 is like dividing by 2.\n                let half := shr(1, scalar)\n\n                for {\n                    // Shift n right by 1 before looping to halve it.\n                    n := shr(1, n)\n                } n {\n                    // Shift n right by 1 each iteration to halve it.\n                    n := shr(1, n)\n                } {\n                    // Revert immediately if x ** 2 would overflow.\n                    // Equivalent to iszero(eq(div(xx, x), x)) here.\n                    if shr(128, x) {\n                        revert(0, 0)\n                    }\n\n                    // Store x squared.\n                    let xx := mul(x, x)\n\n                    // Round to the nearest number.\n                    let xxRound := add(xx, half)\n\n                    // Revert if xx + half overflowed.\n                    if lt(xxRound, xx) {\n                        revert(0, 0)\n                    }\n\n                    // Set x to scaled xxRound.\n                    x := div(xxRound, scalar)\n\n                    // If n is even:\n                    if mod(n, 2) {\n                        // Compute z * x.\n                        let zx := mul(z, x)\n\n                        // If z * x overflowed:\n                        if iszero(eq(div(zx, x), z)) {\n                            // Revert if x is non-zero.\n                            if iszero(iszero(x)) {\n                                revert(0, 0)\n                            }\n                        }\n\n                        // Round to the nearest number.\n                        let zxRound := add(zx, half)\n\n                        // Revert if zx + half overflowed.\n                        if lt(zxRound, zx) {\n                            revert(0, 0)\n                        }\n\n                        // Return properly scaled zxRound.\n                        z := div(zxRound, scalar)\n                    }\n                }\n            }\n        }\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        GENERAL NUMBER UTILITIES\n    //////////////////////////////////////////////////////////////*/\n\n    function sqrt(uint256 x) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            let y := x // We start y at x, which will help us make our initial estimate.\n\n            z := 181 // The \"correct\" value is 1, but this saves a multiplication later.\n\n            // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\n            // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\n\n            // We check y >= 2^(k + 8) but shift right by k bits\n            // each branch to ensure that if x >= 256, then y >= 256.\n            if iszero(lt(y, 0x10000000000000000000000000000000000)) {\n                y := shr(128, y)\n                z := shl(64, z)\n            }\n            if iszero(lt(y, 0x1000000000000000000)) {\n                y := shr(64, y)\n                z := shl(32, z)\n            }\n            if iszero(lt(y, 0x10000000000)) {\n                y := shr(32, y)\n                z := shl(16, z)\n            }\n            if iszero(lt(y, 0x1000000)) {\n                y := shr(16, y)\n                z := shl(8, z)\n            }\n\n            // Goal was to get z*z*y within a small factor of x. More iterations could\n            // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\n            // We ensured y >= 256 so that the relative difference between y and y+1 is small.\n            // That's not possible if x < 256 but we can just verify those cases exhaustively.\n\n            // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\n            // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\n            // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\n\n            // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\n            // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\n\n            // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\n            // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\n\n            // There is no overflow risk here since y < 2^136 after the first branch above.\n            z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\n\n            // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n            z := shr(1, add(z, div(x, z)))\n\n            // If x+1 is a perfect square, the Babylonian method cycles between\n            // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\n            // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\n            // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\n            // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\n            z := sub(z, lt(div(x, z), z))\n        }\n    }\n\n    function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Mod x by y. Note this will return\n            // 0 instead of reverting if y is zero.\n            z := mod(x, y)\n        }\n    }\n\n    function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Divide x by y. Note this will return\n            // 0 instead of reverting if y is zero.\n            r := div(x, y)\n        }\n    }\n\n    function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Add 1 to x * y if x % y > 0. Note this will\n            // return 0 instead of reverting if y is zero.\n            z := add(gt(mod(x, y), 0), div(x, y))\n        }\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OApp.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n// @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers\n// solhint-disable-next-line no-unused-import\nimport { OAppSender, MessagingFee, MessagingReceipt } from \"./OAppSender.sol\";\n// @dev Import the 'Origin' so it's exposed to OApp implementers\n// solhint-disable-next-line no-unused-import\nimport { OAppReceiver, Origin } from \"./OAppReceiver.sol\";\nimport { OAppCore } from \"./OAppCore.sol\";\n\n/**\n * @title OApp\n * @dev Abstract contract serving as the base for OApp implementation, combining OAppSender and OAppReceiver functionality.\n */\nabstract contract OApp is OAppSender, OAppReceiver {\n    /**\n     * @dev Constructor to initialize the OApp with the provided endpoint and owner.\n     * @param _endpoint The address of the LOCAL LayerZero endpoint.\n     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.\n     */\n    constructor(address _endpoint, address _delegate) OAppCore(_endpoint, _delegate) {}\n\n    /**\n     * @notice Retrieves the OApp version information.\n     * @return senderVersion The version of the OAppSender.sol implementation.\n     * @return receiverVersion The version of the OAppReceiver.sol implementation.\n     */\n    function oAppVersion()\n        public\n        pure\n        virtual\n        override(OAppSender, OAppReceiver)\n        returns (uint64 senderVersion, uint64 receiverVersion)\n    {\n        return (SENDER_VERSION, RECEIVER_VERSION);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { IERC165 } from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\nimport { SetConfigParam } from \"./IMessageLibManager.sol\";\n\nenum MessageLibType {\n    Send,\n    Receive,\n    SendAndReceive\n}\n\ninterface IMessageLib is IERC165 {\n    function setConfig(address _oapp, SetConfigParam[] calldata _config) external;\n\n    function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view returns (bytes memory config);\n\n    function isSupportedEid(uint32 _eid) external view returns (bool);\n\n    // message libs of same major version are compatible\n    function version() external view returns (uint64 major, uint8 minor, uint8 endpointVersion);\n\n    function messageLibType() external view returns (MessageLibType);\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        if (!_safeTransfer(token, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        if (!_safeTransferFrom(token, from, to, value, true)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _safeTransfer(token, to, value, false);\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _safeTransferFrom(token, from, to, value, false);\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        if (!_safeApprove(token, spender, value, false)) {\n            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));\n            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transfer(to, value)` call, relaxing the requirement on the return value: the\n     * return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.transfer.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(to, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0, 0x44, 0, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, relaxing the requirement on the return\n     * value: the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param from The sender of the tokens\n     * @param to The recipient of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeTransferFrom(\n        IERC20 token,\n        address from,\n        address to,\n        uint256 value,\n        bool bubble\n    ) private returns (bool success) {\n        bytes4 selector = IERC20.transferFrom.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(from, shr(96, not(0))))\n            mstore(0x24, and(to, shr(96, not(0))))\n            mstore(0x44, value)\n            success := call(gas(), token, 0, 0, 0x64, 0, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n            mstore(0x60, 0)\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity `token.approve(spender, value)` call, relaxing the requirement on the return value:\n     * the return value is optional (but if data is returned, it must not be false).\n     *\n     * @param token The token targeted by the call.\n     * @param spender The spender of the tokens\n     * @param value The amount of token to transfer\n     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.\n     */\n    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {\n        bytes4 selector = IERC20.approve.selector;\n\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            mstore(0x00, selector)\n            mstore(0x04, and(spender, shr(96, not(0))))\n            mstore(0x24, value)\n            success := call(gas(), token, 0, 0, 0x44, 0, 0x20)\n            // if call success and return is true, all is good.\n            // otherwise (not success or return is not true), we need to perform further checks\n            if iszero(and(success, eq(mload(0x00), 1))) {\n                // if the call was a failure and bubble is enabled, bubble the error\n                if and(iszero(success), bubble) {\n                    returndatacopy(fmp, 0, returndatasize())\n                    revert(fmp, returndatasize())\n                }\n                // if the return value is not true, then the call is only successful if:\n                // - the token address has code\n                // - the returndata is empty\n                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))\n            }\n            mstore(0x40, fmp)\n        }\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/oft-evm/contracts/libs/OFTComposeMsgCodec.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nlibrary OFTComposeMsgCodec {\n    // Offset constants for decoding composed messages\n    uint8 private constant NONCE_OFFSET = 8;\n    uint8 private constant SRC_EID_OFFSET = 12;\n    uint8 private constant AMOUNT_LD_OFFSET = 44;\n    uint8 private constant COMPOSE_FROM_OFFSET = 76;\n\n    /**\n     * @dev Encodes a OFT composed message.\n     * @param _nonce The nonce value.\n     * @param _srcEid The source endpoint ID.\n     * @param _amountLD The amount in local decimals.\n     * @param _composeMsg The composed message.\n     * @return _msg The encoded Composed message.\n     */\n    function encode(\n        uint64 _nonce,\n        uint32 _srcEid,\n        uint256 _amountLD,\n        bytes memory _composeMsg // 0x[composeFrom][composeMsg]\n    ) internal pure returns (bytes memory _msg) {\n        _msg = abi.encodePacked(_nonce, _srcEid, _amountLD, _composeMsg);\n    }\n\n    /**\n     * @dev Retrieves the nonce for the composed message.\n     * @param _msg The message.\n     * @return The nonce value.\n     */\n    function nonce(bytes calldata _msg) internal pure returns (uint64) {\n        return uint64(bytes8(_msg[:NONCE_OFFSET]));\n    }\n\n    /**\n     * @dev Retrieves the source endpoint ID for the composed message.\n     * @param _msg The message.\n     * @return The source endpoint ID.\n     */\n    function srcEid(bytes calldata _msg) internal pure returns (uint32) {\n        return uint32(bytes4(_msg[NONCE_OFFSET:SRC_EID_OFFSET]));\n    }\n\n    /**\n     * @dev Retrieves the amount in local decimals from the composed message.\n     * @param _msg The message.\n     * @return The amount in local decimals.\n     */\n    function amountLD(bytes calldata _msg) internal pure returns (uint256) {\n        return uint256(bytes32(_msg[SRC_EID_OFFSET:AMOUNT_LD_OFFSET]));\n    }\n\n    /**\n     * @dev Retrieves the composeFrom value from the composed message.\n     * @param _msg The message.\n     * @return The composeFrom value.\n     */\n    function composeFrom(bytes calldata _msg) internal pure returns (bytes32) {\n        return bytes32(_msg[AMOUNT_LD_OFFSET:COMPOSE_FROM_OFFSET]);\n    }\n\n    /**\n     * @dev Retrieves the composed message.\n     * @param _msg The message.\n     * @return The composed message.\n     */\n    function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {\n        return _msg[COMPOSE_FROM_OFFSET:];\n    }\n\n    /**\n     * @dev Converts an address to bytes32.\n     * @param _addr The address to convert.\n     * @return The bytes32 representation of the address.\n     */\n    function addressToBytes32(address _addr) internal pure returns (bytes32) {\n        return bytes32(uint256(uint160(_addr)));\n    }\n\n    /**\n     * @dev Converts bytes32 to an address.\n     * @param _b The bytes32 value to convert.\n     * @return The address representation of bytes32.\n     */\n    function bytes32ToAddress(bytes32 _b) internal pure returns (address) {\n        return address(uint160(uint256(_b)));\n    }\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/Ownable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    /**\n     * @dev The caller account is not authorized to perform an operation.\n     */\n    error OwnableUnauthorizedAccount(address account);\n\n    /**\n     * @dev The owner is not a valid owner account. (eg. `address(0)`)\n     */\n    error OwnableInvalidOwner(address owner);\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n     */\n    constructor(address initialOwner) {\n        if (initialOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(initialOwner);\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        if (owner() != _msgSender()) {\n            revert OwnableUnauthorizedAccount(_msgSender());\n        }\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        if (newOwner == address(0)) {\n            revert OwnableInvalidOwner(address(0));\n        }\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/oft-evm/contracts/libs/OFTMsgCodec.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nlibrary OFTMsgCodec {\n    // Offset constants for encoding and decoding OFT messages\n    uint8 private constant SEND_TO_OFFSET = 32;\n    uint8 private constant SEND_AMOUNT_SD_OFFSET = 40;\n\n    /**\n     * @dev Encodes an OFT LayerZero message.\n     * @param _sendTo The recipient address.\n     * @param _amountShared The amount in shared decimals.\n     * @param _composeMsg The composed message.\n     * @return _msg The encoded message.\n     * @return hasCompose A boolean indicating whether the message has a composed payload.\n     */\n    function encode(\n        bytes32 _sendTo,\n        uint64 _amountShared,\n        bytes memory _composeMsg\n    ) internal view returns (bytes memory _msg, bool hasCompose) {\n        hasCompose = _composeMsg.length > 0;\n        // @dev Remote chains will want to know the composed function caller ie. msg.sender on the src.\n        _msg = hasCompose\n            ? abi.encodePacked(_sendTo, _amountShared, addressToBytes32(msg.sender), _composeMsg)\n            : abi.encodePacked(_sendTo, _amountShared);\n    }\n\n    /**\n     * @dev Checks if the OFT message is composed.\n     * @param _msg The OFT message.\n     * @return A boolean indicating whether the message is composed.\n     */\n    function isComposed(bytes calldata _msg) internal pure returns (bool) {\n        return _msg.length > SEND_AMOUNT_SD_OFFSET;\n    }\n\n    /**\n     * @dev Retrieves the recipient address from the OFT message.\n     * @param _msg The OFT message.\n     * @return The recipient address.\n     */\n    function sendTo(bytes calldata _msg) internal pure returns (bytes32) {\n        return bytes32(_msg[:SEND_TO_OFFSET]);\n    }\n\n    /**\n     * @dev Retrieves the amount in shared decimals from the OFT message.\n     * @param _msg The OFT message.\n     * @return The amount in shared decimals.\n     */\n    function amountSD(bytes calldata _msg) internal pure returns (uint64) {\n        return uint64(bytes8(_msg[SEND_TO_OFFSET:SEND_AMOUNT_SD_OFFSET]));\n    }\n\n    /**\n     * @dev Retrieves the composed message from the OFT message.\n     * @param _msg The OFT message.\n     * @return The composed message.\n     */\n    function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {\n        return _msg[SEND_AMOUNT_SD_OFFSET:];\n    }\n\n    /**\n     * @dev Converts an address to bytes32.\n     * @param _addr The address to convert.\n     * @return The bytes32 representation of the address.\n     */\n    function addressToBytes32(address _addr) internal pure returns (bytes32) {\n        return bytes32(uint256(uint160(_addr)));\n    }\n\n    /**\n     * @dev Converts bytes32 to an address.\n     * @param _b The bytes32 value to convert.\n     * @return The address representation of bytes32.\n     */\n    function bytes32ToAddress(bytes32 _b) internal pure returns (address) {\n        return address(uint160(uint256(_b)));\n    }\n}\n"},{"file_path":"src/libraries/solmate/SafeCastLib.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Safe unsigned integer casting library that reverts on overflow.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeCastLib.sol)\n/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeCast.sol)\nlibrary SafeCastLib {\n    function safeCastTo248(uint256 x) internal pure returns (uint248 y) {\n        require(x < 1 << 248);\n\n        y = uint248(x);\n    }\n\n    function safeCastTo240(uint256 x) internal pure returns (uint240 y) {\n        require(x < 1 << 240);\n\n        y = uint240(x);\n    }\n\n    function safeCastTo232(uint256 x) internal pure returns (uint232 y) {\n        require(x < 1 << 232);\n\n        y = uint232(x);\n    }\n\n    function safeCastTo224(uint256 x) internal pure returns (uint224 y) {\n        require(x < 1 << 224);\n\n        y = uint224(x);\n    }\n\n    function safeCastTo216(uint256 x) internal pure returns (uint216 y) {\n        require(x < 1 << 216);\n\n        y = uint216(x);\n    }\n\n    function safeCastTo208(uint256 x) internal pure returns (uint208 y) {\n        require(x < 1 << 208);\n\n        y = uint208(x);\n    }\n\n    function safeCastTo200(uint256 x) internal pure returns (uint200 y) {\n        require(x < 1 << 200);\n\n        y = uint200(x);\n    }\n\n    function safeCastTo192(uint256 x) internal pure returns (uint192 y) {\n        require(x < 1 << 192);\n\n        y = uint192(x);\n    }\n\n    function safeCastTo184(uint256 x) internal pure returns (uint184 y) {\n        require(x < 1 << 184);\n\n        y = uint184(x);\n    }\n\n    function safeCastTo176(uint256 x) internal pure returns (uint176 y) {\n        require(x < 1 << 176);\n\n        y = uint176(x);\n    }\n\n    function safeCastTo168(uint256 x) internal pure returns (uint168 y) {\n        require(x < 1 << 168);\n\n        y = uint168(x);\n    }\n\n    function safeCastTo160(uint256 x) internal pure returns (uint160 y) {\n        require(x < 1 << 160);\n\n        y = uint160(x);\n    }\n\n    function safeCastTo152(uint256 x) internal pure returns (uint152 y) {\n        require(x < 1 << 152);\n\n        y = uint152(x);\n    }\n\n    function safeCastTo144(uint256 x) internal pure returns (uint144 y) {\n        require(x < 1 << 144);\n\n        y = uint144(x);\n    }\n\n    function safeCastTo136(uint256 x) internal pure returns (uint136 y) {\n        require(x < 1 << 136);\n\n        y = uint136(x);\n    }\n\n    function safeCastTo128(uint256 x) internal pure returns (uint128 y) {\n        require(x < 1 << 128);\n\n        y = uint128(x);\n    }\n\n    function safeCastTo120(uint256 x) internal pure returns (uint120 y) {\n        require(x < 1 << 120);\n\n        y = uint120(x);\n    }\n\n    function safeCastTo112(uint256 x) internal pure returns (uint112 y) {\n        require(x < 1 << 112);\n\n        y = uint112(x);\n    }\n\n    function safeCastTo104(uint256 x) internal pure returns (uint104 y) {\n        require(x < 1 << 104);\n\n        y = uint104(x);\n    }\n\n    function safeCastTo96(uint256 x) internal pure returns (uint96 y) {\n        require(x < 1 << 96);\n\n        y = uint96(x);\n    }\n\n    function safeCastTo88(uint256 x) internal pure returns (uint88 y) {\n        require(x < 1 << 88);\n\n        y = uint88(x);\n    }\n\n    function safeCastTo80(uint256 x) internal pure returns (uint80 y) {\n        require(x < 1 << 80);\n\n        y = uint80(x);\n    }\n\n    function safeCastTo72(uint256 x) internal pure returns (uint72 y) {\n        require(x < 1 << 72);\n\n        y = uint72(x);\n    }\n\n    function safeCastTo64(uint256 x) internal pure returns (uint64 y) {\n        require(x < 1 << 64);\n\n        y = uint64(x);\n    }\n\n    function safeCastTo56(uint256 x) internal pure returns (uint56 y) {\n        require(x < 1 << 56);\n\n        y = uint56(x);\n    }\n\n    function safeCastTo48(uint256 x) internal pure returns (uint48 y) {\n        require(x < 1 << 48);\n\n        y = uint48(x);\n    }\n\n    function safeCastTo40(uint256 x) internal pure returns (uint40 y) {\n        require(x < 1 << 40);\n\n        y = uint40(x);\n    }\n\n    function safeCastTo32(uint256 x) internal pure returns (uint32 y) {\n        require(x < 1 << 32);\n\n        y = uint32(x);\n    }\n\n    function safeCastTo24(uint256 x) internal pure returns (uint24 y) {\n        require(x < 1 << 24);\n\n        y = uint24(x);\n    }\n\n    function safeCastTo16(uint256 x) internal pure returns (uint16 y) {\n        require(x < 1 << 16);\n\n        y = uint16(x);\n    }\n\n    function safeCastTo8(uint256 x) internal pure returns (uint8 y) {\n        require(x < 1 << 8);\n\n        y = uint8(x);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingComposer {\n    event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);\n    event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);\n    event LzComposeAlert(\n        address indexed from,\n        address indexed to,\n        address indexed executor,\n        bytes32 guid,\n        uint16 index,\n        uint256 gas,\n        uint256 value,\n        bytes message,\n        bytes extraData,\n        bytes reason\n    );\n\n    function composeQueue(\n        address _from,\n        address _to,\n        bytes32 _guid,\n        uint16 _index\n    ) external view returns (bytes32 messageHash);\n\n    function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;\n\n    function lzCompose(\n        address _from,\n        address _to,\n        bytes32 _guid,\n        uint16 _index,\n        bytes calldata _message,\n        bytes calldata _extraData\n    ) external payable;\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { IMessageLibManager } from \"./IMessageLibManager.sol\";\nimport { IMessagingComposer } from \"./IMessagingComposer.sol\";\nimport { IMessagingChannel } from \"./IMessagingChannel.sol\";\nimport { IMessagingContext } from \"./IMessagingContext.sol\";\n\nstruct MessagingParams {\n    uint32 dstEid;\n    bytes32 receiver;\n    bytes message;\n    bytes options;\n    bool payInLzToken;\n}\n\nstruct MessagingReceipt {\n    bytes32 guid;\n    uint64 nonce;\n    MessagingFee fee;\n}\n\nstruct MessagingFee {\n    uint256 nativeFee;\n    uint256 lzTokenFee;\n}\n\nstruct Origin {\n    uint32 srcEid;\n    bytes32 sender;\n    uint64 nonce;\n}\n\ninterface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {\n    event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);\n\n    event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);\n\n    event PacketDelivered(Origin origin, address receiver);\n\n    event LzReceiveAlert(\n        address indexed receiver,\n        address indexed executor,\n        Origin origin,\n        bytes32 guid,\n        uint256 gas,\n        uint256 value,\n        bytes message,\n        bytes extraData,\n        bytes reason\n    );\n\n    event LzTokenSet(address token);\n\n    event DelegateSet(address sender, address delegate);\n\n    function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);\n\n    function send(\n        MessagingParams calldata _params,\n        address _refundAddress\n    ) external payable returns (MessagingReceipt memory);\n\n    function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;\n\n    function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);\n\n    function initializable(Origin calldata _origin, address _receiver) external view returns (bool);\n\n    function lzReceive(\n        Origin calldata _origin,\n        address _receiver,\n        bytes32 _guid,\n        bytes calldata _message,\n        bytes calldata _extraData\n    ) external payable;\n\n    // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order\n    function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;\n\n    function setLzToken(address _lzToken) external;\n\n    function lzToken() external view returns (address);\n\n    function nativeToken() external view returns (address);\n\n    function setDelegate(address _delegate) external;\n}\n"},{"file_path":"src/interfaces/ICore.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\nimport { IAuthHook } from './IAuthHook.sol';\n\ninterface ICore {\n    struct OperatorAuth {\n        bool authorized;\n        IAuthHook hook;\n    }\n\n    event VoterSet(address indexed newVoter);\n    event OperatorExecuted(address indexed caller, address indexed target, bytes data);\n    event OperatorSet(address indexed caller, address indexed target, bool authorized, bytes4 selector, IAuthHook authHook);\n\n    function execute(address target, bytes calldata data) external returns (bytes memory);\n    function epochLength() external view returns (uint256);\n    function startTime() external view returns (uint256);\n    function voter() external view returns (address);\n    function ownershipTransferDeadline() external view returns (uint256);\n    function pendingOwner() external view returns (address);\n    function setOperatorPermissions(\n        address caller,\n        address target,\n        bytes4 selector,\n        bool authorized,\n        IAuthHook authHook\n    ) external;\n    function setVoter(address newVoter) external;\n    function operatorPermissions(address caller, address target, bytes4 selector) external view returns (bool authorized, IAuthHook hook);\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingContext {\n    function isSendingMessage() external view returns (bool);\n\n    function getSendContext() external view returns (uint32 dstEid, address sender);\n}\n"},{"file_path":"src/dependencies/EpochTracker.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\nimport \"../interfaces/ICore.sol\";\n\n/**\n    @title EpochTracker\n    @dev Provides a unified `startTime` and `getEpoch`, used for tracking epochs.\n */\ncontract EpochTracker {\n    uint256 public immutable startTime;\n    \n    /// @notice Length of an epoch, in seconds\n    uint256 public immutable epochLength;\n\n    constructor(address _core) {\n        startTime = ICore(_core).startTime();\n        epochLength = ICore(_core).epochLength();\n    }\n\n    function getEpoch() public view returns (uint256 epoch) {\n        return (block.timestamp - startTime) / epochLength;\n    }\n}"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingChannel {\n    event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);\n    event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\n    event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\n\n    function eid() external view returns (uint32);\n\n    // this is an emergency function if a message cannot be verified for some reasons\n    // required to provide _nextNonce to avoid race condition\n    function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;\n\n    function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\n\n    function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\n\n    function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);\n\n    function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\n\n    function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);\n\n    function inboundPayloadHash(\n        address _receiver,\n        uint32 _srcEid,\n        bytes32 _sender,\n        uint64 _nonce\n    ) external view returns (bytes32);\n\n    function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\n}\n"},{"file_path":"src/libraries/solmate/SafeTransferLib.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"./ERC20.sol\";\n\n/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)\n/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.\nlibrary SafeTransferLib {\n    /*//////////////////////////////////////////////////////////////\n                             ETH OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferETH(address to, uint256 amount) internal {\n        bool success;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Transfer the ETH and store if it succeeded or not.\n            success := call(gas(), to, amount, 0, 0, 0, 0)\n        }\n\n        require(success, \"ETH_TRANSFER_FAILED\");\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            ERC20 OPERATIONS\n    //////////////////////////////////////////////////////////////*/\n\n    function safeTransferFrom(\n        ERC20 token,\n        address from,\n        address to,\n        uint256 amount\n    ) internal {\n        bool success;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata into memory, beginning with the function selector.\n            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\n            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"from\" argument.\n            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"to\" argument.\n            mstore(add(freeMemoryPointer, 68), amount) // Append the \"amount\" argument. Masking not required as it's a full 32 byte type.\n\n            // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.\n            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\n            success := call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)\n\n            // Set success to whether the call reverted, if not we check it either\n            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.\n            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {\n                success := iszero(or(iszero(extcodesize(token)), returndatasize())) \n            }\n        }\n\n        require(success, \"TRANSFER_FROM_FAILED\");\n    }\n\n    function safeTransfer(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool success;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata into memory, beginning with the function selector.\n            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Append the \"amount\" argument. Masking not required as it's a full 32 byte type.\n\n            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.\n            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\n            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)\n\n            // Set success to whether the call reverted, if not we check it either\n            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.\n            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {\n                success := iszero(or(iszero(extcodesize(token)), returndatasize())) \n            }\n        }\n\n        require(success, \"TRANSFER_FAILED\");\n    }\n\n    function safeApprove(\n        ERC20 token,\n        address to,\n        uint256 amount\n    ) internal {\n        bool success;\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Get a pointer to some free memory.\n            let freeMemoryPointer := mload(0x40)\n\n            // Write the abi-encoded calldata into memory, beginning with the function selector.\n            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)\n            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \"to\" argument.\n            mstore(add(freeMemoryPointer, 36), amount) // Append the \"amount\" argument. Masking not required as it's a full 32 byte type.\n\n            // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.\n            // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\n            success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)\n\n            // Set success to whether the call reverted, if not we check it either\n            // returned exactly 1 (can't just be non-zero data), or had no return data and token has code.\n            if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) {\n                success := iszero(or(iszero(extcodesize(token)), returndatasize())) \n            }\n        }\n\n        require(success, \"APPROVE_FAILED\");\n    }\n}\n"},{"file_path":"src/interfaces/IAuthHook.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\ninterface IAuthHook {\n    function preHook(address operator, address target, bytes calldata data) external returns (bool);\n    function postHook(bytes memory result, address operator, address target, bytes calldata data) external returns (bool);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oft-evm/contracts/interfaces/IOFT.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { MessagingReceipt, MessagingFee } from \"@layerzerolabs/oapp-evm/contracts/oapp/OAppSender.sol\";\n\n/**\n * @dev Struct representing token parameters for the OFT send() operation.\n */\nstruct SendParam {\n    uint32 dstEid; // Destination endpoint ID.\n    bytes32 to; // Recipient address.\n    uint256 amountLD; // Amount to send in local decimals.\n    uint256 minAmountLD; // Minimum amount to send in local decimals.\n    bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.\n    bytes composeMsg; // The composed message for the send() operation.\n    bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.\n}\n\n/**\n * @dev Struct representing OFT limit information.\n * @dev These amounts can change dynamically and are up the specific oft implementation.\n */\nstruct OFTLimit {\n    uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.\n    uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.\n}\n\n/**\n * @dev Struct representing OFT receipt information.\n */\nstruct OFTReceipt {\n    uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.\n    // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.\n    uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.\n}\n\n/**\n * @dev Struct representing OFT fee details.\n * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.\n */\nstruct OFTFeeDetail {\n    int256 feeAmountLD; // Amount of the fee in local decimals.\n    string description; // Description of the fee.\n}\n\n/**\n * @title IOFT\n * @dev Interface for the OftChain (OFT) token.\n * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.\n * @dev This specific interface ID is '0x02e49c2c'.\n */\ninterface IOFT {\n    // Custom error messages\n    error InvalidLocalDecimals();\n    error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);\n\n    // Events\n    event OFTSent(\n        bytes32 indexed guid, // GUID of the OFT message.\n        uint32 dstEid, // Destination Endpoint ID.\n        address indexed fromAddress, // Address of the sender on the src chain.\n        uint256 amountSentLD, // Amount of tokens sent in local decimals.\n        uint256 amountReceivedLD // Amount of tokens received in local decimals.\n    );\n    event OFTReceived(\n        bytes32 indexed guid, // GUID of the OFT message.\n        uint32 srcEid, // Source Endpoint ID.\n        address indexed toAddress, // Address of the recipient on the dst chain.\n        uint256 amountReceivedLD // Amount of tokens received in local decimals.\n    );\n\n    /**\n     * @notice Retrieves interfaceID and the version of the OFT.\n     * @return interfaceId The interface ID.\n     * @return version The version.\n     *\n     * @dev interfaceId: This specific interface ID is '0x02e49c2c'.\n     * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.\n     * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.\n     * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)\n     */\n    function oftVersion() external view returns (bytes4 interfaceId, uint64 version);\n\n    /**\n     * @notice Retrieves the address of the token associated with the OFT.\n     * @return token The address of the ERC20 token implementation.\n     */\n    function token() external view returns (address);\n\n    /**\n     * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.\n     * @return requiresApproval Needs approval of the underlying token implementation.\n     *\n     * @dev Allows things like wallet implementers to determine integration requirements,\n     * without understanding the underlying token implementation.\n     */\n    function approvalRequired() external view returns (bool);\n\n    /**\n     * @notice Retrieves the shared decimals of the OFT.\n     * @return sharedDecimals The shared decimals of the OFT.\n     */\n    function sharedDecimals() external view returns (uint8);\n\n    /**\n     * @notice Provides the fee breakdown and settings data for an OFT. Unused in the default implementation.\n     * @param _sendParam The parameters for the send operation.\n     * @return limit The OFT limit information.\n     * @return oftFeeDetails The details of OFT fees.\n     * @return receipt The OFT receipt information.\n     */\n    function quoteOFT(\n        SendParam calldata _sendParam\n    ) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);\n\n    /**\n     * @notice Provides a quote for the send() operation.\n     * @param _sendParam The parameters for the send() operation.\n     * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.\n     * @return fee The calculated LayerZero messaging fee from the send() operation.\n     *\n     * @dev MessagingFee: LayerZero msg fee\n     *  - nativeFee: The native fee.\n     *  - lzTokenFee: The lzToken fee.\n     */\n    function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);\n\n    /**\n     * @notice Executes the send() operation.\n     * @param _sendParam The parameters for the send operation.\n     * @param _fee The fee information supplied by the caller.\n     *      - nativeFee: The native fee.\n     *      - lzTokenFee: The lzToken fee.\n     * @param _refundAddress The address to receive any excess funds from fees etc. on the src.\n     * @return receipt The LayerZero messaging receipt from the send() operation.\n     * @return oftReceipt The OFT receipt information.\n     *\n     * @dev MessagingReceipt: LayerZero msg receipt\n     *  - guid: The unique identifier for the sent message.\n     *  - nonce: The nonce of the sent message.\n     *  - fee: The LayerZero fee incurred for the message.\n     */\n    function send(\n        SendParam calldata _sendParam,\n        MessagingFee calldata _fee,\n        address _refundAddress\n    ) external payable returns (MessagingReceipt memory, OFTReceipt memory);\n}\n"},{"file_path":"src/interfaces/IFeeDepositController.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\n/// @title IFeeDepositController\n/// @notice Interface for the FeeDepositController contract that handles distribution of fees\ninterface IFeeDepositController {\n    /// @notice Struct defining the split percentages for fee distribution\n    struct Splits {\n        uint40 insurance;\n        uint40 treasury;\n        uint40 platform;\n        uint40 stakedStable;\n    }\n\n    /// @notice Emitted when fee distribution splits are updated\n    /// @param insurance The percentage (in BPS) allocated to insurance pool\n    /// @param treasury The percentage (in BPS) allocated to treasury\n    /// @param platform The percentage (in BPS) allocated to platform stakers\n    event SplitsSet(uint40 insurance, uint40 treasury, uint40 platform, uint40 stakedStable);\n    event AdditionalFeeRatioSet(uint256 ratio);\n\n    /// @notice Returns the address of the registry contract\n    function registry() external view returns (address);\n\n    /// @notice Returns the address of the treasury\n    function treasury() external view returns (address);\n\n    /// @notice Returns the address of the fee deposit contract\n    function feeDeposit() external view returns (address);\n\n    /// @notice Returns the address of the fee token\n    function feeToken() external view returns (address);\n\n    /// @notice Returns the basis points constant (10,000)\n    function BPS() external view returns (uint256);\n\n    /// @notice Returns the current split configuration\n    function splits() external view returns (Splits memory);\n\n    /// @notice Distributes collected fees according to the configured splits\n    function distribute() external;\n\n    /// @notice Sets the fee distribution splits between insurance, treasury, and platform\n    /// @param _insuranceSplit The percentage (in BPS) to send to insurance pool\n    /// @param _treasurySplit The percentage (in BPS) to send to treasury\n    /// @param _platformSplit The percentage (in BPS) to send to platform stakers\n    /// @param _stakedStableSplit The percentage (in BPS) to send to staked stable\n    function setSplits(uint256 _insuranceSplit, uint256 _treasurySplit, uint256 _platformSplit, uint256 _stakedStableSplit) external;\n\n\n    function setAdditionalFeeRatio(uint256 _additionalFee) external;\n\n    /// @notice Returns the maximum additional fee ratio\n    function additionalFeeRatio() external view returns (uint256);\n\n}"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/OAppSender.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { MessagingParams, MessagingFee, MessagingReceipt } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\";\nimport { OAppCore } from \"./OAppCore.sol\";\n\n/**\n * @title OAppSender\n * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.\n */\nabstract contract OAppSender is OAppCore {\n    using SafeERC20 for IERC20;\n\n    // Custom error messages\n    error NotEnoughNative(uint256 msgValue);\n    error LzTokenUnavailable();\n\n    // @dev The version of the OAppSender implementation.\n    // @dev Version is bumped when changes are made to this contract.\n    uint64 internal constant SENDER_VERSION = 1;\n\n    /**\n     * @notice Retrieves the OApp version information.\n     * @return senderVersion The version of the OAppSender.sol contract.\n     * @return receiverVersion The version of the OAppReceiver.sol contract.\n     *\n     * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.\n     * ie. this is a SEND only OApp.\n     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions\n     */\n    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {\n        return (SENDER_VERSION, 0);\n    }\n\n    /**\n     * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.\n     * @param _dstEid The destination endpoint ID.\n     * @param _message The message payload.\n     * @param _options Additional options for the message.\n     * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.\n     * @return fee The calculated MessagingFee for the message.\n     *      - nativeFee: The native fee for the message.\n     *      - lzTokenFee: The LZ token fee for the message.\n     */\n    function _quote(\n        uint32 _dstEid,\n        bytes memory _message,\n        bytes memory _options,\n        bool _payInLzToken\n    ) internal view virtual returns (MessagingFee memory fee) {\n        return\n            endpoint.quote(\n                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),\n                address(this)\n            );\n    }\n\n    /**\n     * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.\n     * @param _dstEid The destination endpoint ID.\n     * @param _message The message payload.\n     * @param _options Additional options for the message.\n     * @param _fee The calculated LayerZero fee for the message.\n     *      - nativeFee: The native fee.\n     *      - lzTokenFee: The lzToken fee.\n     * @param _refundAddress The address to receive any excess fee values sent to the endpoint.\n     * @return receipt The receipt for the sent message.\n     *      - guid: The unique identifier for the sent message.\n     *      - nonce: The nonce of the sent message.\n     *      - fee: The LayerZero fee incurred for the message.\n     */\n    function _lzSend(\n        uint32 _dstEid,\n        bytes memory _message,\n        bytes memory _options,\n        MessagingFee memory _fee,\n        address _refundAddress\n    ) internal virtual returns (MessagingReceipt memory receipt) {\n        // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.\n        uint256 messageValue = _payNative(_fee.nativeFee);\n        if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);\n\n        return\n            // solhint-disable-next-line check-send-result\n            endpoint.send{ value: messageValue }(\n                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),\n                _refundAddress\n            );\n    }\n\n    /**\n     * @dev Internal function to pay the native fee associated with the message.\n     * @param _nativeFee The native fee to be paid.\n     * @return nativeFee The amount of native currency paid.\n     *\n     * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,\n     * this will need to be overridden because msg.value would contain multiple lzFees.\n     * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.\n     * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.\n     * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.\n     */\n    function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {\n        if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);\n        return _nativeFee;\n    }\n\n    /**\n     * @dev Internal function to pay the LZ token fee associated with the message.\n     * @param _lzTokenFee The LZ token fee to be paid.\n     *\n     * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.\n     * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().\n     */\n    function _payLzToken(uint256 _lzTokenFee) internal virtual {\n        // @dev Cannot cache the token because it is not immutable in the endpoint.\n        address lzToken = endpoint.lzToken();\n        if (lzToken == address(0)) revert LzTokenUnavailable();\n\n        // Pay LZ token fee by sending tokens to the endpoint.\n        IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { MessagingFee } from \"./ILayerZeroEndpointV2.sol\";\nimport { IMessageLib } from \"./IMessageLib.sol\";\n\nstruct Packet {\n    uint64 nonce;\n    uint32 srcEid;\n    address sender;\n    uint32 dstEid;\n    bytes32 receiver;\n    bytes32 guid;\n    bytes message;\n}\n\ninterface ISendLib is IMessageLib {\n    function send(\n        Packet calldata _packet,\n        bytes calldata _options,\n        bool _payInLzToken\n    ) external returns (MessagingFee memory, bytes memory encodedPacket);\n\n    function quote(\n        Packet calldata _packet,\n        bytes calldata _options,\n        bool _payInLzToken\n    ) external view returns (MessagingFee memory);\n\n    function setTreasury(address _treasury) external;\n\n    function withdrawFee(address _to, uint256 _amount) external;\n\n    function withdrawLzTokenFee(address _lzToken, address _to, uint256 _amount) external;\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Struct representing enforced option parameters.\n */\nstruct EnforcedOptionParam {\n    uint32 eid; // Endpoint ID\n    uint16 msgType; // Message Type\n    bytes options; // Additional options\n}\n\n/**\n * @title IOAppOptionsType3\n * @dev Interface for the OApp with Type 3 Options, allowing the setting and combining of enforced options.\n */\ninterface IOAppOptionsType3 {\n    // Custom error message for invalid options\n    error InvalidOptions(bytes options);\n\n    // Event emitted when enforced options are set\n    event EnforcedOptionSet(EnforcedOptionParam[] _enforcedOptions);\n\n    /**\n     * @notice Sets enforced options for specific endpoint and message type combinations.\n     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.\n     */\n    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) external;\n\n    /**\n     * @notice Combines options for a given endpoint and message type.\n     * @param _eid The endpoint ID.\n     * @param _msgType The OApp message type.\n     * @param _extraOptions Additional options passed by the caller.\n     * @return options The combination of caller specified options AND enforced options.\n     */\n    function combineOptions(\n        uint32 _eid,\n        uint16 _msgType,\n        bytes calldata _extraOptions\n    ) external view returns (bytes memory options);\n}\n"},{"file_path":"src/libraries/solmate/ERC20.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\nabstract contract ERC20 {\n    /*//////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Transfer(address indexed from, address indexed to, uint256 amount);\n\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n    /*//////////////////////////////////////////////////////////////\n                            METADATA STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    string public name;\n\n    string public symbol;\n\n    uint8 public immutable decimals;\n\n    /*//////////////////////////////////////////////////////////////\n                              ERC20 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 public totalSupply;\n\n    mapping(address => uint256) public balanceOf;\n\n    mapping(address => mapping(address => uint256)) public allowance;\n\n    /*//////////////////////////////////////////////////////////////\n                            EIP-2612 STORAGE\n    //////////////////////////////////////////////////////////////*/\n\n    uint256 internal immutable INITIAL_CHAIN_ID;\n\n    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\n\n    mapping(address => uint256) public nonces;\n\n    /*//////////////////////////////////////////////////////////////\n                               CONSTRUCTOR\n    //////////////////////////////////////////////////////////////*/\n\n    constructor(\n        string memory _name,\n        string memory _symbol,\n        uint8 _decimals\n    ) {\n        name = _name;\n        symbol = _symbol;\n        decimals = _decimals;\n\n        INITIAL_CHAIN_ID = block.chainid;\n        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                               ERC20 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function approve(address spender, uint256 amount) public virtual returns (bool) {\n        allowance[msg.sender][spender] = amount;\n\n        emit Approval(msg.sender, spender, amount);\n\n        return true;\n    }\n\n    function transfer(address to, uint256 amount) public virtual returns (bool) {\n        balanceOf[msg.sender] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(msg.sender, to, amount);\n\n        return true;\n    }\n\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) public virtual returns (bool) {\n        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\n\n        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\n\n        balanceOf[from] -= amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(from, to, amount);\n\n        return true;\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                             EIP-2612 LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) public virtual {\n        require(deadline >= block.timestamp, \"PERMIT_DEADLINE_EXPIRED\");\n\n        // Unchecked because the only math done is incrementing\n        // the owner's nonce which cannot realistically overflow.\n        unchecked {\n            address recoveredAddress = ecrecover(\n                keccak256(\n                    abi.encodePacked(\n                        \"\\x19\\x01\",\n                        DOMAIN_SEPARATOR(),\n                        keccak256(\n                            abi.encode(\n                                keccak256(\n                                    \"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\"\n                                ),\n                                owner,\n                                spender,\n                                value,\n                                nonces[owner]++,\n                                deadline\n                            )\n                        )\n                    )\n                ),\n                v,\n                r,\n                s\n            );\n\n            require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNER\");\n\n            allowance[recoveredAddress][spender] = value;\n        }\n\n        emit Approval(owner, spender, value);\n    }\n\n    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\n        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\n    }\n\n    function computeDomainSeparator() internal view virtual returns (bytes32) {\n        return\n            keccak256(\n                abi.encode(\n                    keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n                    keccak256(bytes(name)),\n                    keccak256(\"1\"),\n                    block.chainid,\n                    address(this)\n                )\n            );\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        INTERNAL MINT/BURN LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function _mint(address to, uint256 amount) internal virtual {\n        totalSupply += amount;\n\n        // Cannot overflow because the sum of all user\n        // balances can't exceed the max uint256 value.\n        unchecked {\n            balanceOf[to] += amount;\n        }\n\n        emit Transfer(address(0), to, amount);\n    }\n\n    function _burn(address from, uint256 amount) internal virtual {\n        balanceOf[from] -= amount;\n\n        // Cannot underflow because a user's balance\n        // will never be larger than the total supply.\n        unchecked {\n            totalSupply -= amount;\n        }\n\n        emit Transfer(from, address(0), amount);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nstruct SetConfigParam {\n    uint32 eid;\n    uint32 configType;\n    bytes config;\n}\n\ninterface IMessageLibManager {\n    struct Timeout {\n        address lib;\n        uint256 expiry;\n    }\n\n    event LibraryRegistered(address newLib);\n    event DefaultSendLibrarySet(uint32 eid, address newLib);\n    event DefaultReceiveLibrarySet(uint32 eid, address newLib);\n    event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);\n    event SendLibrarySet(address sender, uint32 eid, address newLib);\n    event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);\n    event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);\n\n    function registerLibrary(address _lib) external;\n\n    function isRegisteredLibrary(address _lib) external view returns (bool);\n\n    function getRegisteredLibraries() external view returns (address[] memory);\n\n    function setDefaultSendLibrary(uint32 _eid, address _newLib) external;\n\n    function defaultSendLibrary(uint32 _eid) external view returns (address);\n\n    function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external;\n\n    function defaultReceiveLibrary(uint32 _eid) external view returns (address);\n\n    function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;\n\n    function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);\n\n    function isSupportedEid(uint32 _eid) external view returns (bool);\n\n    function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);\n\n    /// ------------------- OApp interfaces -------------------\n    function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;\n\n    function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);\n\n    function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);\n\n    function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;\n\n    function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);\n\n    function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external;\n\n    function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);\n\n    function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;\n\n    function getConfig(\n        address _oapp,\n        address _lib,\n        uint32 _eid,\n        uint32 _configType\n    ) external view returns (bytes memory config);\n}\n"},{"file_path":"src/interfaces/IFeeDeposit.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity 0.8.28;\n\ninterface IFeeDeposit {\n    function operator() external view returns(address);\n    function lastDistributedEpoch() external view returns(uint256);\n    function setOperator(address _newAddress) external;\n    function distributeFees() external;\n    function incrementPairRevenue(uint256 _fees, uint256 _otherFees) external;\n    function getEpoch() external view returns(uint256);\n}"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppReceiver.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport { ILayerZeroReceiver, Origin } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol\";\n\ninterface IOAppReceiver is ILayerZeroReceiver {\n    /**\n     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.\n     * @param _origin The origin information containing the source endpoint and sender address.\n     *  - srcEid: The source chain endpoint ID.\n     *  - sender: The sender address on the src chain.\n     *  - nonce: The nonce of the message.\n     * @param _message The lzReceive payload.\n     * @param _sender The sender address.\n     * @return isSender Is a valid sender.\n     *\n     * @dev Applications can optionally choose to implement a separate composeMsg sender that is NOT the bridging layer.\n     * @dev The default sender IS the OAppReceiver implementer.\n     */\n    function isComposeMsgSender(\n        Origin calldata _origin,\n        bytes calldata _message,\n        address _sender\n    ) external view returns (bool isSender);\n}\n"},{"file_path":"node_modules/@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { Origin } from \"./ILayerZeroEndpointV2.sol\";\n\ninterface ILayerZeroReceiver {\n    function allowInitializePath(Origin calldata _origin) external view returns (bool);\n\n    function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64);\n\n    function lzReceive(\n        Origin calldata _origin,\n        bytes32 _guid,\n        bytes calldata _message,\n        address _executor,\n        bytes calldata _extraData\n    ) external payable;\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/oapp/libs/OAppOptionsType3.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport { IOAppOptionsType3, EnforcedOptionParam } from \"../interfaces/IOAppOptionsType3.sol\";\n\n/**\n * @title OAppOptionsType3\n * @dev Abstract contract implementing the IOAppOptionsType3 interface with type 3 options.\n */\nabstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {\n    uint16 internal constant OPTION_TYPE_3 = 3;\n\n    // @dev The \"msgType\" should be defined in the child contract.\n    mapping(uint32 eid => mapping(uint16 msgType => bytes enforcedOption)) public enforcedOptions;\n\n    /**\n     * @dev Sets the enforced options for specific endpoint and message type combinations.\n     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.\n     *\n     * @dev Only the owner/admin of the OApp can call this function.\n     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.\n     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.\n     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay\n     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().\n     */\n    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) public virtual onlyOwner {\n        _setEnforcedOptions(_enforcedOptions);\n    }\n\n    /**\n     * @dev Sets the enforced options for specific endpoint and message type combinations.\n     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.\n     *\n     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.\n     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.\n     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay\n     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().\n     */\n    function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual {\n        for (uint256 i = 0; i < _enforcedOptions.length; i++) {\n            // @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining.\n            _assertOptionsType3(_enforcedOptions[i].options);\n            enforcedOptions[_enforcedOptions[i].eid][_enforcedOptions[i].msgType] = _enforcedOptions[i].options;\n        }\n\n        emit EnforcedOptionSet(_enforcedOptions);\n    }\n\n    /**\n     * @notice Combines options for a given endpoint and message type.\n     * @param _eid The endpoint ID.\n     * @param _msgType The OAPP message type.\n     * @param _extraOptions Additional options passed by the caller.\n     * @return options The combination of caller specified options AND enforced options.\n     *\n     * @dev If there is an enforced lzReceive option:\n     * - {gasLimit: 200k, msg.value: 1 ether} AND a caller supplies a lzReceive option: {gasLimit: 100k, msg.value: 0.5 ether}\n     * - The resulting options will be {gasLimit: 300k, msg.value: 1.5 ether} when the message is executed on the remote lzReceive() function.\n     * @dev This presence of duplicated options is handled off-chain in the verifier/executor.\n     */\n    function combineOptions(\n        uint32 _eid,\n        uint16 _msgType,\n        bytes calldata _extraOptions\n    ) public view virtual returns (bytes memory) {\n        bytes memory enforced = enforcedOptions[_eid][_msgType];\n\n        // No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options.\n        if (enforced.length == 0) return _extraOptions;\n\n        // No caller options, return enforced\n        if (_extraOptions.length == 0) return enforced;\n\n        // @dev If caller provided _extraOptions, must be type 3 as its the ONLY type that can be combined.\n        if (_extraOptions.length >= 2) {\n            _assertOptionsType3(_extraOptions);\n            // @dev Remove the first 2 bytes containing the type from the _extraOptions and combine with enforced.\n            return bytes.concat(enforced, _extraOptions[2:]);\n        }\n\n        // No valid set of options was found.\n        revert InvalidOptions(_extraOptions);\n    }\n\n    /**\n     * @dev Internal function to assert that options are of type 3.\n     * @param _options The options to be checked.\n     */\n    function _assertOptionsType3(bytes memory _options) internal pure virtual {\n        uint16 optionsType;\n        assembly {\n            optionsType := mload(add(_options, 2))\n        }\n        if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options);\n    }\n}\n"},{"file_path":"node_modules/@layerzerolabs/oapp-evm/contracts/precrime/libs/Packet.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.20;\n\nimport { Origin } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\";\nimport { PacketV1Codec } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol\";\n\n/**\n * @title InboundPacket\n * @dev Structure representing an inbound packet received by the contract.\n */\nstruct InboundPacket {\n    Origin origin; // Origin information of the packet.\n    uint32 dstEid; // Destination endpointId of the packet.\n    address receiver; // Receiver address for the packet.\n    bytes32 guid; // Unique identifier of the packet.\n    uint256 value; // msg.value of the packet.\n    address executor; // Executor address for the packet.\n    bytes message; // Message payload of the packet.\n    bytes extraData; // Additional arbitrary data for the packet.\n}\n\n/**\n * @title PacketDecoder\n * @dev Library for decoding LayerZero packets.\n */\nlibrary PacketDecoder {\n    using PacketV1Codec for bytes;\n\n    /**\n     * @dev Decode an inbound packet from the given packet data.\n     * @param _packet The packet data to decode.\n     * @return packet An InboundPacket struct representing the decoded packet.\n     */\n    function decode(bytes calldata _packet) internal pure returns (InboundPacket memory packet) {\n        packet.origin = Origin(_packet.srcEid(), _packet.sender(), _packet.nonce());\n        packet.dstEid = _packet.dstEid();\n        packet.receiver = _packet.receiverB20();\n        packet.guid = _packet.guid();\n        packet.message = _packet.message();\n    }\n\n    /**\n     * @dev Decode multiple inbound packets from the given packet data and associated message values.\n     * @param _packets An array of packet data to decode.\n     * @param _packetMsgValues An array of associated message values for each packet.\n     * @return packets An array of InboundPacket structs representing the decoded packets.\n     */\n    function decode(\n        bytes[] calldata _packets,\n        uint256[] memory _packetMsgValues\n    ) internal pure returns (InboundPacket[] memory packets) {\n        packets = new InboundPacket[](_packets.length);\n        for (uint256 i = 0; i < _packets.length; i++) {\n            bytes calldata packet = _packets[i];\n            packets[i] = PacketDecoder.decode(packet);\n            // @dev Allows the verifier to specify the msg.value that gets passed in lzReceive.\n            packets[i].value = _packetMsgValues[i];\n        }\n    }\n}\n"},{"file_path":"src/libraries/solmate/ERC4626.sol","source_code":"// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.8.0;\n\nimport {ERC20} from \"./ERC20.sol\";\nimport {SafeTransferLib} from \"./SafeTransferLib.sol\";\nimport {FixedPointMathLib} from \"./FixedPointMathLib.sol\";\n\n/// @notice Minimal ERC4626 tokenized Vault implementation.\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC4626.sol)\nabstract contract ERC4626 is ERC20 {\n    using SafeTransferLib for ERC20;\n    using FixedPointMathLib for uint256;\n\n    /*//////////////////////////////////////////////////////////////\n                                 EVENTS\n    //////////////////////////////////////////////////////////////*/\n\n    event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\n\n    event Withdraw(\n        address indexed caller,\n        address indexed receiver,\n        address indexed owner,\n        uint256 assets,\n        uint256 shares\n    );\n\n    /*//////////////////////////////////////////////////////////////\n                               IMMUTABLES\n    //////////////////////////////////////////////////////////////*/\n\n    ERC20 public immutable asset;\n\n    constructor(\n        ERC20 _asset,\n        string memory _name,\n        string memory _symbol\n    ) ERC20(_name, _symbol, _asset.decimals()) {\n        asset = _asset;\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                        DEPOSIT/WITHDRAWAL LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function deposit(uint256 assets, address receiver) public virtual returns (uint256 shares) {\n        // Check for rounding error since we round down in previewDeposit.\n        require((shares = previewDeposit(assets)) != 0, \"ZERO_SHARES\");\n\n        // Need to transfer before minting or ERC777s could reenter.\n        asset.safeTransferFrom(msg.sender, address(this), assets);\n\n        _mint(receiver, shares);\n\n        emit Deposit(msg.sender, receiver, assets, shares);\n\n        afterDeposit(assets, shares);\n    }\n\n    function mint(uint256 shares, address receiver) public virtual returns (uint256 assets) {\n        assets = previewMint(shares); // No need to check for rounding error, previewMint rounds up.\n\n        // Need to transfer before minting or ERC777s could reenter.\n        asset.safeTransferFrom(msg.sender, address(this), assets);\n\n        _mint(receiver, shares);\n\n        emit Deposit(msg.sender, receiver, assets, shares);\n\n        afterDeposit(assets, shares);\n    }\n\n    function withdraw(\n        uint256 assets,\n        address receiver,\n        address owner\n    ) public virtual returns (uint256 shares) {\n        shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up.\n\n        if (msg.sender != owner) {\n            uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\n\n            if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\n        }\n\n        beforeWithdraw(assets, shares);\n\n        _burn(owner, shares);\n\n        emit Withdraw(msg.sender, receiver, owner, assets, shares);\n\n        asset.safeTransfer(receiver, assets);\n    }\n\n    function redeem(\n        uint256 shares,\n        address receiver,\n        address owner\n    ) public virtual returns (uint256 assets) {\n        if (msg.sender != owner) {\n            uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals.\n\n            if (allowed != type(uint256).max) allowance[owner][msg.sender] = allowed - shares;\n        }\n\n        // Check for rounding error since we round down in previewRedeem.\n        require((assets = previewRedeem(shares)) != 0, \"ZERO_ASSETS\");\n\n        beforeWithdraw(assets, shares);\n\n        _burn(owner, shares);\n\n        emit Withdraw(msg.sender, receiver, owner, assets, shares);\n\n        asset.safeTransfer(receiver, assets);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                            ACCOUNTING LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function totalAssets() public view virtual returns (uint256);\n\n    function convertToShares(uint256 assets) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? assets : assets.mulDivDown(supply, totalAssets());\n    }\n\n    function convertToAssets(uint256 shares) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? shares : shares.mulDivDown(totalAssets(), supply);\n    }\n\n    function previewDeposit(uint256 assets) public view virtual returns (uint256) {\n        return convertToShares(assets);\n    }\n\n    function previewMint(uint256 shares) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? shares : shares.mulDivUp(totalAssets(), supply);\n    }\n\n    function previewWithdraw(uint256 assets) public view virtual returns (uint256) {\n        uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero.\n\n        return supply == 0 ? assets : assets.mulDivUp(supply, totalAssets());\n    }\n\n    function previewRedeem(uint256 shares) public view virtual returns (uint256) {\n        return convertToAssets(shares);\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                     DEPOSIT/WITHDRAWAL LIMIT LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function maxDeposit(address) public view virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    function maxMint(address) public view virtual returns (uint256) {\n        return type(uint256).max;\n    }\n\n    function maxWithdraw(address owner) public view virtual returns (uint256) {\n        return convertToAssets(balanceOf[owner]);\n    }\n\n    function maxRedeem(address owner) public view virtual returns (uint256) {\n        return balanceOf[owner];\n    }\n\n    /*//////////////////////////////////////////////////////////////\n                          INTERNAL HOOKS LOGIC\n    //////////////////////////////////////////////////////////////*/\n\n    function beforeWithdraw(uint256 assets, uint256 shares) internal virtual {}\n\n    function afterDeposit(uint256 assets, uint256 shares) internal virtual {}\n}\n"},{"file_path":"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Context.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_registry","type":"address"},{"internalType":"address","name":"_lzEndpoint","type":"address"},{"internalType":"address","name":"_underlying","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxDistributionPerSecondPerAsset","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[],"name":"InvalidLocalDecimals","type":"error"},{"inputs":[{"internalType":"bytes","name":"options","type":"bytes"}],"name":"InvalidOptions","type":"error"},{"inputs":[],"name":"LzTokenUnavailable","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"NotEnoughNative","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"OnlyEndpoint","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"inputs":[],"name":"OnlySelf","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"SimulationResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"}],"name":"SlippageExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardsToDistribute","type":"uint256"}],"name":"DistributeRewards","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"indexed":false,"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"EnforcedOptionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"inspector","type":"address"}],"name":"MsgInspectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"dstEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"preCrimeAddress","type":"address"}],"name":"PreCrimeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMax","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"SetMaxDistributionPerSecondPerAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint40","name":"cycleEnd","type":"uint40"},{"indexed":false,"internalType":"uint40","name":"lastSync","type":"uint40"},{"indexed":false,"internalType":"uint256","name":"rewardCycleAmount","type":"uint256"}],"name":"SyncRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REWARDS_CYCLE_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_AND_CALL","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNDERLYING_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"cycleEnd","type":"uint40"},{"internalType":"uint40","name":"lastSync","type":"uint40"},{"internalType":"uint256","name":"rewardCycleAmount","type":"uint256"}],"internalType":"struct LinearRewardsErc4626.RewardsCycleData","name":"_rewardsCycleData","type":"tuple"},{"internalType":"uint256","name":"_deltaTime","type":"uint256"}],"name":"calculateRewardsToDistribute","outputs":[{"internalType":"uint256","name":"_rewardToDistribute","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint16","name":"_msgType","type":"uint16"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"}],"name":"combineOptions","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalConversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"bool","name":"_approveMax","type":"bool"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"depositWithSignature","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"}],"name":"enforcedOptions","outputs":[{"internalType":"bytes","name":"enforcedOption","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEpoch","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isComposeMsgSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"isPeer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardsDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct InboundPacket[]","name":"_packets","type":"tuple[]"}],"name":"lzReceiveAndRevert","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceiveSimulate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxDistributionPerSecondPerAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"msgInspector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oApp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"oftVersion","outputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"uint64","name":"version","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"preCrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previewDistributeRewards","outputs":[{"internalType":"uint256","name":"_rewardToDistribute","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previewSyncRewards","outputs":[{"components":[{"internalType":"uint40","name":"cycleEnd","type":"uint40"},{"internalType":"uint40","name":"lastSync","type":"uint40"},{"internalType":"uint256","name":"rewardCycleAmount","type":"uint256"}],"internalType":"struct LinearRewardsErc4626.RewardsCycleData","name":"_newRewardsCycleData","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerShare","outputs":[{"internalType":"uint256","name":"_pricePerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"}],"name":"quoteOFT","outputs":[{"components":[{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"uint256","name":"maxAmountLD","type":"uint256"}],"internalType":"struct OFTLimit","name":"oftLimit","type":"tuple"},{"components":[{"internalType":"int256","name":"feeAmountLD","type":"int256"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct OFTFeeDetail[]","name":"oftFeeDetails","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quoteSend","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"msgFee","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsCycleData","outputs":[{"internalType":"uint40","name":"cycleEnd","type":"uint40"},{"internalType":"uint40","name":"lastSync","type":"uint40"},{"internalType":"uint256","name":"rewardCycleAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_fee","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"msgReceipt","type":"tuple"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"setEnforcedOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDistributionPerSecondPerAsset","type":"uint256"}],"name":"setMaxDistributionPerSecondPerAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_msgInspector","type":"address"}],"name":"setMsgInspector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_preCrime","type":"address"}],"name":"setPreCrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharedDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storedTotalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syncRewardsAndDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"_totalAssets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"0x000000000000000000000000c07e000044f95655c11fda4cd37f70a94d7e0a7d00000000000000000000000010101010e0c3171d894b71b3400668af311e7d940000000000000000000000001a44076050125825900e736c501f859c50fe728c00000000000000000000000057ab1e0003f623289cd798b1824be09a793e4bec00000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d536176696e67732072655553440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067372655553440000000000000000000000000000000000000000000000000000"}