Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 20 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16932269 | 674 days ago | 51.81804792 ETH | ||||
16932269 | 674 days ago | 51.81804792 ETH | ||||
16932255 | 674 days ago | 37.75 ETH | ||||
16932255 | 674 days ago | 37.75 ETH | ||||
16919098 | 676 days ago | 50 ETH | ||||
16919098 | 676 days ago | 50 ETH | ||||
16908680 | 677 days ago | 16.04194706 ETH | ||||
16908680 | 677 days ago | 16.04194706 ETH | ||||
16902099 | 678 days ago | 2.6 ETH | ||||
16902099 | 678 days ago | 2.6 ETH | ||||
16901652 | 678 days ago | 38.92 ETH | ||||
16901652 | 678 days ago | 38.92 ETH | ||||
16896468 | 679 days ago | 0.013 ETH | ||||
16896468 | 679 days ago | 0.013 ETH | ||||
16893534 | 679 days ago | 0.12 ETH | ||||
16893534 | 679 days ago | 0.12 ETH | ||||
16883454 | 681 days ago | 13.87114337 ETH | ||||
16883454 | 681 days ago | 13.87114337 ETH | ||||
16883312 | 681 days ago | 13.87416961 ETH | ||||
16883312 | 681 days ago | 13.87416961 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PendleSwapEthereum
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 90000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "@openzeppelin/contracts/utils/Address.sol"; import "../../core/libraries/TokenHelper.sol"; import "../../core/libraries/Errors.sol"; import "./IPSwapAggregator.sol"; import "./1inch/OneInchAggregationRouterHelper.sol"; import "./kyberswap/ethereum/KyberHelperEthereum.sol"; contract PendleSwapEthereum is IPSwapAggregator, TokenHelper, KyberHelperEthereum, OneInchAggregationRouterHelper { using Address for address; function swap(address tokenIn, uint256 amountIn, SwapData calldata data) external payable { _safeApproveInf(tokenIn, data.extRouter); data.extRouter.functionCallWithValue( data.needScale ? _getScaledInputData(data.swapType, data.extCalldata, amountIn) : data.extCalldata, tokenIn == NATIVE ? amountIn : 0 ); } function _getScaledInputData( SwapType swapType, bytes calldata rawCallData, uint256 amountIn ) internal pure returns (bytes memory scaledCallData) { if (swapType == SwapType.KYBERSWAP) { scaledCallData = _getKyberScaledInputData(rawCallData, amountIn); } else if (swapType == SwapType.ONE_INCH) { scaledCallData = _get1inchScaledInputData(rawCallData, amountIn); } else { assert(false); } } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; library Errors { // BulkSeller error BulkInsufficientSyForTrade(uint256 currentAmount, uint256 requiredAmount); error BulkInsufficientTokenForTrade(uint256 currentAmount, uint256 requiredAmount); error BulkInSufficientSyOut(uint256 actualSyOut, uint256 requiredSyOut); error BulkInSufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut); error BulkInsufficientSyReceived(uint256 actualBalance, uint256 requiredBalance); error BulkNotMaintainer(); error BulkNotAdmin(); error BulkSellerAlreadyExisted(address token, address SY, address bulk); error BulkSellerInvalidToken(address token, address SY); error BulkBadRateTokenToSy(uint256 actualRate, uint256 currentRate, uint256 eps); error BulkBadRateSyToToken(uint256 actualRate, uint256 currentRate, uint256 eps); // APPROX error ApproxFail(); error ApproxParamsInvalid(uint256 guessMin, uint256 guessMax, uint256 eps); error ApproxBinarySearchInputInvalid( uint256 approxGuessMin, uint256 approxGuessMax, uint256 minGuessMin, uint256 maxGuessMax ); // MARKET + MARKET MATH CORE error MarketExpired(); error MarketZeroAmountsInput(); error MarketZeroAmountsOutput(); error MarketZeroLnImpliedRate(); error MarketInsufficientPtForTrade(int256 currentAmount, int256 requiredAmount); error MarketInsufficientPtReceived(uint256 actualBalance, uint256 requiredBalance); error MarketInsufficientSyReceived(uint256 actualBalance, uint256 requiredBalance); error MarketZeroTotalPtOrTotalAsset(int256 totalPt, int256 totalAsset); error MarketExchangeRateBelowOne(int256 exchangeRate); error MarketProportionMustNotEqualOne(); error MarketRateScalarBelowZero(int256 rateScalar); error MarketScalarRootBelowZero(int256 scalarRoot); error MarketProportionTooHigh(int256 proportion, int256 maxProportion); error OracleUninitialized(); error OracleTargetTooOld(uint32 target, uint32 oldest); error OracleZeroCardinality(); error MarketFactoryExpiredPt(); error MarketFactoryInvalidPt(); error MarketFactoryMarketExists(); error MarketFactoryLnFeeRateRootTooHigh(uint80 lnFeeRateRoot, uint256 maxLnFeeRateRoot); error MarketFactoryReserveFeePercentTooHigh( uint8 reserveFeePercent, uint8 maxReserveFeePercent ); error MarketFactoryZeroTreasury(); error MarketFactoryInitialAnchorTooLow(int256 initialAnchor, int256 minInitialAnchor); // ROUTER error RouterInsufficientLpOut(uint256 actualLpOut, uint256 requiredLpOut); error RouterInsufficientSyOut(uint256 actualSyOut, uint256 requiredSyOut); error RouterInsufficientPtOut(uint256 actualPtOut, uint256 requiredPtOut); error RouterInsufficientYtOut(uint256 actualYtOut, uint256 requiredYtOut); error RouterInsufficientPYOut(uint256 actualPYOut, uint256 requiredPYOut); error RouterInsufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut); error RouterExceededLimitSyIn(uint256 actualSyIn, uint256 limitSyIn); error RouterExceededLimitPtIn(uint256 actualPtIn, uint256 limitPtIn); error RouterExceededLimitYtIn(uint256 actualYtIn, uint256 limitYtIn); error RouterInsufficientSyRepay(uint256 actualSyRepay, uint256 requiredSyRepay); error RouterInsufficientPtRepay(uint256 actualPtRepay, uint256 requiredPtRepay); error RouterNotAllSyUsed(uint256 netSyDesired, uint256 netSyUsed); error RouterTimeRangeZero(); error RouterCallbackNotPendleMarket(address caller); error RouterInvalidAction(bytes4 selector); error RouterInvalidFacet(address facet); error RouterKyberSwapDataZero(); // YIELD CONTRACT error YCExpired(); error YCNotExpired(); error YieldContractInsufficientSy(uint256 actualSy, uint256 requiredSy); error YCNothingToRedeem(); error YCPostExpiryDataNotSet(); error YCNoFloatingSy(); // YieldFactory error YCFactoryInvalidExpiry(); error YCFactoryYieldContractExisted(); error YCFactoryZeroExpiryDivisor(); error YCFactoryZeroTreasury(); error YCFactoryInterestFeeRateTooHigh(uint256 interestFeeRate, uint256 maxInterestFeeRate); error YCFactoryRewardFeeRateTooHigh(uint256 newRewardFeeRate, uint256 maxRewardFeeRate); // SY error SYInvalidTokenIn(address token); error SYInvalidTokenOut(address token); error SYZeroDeposit(); error SYZeroRedeem(); error SYInsufficientSharesOut(uint256 actualSharesOut, uint256 requiredSharesOut); error SYInsufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut); // SY-specific error SYQiTokenMintFailed(uint256 errCode); error SYQiTokenRedeemFailed(uint256 errCode); error SYQiTokenRedeemRewardsFailed(uint256 rewardAccruedType0, uint256 rewardAccruedType1); error SYQiTokenBorrowRateTooHigh(uint256 borrowRate, uint256 borrowRateMax); error SYCurveInvalidPid(); error SYCurve3crvPoolNotFound(); error SYApeDepositAmountTooSmall(uint256 amountDeposited); error SYBalancerInvalidPid(); error SYInvalidRewardToken(address token); // Liquidity Mining error VCInactivePool(address pool); error VCPoolAlreadyActive(address pool); error VCZeroVePendle(address user); error VCExceededMaxWeight(uint256 totalWeight, uint256 maxWeight); error VCEpochNotFinalized(uint256 wTime); error VCPoolAlreadyAddAndRemoved(address pool); error VEInvalidNewExpiry(uint256 newExpiry); error VEExceededMaxLockTime(); error VEInsufficientLockTime(); error VENotAllowedReduceExpiry(); error VEZeroAmountLocked(); error VEPositionNotExpired(); error VEZeroPosition(); error VEZeroSlope(uint128 bias, uint128 slope); error VEReceiveOldSupply(uint256 msgTime); error GCNotPendleMarket(address caller); error GCNotVotingController(address caller); error InvalidWTime(uint256 wTime); error ExpiryInThePast(uint256 expiry); error ChainNotSupported(uint256 chainId); error FDTotalAmountFundedNotMatch(uint256 actualTotalAmount, uint256 expectedTotalAmount); error FDEpochLengthMismatch(); error FDInvalidPool(address pool); error FDPoolAlreadyExists(address pool); error FDInvalidNewFinishedEpoch(uint256 oldFinishedEpoch, uint256 newFinishedEpoch); error FDInvalidStartEpoch(uint256 startEpoch); error FDInvalidWTimeFund(uint256 lastFunded, uint256 wTime); error FDFutureFunding(uint256 lastFunded, uint256 currentWTime); error BDInvalidEpoch(uint256 epoch, uint256 startTime); // Cross-Chain error MsgNotFromSendEndpoint(uint16 srcChainId, bytes path); error MsgNotFromReceiveEndpoint(address sender); error InsufficientFeeToSendMsg(uint256 currentFee, uint256 requiredFee); error ApproxDstExecutionGasNotSet(); error InvalidRetryData(); // GENERIC MSG error ArrayLengthMismatch(); error ArrayEmpty(); error ArrayOutOfBounds(); error ZeroAddress(); error FailedToSendEther(); error OnlyLayerZeroEndpoint(); error OnlyYT(); error OnlyYCFactory(); error OnlyWhitelisted(); // Swap Aggregator error SAInsufficientTokenIn(address tokenIn, uint256 amountExpected, uint256 amountActual); error UnsupportedSelector(uint256 aggregatorType, bytes4 selector); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../../interfaces/IWETH.sol"; abstract contract TokenHelper { using SafeERC20 for IERC20; address internal constant NATIVE = address(0); uint256 internal constant LOWER_BOUND_APPROVAL = type(uint96).max / 2; // some tokens use 96 bits for approval function _transferIn(address token, address from, uint256 amount) internal { if (token == NATIVE) require(msg.value == amount, "eth mismatch"); else if (amount != 0) IERC20(token).safeTransferFrom(from, address(this), amount); } function _transferFrom(IERC20 token, address from, address to, uint256 amount) internal { if (amount != 0) token.safeTransferFrom(from, to, amount); } function _transferOut(address token, address to, uint256 amount) internal { if (amount == 0) return; if (token == NATIVE) { (bool success, ) = to.call{ value: amount }(""); require(success, "eth send failed"); } else { IERC20(token).safeTransfer(to, amount); } } function _transferOut(address[] memory tokens, address to, uint256[] memory amounts) internal { uint256 numTokens = tokens.length; require(numTokens == amounts.length, "length mismatch"); for (uint256 i = 0; i < numTokens; ) { _transferOut(tokens[i], to, amounts[i]); unchecked { i++; } } } function _selfBalance(address token) internal view returns (uint256) { return (token == NATIVE) ? address(this).balance : IERC20(token).balanceOf(address(this)); } function _selfBalance(IERC20 token) internal view returns (uint256) { return token.balanceOf(address(this)); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev PLS PAY ATTENTION to tokens that requires the approval to be set to 0 before changing it function _safeApprove(address token, address to, uint256 value) internal { (bool success, bytes memory data) = token.call( abi.encodeWithSelector(IERC20.approve.selector, to, value) ); require(success && (data.length == 0 || abi.decode(data, (bool))), "Safe Approve"); } function _safeApproveInf(address token, address to) internal { if (token == NATIVE) return; if (IERC20(token).allowance(address(this), to) < LOWER_BOUND_APPROVAL) { _safeApprove(token, to, 0); _safeApprove(token, to, type(uint256).max); } } function _wrap_unwrap_ETH(address tokenIn, address tokenOut, uint256 netTokenIn) internal { if (tokenIn == NATIVE) IWETH(tokenOut).deposit{ value: netTokenIn }(); else IWETH(tokenIn).withdraw(netTokenIn); } }
// SPDX-License-Identifier: GPL-3.0-or-later /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IWETH is IERC20 { event Deposit(address indexed dst, uint256 wad); event Withdrawal(address indexed src, uint256 wad); function deposit() external payable; function withdraw(uint256 wad) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; interface I1inchAggregationRouterV5 { struct SwapDescription { IERC20 srcToken; IERC20 dstToken; address payable srcReceiver; address payable dstReceiver; uint256 amount; uint256 minReturnAmount; uint256 flags; } function uniswapV3SwapTo( address payable recipient, uint256 amount, uint256 minReturn, uint256[] calldata pools ) external payable returns (uint256 returnAmount); function swap( address executor, SwapDescription calldata desc, bytes calldata permit, bytes calldata data ) external payable returns (uint256 returnAmount, uint256 spentAmount); function unoswapTo( address payable recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] calldata pools ) external payable returns (uint256 returnAmount); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./I1inchAggregationRouterV5.sol"; import "../../../core/libraries/Errors.sol"; abstract contract OneInchAggregationRouterHelper { function _rescaleMinAmount( uint256 minAmount, uint256 oldAmount, uint256 newAmount ) internal pure returns (uint256) { return (minAmount * newAmount) / oldAmount; } function _get1inchScaledInputData( bytes calldata rawCallData, uint256 newAmount ) internal pure returns (bytes memory) { bytes4 selector = bytes4(rawCallData[:4]); bytes memory args = rawCallData[4:]; if (selector == I1inchAggregationRouterV5.uniswapV3SwapTo.selector) { ( address payable recipient, uint256 amount, uint256 minReturn, uint256[] memory pools ) = abi.decode(args, (address, uint256, uint256, uint256[])); minReturn = _rescaleMinAmount(minReturn, amount, newAmount); amount = newAmount; return abi.encodeWithSelector(selector, recipient, amount, minReturn, pools); } if (selector == I1inchAggregationRouterV5.swap.selector) { ( address executor, I1inchAggregationRouterV5.SwapDescription memory desc, bytes memory permit, bytes memory data ) = abi.decode( args, (address, I1inchAggregationRouterV5.SwapDescription, bytes, bytes) ); desc.minReturnAmount = _rescaleMinAmount(desc.minReturnAmount, desc.amount, newAmount); desc.amount = newAmount; return abi.encodeWithSelector(selector, executor, desc, permit, data); } if (selector == I1inchAggregationRouterV5.unoswapTo.selector) { ( address payable recipient, address srcToken, uint256 amount, uint256 minReturn, uint256[] memory pools ) = abi.decode(args, (address, address, uint256, uint256, uint256[])); minReturn = _rescaleMinAmount(minReturn, amount, newAmount); amount = newAmount; return abi.encodeWithSelector(selector, recipient, srcToken, amount, minReturn, pools); } revert Errors.UnsupportedSelector(1, selector); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.17; struct SwapData { SwapType swapType; address extRouter; bytes extCalldata; bool needScale; } enum SwapType { NONE, KYBERSWAP, ONE_INCH, // ETH_WETH not used in Aggregator ETH_WETH } interface IPSwapAggregator { function swap(address tokenIn, uint256 amountIn, SwapData calldata swapData) external payable; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.12; interface IAggregationExecutor { function callBytes(bytes calldata data) external payable; // 0xd9c45357 // callbytes per swap sequence function swapSingleSequence(bytes calldata data) external; function finalTransactionProcessing( address tokenIn, address tokenOut, address to, bytes calldata destTokenFeeData ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./IHashflow.sol"; interface IExecutorHelperEthereum1 { struct UniSwap { address pool; address tokenIn; address tokenOut; address recipient; uint256 collectAmount; // amount that should be transferred to the pool uint256 limitReturnAmount; uint32 swapFee; uint32 feePrecision; uint32 tokenWeightInput; } struct StableSwap { address pool; address tokenFrom; address tokenTo; uint8 tokenIndexFrom; uint8 tokenIndexTo; uint256 dx; uint256 minDy; uint256 poolLength; address poolLp; bool isSaddle; // true: saddle, false: stable } struct CurveSwap { address pool; address tokenFrom; address tokenTo; int128 tokenIndexFrom; int128 tokenIndexTo; uint256 dx; uint256 minDy; bool usePoolUnderlying; bool useTriCrypto; } struct UniSwapV3ProMM { address recipient; address pool; address tokenIn; address tokenOut; uint256 swapAmount; uint256 limitReturnAmount; uint160 sqrtPriceLimitX96; bool isUniV3; // true = UniV3, false = ProMM } struct BalancerV2 { address vault; bytes32 poolId; address assetIn; address assetOut; uint256 amount; uint256 limit; } struct KyberRFQ { address rfq; bytes order; bytes signature; uint256 amount; address payable target; } struct DODO { address recipient; address pool; address tokenFrom; address tokenTo; uint256 amount; uint256 minReceiveQuote; address sellHelper; bool isSellBase; bool isVersion2; } struct Synthetix { address synthetixProxy; address tokenIn; address tokenOut; bytes32 sourceCurrencyKey; uint256 sourceAmount; bytes32 destinationCurrencyKey; uint256 minAmount; bool useAtomicExchange; } struct PSM { address router; address tokenIn; address tokenOut; uint256 amountIn; address recipient; } struct Hashflow { address router; IHashflow.Quote quote; } struct WSTETH { address pool; uint256 amount; bool isWrapping; } function executeUniSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeStableSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeCurveSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeKyberDMMSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeUniV3ProMMSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeRfqSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeBalV2Swap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeDODOSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeWrappedstETHSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeSynthetixSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executePSMSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeHashflowSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); function executeFraxSwap( uint256 index, bytes memory data, uint256 previousAmountOut ) external payable returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; interface IHashflow { enum RFQType { TAKER, MAKER } struct Quote { RFQType rfqType; address pool; address eoa; address trader; address effectiveTrader; address baseToken; address quoteToken; uint256 effectiveBaseTokenAmount; uint256 maxBaseTokenAmount; uint256 maxQuoteTokenAmount; uint256 fees; uint256 quoteExpiry; uint256 nonce; bytes32 txid; bytes signedQuote; } function tradeSingleHop(Quote memory quote) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IAggregationExecutor.sol"; interface IMetaAggregationRouterV2 { struct SwapDescriptionV2 { IERC20 srcToken; IERC20 dstToken; address[] srcReceivers; // transfer src token to these addresses, default uint256[] srcAmounts; address[] feeReceivers; uint256[] feeAmounts; address dstReceiver; uint256 amount; uint256 minReturnAmount; uint256 flags; bytes permit; } /// @dev use for swapGeneric and swap to avoid stack too deep struct SwapExecutionParams { address callTarget; // call this address address approveTarget; // approve this address if _APPROVE_FUND set bytes targetData; SwapDescriptionV2 desc; bytes clientData; } function swap( SwapExecutionParams calldata execution ) external payable returns (uint256, uint256); function swapSimpleMode( IAggregationExecutor caller, SwapDescriptionV2 memory desc, bytes calldata executorData, bytes calldata clientData ) external returns (uint256, uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./IMetaAggregationRouterV2.sol"; import "./IHashflow.sol"; import "./IExecutorHelperEthereum1.sol"; import "./ScaleDataHelperEthereum.sol"; abstract contract KyberHelperEthereum { uint256 private constant _PARTIAL_FILL = 0x01; uint256 private constant _REQUIRES_EXTRA_ETH = 0x02; uint256 private constant _SHOULD_CLAIM = 0x04; uint256 private constant _BURN_FROM_MSG_SENDER = 0x08; uint256 private constant _BURN_FROM_TX_ORIGIN = 0x10; uint256 private constant _SIMPLE_SWAP = 0x20; struct Swap { bytes data; bytes4 selector; } struct SimpleSwapData { address[] firstPools; uint256[] firstSwapAmounts; bytes[] swapDatas; uint256 deadline; bytes destTokenFeeData; } struct SwapExecutorDescription { Swap[][] swapSequences; address tokenIn; address tokenOut; uint256 minTotalAmountOut; address to; uint256 deadline; bytes destTokenFeeData; } function _getKyberScaledInputData( bytes calldata kybercall, uint256 newAmount ) internal pure returns (bytes memory) { bytes4 selector = bytes4(kybercall[:4]); if (selector == IMetaAggregationRouterV2.swap.selector) { IMetaAggregationRouterV2.SwapExecutionParams memory params = abi.decode( kybercall[4:], (IMetaAggregationRouterV2.SwapExecutionParams) ); (params.desc, params.targetData) = _getScaledInputDataV2( params.desc, params.targetData, newAmount, _flagsChecked(params.desc.flags, _SIMPLE_SWAP) ); return abi.encodeWithSelector(selector, params); } if (selector == IMetaAggregationRouterV2.swapSimpleMode.selector) { ( address callTarget, IMetaAggregationRouterV2.SwapDescriptionV2 memory desc, bytes memory targetData, bytes memory clientData ) = abi.decode( kybercall[4:], (address, IMetaAggregationRouterV2.SwapDescriptionV2, bytes, bytes) ); (desc, targetData) = _getScaledInputDataV2(desc, targetData, newAmount, true); return abi.encodeWithSelector(selector, callTarget, desc, targetData, clientData); } revert("InputScalingHelper: Invalid selector"); } function _getScaledInputDataV2( IMetaAggregationRouterV2.SwapDescriptionV2 memory desc, bytes memory executorData, uint256 newAmount, bool isSimpleMode ) internal pure returns (IMetaAggregationRouterV2.SwapDescriptionV2 memory, bytes memory) { uint256 oldAmount = desc.amount; if (oldAmount == newAmount) { return (desc, executorData); } // simple mode swap if (isSimpleMode) { return ( _scaledSwapDescriptionV2(desc, oldAmount, newAmount), _scaledSimpleSwapData(executorData, oldAmount, newAmount) ); } //normal mode swap return ( _scaledSwapDescriptionV2(desc, oldAmount, newAmount), _scaledExecutorCallBytesData(executorData, oldAmount, newAmount) ); } function _scaledSimpleSwapData( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { SimpleSwapData memory swapData = abi.decode(data, (SimpleSwapData)); uint256 numberSeq = swapData.firstPools.length; uint256 newTotalSwapAmount; for (uint256 i = 0; i < numberSeq; i++) { if (i == numberSeq - 1) { swapData.firstSwapAmounts[i] = newAmount - newTotalSwapAmount; } else { swapData.firstSwapAmounts[i] = (swapData.firstSwapAmounts[i] * newAmount) / oldAmount; } newTotalSwapAmount += swapData.firstSwapAmounts[i]; } return abi.encode(swapData); } function _scaledExecutorCallBytesData( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { SwapExecutorDescription memory executorDesc = abi.decode(data, (SwapExecutorDescription)); executorDesc.minTotalAmountOut = (executorDesc.minTotalAmountOut * newAmount) / oldAmount; for (uint256 i = 0; i < executorDesc.swapSequences.length; i++) { Swap memory swap = executorDesc.swapSequences[i][0]; bytes4 selector = swap.selector; if (selector == IExecutorHelperEthereum1.executeUniSwap.selector) { swap.data = ScaleDataHelperEthereum.newUniSwap(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeStableSwap.selector) { swap.data = ScaleDataHelperEthereum.newStableSwap(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeCurveSwap.selector) { swap.data = ScaleDataHelperEthereum.newCurveSwap(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeKyberDMMSwap.selector) { swap.data = ScaleDataHelperEthereum.newKyberDMM(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeUniV3ProMMSwap.selector) { swap.data = ScaleDataHelperEthereum.newUniV3ProMM(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeRfqSwap.selector) { revert("InputScalingHelper: Can not scale RFQ swap"); } else if (selector == IExecutorHelperEthereum1.executeBalV2Swap.selector) { swap.data = ScaleDataHelperEthereum.newBalancerV2(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeDODOSwap.selector) { swap.data = ScaleDataHelperEthereum.newDODO(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeWrappedstETHSwap.selector) { swap.data = ScaleDataHelperEthereum.newWrappedstETHSwap( swap.data, oldAmount, newAmount ); } else if (selector == IExecutorHelperEthereum1.executeSynthetixSwap.selector) { swap.data = ScaleDataHelperEthereum.newSynthetix(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executePSMSwap.selector) { swap.data = ScaleDataHelperEthereum.newPSM(swap.data, oldAmount, newAmount); } else if (selector == IExecutorHelperEthereum1.executeHashflowSwap.selector) { revert("InputScalingHelper: Can not scale RFQ swap"); } else if (selector == IExecutorHelperEthereum1.executeFraxSwap.selector) { swap.data = ScaleDataHelperEthereum.newFrax(swap.data, oldAmount, newAmount); } else revert("AggregationExecutor: Dex type not supported"); } return abi.encode(executorDesc); } function _scaledSwapDescriptionV2( IMetaAggregationRouterV2.SwapDescriptionV2 memory desc, uint256 oldAmount, uint256 newAmount ) internal pure returns (IMetaAggregationRouterV2.SwapDescriptionV2 memory) { uint256 oldMinReturnAmount = desc.minReturnAmount; desc.minReturnAmount = (desc.minReturnAmount * newAmount) / oldAmount; //newMinReturnAmount should no be 0 if oldMinReturnAmount > 0 if (oldMinReturnAmount > 0 && desc.minReturnAmount == 0) desc.minReturnAmount = 1; desc.amount = newAmount; if (desc.srcReceivers.length == 0) { return desc; } uint256 newTotal; for (uint256 i = 0; i < desc.srcReceivers.length; i++) { if (i == desc.srcReceivers.length - 1) { desc.srcAmounts[i] = newAmount - newTotal; } else { desc.srcAmounts[i] = (desc.srcAmounts[i] * newAmount) / oldAmount; } newTotal += desc.srcAmounts[i]; } return desc; } function _flagsChecked(uint256 number, uint256 flag) internal pure returns (bool) { return number & flag != 0; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "./IExecutorHelperEthereum1.sol"; library ScaleDataHelperEthereum { function newUniSwap( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.UniSwap memory uniSwap = abi.decode( data, (IExecutorHelperEthereum1.UniSwap) ); uniSwap.collectAmount = (uniSwap.collectAmount * newAmount) / oldAmount; return abi.encode(uniSwap); } function newStableSwap( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.StableSwap memory stableSwap = abi.decode( data, (IExecutorHelperEthereum1.StableSwap) ); stableSwap.dx = (stableSwap.dx * newAmount) / oldAmount; return abi.encode(stableSwap); } function newCurveSwap( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.CurveSwap memory curveSwap = abi.decode( data, (IExecutorHelperEthereum1.CurveSwap) ); curveSwap.dx = (curveSwap.dx * newAmount) / oldAmount; return abi.encode(curveSwap); } function newKyberDMM( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.UniSwap memory kyberDMMSwap = abi.decode( data, (IExecutorHelperEthereum1.UniSwap) ); kyberDMMSwap.collectAmount = (kyberDMMSwap.collectAmount * newAmount) / oldAmount; return abi.encode(kyberDMMSwap); } function newUniV3ProMM( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.UniSwapV3ProMM memory uniSwapV3ProMM = abi.decode( data, (IExecutorHelperEthereum1.UniSwapV3ProMM) ); uniSwapV3ProMM.swapAmount = (uniSwapV3ProMM.swapAmount * newAmount) / oldAmount; return abi.encode(uniSwapV3ProMM); } function newBalancerV2( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.BalancerV2 memory balancerV2 = abi.decode( data, (IExecutorHelperEthereum1.BalancerV2) ); balancerV2.amount = (balancerV2.amount * newAmount) / oldAmount; return abi.encode(balancerV2); } function newDODO( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.DODO memory dodo = abi.decode( data, (IExecutorHelperEthereum1.DODO) ); dodo.amount = (dodo.amount * newAmount) / oldAmount; return abi.encode(dodo); } function newSynthetix( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.Synthetix memory synthetix = abi.decode( data, (IExecutorHelperEthereum1.Synthetix) ); synthetix.sourceAmount = (synthetix.sourceAmount * newAmount) / oldAmount; return abi.encode(synthetix); } function newWrappedstETHSwap( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.WSTETH memory wstEthData = abi.decode( data, (IExecutorHelperEthereum1.WSTETH) ); wstEthData.amount = (wstEthData.amount * newAmount) / oldAmount; return abi.encode(wstEthData); } function newPSM( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.PSM memory psm = abi.decode(data, (IExecutorHelperEthereum1.PSM)); psm.amountIn = (psm.amountIn * newAmount) / oldAmount; return abi.encode(psm); } function newFrax( bytes memory data, uint256 oldAmount, uint256 newAmount ) internal pure returns (bytes memory) { IExecutorHelperEthereum1.UniSwap memory frax = abi.decode( data, (IExecutorHelperEthereum1.UniSwap) ); frax.collectAmount = (frax.collectAmount * newAmount) / oldAmount; return abi.encode(frax); } }
{ "optimizer": { "enabled": true, "runs": 90000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"aggregatorType","type":"uint256"},{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"UnsupportedSelector","type":"error"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"components":[{"internalType":"enum SwapType","name":"swapType","type":"uint8"},{"internalType":"address","name":"extRouter","type":"address"},{"internalType":"bytes","name":"extCalldata","type":"bytes"},{"internalType":"bool","name":"needScale","type":"bool"}],"internalType":"struct SwapData","name":"data","type":"tuple"}],"name":"swap","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50613c04806100206000396000f3fe6080604052600436106100225760003560e01c80632bdb823c1461002e57600080fd5b3661002957005b600080fd5b61004161003c366004611c77565b610043565b005b61005c836100576040840160208501611cd7565b610135565b61012f61006f6080830160608401611d02565b6100ba576100806040830183611d1f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506100dd92505050565b6100dd6100ca6020840184611d8b565b6100d76040850185611d1f565b86610254565b73ffffffffffffffffffffffffffffffffffffffff851615610100576000610102565b835b6101126040850160208601611cd7565b73ffffffffffffffffffffffffffffffffffffffff1691906102b5565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216610154575050565b61016b60026bffffffffffffffffffffffff611e0a565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526bffffffffffffffffffffffff929092169184169063dd62ed3e90604401602060405180830381865afa1580156101ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102139190611e35565b101561025057610225828260006102e5565b61025082827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6102e5565b5050565b6060600185600381111561026a5761026a611e4e565b036102815761027a84848461045a565b90506102ad565b600285600381111561029557610295611e4e565b036102a55761027a848484610759565b6102ad611e7d565b949350505050565b60606102db848484604051806060016040528060298152602001613ba660299139610afe565b90505b9392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052915160009283929087169161037c9190611ed0565b6000604051808303816000865af19150503d80600081146103b9576040519150601f19603f3d011682016040523d82523d6000602084013e6103be565b606091505b50915091508180156103e85750805115806103e85750808060200190518101906103e89190611ef7565b610453576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5361666520417070726f7665000000000000000000000000000000000000000060448201526064015b60405180910390fd5b5050505050565b6060600061046b6004828688611f14565b61047491611f3e565b90507f1de02f17000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016105ad5760006104ce8560048189611f14565b8101906104db91906123c1565b905061050481606001518260400151866104ff856060015161012001516020610c94565b610ca0565b8260600183604001829052829052505081816040516024016105269190612671565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292506102de915050565b7f750fcc05000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016106d2576000808080610608886004818c611f14565b810190610615919061271e565b935093509350935061062a8383896001610ca0565b604051919450925085906106489086908690869086906024016127b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915295506102de945050505050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e7075745363616c696e6748656c7065723a20496e76616c69642073656c6560448201527f63746f7200000000000000000000000000000000000000000000000000000000606482015260840161044a565b6060600061076a6004828688611f14565b61077391611f3e565b905060006107848560048189611f14565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050507fffffffff0000000000000000000000000000000000000000000000000000000082167f437f0e5800000000000000000000000000000000000000000000000000000000016108d9576000806000808480602001905181019061081e9190612869565b935093509350935061083182848a610da5565b9150879250858484848460405160240161084e94939291906128c2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915296506102de95505050505050565b7fed55c351000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161097c576000806000808480602001905181019061093c9190612942565b93509350935093506109578360a0015184608001518a610da5565b60a084015260808301889052604051869061084e908690869086908690602401612a59565b7f08723dad000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610aa1576000806000806000858060200190518101906109e19190612aec565b945094509450945094506109f682848b610da5565b9150889250868585858585604051602401610a15959493929190612b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915297506102de9650505050505050565b6040517fa7dd6a95000000000000000000000000000000000000000000000000000000008152600160048201527fffffffff000000000000000000000000000000000000000000000000000000008316602482015260440161044a565b606082471015610b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161044a565b73ffffffffffffffffffffffffffffffffffffffff85163b610c0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161044a565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c379190611ed0565b60006040518083038185875af1925050503d8060008114610c74576040519150601f19603f3d011682016040523d82523d6000602084013e610c79565b606091505b5091509150610c89828286610dbc565b979650505050505050565b81811615155b92915050565b610d3f604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001606081525090565b60e0850151606090848103610d5a5786869250925050610d9c565b8315610d8057610d6b878287610e0f565b610d76878388611005565b9250925050610d9c565b610d8b878287610e0f565b610d96878388611132565b92509250505b94509492505050565b600082610db28386612baa565b6102db9190612bc1565b60608315610dcb5750816102de565b825115610ddb5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044a9190612bd5565b610eae604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001606081525090565b61010084015183610ebf8483612baa565b610ec99190612bc1565b6101008601528015801590610ee15750610100850151155b15610eef5760016101008601525b60e08501839052604085015151600003610f0c57849150506102de565b6000805b866040015151811015610ffa576001876040015151610f2f9190612be8565b8103610f6657610f3f8286612be8565b87606001518281518110610f5557610f55612bfb565b602002602001018181525050610fbd565b858588606001518381518110610f7e57610f7e612bfb565b6020026020010151610f909190612baa565b610f9a9190612bc1565b87606001518281518110610fb057610fb0612bfb565b6020026020010181815250505b86606001518181518110610fd357610fd3612bfb565b602002602001015182610fe69190612c2a565b915080610ff281612c3d565b915050610f10565b509495945050505050565b606060008480602001905181019061101d9190612d64565b8051519091506000805b828110156111055761103a600184612be8565b81036110715761104a8287612be8565b8460200151828151811061106057611060612bfb565b6020026020010181815250506110c8565b86868560200151838151811061108957611089612bfb565b602002602001015161109b9190612baa565b6110a59190612bc1565b846020015182815181106110bb576110bb612bfb565b6020026020010181815250505b836020015181815181106110de576110de612bfb565b6020026020010151826110f19190612c2a565b9150806110fd81612c3d565b915050611027565b50826040516020016111179190612e38565b60405160208183030381529060405293505050509392505050565b606060008480602001905181019061114a91906130c8565b90508383826060015161115d9190612baa565b6111679190612bc1565b606082015260005b8151518110156117b65760008260000151828151811061119157611191612bfb565b60200260200101516000815181106111ab576111ab612bfb565b602090810291909101810151908101519091507f2f869e8c000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161121b5781516112149088886117e1565b82526117a1565b7fdcb37780000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161127157815161121490888861182c565b7f3409dd2d000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016112c7578151611214908888611877565b7fb6bb37eb000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161131d5781516112149088886117e1565b7f617556cb000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016113735781516112149088886118c2565b7f118939be000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601611444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f496e7075745363616c696e6748656c7065723a2043616e206e6f74207363616c60448201527f6520524651207377617000000000000000000000000000000000000000000000606482015260840161044a565b7f5a2f8d71000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161149a578151611214908888611983565b7f75a256f1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016114f0578151611214908888611a29565b7fa7c1a929000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601611546578151611214908888611a74565b7f60fabb9d000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161159c578151611214908888611aed565b7f873c52e1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016115f2578151611214908888611baa565b7f0b2179d2000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f496e7075745363616c696e6748656c7065723a2043616e206e6f74207363616c60448201527f6520524651207377617000000000000000000000000000000000000000000000606482015260840161044a565b7f10262a3d000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016117195781516112149088886117e1565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4167677265676174696f6e4578656375746f723a204465782074797065206e6f60448201527f7420737570706f72746564000000000000000000000000000000000000000000606482015260840161044a565b505080806117ae90612c3d565b91505061116f565b50806040516020016117c891906131a0565b6040516020818303038152906040529150509392505050565b60606000848060200190518101906117f99190613398565b90508383826080015161180c9190612baa565b6118169190612bc1565b60808201526040516117c8908290602001613440565b606060008480602001905181019061184491906134f4565b905083838260a001516118579190612baa565b6118619190612bc1565b60a08201526040516117c890829060200161359c565b606060008480602001905181019061188f91906136a2565b905083838260a001516118a29190612baa565b6118ac9190612bc1565b60a08201526040516117c890829060200161373f565b60606000848060200190518101906118da91906137e0565b9050838382608001516118ed9190612baa565b6118f79190612bc1565b60808201526040516117c890829060200160006101008201905073ffffffffffffffffffffffffffffffffffffffff8084511683528060208501511660208401528060408501511660408401528060608501511660608401526080840151608084015260a084015160a08401528060c08501511660c08401525060e0830151151560e083015292915050565b606060008480602001905181019061199b919061387a565b9050838382608001516119ae9190612baa565b6119b89190612bc1565b60808201526040516117c8908290602001600060c08201905073ffffffffffffffffffffffffffffffffffffffff80845116835260208401516020840152806040850151166040840152806060850151166060840152506080830151608083015260a083015160a083015292915050565b6060600084806020019051810190611a41919061390c565b905083838260800151611a549190612baa565b611a5e9190612bc1565b60808201526040516117c8908290602001613996565b6060600084806020019051810190611a8c9190613a2d565b905083838260200151611a9f9190612baa565b611aa99190612bc1565b602082810191825260408051845173ffffffffffffffffffffffffffffffffffffffff169281019290925291518183015290820151151560608201526080016117c8565b6060600084806020019051810190611b059190613a96565b905083838260800151611b189190612baa565b611b229190612bc1565b60808201526040516117c890829060200160006101008201905073ffffffffffffffffffffffffffffffffffffffff80845116835280602085015116602084015280604085015116604084015250606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e0830151151560e083015292915050565b6060600084806020019051810190611bc29190613b16565b905083838260600151611bd59190612baa565b611bdf9190612bc1565b60608201526040516117c8908290602001815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015190830152608092830151169181019190915260a00190565b73ffffffffffffffffffffffffffffffffffffffff81168114611c6457600080fd5b50565b8035611c7281611c42565b919050565b600080600060608486031215611c8c57600080fd5b8335611c9781611c42565b925060208401359150604084013567ffffffffffffffff811115611cba57600080fd5b840160808187031215611ccc57600080fd5b809150509250925092565b600060208284031215611ce957600080fd5b81356102de81611c42565b8015158114611c6457600080fd5b600060208284031215611d1457600080fd5b81356102de81611cf4565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611d5457600080fd5b83018035915067ffffffffffffffff821115611d6f57600080fd5b602001915036819003821315611d8457600080fd5b9250929050565b600060208284031215611d9d57600080fd5b8135600481106102de57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680611e2957611e29611dac565b92169190910492915050565b600060208284031215611e4757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60005b83811015611ec7578181015183820152602001611eaf565b50506000910152565b60008251611ee2818460208701611eac565b9190910192915050565b8051611c7281611cf4565b600060208284031215611f0957600080fd5b81516102de81611cf4565b60008085851115611f2457600080fd5b83861115611f3157600080fd5b5050820193919092039150565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611f7e5780818660040360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715611fd957611fd9611f86565b60405290565b60405160a0810167ffffffffffffffff81118282101715611fd957611fd9611f86565b60405160e0810167ffffffffffffffff81118282101715611fd957611fd9611f86565b6040805190810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610120810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610140810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610100810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156120fb576120fb611f86565b604052919050565b600067ffffffffffffffff82111561211d5761211d611f86565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261215a57600080fd5b813561216d61216882612103565b6120b4565b81815284602083860101111561218257600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff8211156121b9576121b9611f86565b5060051b60200190565b600082601f8301126121d457600080fd5b813560206121e46121688361219f565b82815260059290921b8401810191818101908684111561220357600080fd5b8286015b8481101561222757803561221a81611c42565b8352918301918301612207565b509695505050505050565b600082601f83011261224357600080fd5b813560206122536121688361219f565b82815260059290921b8401810191818101908684111561227257600080fd5b8286015b848110156122275780358352918301918301612276565b600061016082840312156122a057600080fd5b6122a8611fb5565b90506122b382611c67565b81526122c160208301611c67565b6020820152604082013567ffffffffffffffff808211156122e157600080fd5b6122ed858386016121c3565b6040840152606084013591508082111561230657600080fd5b61231285838601612232565b6060840152608084013591508082111561232b57600080fd5b612337858386016121c3565b608084015260a084013591508082111561235057600080fd5b61235c85838601612232565b60a084015261236d60c08501611c67565b60c084015260e0848101359084015261010080850135908401526101208085013590840152610140915081840135818111156123a857600080fd5b6123b486828701612149565b8385015250505092915050565b6000602082840312156123d357600080fd5b813567ffffffffffffffff808211156123eb57600080fd5b9083019060a082860312156123ff57600080fd5b612407611fdf565b61241083611c67565b815261241e60208401611c67565b602082015260408301358281111561243557600080fd5b61244187828601612149565b60408301525060608301358281111561245957600080fd5b6124658782860161228d565b60608301525060808301358281111561247d57600080fd5b61248987828601612149565b60808301525095945050505050565b600081518084526124b0816020860160208601611eac565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600081518084526020808501945080840160005b83811015610ffa57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016124f6565b600081518084526020808501945080840160005b83811015610ffa5781518752958201959082019060010161253c565b805173ffffffffffffffffffffffffffffffffffffffff1682526000610160602083015161259e602086018273ffffffffffffffffffffffffffffffffffffffff169052565b5060408301518160408601526125b6828601826124e2565b915050606083015184820360608601526125d08282612528565b915050608083015184820360808601526125ea82826124e2565b91505060a083015184820360a08601526126048282612528565b91505060c083015161262e60c086018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e083810151908501526101008084015190850152610120808401519085015261014080840151858303828701526126678382612498565b9695505050505050565b60208152600073ffffffffffffffffffffffffffffffffffffffff80845116602084015280602085015116604084015250604083015160a060608401526126bb60c0840182612498565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526126f78383612558565b925060808601519150808584030160a0860152506127158282612498565b95945050505050565b6000806000806080858703121561273457600080fd5b843561273f81611c42565b9350602085013567ffffffffffffffff8082111561275c57600080fd5b6127688883890161228d565b9450604087013591508082111561277e57600080fd5b61278a88838901612149565b935060608701359150808211156127a057600080fd5b506127ad87828801612149565b91505092959194509250565b73ffffffffffffffffffffffffffffffffffffffff851681526080602082015260006127e86080830186612558565b82810360408401526127fa8186612498565b90508281036060840152610c898185612498565b600082601f83011261281f57600080fd5b8151602061282f6121688361219f565b82815260059290921b8401810191818101908684111561284e57600080fd5b8286015b848110156122275780518352918301918301612852565b6000806000806080858703121561287f57600080fd5b845161288a81611c42565b809450506020850151925060408501519150606085015167ffffffffffffffff8111156128b657600080fd5b6127ad8782880161280e565b73ffffffffffffffffffffffffffffffffffffffff851681528360208201528260408201526080606082015260006126676080830184612528565b600082601f83011261290e57600080fd5b815161291c61216882612103565b81815284602083860101111561293157600080fd5b6102ad826020830160208701611eac565b60008060008084860361014081121561295a57600080fd5b855161296581611c42565b945060e07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561299757600080fd5b506129a0612002565b60208601516129ae81611c42565b815260408601516129be81611c42565b602082015260608601516129d181611c42565b604082015260808601516129e481611c42565b8060608301525060a0860151608082015260c086015160a082015260e086015160c08201528093505061010085015167ffffffffffffffff80821115612a2957600080fd5b612a35888389016128fd565b9350610120870151915080821115612a4c57600080fd5b506127ad878288016128fd565b600061014073ffffffffffffffffffffffffffffffffffffffff808816845280875116602085015280602088015116604085015280604088015116606085015280606088015116608085015250608086015160a084015260a086015160c084015260c086015160e084015280610100840152612ad781840186612498565b9050828103610120840152610c898185612498565b600080600080600060a08688031215612b0457600080fd5b8551612b0f81611c42565b6020870151909550612b2081611c42565b809450506040860151925060608601519150608086015167ffffffffffffffff811115612b4c57600080fd5b612b588882890161280e565b9150509295509295909350565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a06080830152610c8960a0830184612528565b8082028115828204841417610c9a57610c9a611ddb565b600082612bd057612bd0611dac565b500490565b6020815260006102de6020830184612498565b81810381811115610c9a57610c9a611ddb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610c9a57610c9a611ddb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c6e57612c6e611ddb565b5060010190565b8051611c7281611c42565b600082601f830112612c9157600080fd5b81516020612ca16121688361219f565b82815260059290921b84018101918181019086841115612cc057600080fd5b8286015b84811015612227578051612cd781611c42565b8352918301918301612cc4565b600082601f830112612cf557600080fd5b81516020612d056121688361219f565b82815260059290921b84018101918181019086841115612d2457600080fd5b8286015b8481101561222757805167ffffffffffffffff811115612d485760008081fd5b612d568986838b01016128fd565b845250918301918301612d28565b600060208284031215612d7657600080fd5b815167ffffffffffffffff80821115612d8e57600080fd5b9083019060a08286031215612da257600080fd5b612daa611fdf565b825182811115612db957600080fd5b612dc587828601612c80565b825250602083015182811115612dda57600080fd5b612de68782860161280e565b602083015250604083015182811115612dfe57600080fd5b612e0a87828601612ce4565b60408301525060608301516060820152608083015182811115612e2c57600080fd5b612489878286016128fd565b60006020808352835160a082850152612e5460c08501826124e2565b9050818501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868403016040870152612e8f8383612528565b60408801518782038301606089015280518083529194508501925084840190600581901b8501860160005b82811015612ee65784878303018452612ed4828751612498565b95880195938801939150600101612eba565b5060608a015160808a015260808a01519650838982030160a08a0152612f0c8188612498565b9a9950505050505050505050565b600082601f830112612f2b57600080fd5b8151612f396121688261219f565b808282526020820191508560208460051b8701011115612f5857600080fd5b602085015b60208460051b8701018110156130be57805167ffffffffffffffff811115612f8457600080fd5b8601603f81018813612f9557600080fd5b6020810151612fa66121688261219f565b808282526020820191508a60408460051b8601011115612fc557600080fd5b604084015b60408460051b8601018110156130a857805167ffffffffffffffff811115612ff157600080fd5b60407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08288018f0301121561302557600080fd5b61302d612025565b6040828801015167ffffffffffffffff81111561304957600080fd5b61305a8f604083868c0101016128fd565b82525090860160600151907fffffffff000000000000000000000000000000000000000000000000000000008216821461309357600080fd5b60208181019290925284529283019201612fca565b5086525050602093840193919091019050612f5d565b5095945050505050565b6000602082840312156130da57600080fd5b815167ffffffffffffffff808211156130f257600080fd5b9083019060e0828603121561310657600080fd5b61310e612002565b82518281111561311d57600080fd5b61312987828601612f1a565b82525061313860208401612c75565b602082015261314960408401612c75565b60408201526060830151606082015261316460808401612c75565b608082015260a083015160a082015260c08301518281111561318557600080fd5b613191878286016128fd565b60c08301525095945050505050565b6020808252825160e0838301528051610100840181905260009291600582811b860161012090810193928501929087019186805b838110156132bc578987037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee001855285518051808952908901908989019080861b8a018b01855b828110156132a6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08c830301845284516040815181855261325f82860182612498565b9150507fffffffff000000000000000000000000000000000000000000000000000000008f830151168f85015280935050508c850194508c8401935060018101905061321b565b50995050509588019550938701936001016131d4565b505050509286015173ffffffffffffffffffffffffffffffffffffffff8116604087015292506132e99050565b604085015173ffffffffffffffffffffffffffffffffffffffff811660608601529150606085015160808501526080850151915061333f60a085018373ffffffffffffffffffffffffffffffffffffffff169052565b60a085015160c085015260c085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08482030160e08501526127158183612498565b805163ffffffff81168114611c7257600080fd5b600061012082840312156133ab57600080fd5b6133b3612048565b6133bc83612c75565b81526133ca60208401612c75565b60208201526133db60408401612c75565b60408201526133ec60608401612c75565b60608201526080830151608082015260a083015160a082015261341160c08401613384565b60c082015261342260e08401613384565b60e0820152610100613435818501613384565b908201529392505050565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151608083015260a083015160a083015260c08301516134b360c084018263ffffffff169052565b5060e08301516134cb60e084018263ffffffff169052565b506101008381015163ffffffff811684830152611f7e565b805160ff81168114611c7257600080fd5b6000610140828403121561350757600080fd5b61350f61206c565b61351883612c75565b815261352660208401612c75565b602082015261353760408401612c75565b6040820152613548606084016134e3565b6060820152613559608084016134e3565b608082015260a083015160a082015260c083015160c082015260e083015160e082015261010061358a818501612c75565b90820152610120613435848201611eec565b815173ffffffffffffffffffffffffffffffffffffffff168152610140810160208301516135e2602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604083015161360a604084018273ffffffffffffffffffffffffffffffffffffffff169052565b50606083015161361f606084018260ff169052565b506080830151613634608084018260ff169052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015161367b8285018273ffffffffffffffffffffffffffffffffffffffff169052565b50506101208381015180151584830152611f7e565b8051600f81900b8114611c7257600080fd5b600061012082840312156136b557600080fd5b6136bd612048565b6136c683612c75565b81526136d460208401612c75565b60208201526136e560408401612c75565b60408201526136f660608401613690565b606082015261370760808401613690565b608082015260a083015160a082015260c083015160c082015261372c60e08401611eec565b60e0820152610100613435818501611eec565b815173ffffffffffffffffffffffffffffffffffffffff90811682526020808401518216908301526040808401519182169083015261012082019050606083015161378f6060840182600f0b9052565b5060808301516137a46080840182600f0b9052565b5060a083015160a083015260c083015160c083015260e08301516137cc60e084018215159052565b506101008381015180151584830152611f7e565b600061010082840312156137f357600080fd5b6137fb612090565b825161380681611c42565b8152602083015161381681611c42565b602082015261382760408401612c75565b604082015261383860608401612c75565b60608201526080830151608082015260a083015160a082015261385d60c08401612c75565b60c082015261386e60e08401611eec565b60e08201529392505050565b600060c0828403121561388c57600080fd5b60405160c0810181811067ffffffffffffffff821117156138af576138af611f86565b60405282516138bd81611c42565b81526020838101519082015260408301516138d781611c42565b604082015260608301516138ea81611c42565b60608201526080838101519082015260a0928301519281019290925250919050565b6000610120828403121561391f57600080fd5b613927612048565b61393083612c75565b815261393e60208401612c75565b602082015261394f60408401612c75565b604082015261396060608401612c75565b60608201526080830151608082015260a083015160a082015261398560c08401612c75565b60c082015261372c60e08401611eec565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151608083015260a083015160a083015260c0830151613a1960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e08301516137cc60e084018215159052565b600060608284031215613a3f57600080fd5b6040516060810181811067ffffffffffffffff82111715613a6257613a62611f86565b6040528251613a7081611c42565b8152602083810151908201526040830151613a8a81611cf4565b60408201529392505050565b60006101008284031215613aa957600080fd5b613ab1612090565b8251613abc81611c42565b81526020830151613acc81611c42565b6020820152613add60408401612c75565b6040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015261386e60e08401611eec565b600060a08284031215613b2857600080fd5b60405160a0810181811067ffffffffffffffff82111715613b4b57613b4b611f86565b6040528251613b5981611c42565b81526020830151613b6981611c42565b60208201526040830151613b7c81611c42565b6040820152606083810151908201526080830151613b9981611c42565b6080820152939250505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a2646970667358221220fb97f8285f99c9c37737a7fc136071383a90822fcb5685cec57b32b9eeef1f3364736f6c63430008110033
Deployed Bytecode
0x6080604052600436106100225760003560e01c80632bdb823c1461002e57600080fd5b3661002957005b600080fd5b61004161003c366004611c77565b610043565b005b61005c836100576040840160208501611cd7565b610135565b61012f61006f6080830160608401611d02565b6100ba576100806040830183611d1f565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506100dd92505050565b6100dd6100ca6020840184611d8b565b6100d76040850185611d1f565b86610254565b73ffffffffffffffffffffffffffffffffffffffff851615610100576000610102565b835b6101126040850160208601611cd7565b73ffffffffffffffffffffffffffffffffffffffff1691906102b5565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216610154575050565b61016b60026bffffffffffffffffffffffff611e0a565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff83811660248301526bffffffffffffffffffffffff929092169184169063dd62ed3e90604401602060405180830381865afa1580156101ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102139190611e35565b101561025057610225828260006102e5565b61025082827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6102e5565b5050565b6060600185600381111561026a5761026a611e4e565b036102815761027a84848461045a565b90506102ad565b600285600381111561029557610295611e4e565b036102a55761027a848484610759565b6102ad611e7d565b949350505050565b60606102db848484604051806060016040528060298152602001613ba660299139610afe565b90505b9392505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052915160009283929087169161037c9190611ed0565b6000604051808303816000865af19150503d80600081146103b9576040519150601f19603f3d011682016040523d82523d6000602084013e6103be565b606091505b50915091508180156103e85750805115806103e85750808060200190518101906103e89190611ef7565b610453576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f5361666520417070726f7665000000000000000000000000000000000000000060448201526064015b60405180910390fd5b5050505050565b6060600061046b6004828688611f14565b61047491611f3e565b90507f1de02f17000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016105ad5760006104ce8560048189611f14565b8101906104db91906123c1565b905061050481606001518260400151866104ff856060015161012001516020610c94565b610ca0565b8260600183604001829052829052505081816040516024016105269190612671565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292506102de915050565b7f750fcc05000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016106d2576000808080610608886004818c611f14565b810190610615919061271e565b935093509350935061062a8383896001610ca0565b604051919450925085906106489086908690869086906024016127b9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915295506102de945050505050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e7075745363616c696e6748656c7065723a20496e76616c69642073656c6560448201527f63746f7200000000000000000000000000000000000000000000000000000000606482015260840161044a565b6060600061076a6004828688611f14565b61077391611f3e565b905060006107848560048189611f14565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050507fffffffff0000000000000000000000000000000000000000000000000000000082167f437f0e5800000000000000000000000000000000000000000000000000000000016108d9576000806000808480602001905181019061081e9190612869565b935093509350935061083182848a610da5565b9150879250858484848460405160240161084e94939291906128c2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915296506102de95505050505050565b7fed55c351000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083160161097c576000806000808480602001905181019061093c9190612942565b93509350935093506109578360a0015184608001518a610da5565b60a084015260808301889052604051869061084e908690869086908690602401612a59565b7f08723dad000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831601610aa1576000806000806000858060200190518101906109e19190612aec565b945094509450945094506109f682848b610da5565b9150889250868585858585604051602401610a15959493929190612b65565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915297506102de9650505050505050565b6040517fa7dd6a95000000000000000000000000000000000000000000000000000000008152600160048201527fffffffff000000000000000000000000000000000000000000000000000000008316602482015260440161044a565b606082471015610b90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161044a565b73ffffffffffffffffffffffffffffffffffffffff85163b610c0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161044a565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c379190611ed0565b60006040518083038185875af1925050503d8060008114610c74576040519150601f19603f3d011682016040523d82523d6000602084013e610c79565b606091505b5091509150610c89828286610dbc565b979650505050505050565b81811615155b92915050565b610d3f604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001606081525090565b60e0850151606090848103610d5a5786869250925050610d9c565b8315610d8057610d6b878287610e0f565b610d76878388611005565b9250925050610d9c565b610d8b878287610e0f565b610d96878388611132565b92509250505b94509492505050565b600082610db28386612baa565b6102db9190612bc1565b60608315610dcb5750816102de565b825115610ddb5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044a9190612bd5565b610eae604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001606081526020016060815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001606081525090565b61010084015183610ebf8483612baa565b610ec99190612bc1565b6101008601528015801590610ee15750610100850151155b15610eef5760016101008601525b60e08501839052604085015151600003610f0c57849150506102de565b6000805b866040015151811015610ffa576001876040015151610f2f9190612be8565b8103610f6657610f3f8286612be8565b87606001518281518110610f5557610f55612bfb565b602002602001018181525050610fbd565b858588606001518381518110610f7e57610f7e612bfb565b6020026020010151610f909190612baa565b610f9a9190612bc1565b87606001518281518110610fb057610fb0612bfb565b6020026020010181815250505b86606001518181518110610fd357610fd3612bfb565b602002602001015182610fe69190612c2a565b915080610ff281612c3d565b915050610f10565b509495945050505050565b606060008480602001905181019061101d9190612d64565b8051519091506000805b828110156111055761103a600184612be8565b81036110715761104a8287612be8565b8460200151828151811061106057611060612bfb565b6020026020010181815250506110c8565b86868560200151838151811061108957611089612bfb565b602002602001015161109b9190612baa565b6110a59190612bc1565b846020015182815181106110bb576110bb612bfb565b6020026020010181815250505b836020015181815181106110de576110de612bfb565b6020026020010151826110f19190612c2a565b9150806110fd81612c3d565b915050611027565b50826040516020016111179190612e38565b60405160208183030381529060405293505050509392505050565b606060008480602001905181019061114a91906130c8565b90508383826060015161115d9190612baa565b6111679190612bc1565b606082015260005b8151518110156117b65760008260000151828151811061119157611191612bfb565b60200260200101516000815181106111ab576111ab612bfb565b602090810291909101810151908101519091507f2f869e8c000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161121b5781516112149088886117e1565b82526117a1565b7fdcb37780000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161127157815161121490888861182c565b7f3409dd2d000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016112c7578151611214908888611877565b7fb6bb37eb000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161131d5781516112149088886117e1565b7f617556cb000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016113735781516112149088886118c2565b7f118939be000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601611444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f496e7075745363616c696e6748656c7065723a2043616e206e6f74207363616c60448201527f6520524651207377617000000000000000000000000000000000000000000000606482015260840161044a565b7f5a2f8d71000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161149a578151611214908888611983565b7f75a256f1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016114f0578151611214908888611a29565b7fa7c1a929000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601611546578151611214908888611a74565b7f60fabb9d000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082160161159c578151611214908888611aed565b7f873c52e1000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016115f2578151611214908888611baa565b7f0b2179d2000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f496e7075745363616c696e6748656c7065723a2043616e206e6f74207363616c60448201527f6520524651207377617000000000000000000000000000000000000000000000606482015260840161044a565b7f10262a3d000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008216016117195781516112149088886117e1565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4167677265676174696f6e4578656375746f723a204465782074797065206e6f60448201527f7420737570706f72746564000000000000000000000000000000000000000000606482015260840161044a565b505080806117ae90612c3d565b91505061116f565b50806040516020016117c891906131a0565b6040516020818303038152906040529150509392505050565b60606000848060200190518101906117f99190613398565b90508383826080015161180c9190612baa565b6118169190612bc1565b60808201526040516117c8908290602001613440565b606060008480602001905181019061184491906134f4565b905083838260a001516118579190612baa565b6118619190612bc1565b60a08201526040516117c890829060200161359c565b606060008480602001905181019061188f91906136a2565b905083838260a001516118a29190612baa565b6118ac9190612bc1565b60a08201526040516117c890829060200161373f565b60606000848060200190518101906118da91906137e0565b9050838382608001516118ed9190612baa565b6118f79190612bc1565b60808201526040516117c890829060200160006101008201905073ffffffffffffffffffffffffffffffffffffffff8084511683528060208501511660208401528060408501511660408401528060608501511660608401526080840151608084015260a084015160a08401528060c08501511660c08401525060e0830151151560e083015292915050565b606060008480602001905181019061199b919061387a565b9050838382608001516119ae9190612baa565b6119b89190612bc1565b60808201526040516117c8908290602001600060c08201905073ffffffffffffffffffffffffffffffffffffffff80845116835260208401516020840152806040850151166040840152806060850151166060840152506080830151608083015260a083015160a083015292915050565b6060600084806020019051810190611a41919061390c565b905083838260800151611a549190612baa565b611a5e9190612bc1565b60808201526040516117c8908290602001613996565b6060600084806020019051810190611a8c9190613a2d565b905083838260200151611a9f9190612baa565b611aa99190612bc1565b602082810191825260408051845173ffffffffffffffffffffffffffffffffffffffff169281019290925291518183015290820151151560608201526080016117c8565b6060600084806020019051810190611b059190613a96565b905083838260800151611b189190612baa565b611b229190612bc1565b60808201526040516117c890829060200160006101008201905073ffffffffffffffffffffffffffffffffffffffff80845116835280602085015116602084015280604085015116604084015250606083015160608301526080830151608083015260a083015160a083015260c083015160c083015260e0830151151560e083015292915050565b6060600084806020019051810190611bc29190613b16565b905083838260600151611bd59190612baa565b611bdf9190612bc1565b60608201526040516117c8908290602001815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015190830152608092830151169181019190915260a00190565b73ffffffffffffffffffffffffffffffffffffffff81168114611c6457600080fd5b50565b8035611c7281611c42565b919050565b600080600060608486031215611c8c57600080fd5b8335611c9781611c42565b925060208401359150604084013567ffffffffffffffff811115611cba57600080fd5b840160808187031215611ccc57600080fd5b809150509250925092565b600060208284031215611ce957600080fd5b81356102de81611c42565b8015158114611c6457600080fd5b600060208284031215611d1457600080fd5b81356102de81611cf4565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611d5457600080fd5b83018035915067ffffffffffffffff821115611d6f57600080fd5b602001915036819003821315611d8457600080fd5b9250929050565b600060208284031215611d9d57600080fd5b8135600481106102de57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680611e2957611e29611dac565b92169190910492915050565b600060208284031215611e4757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60005b83811015611ec7578181015183820152602001611eaf565b50506000910152565b60008251611ee2818460208701611eac565b9190910192915050565b8051611c7281611cf4565b600060208284031215611f0957600080fd5b81516102de81611cf4565b60008085851115611f2457600080fd5b83861115611f3157600080fd5b5050820193919092039150565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611f7e5780818660040360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715611fd957611fd9611f86565b60405290565b60405160a0810167ffffffffffffffff81118282101715611fd957611fd9611f86565b60405160e0810167ffffffffffffffff81118282101715611fd957611fd9611f86565b6040805190810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610120810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610140810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051610100810167ffffffffffffffff81118282101715611fd957611fd9611f86565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156120fb576120fb611f86565b604052919050565b600067ffffffffffffffff82111561211d5761211d611f86565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261215a57600080fd5b813561216d61216882612103565b6120b4565b81815284602083860101111561218257600080fd5b816020850160208301376000918101602001919091529392505050565b600067ffffffffffffffff8211156121b9576121b9611f86565b5060051b60200190565b600082601f8301126121d457600080fd5b813560206121e46121688361219f565b82815260059290921b8401810191818101908684111561220357600080fd5b8286015b8481101561222757803561221a81611c42565b8352918301918301612207565b509695505050505050565b600082601f83011261224357600080fd5b813560206122536121688361219f565b82815260059290921b8401810191818101908684111561227257600080fd5b8286015b848110156122275780358352918301918301612276565b600061016082840312156122a057600080fd5b6122a8611fb5565b90506122b382611c67565b81526122c160208301611c67565b6020820152604082013567ffffffffffffffff808211156122e157600080fd5b6122ed858386016121c3565b6040840152606084013591508082111561230657600080fd5b61231285838601612232565b6060840152608084013591508082111561232b57600080fd5b612337858386016121c3565b608084015260a084013591508082111561235057600080fd5b61235c85838601612232565b60a084015261236d60c08501611c67565b60c084015260e0848101359084015261010080850135908401526101208085013590840152610140915081840135818111156123a857600080fd5b6123b486828701612149565b8385015250505092915050565b6000602082840312156123d357600080fd5b813567ffffffffffffffff808211156123eb57600080fd5b9083019060a082860312156123ff57600080fd5b612407611fdf565b61241083611c67565b815261241e60208401611c67565b602082015260408301358281111561243557600080fd5b61244187828601612149565b60408301525060608301358281111561245957600080fd5b6124658782860161228d565b60608301525060808301358281111561247d57600080fd5b61248987828601612149565b60808301525095945050505050565b600081518084526124b0816020860160208601611eac565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600081518084526020808501945080840160005b83811015610ffa57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016124f6565b600081518084526020808501945080840160005b83811015610ffa5781518752958201959082019060010161253c565b805173ffffffffffffffffffffffffffffffffffffffff1682526000610160602083015161259e602086018273ffffffffffffffffffffffffffffffffffffffff169052565b5060408301518160408601526125b6828601826124e2565b915050606083015184820360608601526125d08282612528565b915050608083015184820360808601526125ea82826124e2565b91505060a083015184820360a08601526126048282612528565b91505060c083015161262e60c086018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e083810151908501526101008084015190850152610120808401519085015261014080840151858303828701526126678382612498565b9695505050505050565b60208152600073ffffffffffffffffffffffffffffffffffffffff80845116602084015280602085015116604084015250604083015160a060608401526126bb60c0840182612498565b905060608401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0808584030160808601526126f78383612558565b925060808601519150808584030160a0860152506127158282612498565b95945050505050565b6000806000806080858703121561273457600080fd5b843561273f81611c42565b9350602085013567ffffffffffffffff8082111561275c57600080fd5b6127688883890161228d565b9450604087013591508082111561277e57600080fd5b61278a88838901612149565b935060608701359150808211156127a057600080fd5b506127ad87828801612149565b91505092959194509250565b73ffffffffffffffffffffffffffffffffffffffff851681526080602082015260006127e86080830186612558565b82810360408401526127fa8186612498565b90508281036060840152610c898185612498565b600082601f83011261281f57600080fd5b8151602061282f6121688361219f565b82815260059290921b8401810191818101908684111561284e57600080fd5b8286015b848110156122275780518352918301918301612852565b6000806000806080858703121561287f57600080fd5b845161288a81611c42565b809450506020850151925060408501519150606085015167ffffffffffffffff8111156128b657600080fd5b6127ad8782880161280e565b73ffffffffffffffffffffffffffffffffffffffff851681528360208201528260408201526080606082015260006126676080830184612528565b600082601f83011261290e57600080fd5b815161291c61216882612103565b81815284602083860101111561293157600080fd5b6102ad826020830160208701611eac565b60008060008084860361014081121561295a57600080fd5b855161296581611c42565b945060e07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561299757600080fd5b506129a0612002565b60208601516129ae81611c42565b815260408601516129be81611c42565b602082015260608601516129d181611c42565b604082015260808601516129e481611c42565b8060608301525060a0860151608082015260c086015160a082015260e086015160c08201528093505061010085015167ffffffffffffffff80821115612a2957600080fd5b612a35888389016128fd565b9350610120870151915080821115612a4c57600080fd5b506127ad878288016128fd565b600061014073ffffffffffffffffffffffffffffffffffffffff808816845280875116602085015280602088015116604085015280604088015116606085015280606088015116608085015250608086015160a084015260a086015160c084015260c086015160e084015280610100840152612ad781840186612498565b9050828103610120840152610c898185612498565b600080600080600060a08688031215612b0457600080fd5b8551612b0f81611c42565b6020870151909550612b2081611c42565b809450506040860151925060608601519150608086015167ffffffffffffffff811115612b4c57600080fd5b612b588882890161280e565b9150509295509295909350565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a06080830152610c8960a0830184612528565b8082028115828204841417610c9a57610c9a611ddb565b600082612bd057612bd0611dac565b500490565b6020815260006102de6020830184612498565b81810381811115610c9a57610c9a611ddb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610c9a57610c9a611ddb565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c6e57612c6e611ddb565b5060010190565b8051611c7281611c42565b600082601f830112612c9157600080fd5b81516020612ca16121688361219f565b82815260059290921b84018101918181019086841115612cc057600080fd5b8286015b84811015612227578051612cd781611c42565b8352918301918301612cc4565b600082601f830112612cf557600080fd5b81516020612d056121688361219f565b82815260059290921b84018101918181019086841115612d2457600080fd5b8286015b8481101561222757805167ffffffffffffffff811115612d485760008081fd5b612d568986838b01016128fd565b845250918301918301612d28565b600060208284031215612d7657600080fd5b815167ffffffffffffffff80821115612d8e57600080fd5b9083019060a08286031215612da257600080fd5b612daa611fdf565b825182811115612db957600080fd5b612dc587828601612c80565b825250602083015182811115612dda57600080fd5b612de68782860161280e565b602083015250604083015182811115612dfe57600080fd5b612e0a87828601612ce4565b60408301525060608301516060820152608083015182811115612e2c57600080fd5b612489878286016128fd565b60006020808352835160a082850152612e5460c08501826124e2565b9050818501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe080868403016040870152612e8f8383612528565b60408801518782038301606089015280518083529194508501925084840190600581901b8501860160005b82811015612ee65784878303018452612ed4828751612498565b95880195938801939150600101612eba565b5060608a015160808a015260808a01519650838982030160a08a0152612f0c8188612498565b9a9950505050505050505050565b600082601f830112612f2b57600080fd5b8151612f396121688261219f565b808282526020820191508560208460051b8701011115612f5857600080fd5b602085015b60208460051b8701018110156130be57805167ffffffffffffffff811115612f8457600080fd5b8601603f81018813612f9557600080fd5b6020810151612fa66121688261219f565b808282526020820191508a60408460051b8601011115612fc557600080fd5b604084015b60408460051b8601018110156130a857805167ffffffffffffffff811115612ff157600080fd5b60407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08288018f0301121561302557600080fd5b61302d612025565b6040828801015167ffffffffffffffff81111561304957600080fd5b61305a8f604083868c0101016128fd565b82525090860160600151907fffffffff000000000000000000000000000000000000000000000000000000008216821461309357600080fd5b60208181019290925284529283019201612fca565b5086525050602093840193919091019050612f5d565b5095945050505050565b6000602082840312156130da57600080fd5b815167ffffffffffffffff808211156130f257600080fd5b9083019060e0828603121561310657600080fd5b61310e612002565b82518281111561311d57600080fd5b61312987828601612f1a565b82525061313860208401612c75565b602082015261314960408401612c75565b60408201526060830151606082015261316460808401612c75565b608082015260a083015160a082015260c08301518281111561318557600080fd5b613191878286016128fd565b60c08301525095945050505050565b6020808252825160e0838301528051610100840181905260009291600582811b860161012090810193928501929087019186805b838110156132bc578987037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee001855285518051808952908901908989019080861b8a018b01855b828110156132a6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08c830301845284516040815181855261325f82860182612498565b9150507fffffffff000000000000000000000000000000000000000000000000000000008f830151168f85015280935050508c850194508c8401935060018101905061321b565b50995050509588019550938701936001016131d4565b505050509286015173ffffffffffffffffffffffffffffffffffffffff8116604087015292506132e99050565b604085015173ffffffffffffffffffffffffffffffffffffffff811660608601529150606085015160808501526080850151915061333f60a085018373ffffffffffffffffffffffffffffffffffffffff169052565b60a085015160c085015260c085015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08482030160e08501526127158183612498565b805163ffffffff81168114611c7257600080fd5b600061012082840312156133ab57600080fd5b6133b3612048565b6133bc83612c75565b81526133ca60208401612c75565b60208201526133db60408401612c75565b60408201526133ec60608401612c75565b60608201526080830151608082015260a083015160a082015261341160c08401613384565b60c082015261342260e08401613384565b60e0820152610100613435818501613384565b908201529392505050565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151608083015260a083015160a083015260c08301516134b360c084018263ffffffff169052565b5060e08301516134cb60e084018263ffffffff169052565b506101008381015163ffffffff811684830152611f7e565b805160ff81168114611c7257600080fd5b6000610140828403121561350757600080fd5b61350f61206c565b61351883612c75565b815261352660208401612c75565b602082015261353760408401612c75565b6040820152613548606084016134e3565b6060820152613559608084016134e3565b608082015260a083015160a082015260c083015160c082015260e083015160e082015261010061358a818501612c75565b90820152610120613435848201611eec565b815173ffffffffffffffffffffffffffffffffffffffff168152610140810160208301516135e2602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604083015161360a604084018273ffffffffffffffffffffffffffffffffffffffff169052565b50606083015161361f606084018260ff169052565b506080830151613634608084018260ff169052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015161367b8285018273ffffffffffffffffffffffffffffffffffffffff169052565b50506101208381015180151584830152611f7e565b8051600f81900b8114611c7257600080fd5b600061012082840312156136b557600080fd5b6136bd612048565b6136c683612c75565b81526136d460208401612c75565b60208201526136e560408401612c75565b60408201526136f660608401613690565b606082015261370760808401613690565b608082015260a083015160a082015260c083015160c082015261372c60e08401611eec565b60e0820152610100613435818501611eec565b815173ffffffffffffffffffffffffffffffffffffffff90811682526020808401518216908301526040808401519182169083015261012082019050606083015161378f6060840182600f0b9052565b5060808301516137a46080840182600f0b9052565b5060a083015160a083015260c083015160c083015260e08301516137cc60e084018215159052565b506101008381015180151584830152611f7e565b600061010082840312156137f357600080fd5b6137fb612090565b825161380681611c42565b8152602083015161381681611c42565b602082015261382760408401612c75565b604082015261383860608401612c75565b60608201526080830151608082015260a083015160a082015261385d60c08401612c75565b60c082015261386e60e08401611eec565b60e08201529392505050565b600060c0828403121561388c57600080fd5b60405160c0810181811067ffffffffffffffff821117156138af576138af611f86565b60405282516138bd81611c42565b81526020838101519082015260408301516138d781611c42565b604082015260608301516138ea81611c42565b60608201526080838101519082015260a0928301519281019290925250919050565b6000610120828403121561391f57600080fd5b613927612048565b61393083612c75565b815261393e60208401612c75565b602082015261394f60408401612c75565b604082015261396060608401612c75565b60608201526080830151608082015260a083015160a082015261398560c08401612c75565b60c082015261372c60e08401611eec565b815173ffffffffffffffffffffffffffffffffffffffff908116825260208084015182169083015260408084015182169083015260608084015191821690830152610120820190506080830151608083015260a083015160a083015260c0830151613a1960c084018273ffffffffffffffffffffffffffffffffffffffff169052565b5060e08301516137cc60e084018215159052565b600060608284031215613a3f57600080fd5b6040516060810181811067ffffffffffffffff82111715613a6257613a62611f86565b6040528251613a7081611c42565b8152602083810151908201526040830151613a8a81611cf4565b60408201529392505050565b60006101008284031215613aa957600080fd5b613ab1612090565b8251613abc81611c42565b81526020830151613acc81611c42565b6020820152613add60408401612c75565b6040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015261386e60e08401611eec565b600060a08284031215613b2857600080fd5b60405160a0810181811067ffffffffffffffff82111715613b4b57613b4b611f86565b6040528251613b5981611c42565b81526020830151613b6981611c42565b60208201526040830151613b7c81611c42565b6040820152606083810151908201526080830151613b9981611c42565b6080820152939250505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a2646970667358221220fb97f8285f99c9c37737a7fc136071383a90822fcb5685cec57b32b9eeef1f3364736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.