Source Code
Overview
HYPE Balance
HYPE Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PendleHyperlendWHLPSY
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: MIT
pragma solidity ^0.8.0;
import "../NucleusBoring/PendleNucleusBoringVaultBaseSY.sol";
contract PendleHyperlendWHLPSY is PendleNucleusBoringVaultBaseSY {
address public constant WHLP = 0x1359b05241cA5076c9F59605214f4F84114c0dE8;
address public constant USDHL = 0xb50A96253aBDF803D85efcDce07Ad8becBc52BD5;
address public constant teller = 0x9781E42b4f3cB55Ba837F9579D17970d9efccB34;
address public constant depositor = 0x340C9f6159ABc2bdfCC0E2b9Fe91D739006b41c1;
constructor() PendleNucleusBoringVaultBaseSY(WHLP, teller, depositor, USDHL) {}
function PENDLE_COMMUNITY_CODE() internal pure override returns (bytes memory) {
return "pendle";
}
function initialize(string memory name_, string memory symbol_, address _owner) external initializer {
__SYBaseUpgV2_init(name_, symbol_, _owner);
_safeApproveInf(USDHL, depositor);
}
function getTokensIn() public pure override returns (address[] memory res) {
return ArrayLib.create(USDHL, WHLP);
}
function isValidTokenIn(address token) public pure override returns (bool) {
return token == USDHL || token == WHLP;
}
}// 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: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// 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.9.0) (token/ERC20/extensions/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 (last updated v4.9.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.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/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;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
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");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// 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 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
*
* 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: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: GPL-3.0-or-later
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
/**
* @dev Pendle's ERC20 implementation, modified from @openzeppelin implementation
* Changes are:
* - comes with built-in reentrancy protection, storage-packed with totalSupply variable
* - delete increaseAllowance / decreaseAllowance
* - add nonReentrancy protection to transfer / transferFrom functions
* - allow decimals to be passed in
* - block self-transfer by default
*/
// solhint-disable
abstract contract PendleERC20Upg is Context, Initializable, IERC20, IERC20Metadata {
uint8 private constant _NOT_ENTERED = 1;
uint8 private constant _ENTERED = 2;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint248 private _totalSupply;
uint8 private _status;
string private _name;
string private _symbol;
uint8 public immutable decimals;
uint256[100] private __gap;
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Sets the values for {name}, {symbol} and {decimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor(uint8 decimals_) {
decimals = decimals_;
}
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
function __ERC20Upg_init(string memory name_, string memory symbol_) internal onlyInitializing {
_name = name_;
_symbol = symbol_;
_status = _NOT_ENTERED;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) external virtual override nonReentrant returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) external virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external virtual override nonReentrant returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(from != to, "ERC20: transfer to self");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += toUint248(amount);
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= toUint248(amount);
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
function toUint248(uint256 x) internal virtual returns (uint248) {
require(x <= type(uint248).max); // signed, lim = bit-1
return uint248(x);
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
library ArrayLib {
function sum(uint256[] memory input) internal pure returns (uint256) {
uint256 value = 0;
for (uint256 i = 0; i < input.length; ) {
value += input[i];
unchecked {
i++;
}
}
return value;
}
/// @notice return index of the element if found, else return uint256.max
function find(address[] memory array, address element) internal pure returns (uint256 index) {
uint256 length = array.length;
for (uint256 i = 0; i < length; ) {
if (array[i] == element) return i;
unchecked {
i++;
}
}
return type(uint256).max;
}
function append(address[] memory inp, address element) internal pure returns (address[] memory out) {
uint256 length = inp.length;
out = new address[](length + 1);
for (uint256 i = 0; i < length; ) {
out[i] = inp[i];
unchecked {
i++;
}
}
out[length] = element;
}
function append(
address[] memory inp,
address element0,
address element1
) internal pure returns (address[] memory out) {
uint256 length = inp.length;
out = new address[](length + 2);
for (uint256 i = 0; i < length; ) {
out[i] = inp[i];
unchecked {
i++;
}
}
out[length] = element0;
out[length + 1] = element1;
}
function appendHead(address[] memory inp, address element) internal pure returns (address[] memory out) {
uint256 length = inp.length;
out = new address[](length + 1);
out[0] = element;
for (uint256 i = 1; i <= length; ) {
out[i] = inp[i - 1];
unchecked {
i++;
}
}
}
/**
* @dev This function assumes a and b each contains unidentical elements
* @param a array of addresses a
* @param b array of addresses b
* @return out Concatenation of a and b containing unidentical elements
*/
function merge(address[] memory a, address[] memory b) internal pure returns (address[] memory out) {
unchecked {
uint256 countUnidenticalB = 0;
bool[] memory isUnidentical = new bool[](b.length);
for (uint256 i = 0; i < b.length; ++i) {
if (!contains(a, b[i])) {
countUnidenticalB++;
isUnidentical[i] = true;
}
}
out = new address[](a.length + countUnidenticalB);
for (uint256 i = 0; i < a.length; ++i) {
out[i] = a[i];
}
uint256 id = a.length;
for (uint256 i = 0; i < b.length; ++i) {
if (isUnidentical[i]) {
out[id++] = b[i];
}
}
}
}
// various version of contains
function contains(address[] memory array, address element) internal pure returns (bool) {
uint256 length = array.length;
for (uint256 i = 0; i < length; ) {
if (array[i] == element) return true;
unchecked {
i++;
}
}
return false;
}
function contains(bytes4[] memory array, bytes4 element) internal pure returns (bool) {
uint256 length = array.length;
for (uint256 i = 0; i < length; ) {
if (array[i] == element) return true;
unchecked {
i++;
}
}
return false;
}
function create(address a) internal pure returns (address[] memory res) {
res = new address[](1);
res[0] = a;
}
function create(address a, address b) internal pure returns (address[] memory res) {
res = new address[](2);
res[0] = a;
res[1] = b;
}
function create(address a, address b, address c) internal pure returns (address[] memory res) {
res = new address[](3);
res[0] = a;
res[1] = b;
res[2] = c;
}
function create(address a, address b, address c, address d) internal pure returns (address[] memory res) {
res = new address[](4);
res[0] = a;
res[1] = b;
res[2] = c;
res[3] = d;
}
function create(
address a,
address b,
address c,
address d,
address e
) internal pure returns (address[] memory res) {
res = new address[](5);
res[0] = a;
res[1] = b;
res[2] = c;
res[3] = d;
res[4] = e;
}
function create(uint256 a) internal pure returns (uint256[] memory res) {
res = new uint256[](1);
res[0] = a;
}
function create(uint256 a, uint256 b) internal pure returns (uint256[] memory res) {
res = new uint256[](2);
res[0] = a;
res[1] = b;
}
}// 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 BoringOwnableUpgradeableV2 is BoringOwnableUpgradeableData, Initializable {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function __BoringOwnableV2_init(address _owner) internal onlyInitializing {
owner = _owner;
}
/// @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 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;
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: MIT
pragma solidity ^0.8.0;
import "../../v2/SYBaseUpgV2.sol";
import "../../../../interfaces/NucleusBoring/INucleusBoringTeller.sol";
import "../../../../interfaces/NucleusBoring/INucleusBoringDepositor.sol";
import "../../../../interfaces/NucleusBoring/INucleusBoringAccountant.sol";
abstract contract PendleNucleusBoringVaultBaseSY is SYBaseUpgV2 {
uint256 public immutable ONE_SHARE;
address public immutable underlyingAsset;
address public immutable communityDepositor;
address public immutable boringTeller;
address public immutable accountant;
uint256[100] private __gap;
constructor(address _boringVault, address _boringTeller, address _depositor, address _underlyingAsset)
SYBaseUpgV2(_boringVault)
{
communityDepositor = _depositor;
boringTeller = _boringTeller;
accountant = INucleusBoringTeller(boringTeller).accountant();
underlyingAsset = _underlyingAsset;
ONE_SHARE = 10 ** IERC20Metadata(_boringVault).decimals();
}
function PENDLE_COMMUNITY_CODE() internal pure virtual returns (bytes memory);
function _deposit(address tokenIn, uint256 amountDeposited)
internal
virtual
override
returns (uint256 amountSharesOut)
{
if (tokenIn == yieldToken) {
return amountDeposited;
}
amountSharesOut = INucleusBoringDepositor(communityDepositor).deposit(
tokenIn, amountDeposited, 0, address(this), PENDLE_COMMUNITY_CODE()
);
}
function _redeem(address receiver, address /*tokenOut*/, uint256 amountSharesToRedeem)
internal
virtual
override
returns (uint256 /*amountTokenOut*/)
{
_transferOut(yieldToken, receiver, amountSharesToRedeem);
return amountSharesToRedeem;
}
function exchangeRate() external view virtual override returns (uint256 res) {
return INucleusBoringAccountant(accountant).getRateInQuoteSafe(underlyingAsset) * PMath.ONE / ONE_SHARE;
}
function _previewDeposit(address tokenIn, uint256 amountTokenToDeposit)
internal
view
virtual
override
returns (uint256 amountSharesOut)
{
if (tokenIn == yieldToken) {
return amountTokenToDeposit;
}
uint256 rate = INucleusBoringAccountant(accountant).getRateInQuoteSafe(tokenIn);
amountSharesOut = (amountTokenToDeposit * ONE_SHARE) / rate;
}
function _previewRedeem(address /*tokenOut*/, uint256 amountSharesToRedeem)
internal
view
virtual
override
returns (uint256 /*amountTokenOut*/)
{
return amountSharesToRedeem;
}
function getTokensOut() public view virtual override returns (address[] memory res) {
return ArrayLib.create(yieldToken);
}
function isValidTokenOut(address token) public view virtual override returns (bool) {
return token == yieldToken;
}
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
return (AssetType.TOKEN, underlyingAsset, IERC20Metadata(underlyingAsset).decimals());
}
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.17;
import "../../../interfaces/IStandardizedYield.sol";
import "../../erc20/PendleERC20Upg.sol";
import "../../libraries/math/PMath.sol";
import "../../libraries/ArrayLib.sol";
import "../../libraries/TokenHelper.sol";
import "../../libraries/Errors.sol";
import "../../libraries/BoringOwnableUpgradeableV2.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../../../interfaces/IStandardizedYieldExtended.sol";
abstract contract SYBaseUpgV2 is IStandardizedYield, PendleERC20Upg, TokenHelper, BoringOwnableUpgradeableV2, Pausable {
using PMath for uint256;
address public immutable yieldToken;
uint256[100] private __gap;
constructor(address _yieldToken) PendleERC20Upg(IERC20Metadata(_yieldToken).decimals()) {
yieldToken = _yieldToken;
_disableInitializers();
}
function __SYBaseUpgV2_init(string memory name_, string memory symbol_, address _owner) internal onlyInitializing {
__ERC20Upg_init(name_, symbol_);
__BoringOwnableV2_init(_owner);
}
// solhint-disable no-empty-blocks
receive() external payable {}
/*///////////////////////////////////////////////////////////////
DEPOSIT/REDEEM USING BASE TOKENS
//////////////////////////////////////////////////////////////*/
/**
* @dev See {IStandardizedYield-deposit}
*/
function deposit(
address receiver,
address tokenIn,
uint256 amountTokenToDeposit,
uint256 minSharesOut
) external payable nonReentrant returns (uint256 amountSharesOut) {
if (!isValidTokenIn(tokenIn)) revert Errors.SYInvalidTokenIn(tokenIn);
if (amountTokenToDeposit == 0) revert Errors.SYZeroDeposit();
_transferIn(tokenIn, msg.sender, amountTokenToDeposit);
amountSharesOut = _deposit(tokenIn, amountTokenToDeposit);
if (amountSharesOut < minSharesOut) revert Errors.SYInsufficientSharesOut(amountSharesOut, minSharesOut);
_mint(receiver, amountSharesOut);
emit Deposit(msg.sender, receiver, tokenIn, amountTokenToDeposit, amountSharesOut);
}
/**
* @dev See {IStandardizedYield-redeem}
*/
function redeem(
address receiver,
uint256 amountSharesToRedeem,
address tokenOut,
uint256 minTokenOut,
bool burnFromInternalBalance
) external nonReentrant returns (uint256 amountTokenOut) {
if (!isValidTokenOut(tokenOut)) revert Errors.SYInvalidTokenOut(tokenOut);
if (amountSharesToRedeem == 0) revert Errors.SYZeroRedeem();
if (burnFromInternalBalance) {
_burn(address(this), amountSharesToRedeem);
} else {
_burn(msg.sender, amountSharesToRedeem);
}
amountTokenOut = _redeem(receiver, tokenOut, amountSharesToRedeem);
if (amountTokenOut < minTokenOut) revert Errors.SYInsufficientTokenOut(amountTokenOut, minTokenOut);
emit Redeem(msg.sender, receiver, tokenOut, amountSharesToRedeem, amountTokenOut);
}
/**
* @notice mint shares based on the deposited base tokens
* @param tokenIn base token address used to mint shares
* @param amountDeposited amount of base tokens deposited
* @return amountSharesOut amount of shares minted
*/
function _deposit(address tokenIn, uint256 amountDeposited) internal virtual returns (uint256 amountSharesOut);
/**
* @notice redeems base tokens based on amount of shares to be burned
* @param tokenOut address of the base token to be redeemed
* @param amountSharesToRedeem amount of shares to be burned
* @return amountTokenOut amount of base tokens redeemed
*/
function _redeem(
address receiver,
address tokenOut,
uint256 amountSharesToRedeem
) internal virtual returns (uint256 amountTokenOut);
/*///////////////////////////////////////////////////////////////
EXCHANGE-RATE
//////////////////////////////////////////////////////////////*/
/**
* @dev See {IStandardizedYield-exchangeRate}
*/
function exchangeRate() external view virtual override returns (uint256 res);
/*///////////////////////////////////////////////////////////////
REWARDS-RELATED
//////////////////////////////////////////////////////////////*/
/**
* @dev See {IStandardizedYield-claimRewards}
*/
function claimRewards(address /*user*/) external virtual override returns (uint256[] memory rewardAmounts) {
rewardAmounts = new uint256[](0);
}
/**
* @dev See {IStandardizedYield-getRewardTokens}
*/
function getRewardTokens() external view virtual override returns (address[] memory rewardTokens) {
rewardTokens = new address[](0);
}
/**
* @dev See {IStandardizedYield-accruedRewards}
*/
function accruedRewards(address /*user*/) external view virtual override returns (uint256[] memory rewardAmounts) {
rewardAmounts = new uint256[](0);
}
function rewardIndexesCurrent() external virtual override returns (uint256[] memory indexes) {
indexes = new uint256[](0);
}
function rewardIndexesStored() external view virtual override returns (uint256[] memory indexes) {
indexes = new uint256[](0);
}
/*///////////////////////////////////////////////////////////////
MISC METADATA FUNCTIONS
//////////////////////////////////////////////////////////////*/
function previewDeposit(
address tokenIn,
uint256 amountTokenToDeposit
) external view virtual returns (uint256 amountSharesOut) {
if (!isValidTokenIn(tokenIn)) revert Errors.SYInvalidTokenIn(tokenIn);
return _previewDeposit(tokenIn, amountTokenToDeposit);
}
function previewRedeem(
address tokenOut,
uint256 amountSharesToRedeem
) external view virtual returns (uint256 amountTokenOut) {
if (!isValidTokenOut(tokenOut)) revert Errors.SYInvalidTokenOut(tokenOut);
return _previewRedeem(tokenOut, amountSharesToRedeem);
}
function pause() external onlyOwner {
_pause();
}
function unpause() external onlyOwner {
_unpause();
}
function _beforeTokenTransfer(address, address, uint256) internal virtual override whenNotPaused {}
function _previewDeposit(
address tokenIn,
uint256 amountTokenToDeposit
) internal view virtual returns (uint256 amountSharesOut);
function _previewRedeem(
address tokenOut,
uint256 amountSharesToRedeem
) internal view virtual returns (uint256 amountTokenOut);
function getTokensIn() public view virtual returns (address[] memory res);
function getTokensOut() public view virtual returns (address[] memory res);
function isValidTokenIn(address token) public view virtual returns (bool);
function isValidTokenOut(address token) public view virtual returns (bool);
function pricingInfo() external view virtual returns (address refToken, bool refStrictlyEqual) {
return (yieldToken, true);
}
}// 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.0;
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IStandardizedYield is IERC20Metadata {
/// @dev Emitted when any base tokens is deposited to mint shares
event Deposit(
address indexed caller,
address indexed receiver,
address indexed tokenIn,
uint256 amountDeposited,
uint256 amountSyOut
);
/// @dev Emitted when any shares are redeemed for base tokens
event Redeem(
address indexed caller,
address indexed receiver,
address indexed tokenOut,
uint256 amountSyToRedeem,
uint256 amountTokenOut
);
/// @dev check `assetInfo()` for more information
enum AssetType {
TOKEN,
LIQUIDITY
}
/// @dev Emitted when (`user`) claims their rewards
event ClaimRewards(address indexed user, address[] rewardTokens, uint256[] rewardAmounts);
/**
* @notice mints an amount of shares by depositing a base token.
* @param receiver shares recipient address
* @param tokenIn address of the base tokens to mint shares
* @param amountTokenToDeposit amount of base tokens to be transferred from (`msg.sender`)
* @param minSharesOut reverts if amount of shares minted is lower than this
* @return amountSharesOut amount of shares minted
* @dev Emits a {Deposit} event
*
* Requirements:
* - (`tokenIn`) must be a valid base token.
*/
function deposit(
address receiver,
address tokenIn,
uint256 amountTokenToDeposit,
uint256 minSharesOut
) external payable returns (uint256 amountSharesOut);
/**
* @notice redeems an amount of base tokens by burning some shares
* @param receiver recipient address
* @param amountSharesToRedeem amount of shares to be burned
* @param tokenOut address of the base token to be redeemed
* @param minTokenOut reverts if amount of base token redeemed is lower than this
* @param burnFromInternalBalance if true, burns from balance of `address(this)`, otherwise burns from `msg.sender`
* @return amountTokenOut amount of base tokens redeemed
* @dev Emits a {Redeem} event
*
* Requirements:
* - (`tokenOut`) must be a valid base token.
*/
function redeem(
address receiver,
uint256 amountSharesToRedeem,
address tokenOut,
uint256 minTokenOut,
bool burnFromInternalBalance
) external returns (uint256 amountTokenOut);
/**
* @notice exchangeRate * syBalance / 1e18 must return the asset balance of the account
* @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of sy
he can mint must be X * exchangeRate / 1e18
* @dev SYUtils's assetToSy & syToAsset should be used instead of raw multiplication
& division
*/
function exchangeRate() external view returns (uint256 res);
/**
* @notice claims reward for (`user`)
* @param user the user receiving their rewards
* @return rewardAmounts an array of reward amounts in the same order as `getRewardTokens`
* @dev
* Emits a `ClaimRewards` event
* See {getRewardTokens} for list of reward tokens
*/
function claimRewards(address user) external returns (uint256[] memory rewardAmounts);
/**
* @notice get the amount of unclaimed rewards for (`user`)
* @param user the user to check for
* @return rewardAmounts an array of reward amounts in the same order as `getRewardTokens`
*/
function accruedRewards(address user) external view returns (uint256[] memory rewardAmounts);
function rewardIndexesCurrent() external returns (uint256[] memory indexes);
function rewardIndexesStored() external view returns (uint256[] memory indexes);
/**
* @notice returns the list of reward token addresses
*/
function getRewardTokens() external view returns (address[] memory);
/**
* @notice returns the address of the underlying yield token
*/
function yieldToken() external view returns (address);
/**
* @notice returns all tokens that can mint this SY
*/
function getTokensIn() external view returns (address[] memory res);
/**
* @notice returns all tokens that can be redeemed by this SY
*/
function getTokensOut() external view returns (address[] memory res);
function isValidTokenIn(address token) external view returns (bool);
function isValidTokenOut(address token) external view returns (bool);
function previewDeposit(
address tokenIn,
uint256 amountTokenToDeposit
) external view returns (uint256 amountSharesOut);
function previewRedeem(
address tokenOut,
uint256 amountSharesToRedeem
) external view returns (uint256 amountTokenOut);
/**
* @notice This function contains information to interpret what the asset is
* @return assetType the type of the asset (0 for ERC20 tokens, 1 for AMM liquidity tokens,
2 for bridged yield bearing tokens like wstETH, rETH on Arbi whose the underlying asset doesn't exist on the chain)
* @return assetAddress the address of the asset
* @return assetDecimals the decimals of the asset
*/
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals);
}// 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.0;
interface IStandardizedYieldExtended {
/**
* @notice This function contains information to describe recommended pricing method for this SY
* @return refToken the token should be referred to when pricing this SY
* @return refStrictlyEqual whether the price of SY is strictly equal to refToken
*
* @dev For pricing PT & YT of this SY, it's recommended that:
* - refStrictlyEqual = true : (1 natural unit of SY = 1 natural unit of refToken). Use PYLpOracle.get{Token}ToSyRate() and multiply with refToken's according price.
* [CAUTION]: SY and refToken might have different decimals.
*
* - refStrictlyEqual = false: use PYLpOracle.get{Token}ToAssetRate() and multiply with refToken's according price. It is also
* highly recommended to contact us for discussion on this type of token
*/
function pricingInfo() external view returns (address refToken, bool refStrictlyEqual);
}// 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.0;
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.0;
interface INucleusBoringAccountant {
function getRateInQuoteSafe(address quote) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface INucleusBoringDepositor {
function deposit(
address depositAsset,
uint256 depositAmount,
uint256 minimumMint,
address to,
bytes calldata communityCode
) external returns (uint256 shares);
function depositNative(
uint256 depositAmount,
uint256 minimumMint,
address to,
bytes calldata communityCode
) external payable returns (uint256 shares);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface INucleusBoringTeller {
function accountant() external view returns (address);
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"viaIR": true,
"evmVersion": "shanghai",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"actualSharesOut","type":"uint256"},{"internalType":"uint256","name":"requiredSharesOut","type":"uint256"}],"name":"SYInsufficientSharesOut","type":"error"},{"inputs":[{"internalType":"uint256","name":"actualTokenOut","type":"uint256"},{"internalType":"uint256","name":"requiredTokenOut","type":"uint256"}],"name":"SYInsufficientTokenOut","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SYInvalidTokenIn","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SYInvalidTokenOut","type":"error"},{"inputs":[],"name":"SYZeroDeposit","type":"error"},{"inputs":[],"name":"SYZeroRedeem","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"rewardAmounts","type":"uint256[]"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountDeposited","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountSyOut","type":"uint256"}],"name":"Deposit","type":"event"},{"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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSyToRedeem","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountTokenOut","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ONE_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDHL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHLP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accountant","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accruedRewards","outputs":[{"internalType":"uint256[]","name":"rewardAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assetInfo","outputs":[{"internalType":"enum IStandardizedYield.AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"assetAddress","type":"address"},{"internalType":"uint8","name":"assetDecimals","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boringTeller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimRewards","outputs":[{"internalType":"uint256[]","name":"rewardAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityDepositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountTokenToDeposit","type":"uint256"},{"internalType":"uint256","name":"minSharesOut","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"amountSharesOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"depositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"res","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardTokens","outputs":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensIn","outputs":[{"internalType":"address[]","name":"res","type":"address[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTokensOut","outputs":[{"internalType":"address[]","name":"res","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isValidTokenIn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isValidTokenOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountTokenToDeposit","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"amountSharesOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountSharesToRedeem","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"amountTokenOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricingInfo","outputs":[{"internalType":"address","name":"refToken","type":"address"},{"internalType":"bool","name":"refStrictlyEqual","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amountSharesToRedeem","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"minTokenOut","type":"uint256"},{"internalType":"bool","name":"burnFromInternalBalance","type":"bool"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"amountTokenOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardIndexesCurrent","outputs":[{"internalType":"uint256[]","name":"indexes","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardIndexesStored","outputs":[{"internalType":"uint256[]","name":"indexes","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yieldToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
610160604081815234620002685763313ce56760e01b908183526020731359b05241ca5076c9f59605214f4f84114c0de8938181600481885afa90811562000220575f9162000313575b5060805260ff19609b5416609b558360a05260015460ff8160a81c16620002c057908160ff806004959460a01c16036200027e575b506101009473340c9f6159abc2bdfcc0e2b9fe91d739006b41c18652739781e42b4f3cb55ba837f9579d17970d9efccb34948261012096808852855196878092634fb3ccc560e01b82525afa94851562000274575f956200022a575b50829061014095865273b50a96253abdf803d85efcdce07ad8becbc52bd560e052600485518094819382525afa91821562000220579060ff92915f92620001ec575b505016604d8111620001d857600a0a60c0525191613912938462000389853960805184611369015260a0518481816103e901528181610ab501528181610b2601528181610bfd01528181611b000152818161265201528181612e650152613450015260c0518481816105b3015281816112a301526134df015260e0518481816106ec01528181610e1c01526112290152518381816102ab0152612f2201525182610dae015251818181610f790152818161124f01526134ac0152f35b634e487b7160e01b5f52601160045260245ffd5b620002109250803d1062000218575b62000207818362000335565b8101906200036d565b5f806200011c565b503d620001fb565b83513d5f823e3d90fd5b9094508281813d83116200026c575b62000245818362000335565b810103126200026857516001600160a01b038116810362000268579382620000da565b5f80fd5b503d62000239565b84513d5f823e3d90fd5b60ff60a01b191660ff60a01b17600155815160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498908290a15f6200007e565b50608491519062461bcd60e51b82526004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152fd5b6200032e9150823d8411620002185762000207818362000335565b5f62000049565b601f909101601f19168101906001600160401b038211908210176200035957604052565b634e487b7160e01b5f52604160045260245ffd5b9081602091031262000268575160ff8116810362000268579056fe6080604090808252600480361015610021575b505050361561001f575f80fd5b005b5f3560e01c91826306fdde031461267e57508163071bc3c9146125e9578163077f224a14611d00578163078dfbe714611b79578163095ea7b314611b2b578163128fced11461025c57816314b3aa0f14611ab857816318160ddd14611a5d57816320e8c56514611659578163213cae631461155a57816323b872dd1461138d578163313ce567146113325781633ba0b9a9146111b45781633f4ba83a146110a75781634e71e0c814610f9d5781634fb3ccc514610f2f57816357edab4e14610ee35781635c975abb14610ea257816370a0823114610e405781637158da7c14610dd2578163740dbbda14610d64578163769f8e5d14610b4a57816376d5de8514610adc578163784367d614610a5f5781637e95926914610a135781638456cb59146109645781638c57a5c7146109185781638da5cb5b146108c757816395d89b41146107aa578163a40bee50146106a5578163a9059cbb146105d6578163b7d122b51461057e578163b8f82b26146104dd578163c4f59f9b14610493578163c7c4ff4614610447578163cbe52ae31461039657508063da88ecb414610257578063dd62ed3e14610321578063e30c3978146102cf578063e828ca1714610261578063ef5cfb8c1461025c578063f8b2f991146102575763fa5a4f0614610208578080610012565b346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209061024a61024561293e565b612bc0565b90519015158152f35b5f80fd5b612a0e565b6129bf565b5034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b503461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209061035b61293e565b610363612961565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260038452825f2091165f528252805f20549051908152f35b90503461025357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576103ce61293e565b73ffffffffffffffffffffffffffffffffffffffff809116907f000000000000000000000000000000000000000000000000000000000000000016810361041a57602083516024358152f35b60249251917f88a50561000000000000000000000000000000000000000000000000000000008352820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173340c9f6159abc2bdfcc0e2b9fe91d739006b41c18152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576104d9906104ce612afd565b9051918291826127a4565b0390f35b90503461025357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535761051561293e565b9061051f82612bc0565b1561053a5760208361053360243585613435565b9051908152f35b73ffffffffffffffffffffffffffffffffffffffff60249351927faeabe7180000000000000000000000000000000000000000000000000000000084521690820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b823461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020917f010000000000000000000000000000000000000000000000000000000000000061063161293e565b61069883549161064760028460f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094161785556024359033612fce565b8254161790555160018152f35b905034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906020835180927f313ce56700000000000000000000000000000000000000000000000000000000825281855afa9081156107a0575f91610761575b509160ff6060938251935f855260208501521690820152f35b90506020813d602011610798575b8161077c6020938361285a565b8101031261025357519160ff83168303610253579160ff610748565b3d915061076f565b83513d5f823e3d90fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535780516006549091825f6107eb84612a47565b808352602094600190866001821691825f1461088757505060011461082c575b50506104d9929161081d91038561285a565b51928284938452830190612748565b9085925060065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f915f925b82841061086f575050508201018161081d61080b565b8054848a018601528895508794909301928101610859565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168682015292151560051b8501909201925083915061081d905061080b565b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff5f54169051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173b50a96253abdf803d85efcdce07ad8becbc52bd58152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916109d973ffffffffffffffffffffffffffffffffffffffff5f54163314612a98565b6109e1613683565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00609b541617609b5551338152a1005b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209051731359b05241ca5076c9f59605214f4f84114c0de88152f35b82346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090610a9a61293e565b73ffffffffffffffffffffffffffffffffffffffff915191807f0000000000000000000000000000000000000000000000000000000000000000169116148152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b9050346102535760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357610b8361293e565b9160243591610b9061291b565b6064359460843590811515820361025357835492610bb460028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8095161785557f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff809216938282168503610d35578815610d0d5783610c60928a925f14610d0357610c5b8330613252565b613594565b878710610cce5760209750907f0100000000000000000000000000000000000000000000000000000000000000939291865191888352888a84015216907faee47cdf925cf525fdae94f9777ee5a06cac37e1c41220d0a8a89ed154f62d1c873392a482541617905551908152f35b60448589898951927fbfee4ca00000000000000000000000000000000000000000000000000000000084528301526024820152fd5b610c5b8333613252565b8688517fc3d83b07000000000000000000000000000000000000000000000000000000008152fd5b602487868a51917f88a50561000000000000000000000000000000000000000000000000000000008352820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b82346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff610e9061293e565b165f5260028252805f20549051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209060ff609b541690519015158152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209051739781e42b4f3cb55ba837f9579d17970d9efccb348152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576001549073ffffffffffffffffffffffffffffffffffffffff928383169182330361104a575050805f549384167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff0000000000000000000000000000000000000000928316175f5516600155005b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602060248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152fd5b905034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576110f973ffffffffffffffffffffffffffffffffffffffff5f54163314612a98565b609b549060ff821615611157577f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516609b5551338152a1005b60649060208451917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602491602073ffffffffffffffffffffffffffffffffffffffff8351948580927f820973da000000000000000000000000000000000000000000000000000000008252807f000000000000000000000000000000000000000000000000000000000000000016868301527f0000000000000000000000000000000000000000000000000000000000000000165afa928315611328575f936112f4575b50670de0b6b3a7640000928381029381850414901517156112c857506105336020927f000000000000000000000000000000000000000000000000000000000000000090612b89565b6011907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b9092506020813d602011611320575b816113106020938361285a565b810103126102535751918361127f565b3d9150611303565b82513d5f823e3d90fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b9050346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576113c661293e565b6113ce612961565b604435908354926113e560028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80951617855573ffffffffffffffffffffffffffffffffffffffff81165f526003602052855f20335f52602052855f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81036114b0575b602087877f010000000000000000000000000000000000000000000000000000000000000088610698898989612fce565b8381106114fd5792602096959492610698926114f0837f010000000000000000000000000000000000000000000000000000000000000097033383612cd8565b925092949596509261147f565b60648660208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253578051906060820182811067ffffffffffffffff82111761162d578152600282528036602084013773b50a96253abdf803d85efcdce07ad8becbc52bd56115ce83612c13565b52815160011015611601576104d99250731359b05241ca5076c9f59605214f4f84114c0de88183015251918291826127a4565b6032837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b6041847f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b8260807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535761168c61293e565b90611695612961565b9160443592606435938554926116b160028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80951617875561170183612bc0565b15611a185781156119f05773ffffffffffffffffffffffffffffffffffffffff908184169384155f14611958578334036118fb578361173f91612e49565b968088106118c657501690811561186957611758613683565b8386116102535786548487168582160185811161183d57918593917fff0000000000000000000000000000000000000000000000000000000000000060209a977f01000000000000000000000000000000000000000000000000000000000000009795169116178655815f5260028952865f206117d6898254612f94565b9055815f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8b8a518c8152a3865190815287898201527f5fe47ed6d4225326d3303476197d782ded5a4e9c14f479dc9ec4992af4e85d59873392a482541617905551908152f35b6011897f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b60648760208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b88604491898951927fbc71f2ba0000000000000000000000000000000000000000000000000000000084528301526024820152fd5b60648960208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600c60248201527f657468206d69736d6174636800000000000000000000000000000000000000006044820152fd5b86517f23b872dd0000000000000000000000000000000000000000000000000000000060208201523360248201523060448201528460648201526064815260a0810181811067ffffffffffffffff8211176119c457916119bf869261173f948b52886136ed565b612e49565b60418b7f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b8685517fa907f2f0000000000000000000000000000000000000000000000000000000008152fd5b84517faeabe71800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841681890152602490fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357805173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016815260016020820152f35b823461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090611b72611b6861293e565b6024359033612cd8565b5160018152f35b82346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357611bb161293e565b91602435918215158303610253576044359283151584036102535773ffffffffffffffffffffffffffffffffffffffff948591611bf2835f54163314612a98565b15611ccd571692831590811591611cc5575b5015611c68575050805f549283167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff0000000000000000000000000000000000000000809216175f55600154166001555f80f35b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601560248201527f4f776e61626c653a207a65726f206164647265737300000000000000000000006044820152fd5b905085611c04565b9350505050167fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001555f80f35b82346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535767ffffffffffffffff823581811161025357611d4f90369085016128d5565b926024803583811161025357611d6890369084016128d5565b92611d7161291b565b9060019687549560ff8760a81c1615968780986125da575b80156125c1575b1561253f5787740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8316178b556124fd575b50611df160ff8a5460a81c16611dec81612c4d565b612c4d565b815183811161239a5760059080611e088354612a47565b94601f95868111612492575b506020908683116001146123d0575f926123c5575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828d1b9260031b1c19161781555b815193841161239a57611e6e600654612a47565b90838211612339575b505060209183116001146122665773ffffffffffffffffffffffffffffffffffffffff9392915f918361225b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828a1b9260031b1c1916176006555b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff855416178455611f2e60ff885460a81c16612c4d565b167fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f558351907fdd62ed3e000000000000000000000000000000000000000000000000000000008252308383015273340c9f6159abc2bdfcc0e2b9fe91d739006b41c191828282015260449273b50a96253abdf803d85efcdce07ad8becbc52bd5916020818681865afa8015612251575f90612213575b6b7fffffffffffffffffffffff91501061203c575b5050505050611fea57005b816020917fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498945416825551908152a1005b8651905f80602084017f095ea7b30000000000000000000000000000000000000000000000000000000094858252848882015282898201528881526120808161283e565b519082875af161208e61354d565b816121e4575b501561218957915f92918380938a519060208201938452878201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff888201528781526120e08161283e565b51925af16120ec61354d565b8161215a575b50156120ff578080611fdf565b60649291600c7f5361666520417070726f766500000000000000000000000000000000000000009260208851957f08c379a0000000000000000000000000000000000000000000000000000000008752860152840152820152fd5b805180159250821561216f575b5050876120f2565b612182925060208091830101910161357c565b8780612167565b6064867f5361666520417070726f7665000000000000000000000000000000000000000087600c8860208e51957f08c379a0000000000000000000000000000000000000000000000000000000008752860152840152820152fd5b80518015925082156121f9575b50508a612094565b61220c925060208091830101910161357c565b8a806121f1565b506020813d602011612249575b8161222d6020938361285a565b81010312610253576b7fffffffffffffffffffffff9051611fca565b3d9150612220565b88513d5f823e3d90fd5b015190508980611ea5565b929188917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169060065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f915f5b8181106123215750958373ffffffffffffffffffffffffffffffffffffffff97106122ea575b505050811b01600655611ed7565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806122dc565b8288015184558c9590930192602092830192016122b6565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9084808701821c83019360208810612391575b01901c01908a905b8281106123865750611e77565b5f8155018a90612379565b93508293612371565b856041887f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b015190508c80611e29565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08e941691855f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0925f5b81811061247057508411612439575b505050811b018155611e5a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558c808061242c565b93839596602092939491839286015181550195019301908f959493929161241d565b909150835f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db086808501861c820192602086106124f4575b918f918695949301871c01915b8281106124e6575050611e14565b5f81558594508f91016124d8565b925081926124cb565b7fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16750101000000000000000000000000000000000000000017895589611dd7565b608487602e8860208d51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152fd5b50303b158015611d9057508960ff8260a01c1614611d90565b508960ff8260a01c1610611d89565b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535780516104d991612627826127f5565b600182526020368184013761263b82612c13565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016905251918291826127a4565b8334610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760055490825f6126bc84612a47565b808352602094600190866001821691825f146108875750506001146126ed5750506104d9929161081d91038561285a565b9085925060055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0915f925b828410612730575050508201018161081d61080b565b8054848a01860152889550879490930192810161271a565b91908251928382525f5b8481106127905750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201612752565b60209060206040818301928281528551809452019301915f5b8281106127cb575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016127bd565b6040810190811067ffffffffffffffff82111761281157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6080810190811067ffffffffffffffff82111761281157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761281157604052565b67ffffffffffffffff811161281157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f82011215610253578035906128ec8261289b565b926128fa604051948561285a565b8284526020838301011161025357815f926020809301838601378301015290565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b60209060206040818301928281528551809452019301915f5b8281106129ab575050505090565b83518552938101939281019260010161299d565b346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576129f661293e565b506104d9612a02612afd565b60405191829182612984565b34610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576104d9612a02612afd565b90600182811c92168015612a8e575b6020831014612a6157565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612a56565b15612a9f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6040516020810181811067ffffffffffffffff821117612811576040525f8152905f368137565b15612b2b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b8115612b93570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff1673b50a96253abdf803d85efcdce07ad8becbc52bd58114908115612bf8575090565b731359b05241ca5076c9f59605214f4f84114c0de891501490565b805115612c205760200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b15612c5457565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215612dc65716918215612d425760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526003825260405f20855f5282528060405f2055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff80911690807f0000000000000000000000000000000000000000000000000000000000000000168214612f8f5790602091612f1e935f60405193612ea1856127f5565b600685527f70656e646c65000000000000000000000000000000000000000000000000000086860152604051968795869485937fd97e6ec00000000000000000000000000000000000000000000000000000000085526004850152602484015283604484015230606484015260a0608484015260a4830190612748565b03927f0000000000000000000000000000000000000000000000000000000000000000165af1908115612f84575f91612f55575090565b90506020813d602011612f7c575b81612f706020938361285a565b81010312610253575190565b3d9150612f63565b6040513d5f823e3d90fd5b505090565b91908201809211612fa157565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff8091169182156131ce571691821561314a578282146130ec57613004613683565b815f52600260205260405f205481811061306857817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f52600284520360405f2055845f5260405f2061305d828254612f94565b9055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45524332303a207472616e7366657220746f2073656c660000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff1680156133b157613276613683565b805f52600260205260405f205482811061332d578290825f5260026020520360405f20557effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9182811161025357600454928082168185160391818311612fa1575f947fff000000000000000000000000000000000000000000000000000000000000006020937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9516911617600455604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116817f0000000000000000000000000000000000000000000000000000000000000000168114612f8f576020906024604051809481937f820973da00000000000000000000000000000000000000000000000000000000835260048301527f0000000000000000000000000000000000000000000000000000000000000000165afa908115612f84575f9161351b575b507f000000000000000000000000000000000000000000000000000000000000000091828102928184041490151715612fa15761351891612b89565b90565b90506020813d602011613545575b816135366020938361285a565b8101031261025357515f6134dc565b3d9150613529565b3d15613577573d9061355e8261289b565b9161356c604051938461285a565b82523d5f602084013e565b606090565b90816020910312610253575180151581036102535790565b821561367e5773ffffffffffffffffffffffffffffffffffffffff90811690816136305750505f80809381935af16135ca61354d565b50156135d257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6574682073656e64206661696c656400000000000000000000000000000000006044820152fd5b9261367c93604051937fa9059cbb0000000000000000000000000000000000000000000000000000000060208601521660248401526044830152604482526136778261283e565b6136ed565b565b505050565b60ff609b541661368f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b6040516137579173ffffffffffffffffffffffffffffffffffffffff16613713826127f5565b5f806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161375161354d565b9161380c565b8051908282159283156137f4575b505050156137705750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b613804935082018101910161357c565b5f8281613765565b919290156138875750815115613820575090565b3b156138295790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561389a5750805190602001fd5b6138d8906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190612748565b0390fdfea26469706673582212200ee6360556eac854b69ae2e90f7c3d64c702ba449feaadeaa654644bd398441364736f6c63430008180033
Deployed Bytecode
0x6080604090808252600480361015610021575b505050361561001f575f80fd5b005b5f3560e01c91826306fdde031461267e57508163071bc3c9146125e9578163077f224a14611d00578163078dfbe714611b79578163095ea7b314611b2b578163128fced11461025c57816314b3aa0f14611ab857816318160ddd14611a5d57816320e8c56514611659578163213cae631461155a57816323b872dd1461138d578163313ce567146113325781633ba0b9a9146111b45781633f4ba83a146110a75781634e71e0c814610f9d5781634fb3ccc514610f2f57816357edab4e14610ee35781635c975abb14610ea257816370a0823114610e405781637158da7c14610dd2578163740dbbda14610d64578163769f8e5d14610b4a57816376d5de8514610adc578163784367d614610a5f5781637e95926914610a135781638456cb59146109645781638c57a5c7146109185781638da5cb5b146108c757816395d89b41146107aa578163a40bee50146106a5578163a9059cbb146105d6578163b7d122b51461057e578163b8f82b26146104dd578163c4f59f9b14610493578163c7c4ff4614610447578163cbe52ae31461039657508063da88ecb414610257578063dd62ed3e14610321578063e30c3978146102cf578063e828ca1714610261578063ef5cfb8c1461025c578063f8b2f991146102575763fa5a4f0614610208578080610012565b346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209061024a61024561293e565b612bc0565b90519015158152f35b5f80fd5b612a0e565b6129bf565b5034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000340c9f6159abc2bdfcc0e2b9fe91d739006b41c1168152f35b5034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b503461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209061035b61293e565b610363612961565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260038452825f2091165f528252805f20549051908152f35b90503461025357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576103ce61293e565b73ffffffffffffffffffffffffffffffffffffffff809116907f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de816810361041a57602083516024358152f35b60249251917f88a50561000000000000000000000000000000000000000000000000000000008352820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173340c9f6159abc2bdfcc0e2b9fe91d739006b41c18152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576104d9906104ce612afd565b9051918291826127a4565b0390f35b90503461025357817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535761051561293e565b9061051f82612bc0565b1561053a5760208361053360243585613435565b9051908152f35b73ffffffffffffffffffffffffffffffffffffffff60249351927faeabe7180000000000000000000000000000000000000000000000000000000084521690820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090517f00000000000000000000000000000000000000000000000000000000000f42408152f35b823461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020917f010000000000000000000000000000000000000000000000000000000000000061063161293e565b61069883549161064760028460f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8094161785556024359033612fce565b8254161790555160018152f35b905034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b50a96253abdf803d85efcdce07ad8becbc52bd516906020835180927f313ce56700000000000000000000000000000000000000000000000000000000825281855afa9081156107a0575f91610761575b509160ff6060938251935f855260208501521690820152f35b90506020813d602011610798575b8161077c6020938361285a565b8101031261025357519160ff83168303610253579160ff610748565b3d915061076f565b83513d5f823e3d90fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535780516006549091825f6107eb84612a47565b808352602094600190866001821691825f1461088757505060011461082c575b50506104d9929161081d91038561285a565b51928284938452830190612748565b9085925060065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f915f925b82841061086f575050508201018161081d61080b565b8054848a018601528895508794909301928101610859565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168682015292151560051b8501909201925083915061081d905061080b565b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff5f54169051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173b50a96253abdf803d85efcdce07ad8becbc52bd58152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760207f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258916109d973ffffffffffffffffffffffffffffffffffffffff5f54163314612a98565b6109e1613683565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00609b541617609b5551338152a1005b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209051731359b05241ca5076c9f59605214f4f84114c0de88152f35b82346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090610a9a61293e565b73ffffffffffffffffffffffffffffffffffffffff915191807f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de8169116148152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de8168152f35b9050346102535760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357610b8361293e565b9160243591610b9061291b565b6064359460843590811515820361025357835492610bb460028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8095161785557f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de873ffffffffffffffffffffffffffffffffffffffff809216938282168503610d35578815610d0d5783610c60928a925f14610d0357610c5b8330613252565b613594565b878710610cce5760209750907f0100000000000000000000000000000000000000000000000000000000000000939291865191888352888a84015216907faee47cdf925cf525fdae94f9777ee5a06cac37e1c41220d0a8a89ed154f62d1c873392a482541617905551908152f35b60448589898951927fbfee4ca00000000000000000000000000000000000000000000000000000000084528301526024820152fd5b610c5b8333613252565b8688517fc3d83b07000000000000000000000000000000000000000000000000000000008152fd5b602487868a51917f88a50561000000000000000000000000000000000000000000000000000000008352820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000009781e42b4f3cb55ba837f9579d17970d9efccb34168152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b50a96253abdf803d85efcdce07ad8becbc52bd5168152f35b82346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209073ffffffffffffffffffffffffffffffffffffffff610e9061293e565b165f5260028252805f20549051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209060ff609b541690519015158152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760209051739781e42b4f3cb55ba837f9579d17970d9efccb348152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000470bd109a24f608590d85fc1f5a4b6e625e8bdff168152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576001549073ffffffffffffffffffffffffffffffffffffffff928383169182330361104a575050805f549384167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff0000000000000000000000000000000000000000928316175f5516600155005b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602060248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152fd5b905034610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576110f973ffffffffffffffffffffffffffffffffffffffff5f54163314612a98565b609b549060ff821615611157577f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516609b5551338152a1005b60649060208451917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602491602073ffffffffffffffffffffffffffffffffffffffff8351948580927f820973da000000000000000000000000000000000000000000000000000000008252807f000000000000000000000000b50a96253abdf803d85efcdce07ad8becbc52bd516868301527f000000000000000000000000470bd109a24f608590d85fc1f5a4b6e625e8bdff165afa928315611328575f936112f4575b50670de0b6b3a7640000928381029381850414901517156112c857506105336020927f00000000000000000000000000000000000000000000000000000000000f424090612b89565b6011907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b9092506020813d602011611320575b816113106020938361285a565b810103126102535751918361127f565b3d9150611303565b82513d5f823e3d90fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576020905160ff7f0000000000000000000000000000000000000000000000000000000000000006168152f35b9050346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576113c661293e565b6113ce612961565b604435908354926113e560028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80951617855573ffffffffffffffffffffffffffffffffffffffff81165f526003602052855f20335f52602052855f20547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81036114b0575b602087877f010000000000000000000000000000000000000000000000000000000000000088610698898989612fce565b8381106114fd5792602096959492610698926114f0837f010000000000000000000000000000000000000000000000000000000000000097033383612cd8565b925092949596509261147f565b60648660208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253578051906060820182811067ffffffffffffffff82111761162d578152600282528036602084013773b50a96253abdf803d85efcdce07ad8becbc52bd56115ce83612c13565b52815160011015611601576104d99250731359b05241ca5076c9f59605214f4f84114c0de88183015251918291826127a4565b6032837f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b6041847f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b8260807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535761168c61293e565b90611695612961565b9160443592606435938554926116b160028560f81c1415612b24565b7f02000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80951617875561170183612bc0565b15611a185781156119f05773ffffffffffffffffffffffffffffffffffffffff908184169384155f14611958578334036118fb578361173f91612e49565b968088106118c657501690811561186957611758613683565b8386116102535786548487168582160185811161183d57918593917fff0000000000000000000000000000000000000000000000000000000000000060209a977f01000000000000000000000000000000000000000000000000000000000000009795169116178655815f5260028952865f206117d6898254612f94565b9055815f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8b8a518c8152a3865190815287898201527f5fe47ed6d4225326d3303476197d782ded5a4e9c14f479dc9ec4992af4e85d59873392a482541617905551908152f35b6011897f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b60648760208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b88604491898951927fbc71f2ba0000000000000000000000000000000000000000000000000000000084528301526024820152fd5b60648960208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600c60248201527f657468206d69736d6174636800000000000000000000000000000000000000006044820152fd5b86517f23b872dd0000000000000000000000000000000000000000000000000000000060208201523360248201523060448201528460648201526064815260a0810181811067ffffffffffffffff8211176119c457916119bf869261173f948b52886136ed565b612e49565b60418b7f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b8685517fa907f2f0000000000000000000000000000000000000000000000000000000008152fd5b84517faeabe71800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841681890152602490fd5b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357805173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de816815260016020820152f35b823461025357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357602090611b72611b6861293e565b6024359033612cd8565b5160018152f35b82346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025357611bb161293e565b91602435918215158303610253576044359283151584036102535773ffffffffffffffffffffffffffffffffffffffff948591611bf2835f54163314612a98565b15611ccd571692831590811591611cc5575b5015611c68575050805f549283167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a37fffffffffffffffffffffffff0000000000000000000000000000000000000000809216175f55600154166001555f80f35b90602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601560248201527f4f776e61626c653a207a65726f206164647265737300000000000000000000006044820152fd5b905085611c04565b9350505050167fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001555f80f35b82346102535760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535767ffffffffffffffff823581811161025357611d4f90369085016128d5565b926024803583811161025357611d6890369084016128d5565b92611d7161291b565b9060019687549560ff8760a81c1615968780986125da575b80156125c1575b1561253f5787740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8316178b556124fd575b50611df160ff8a5460a81c16611dec81612c4d565b612c4d565b815183811161239a5760059080611e088354612a47565b94601f95868111612492575b506020908683116001146123d0575f926123c5575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828d1b9260031b1c19161781555b815193841161239a57611e6e600654612a47565b90838211612339575b505060209183116001146122665773ffffffffffffffffffffffffffffffffffffffff9392915f918361225b575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff828a1b9260031b1c1916176006555b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff855416178455611f2e60ff885460a81c16612c4d565b167fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f558351907fdd62ed3e000000000000000000000000000000000000000000000000000000008252308383015273340c9f6159abc2bdfcc0e2b9fe91d739006b41c191828282015260449273b50a96253abdf803d85efcdce07ad8becbc52bd5916020818681865afa8015612251575f90612213575b6b7fffffffffffffffffffffff91501061203c575b5050505050611fea57005b816020917fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498945416825551908152a1005b8651905f80602084017f095ea7b30000000000000000000000000000000000000000000000000000000094858252848882015282898201528881526120808161283e565b519082875af161208e61354d565b816121e4575b501561218957915f92918380938a519060208201938452878201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff888201528781526120e08161283e565b51925af16120ec61354d565b8161215a575b50156120ff578080611fdf565b60649291600c7f5361666520417070726f766500000000000000000000000000000000000000009260208851957f08c379a0000000000000000000000000000000000000000000000000000000008752860152840152820152fd5b805180159250821561216f575b5050876120f2565b612182925060208091830101910161357c565b8780612167565b6064867f5361666520417070726f7665000000000000000000000000000000000000000087600c8860208e51957f08c379a0000000000000000000000000000000000000000000000000000000008752860152840152820152fd5b80518015925082156121f9575b50508a612094565b61220c925060208091830101910161357c565b8a806121f1565b506020813d602011612249575b8161222d6020938361285a565b81010312610253576b7fffffffffffffffffffffff9051611fca565b3d9150612220565b88513d5f823e3d90fd5b015190508980611ea5565b929188917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082169060065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f915f5b8181106123215750958373ffffffffffffffffffffffffffffffffffffffff97106122ea575b505050811b01600655611ed7565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558980806122dc565b8288015184558c9590930192602092830192016122b6565b60065f527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9084808701821c83019360208810612391575b01901c01908a905b8281106123865750611e77565b5f8155018a90612379565b93508293612371565b856041887f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b015190508c80611e29565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08e941691855f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0925f5b81811061247057508411612439575b505050811b018155611e5a565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558c808061242c565b93839596602092939491839286015181550195019301908f959493929161241d565b909150835f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db086808501861c820192602086106124f4575b918f918695949301871c01915b8281106124e6575050611e14565b5f81558594508f91016124d8565b925081926124cb565b7fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16750101000000000000000000000000000000000000000017895589611dd7565b608487602e8860208d51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152fd5b50303b158015611d9057508960ff8260a01c1614611d90565b508960ff8260a01c1610611d89565b8234610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535780516104d991612627826127f5565b600182526020368184013761263b82612c13565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de816905251918291826127a4565b8334610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102535760055490825f6126bc84612a47565b808352602094600190866001821691825f146108875750506001146126ed5750506104d9929161081d91038561285a565b9085925060055f527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0915f925b828410612730575050508201018161081d61080b565b8054848a01860152889550879490930192810161271a565b91908251928382525f5b8481106127905750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201612752565b60209060206040818301928281528551809452019301915f5b8281106127cb575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016127bd565b6040810190811067ffffffffffffffff82111761281157604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6080810190811067ffffffffffffffff82111761281157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761281157604052565b67ffffffffffffffff811161281157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f82011215610253578035906128ec8261289b565b926128fa604051948561285a565b8284526020838301011161025357815f926020809301838601378301015290565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361025357565b60209060206040818301928281528551809452019301915f5b8281106129ab575050505090565b83518552938101939281019260010161299d565b346102535760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576129f661293e565b506104d9612a02612afd565b60405191829182612984565b34610253575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610253576104d9612a02612afd565b90600182811c92168015612a8e575b6020831014612a6157565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f1691612a56565b15612a9f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6040516020810181811067ffffffffffffffff821117612811576040525f8152905f368137565b15612b2b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b8115612b93570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff1673b50a96253abdf803d85efcdce07ad8becbc52bd58114908115612bf8575090565b731359b05241ca5076c9f59605214f4f84114c0de891501490565b805115612c205760200190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b15612c5457565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215612dc65716918215612d425760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591835f526003825260405f20855f5282528060405f2055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff80911690807f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de8168214612f8f5790602091612f1e935f60405193612ea1856127f5565b600685527f70656e646c65000000000000000000000000000000000000000000000000000086860152604051968795869485937fd97e6ec00000000000000000000000000000000000000000000000000000000085526004850152602484015283604484015230606484015260a0608484015260a4830190612748565b03927f000000000000000000000000340c9f6159abc2bdfcc0e2b9fe91d739006b41c1165af1908115612f84575f91612f55575090565b90506020813d602011612f7c575b81612f706020938361285a565b81010312610253575190565b3d9150612f63565b6040513d5f823e3d90fd5b505090565b91908201809211612fa157565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b73ffffffffffffffffffffffffffffffffffffffff8091169182156131ce571691821561314a578282146130ec57613004613683565b815f52600260205260405f205481811061306857817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92602092855f52600284520360405f2055845f5260405f2061305d828254612f94565b9055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45524332303a207472616e7366657220746f2073656c660000000000000000006044820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff1680156133b157613276613683565b805f52600260205260405f205482811061332d578290825f5260026020520360405f20557effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9182811161025357600454928082168185160391818311612fa1575f947fff000000000000000000000000000000000000000000000000000000000000006020937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9516911617600455604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116817f0000000000000000000000001359b05241ca5076c9f59605214f4f84114c0de8168114612f8f576020906024604051809481937f820973da00000000000000000000000000000000000000000000000000000000835260048301527f000000000000000000000000470bd109a24f608590d85fc1f5a4b6e625e8bdff165afa908115612f84575f9161351b575b507f00000000000000000000000000000000000000000000000000000000000f424091828102928184041490151715612fa15761351891612b89565b90565b90506020813d602011613545575b816135366020938361285a565b8101031261025357515f6134dc565b3d9150613529565b3d15613577573d9061355e8261289b565b9161356c604051938461285a565b82523d5f602084013e565b606090565b90816020910312610253575180151581036102535790565b821561367e5773ffffffffffffffffffffffffffffffffffffffff90811690816136305750505f80809381935af16135ca61354d565b50156135d257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6574682073656e64206661696c656400000000000000000000000000000000006044820152fd5b9261367c93604051937fa9059cbb0000000000000000000000000000000000000000000000000000000060208601521660248401526044830152604482526136778261283e565b6136ed565b565b505050565b60ff609b541661368f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b6040516137579173ffffffffffffffffffffffffffffffffffffffff16613713826127f5565b5f806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af161375161354d565b9161380c565b8051908282159283156137f4575b505050156137705750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b613804935082018101910161357c565b5f8281613765565b919290156138875750815115613820575090565b3b156138295790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561389a5750805190602001fd5b6138d8906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190612748565b0390fdfea26469706673582212200ee6360556eac854b69ae2e90f7c3d64c702ba449feaadeaa654644bd398441364736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$9,381,966.56
Net Worth in HYPE
Token Allocations
SUSDE
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| PLASMA | 100.00% | $1.22 | 7,690,136.5229 | $9,381,966.56 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.