Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 10252048 | 14 hrs ago | IN | 0 S | 0.00171517 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
VotingEscrowPendleSidechain
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.17; import "../libraries/VeBalanceLib.sol"; import "../libraries/WeekMath.sol"; import "./VotingEscrowTokenBase.sol"; import "../CrossChainMsg/PendleMsgReceiverAppUpg.sol"; // solhint-disable no-empty-blocks contract VotingEscrowPendleSidechain is VotingEscrowTokenBase, PendleMsgReceiverAppUpg, BoringOwnableUpgradeable { uint256 public lastTotalSupplyReceivedAt; mapping(address => address) internal delegatorOf; event SetNewDelegator(address delegator, address receiver); event SetNewTotalSupply(VeBalance totalSupply); event SetNewUserPosition(LockedPosition position); constructor( address _PendleMsgReceiveEndpointUpg ) initializer PendleMsgReceiverAppUpg(_PendleMsgReceiveEndpointUpg) { __BoringOwnable_init(); } function totalSupplyCurrent() public view virtual override returns (uint128) { return totalSupplyStored(); } /** * @dev The mechanism of delegating is for governance to support protocol to build on top * This way, it is more gas efficient and does not affect the crosschain messaging cost */ function setDelegatorFor(address receiver, address delegator) external onlyOwner { delegatorOf[receiver] = delegator; emit SetNewDelegator(delegator, receiver); } /** * @dev Both two types of message will contain VeBalance supply & wTime * @dev If the message also contains some users' position, we should update it */ function _executeMessage(bytes memory message) internal virtual override { (uint128 msgTime, VeBalance memory supply, bytes memory userData) = abi.decode( message, (uint128, VeBalance, bytes) ); _setNewTotalSupply(msgTime, supply); if (userData.length > 0) { _setNewUserPosition(userData); } } function _setNewUserPosition(bytes memory userData) internal { (address userAddr, LockedPosition memory position) = abi.decode(userData, (address, LockedPosition)); positionData[userAddr] = position; emit SetNewUserPosition(position); } function _setNewTotalSupply(uint128 msgTime, VeBalance memory supply) internal { // lastSlopeChangeAppliedAt = wTime; if (msgTime < lastTotalSupplyReceivedAt) { revert Errors.VEReceiveOldSupply(msgTime); } lastTotalSupplyReceivedAt = msgTime; _totalSupply = supply; emit SetNewTotalSupply(supply); } function balanceOf(address user) public view virtual override returns (uint128) { address delegator = delegatorOf[user]; if (delegator == address(0)) return super.balanceOf(user); return super.balanceOf(delegator); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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.0; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; contract BoringOwnableUpgradeableData { address public owner; address public pendingOwner; } abstract contract BoringOwnableUpgradeable is BoringOwnableUpgradeableData, Initializable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function __BoringOwnable_init() internal onlyInitializing { owner = msg.sender; } /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise. function transferOwnership(address newOwner, bool direct, bool renounce) public onlyOwner { if (direct) { // Checks require(newOwner != address(0) || renounce, "Ownable: zero address"); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = address(0); } else { // Effects pendingOwner = newOwner; } } /// @notice Needs to be called by `pendingOwner` to claim ownership. function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require(msg.sender == _pendingOwner, "Ownable: caller != pending owner"); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); } /// @notice Only allows the `owner` to execute the function. modifier onlyOwner() { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } uint256[48] private __gap; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; 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 MarketFactoryOverriddenFeeTooHigh(uint80 overriddenFee, uint256 marketLnFeeRateRoot); error MarketFactoryReserveFeePercentTooHigh(uint8 reserveFeePercent, uint8 maxReserveFeePercent); error MarketFactoryZeroTreasury(); error MarketFactoryInitialAnchorTooLow(int256 initialAnchor, int256 minInitialAnchor); error MFNotPendleMarket(address addr); // 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 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(); error SimulationResults(bool success, bytes res); // 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); error SYStargateRedeemCapExceeded(uint256 amountLpDesired, uint256 amountLpRedeemable); error SYBalancerReentrancy(); error NotFromTrustedRemote(uint16 srcChainId, bytes path); error ApxETHNotEnoughBuffer(); // 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 InvalidMerkleProof(); 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 // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity ^0.8.0; /* solhint-disable private-vars-leading-underscore, reason-string */ library PMath { uint256 internal constant ONE = 1e18; // 18 decimal places int256 internal constant IONE = 1e18; // 18 decimal places function subMax0(uint256 a, uint256 b) internal pure returns (uint256) { unchecked { return (a >= b ? a - b : 0); } } function subNoNeg(int256 a, int256 b) internal pure returns (int256) { require(a >= b, "negative"); return a - b; // no unchecked since if b is very negative, a - b might overflow } function mulDown(uint256 a, uint256 b) internal pure returns (uint256) { uint256 product = a * b; unchecked { return product / ONE; } } function mulDown(int256 a, int256 b) internal pure returns (int256) { int256 product = a * b; unchecked { return product / IONE; } } function divDown(uint256 a, uint256 b) internal pure returns (uint256) { uint256 aInflated = a * ONE; unchecked { return aInflated / b; } } function divDown(int256 a, int256 b) internal pure returns (int256) { int256 aInflated = a * IONE; unchecked { return aInflated / b; } } function rawDivUp(uint256 a, uint256 b) internal pure returns (uint256) { return (a + b - 1) / b; } function rawDivUp(int256 a, int256 b) internal pure returns (int256) { return (a + b - 1) / b; } function tweakUp(uint256 a, uint256 factor) internal pure returns (uint256) { return mulDown(a, ONE + factor); } function tweakDown(uint256 a, uint256 factor) internal pure returns (uint256) { return mulDown(a, ONE - factor); } /// @return res = min(a + b, bound) /// @dev This function should handle arithmetic operation and bound check without overflow/underflow function addWithUpperBound(uint256 a, uint256 b, uint256 bound) internal pure returns (uint256 res) { unchecked { if (type(uint256).max - b < a) res = bound; else res = min(bound, a + b); } } /// @return res = max(a - b, bound) /// @dev This function should handle arithmetic operation and bound check without overflow/underflow function subWithLowerBound(uint256 a, uint256 b, uint256 bound) internal pure returns (uint256 res) { unchecked { if (b > a) res = bound; else res = max(a - b, bound); } } function clamp(uint256 x, uint256 lower, uint256 upper) internal pure returns (uint256 res) { res = x; if (x < lower) res = lower; else if (x > upper) res = upper; } // @author Uniswap function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } } else if (y != 0) { z = 1; } } function square(uint256 x) internal pure returns (uint256) { return x * x; } function squareDown(uint256 x) internal pure returns (uint256) { return mulDown(x, x); } function abs(int256 x) internal pure returns (uint256) { return uint256(x > 0 ? x : -x); } function neg(int256 x) internal pure returns (int256) { return x * (-1); } function neg(uint256 x) internal pure returns (int256) { return Int(x) * (-1); } function max(uint256 x, uint256 y) internal pure returns (uint256) { return (x > y ? x : y); } function max(int256 x, int256 y) internal pure returns (int256) { return (x > y ? x : y); } function min(uint256 x, uint256 y) internal pure returns (uint256) { return (x < y ? x : y); } function min(int256 x, int256 y) internal pure returns (int256) { return (x < y ? x : y); } /*/////////////////////////////////////////////////////////////// SIGNED CASTS //////////////////////////////////////////////////////////////*/ function Int(uint256 x) internal pure returns (int256) { require(x <= uint256(type(int256).max)); return int256(x); } function Int128(int256 x) internal pure returns (int128) { require(type(int128).min <= x && x <= type(int128).max); return int128(x); } function Int128(uint256 x) internal pure returns (int128) { return Int128(Int(x)); } /*/////////////////////////////////////////////////////////////// UNSIGNED CASTS //////////////////////////////////////////////////////////////*/ function Uint(int256 x) internal pure returns (uint256) { require(x >= 0); return uint256(x); } function Uint32(uint256 x) internal pure returns (uint32) { require(x <= type(uint32).max); return uint32(x); } function Uint64(uint256 x) internal pure returns (uint64) { require(x <= type(uint64).max); return uint64(x); } function Uint112(uint256 x) internal pure returns (uint112) { require(x <= type(uint112).max); return uint112(x); } function Uint96(uint256 x) internal pure returns (uint96) { require(x <= type(uint96).max); return uint96(x); } function Uint128(uint256 x) internal pure returns (uint128) { require(x <= type(uint128).max); return uint128(x); } function Uint192(uint256 x) internal pure returns (uint192) { require(x <= type(uint192).max); return uint192(x); } function Uint80(uint256 x) internal pure returns (uint80) { require(x <= type(uint80).max); return uint80(x); } function isAApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) { return mulDown(b, ONE - eps) <= a && a <= mulDown(b, ONE + eps); } function isAGreaterApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) { return a >= b && a <= mulDown(b, ONE + eps); } function isASmallerApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) { return a <= b && a >= mulDown(b, ONE - eps); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; library MiniHelpers { function isCurrentlyExpired(uint256 expiry) internal view returns (bool) { return (expiry <= block.timestamp); } function isExpired(uint256 expiry, uint256 blockTime) internal pure returns (bool) { return (expiry <= blockTime); } function isTimeInThePast(uint256 timestamp) internal view returns (bool) { return (timestamp <= block.timestamp); // same definition as isCurrentlyExpired } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.8.0; interface IPMsgReceiverApp { function executeMessage(bytes calldata message) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; interface IPVeToken { // ============= USER INFO ============= function balanceOf(address user) external view returns (uint128); function positionData(address user) external view returns (uint128 amount, uint128 expiry); // ============= META DATA ============= function totalSupplyStored() external view returns (uint128); function totalSupplyCurrent() external returns (uint128); function totalSupplyAndBalanceCurrent(address user) external returns (uint128, uint128); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; import "../../interfaces/IPMsgReceiverApp.sol"; import "../../core/libraries/BoringOwnableUpgradeable.sol"; import "../../core/libraries/Errors.sol"; // solhint-disable no-empty-blocks abstract contract PendleMsgReceiverAppUpg is IPMsgReceiverApp { address public immutable pendleMsgReceiveEndpoint; uint256[100] private __gap; modifier onlyFromPendleMsgReceiveEndpoint() { if (msg.sender != pendleMsgReceiveEndpoint) revert Errors.MsgNotFromReceiveEndpoint(msg.sender); _; } constructor(address _pendleMsgReceiveEndpoint) { pendleMsgReceiveEndpoint = _pendleMsgReceiveEndpoint; } function executeMessage(bytes calldata message) external virtual onlyFromPendleMsgReceiveEndpoint { _executeMessage(message); } function _executeMessage(bytes memory message) internal virtual; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; import "../../core/libraries/math/PMath.sol"; import "../../core/libraries/Errors.sol"; struct VeBalance { uint128 bias; uint128 slope; } struct LockedPosition { uint128 amount; uint128 expiry; } library VeBalanceLib { using PMath for uint256; uint128 internal constant MAX_LOCK_TIME = 104 weeks; uint256 internal constant USER_VOTE_MAX_WEIGHT = 10 ** 18; function add(VeBalance memory a, VeBalance memory b) internal pure returns (VeBalance memory res) { res.bias = a.bias + b.bias; res.slope = a.slope + b.slope; } function sub(VeBalance memory a, VeBalance memory b) internal pure returns (VeBalance memory res) { res.bias = a.bias - b.bias; res.slope = a.slope - b.slope; } function sub(VeBalance memory a, uint128 slope, uint128 expiry) internal pure returns (VeBalance memory res) { res.slope = a.slope - slope; res.bias = a.bias - slope * expiry; } function isExpired(VeBalance memory a) internal view returns (bool) { return a.slope * uint128(block.timestamp) >= a.bias; } function getCurrentValue(VeBalance memory a) internal view returns (uint128) { if (isExpired(a)) return 0; return getValueAt(a, uint128(block.timestamp)); } function getValueAt(VeBalance memory a, uint128 t) internal pure returns (uint128) { if (a.slope * t > a.bias) { return 0; } return a.bias - a.slope * t; } function getExpiry(VeBalance memory a) internal pure returns (uint128) { if (a.slope == 0) revert Errors.VEZeroSlope(a.bias, a.slope); return a.bias / a.slope; } function convertToVeBalance(LockedPosition memory position) internal pure returns (VeBalance memory res) { res.slope = position.amount / MAX_LOCK_TIME; res.bias = res.slope * position.expiry; } function convertToVeBalance( LockedPosition memory position, uint256 weight ) internal pure returns (VeBalance memory res) { res.slope = ((position.amount * weight) / MAX_LOCK_TIME / USER_VOTE_MAX_WEIGHT).Uint128(); res.bias = res.slope * position.expiry; } function convertToVeBalance(uint128 amount, uint128 expiry) internal pure returns (uint128, uint128) { VeBalance memory balance = convertToVeBalance(LockedPosition(amount, expiry)); return (balance.bias, balance.slope); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; library WeekMath { uint128 internal constant WEEK = 7 days; function getWeekStartTimestamp(uint128 timestamp) internal pure returns (uint128) { return (timestamp / WEEK) * WEEK; } function getCurrentWeekStart() internal view returns (uint128) { return getWeekStartTimestamp(uint128(block.timestamp)); } function isValidWTime(uint256 time) internal pure returns (bool) { return time % WEEK == 0; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.17; import "../../interfaces/IPVeToken.sol"; import "../../core/libraries/MiniHelpers.sol"; import "../libraries/VeBalanceLib.sol"; import "../libraries/WeekMath.sol"; /** * @dev this contract is an abstract for its mainchain and sidechain variant * PRINCIPLE: * - All functions implemented in this contract should be either view or pure * to ensure that no writing logic is inherited by sidechain version * - Mainchain version will handle the logic which are: * + Deposit, withdraw, increase lock, increase amount * + Mainchain logic will be ensured to have _totalSupply = linear sum of * all users' veBalance such that their locks are not yet expired * + Mainchain contract reserves 100% the right to write on sidechain * + No other transaction is allowed to write on sidechain storage */ abstract contract VotingEscrowTokenBase is IPVeToken { using VeBalanceLib for VeBalance; using VeBalanceLib for LockedPosition; uint128 public constant WEEK = 1 weeks; uint128 public constant MAX_LOCK_TIME = 104 weeks; uint128 public constant MIN_LOCK_TIME = 1 weeks; VeBalance internal _totalSupply; mapping(address => LockedPosition) public positionData; constructor() {} function balanceOf(address user) public view virtual returns (uint128) { return positionData[user].convertToVeBalance().getCurrentValue(); } function totalSupplyStored() public view virtual returns (uint128) { return _totalSupply.getCurrentValue(); } function totalSupplyCurrent() public virtual returns (uint128); function _isPositionExpired(address user) internal view returns (bool) { return MiniHelpers.isCurrentlyExpired(positionData[user].expiry); } function totalSupplyAndBalanceCurrent(address user) external returns (uint128, uint128) { return (totalSupplyCurrent(), balanceOf(user)); } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "viaIR": true, "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_PendleMsgReceiveEndpointUpg","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"MsgNotFromReceiveEndpoint","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgTime","type":"uint256"}],"name":"VEReceiveOldSupply","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"delegator","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"SetNewDelegator","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint128","name":"bias","type":"uint128"},{"internalType":"uint128","name":"slope","type":"uint128"}],"indexed":false,"internalType":"struct VeBalance","name":"totalSupply","type":"tuple"}],"name":"SetNewTotalSupply","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"expiry","type":"uint128"}],"indexed":false,"internalType":"struct LockedPosition","name":"position","type":"tuple"}],"name":"SetNewUserPosition","type":"event"},{"inputs":[],"name":"MAX_LOCK_TIME","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_LOCK_TIME","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WEEK","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTotalSupplyReceivedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendleMsgReceiveEndpoint","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"positionData","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"expiry","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"delegator","type":"address"}],"name":"setDelegatorFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalSupplyAndBalanceCurrent","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupplyCurrent","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyStored","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a03461020457601f6110d538819003918201601f19168301916001600160401b038311848410176102085780849260209460405283398101031261020457516001600160a01b03811681036102045760805260675460ff8160a81c1615908180926101f4575b80156101da575b1561017e5760ff60a01b198116600160a01b1760675581610166575b506067549060ff8260a81c161561010d57606680546001600160a01b031916331790556100d0575b604051610eb8908161021d82396080518181816102bd01526106020152f35b60ff60a81b1916606755604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a15f6100b1565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b61ffff60a01b191661010160a01b176067555f610089565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b15801561006d5750600160ff8260a01c161461006d565b50600160ff8260a01c1610610066565b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe604060808152600480361015610013575f80fd5b5f3560e01c908163078dfbe71461092e57816330d981af146108e05781633ff032071461010c5781634e71e0c8146107d457816370a0823114610780578163769b1ebc146106b45781638da5cb5b14610662578163aafcbe7614610626578163af5a8f7b146105b8578163cb6b4f3c1461052b578163e0299bf51461023c57508063e268b3a4146101be578063e30c39781461016c578063ef1c243a14610111578063f4359ce51461010c5763fa78668f146100cd575f80fd5b34610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857602090516303bfc4008152f35b5f80fd5b610adb565b5034610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff61016461015f610caa565b610d4d565b915191168152f35b5034610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085760209073ffffffffffffffffffffffffffffffffffffffff606754169051908152f35b50346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576101f6610ab8565b61023861020d61020761015f610caa565b92610b7b565b92516fffffffffffffffffffffffffffffffff92831681529190921660208201529081906040820190565b0390f35b823461010857602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085780359267ffffffffffffffff90818511610108573660238601121561010857848301358281116101085736602482880101116101085773ffffffffffffffffffffffffffffffffffffffff93847f00000000000000000000000000000000000000000000000000000000000000001633036104fb575f836102f66102f185610c70565b610c2c565b938085528060248387019b018b37840101528151820196608083858a019903126101085761032390610cfe565b9361033088888501610d1b565b926080810151918211610108570187603f8201121561010857838101519061035a6102f183610c70565b98828a528883830101116101085784905f5b8381106104e75750505f9189010152609854906fffffffffffffffffffffffffffffffff8095169182106104b957506098557f460b96294ff8de4eea3be3fb4fac9f978cffe83c7cc3140a4bfe0bedba26b92f8584835116927fffffffffffffffffffffffffffffffff0000000000000000000000000000000093848683015160801b16175f5561041e82518092602090816fffffffffffffffffffffffffffffffff91828151168552015116910152565ba185518061042857005b86016060878203126101085782870151948516809503610108577f776960a80ccfa09c52229b183bf0ef49b26a5d15f9ae2c1c0f780a450d3b2a9f96868461047293019101610d1b565b935f5260018252845f20928451169184015160801b161790556104b682518092602090816fffffffffffffffffffffffffffffffff91828151168552015116910152565ba1005b6024918751917fce6f391e000000000000000000000000000000000000000000000000000000008352820152fd5b8181018a01518b820184015286920161036c565b6024908651907f56b82aea0000000000000000000000000000000000000000000000000000000082523390820152fd5b82346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576102389073ffffffffffffffffffffffffffffffffffffffff61057c610ab8565b165f90815260016020908152908290205491516fffffffffffffffffffffffffffffffff8316815260809290921c908201529081906040820190565b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906098549051908152f35b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085760209073ffffffffffffffffffffffffffffffffffffffff606654169051908152f35b823461010857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576106eb610ab8565b9060243573ffffffffffffffffffffffffffffffffffffffff808216809203610108577f8d268954369e04c7941c3a7876f40c618eb97919add31202c9a235e75e84cf1b9361073f82606654163314610b16565b16805f526099602052825f20827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905582519182526020820152a1005b82346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff6101646107cf610ab8565b610b7b565b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576067549073ffffffffffffffffffffffffffffffffffffffff9283831691823303610883575050806066549384167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff00000000000000000000000000000000000000009283161760665516606755005b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602060248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152fd5b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff61016461015f610caa565b82346101085760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857610966610ab8565b91602435918215158303610108576044359283151584036101085773ffffffffffffffffffffffffffffffffffffffff9485916109a883606654163314610b16565b15610a85571692831590811591610a7d575b5015610a20575050806066549283167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff000000000000000000000000000000000000000080921617606655606754166067555f80f35b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601560248201527f4f776e61626c653a207a65726f206164647265737300000000000000000000006044820152fd5b9050856109ba565b9350505050167fffffffffffffffffffffffff000000000000000000000000000000000000000060675416176067555f80f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361010857565b34610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857602060405162093a808152f35b15610b1d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b73ffffffffffffffffffffffffffffffffffffffff8091165f52609960205260405f2054168015610bc7575f526001602052610bc461015f610bbf60405f20610cd4565b610de2565b90565b506001602052610bc461015f610bbf60405f20610cd4565b604051906040820182811067ffffffffffffffff821117610bff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff821117610bff57604052565b67ffffffffffffffff8111610bff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b610cb2610bdf565b905f546fffffffffffffffffffffffffffffffff8116835260801c6020830152565b90610cdd610bdf565b91546fffffffffffffffffffffffffffffffff8116835260801c6020830152565b51906fffffffffffffffffffffffffffffffff8216820361010857565b919082604091031261010857610d466020610d34610bdf565b93610d3e81610cfe565b855201610cfe565b6020830152565b6fffffffffffffffffffffffffffffffff8060208301511690610d738142168093610d8e565b8351821691161015610d8857610bc491610e2c565b50505f90565b9190916fffffffffffffffffffffffffffffffff80809416911602918216918203610db557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b90610deb610bdf565b5f81526020610e278183015f815283956fffffffffffffffffffffffffffffffff9381856303bfc4008180955116041680945201511690610d8e565b169052565b60208101916fffffffffffffffffffffffffffffffff92839283610e538482855116610d8e565b9151169384911611610e7a57839182610e6d925116610d8e565b169003908111610db55790565b505050505f9056fea2646970667358221220fc4dee1a9f6e938c2b952a854328250fe054e3bb5ef7f029b502a661db3f83f964736f6c634300081800330000000000000000000000003209e9412cca80b18338f2a56ada59c484c39644
Deployed Bytecode
0x604060808152600480361015610013575f80fd5b5f3560e01c908163078dfbe71461092e57816330d981af146108e05781633ff032071461010c5781634e71e0c8146107d457816370a0823114610780578163769b1ebc146106b45781638da5cb5b14610662578163aafcbe7614610626578163af5a8f7b146105b8578163cb6b4f3c1461052b578163e0299bf51461023c57508063e268b3a4146101be578063e30c39781461016c578063ef1c243a14610111578063f4359ce51461010c5763fa78668f146100cd575f80fd5b34610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857602090516303bfc4008152f35b5f80fd5b610adb565b5034610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff61016461015f610caa565b610d4d565b915191168152f35b5034610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085760209073ffffffffffffffffffffffffffffffffffffffff606754169051908152f35b50346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576101f6610ab8565b61023861020d61020761015f610caa565b92610b7b565b92516fffffffffffffffffffffffffffffffff92831681529190921660208201529081906040820190565b0390f35b823461010857602091827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085780359267ffffffffffffffff90818511610108573660238601121561010857848301358281116101085736602482880101116101085773ffffffffffffffffffffffffffffffffffffffff93847f0000000000000000000000003209e9412cca80b18338f2a56ada59c484c396441633036104fb575f836102f66102f185610c70565b610c2c565b938085528060248387019b018b37840101528151820196608083858a019903126101085761032390610cfe565b9361033088888501610d1b565b926080810151918211610108570187603f8201121561010857838101519061035a6102f183610c70565b98828a528883830101116101085784905f5b8381106104e75750505f9189010152609854906fffffffffffffffffffffffffffffffff8095169182106104b957506098557f460b96294ff8de4eea3be3fb4fac9f978cffe83c7cc3140a4bfe0bedba26b92f8584835116927fffffffffffffffffffffffffffffffff0000000000000000000000000000000093848683015160801b16175f5561041e82518092602090816fffffffffffffffffffffffffffffffff91828151168552015116910152565ba185518061042857005b86016060878203126101085782870151948516809503610108577f776960a80ccfa09c52229b183bf0ef49b26a5d15f9ae2c1c0f780a450d3b2a9f96868461047293019101610d1b565b935f5260018252845f20928451169184015160801b161790556104b682518092602090816fffffffffffffffffffffffffffffffff91828151168552015116910152565ba1005b6024918751917fce6f391e000000000000000000000000000000000000000000000000000000008352820152fd5b8181018a01518b820184015286920161036c565b6024908651907f56b82aea0000000000000000000000000000000000000000000000000000000082523390820152fd5b82346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576102389073ffffffffffffffffffffffffffffffffffffffff61057c610ab8565b165f90815260016020908152908290205491516fffffffffffffffffffffffffffffffff8316815260809290921c908201529081906040820190565b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003209e9412cca80b18338f2a56ada59c484c39644168152f35b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906098549051908152f35b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101085760209073ffffffffffffffffffffffffffffffffffffffff606654169051908152f35b823461010857807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576106eb610ab8565b9060243573ffffffffffffffffffffffffffffffffffffffff808216809203610108577f8d268954369e04c7941c3a7876f40c618eb97919add31202c9a235e75e84cf1b9361073f82606654163314610b16565b16805f526099602052825f20827fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905582519182526020820152a1005b82346101085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff6101646107cf610ab8565b610b7b565b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576067549073ffffffffffffffffffffffffffffffffffffffff9283831691823303610883575050806066549384167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff00000000000000000000000000000000000000009283161760665516606755005b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602060248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152fd5b8234610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610108576020906fffffffffffffffffffffffffffffffff61016461015f610caa565b82346101085760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857610966610ab8565b91602435918215158303610108576044359283151584036101085773ffffffffffffffffffffffffffffffffffffffff9485916109a883606654163314610b16565b15610a85571692831590811591610a7d575b5015610a20575050806066549283167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff000000000000000000000000000000000000000080921617606655606754166067555f80f35b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601560248201527f4f776e61626c653a207a65726f206164647265737300000000000000000000006044820152fd5b9050856109ba565b9350505050167fffffffffffffffffffffffff000000000000000000000000000000000000000060675416176067555f80f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361010857565b34610108575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261010857602060405162093a808152f35b15610b1d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b73ffffffffffffffffffffffffffffffffffffffff8091165f52609960205260405f2054168015610bc7575f526001602052610bc461015f610bbf60405f20610cd4565b610de2565b90565b506001602052610bc461015f610bbf60405f20610cd4565b604051906040820182811067ffffffffffffffff821117610bff57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff821117610bff57604052565b67ffffffffffffffff8111610bff57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b610cb2610bdf565b905f546fffffffffffffffffffffffffffffffff8116835260801c6020830152565b90610cdd610bdf565b91546fffffffffffffffffffffffffffffffff8116835260801c6020830152565b51906fffffffffffffffffffffffffffffffff8216820361010857565b919082604091031261010857610d466020610d34610bdf565b93610d3e81610cfe565b855201610cfe565b6020830152565b6fffffffffffffffffffffffffffffffff8060208301511690610d738142168093610d8e565b8351821691161015610d8857610bc491610e2c565b50505f90565b9190916fffffffffffffffffffffffffffffffff80809416911602918216918203610db557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b90610deb610bdf565b5f81526020610e278183015f815283956fffffffffffffffffffffffffffffffff9381856303bfc4008180955116041680945201511690610d8e565b169052565b60208101916fffffffffffffffffffffffffffffffff92839283610e538482855116610d8e565b9151169384911611610e7a57839182610e6d925116610d8e565b169003908111610db55790565b505050505f9056fea2646970667358221220fc4dee1a9f6e938c2b952a854328250fe054e3bb5ef7f029b502a661db3f83f964736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003209e9412cca80b18338f2a56ada59c484c39644
-----Decoded View---------------
Arg [0] : _PendleMsgReceiveEndpointUpg (address): 0x3209E9412cca80B18338f2a56ADA59c484c39644
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003209e9412cca80b18338f2a56ada59c484c39644
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.