Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 19623828 | 718 days ago | IN | 0 ETH | 0.000432 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x60a06040 | 20634333 | 577 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
V2WrapperFactory
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma abicoder v2;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "./V2Wrapper.sol";
contract V2WrapperFactory is Ownable {
event NewWrapperContract(address indexed wrapper, address indexed stakedToken, address indexed rewardToken, uint256 rewardPerSecond, uint256 startTimestamp, uint256 endTimestamp);
constructor() {
//
}
/*
* @notice Deploy the pool
* @param _stakedToken: staked token address
* @param _rewardToken: reward token address
* @param _rewardPerSecond: reward per second (in rewardToken)
* @param _startTimestamp: start block timestamp
* @param _endTimestamp: end block timestamp
* @param _admin: admin address with ownership
* @param _boostContract: boost contract address
* @return address of new smart chef contract
*/
function deployPool(
IERC20Metadata _stakedToken,
IERC20Metadata _rewardToken,
uint256 _rewardPerSecond,
uint256 _startTimestamp,
uint256 _endTimestamp,
address _admin,
address _boostContract
) external onlyOwner {
require(_stakedToken.totalSupply() >= 0);
require(_rewardToken.totalSupply() >= 0);
require(_stakedToken != _rewardToken, "Tokens must be different");
bytes memory bytecode = type(V2Wrapper).creationCode;
bytes32 salt = keccak256(abi.encodePacked(_stakedToken, _rewardToken, _startTimestamp));
address wrapperAddress;
assembly {
wrapperAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
}
V2Wrapper(wrapperAddress).initialize(
_stakedToken,
_rewardToken,
_rewardPerSecond,
_startTimestamp,
_endTimestamp,
_admin,
_boostContract
);
emit NewWrapperContract(
wrapperAddress,
address(_stakedToken),
address(_rewardToken),
_rewardPerSecond,
_startTimestamp,
_endTimestamp
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @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() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// 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: MIT
pragma solidity ^0.8.19;
interface IFarmBooster {
function updatePositionBoostMultiplier(address user) external returns (uint256 _multiplier);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma abicoder v2;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// need to call FarmBooster
import "../interfaces/IFarmBooster.sol";
contract V2Wrapper is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20Metadata;
using SafeERC20 for IERC20;
// The address of the wrapper factory
address public immutable WRAPPER_FACTORY;
// Whether it is initialized
bool public isInitialized;
// Accrued token per share
uint256 public accTokenPerShare;
// The timestamp when reward token mining starts
uint256 public startTimestamp;
// The timestamp when reward token mining ends
uint256 public endTimestamp;
// The timestamp of the last reward token update
uint256 public lastRewardTimestamp;
// reward tokens created per second
uint256 public rewardPerSecond;
// The precision factor
uint256 public PRECISION_FACTOR;
// The staked token
IERC20Metadata public stakedToken;
// The reward token
IERC20Metadata public rewardToken;
// The contract handles the share boosts.
address public boostContract;
// The total boosted share
uint256 public totalBoostedShare;
// Basic boost factor, none boosted user's boost factor
uint256 public constant BOOST_PRECISION = 100 * 1e10;
// Hard limit for maximum boost factor, it must greater than BOOST_PRECISION
uint256 public constant MAX_BOOST_PRECISION = 300 * 1e10;
// Info of each user that stakes tokens (stakedToken)
mapping(address => UserInfo) public userInfo;
struct UserInfo {
uint256 amount; // How many staked tokens the user has provided
uint256 rewardDebt;
uint256 boostMultiplier; // currently active multiplier
uint256 boostedAmount; // combined boosted amount
uint256 unsettledRewards; // rewards haven't been transferred to users but already accounted in rewardDebt
}
event Deposit(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 amount);
event NewStartAndEndTimestamp(uint256 oldStartTimestamp, uint256 newStartTimestamp, uint256 oldEndTimestamp, uint256 newEndTimestamp, uint256 rewardPerSecond);
event Restart(uint256 startTimestamp, uint256 endTimestamp, uint256 rewardPerSecond);
event NewRewardPerSecond(uint256 oldRewardPerSecond, uint256 newRewardPerSecond, uint256 startTimestamp, uint256 endTimestamp);
event NewPoolLimit(uint256 poolLimitPerUser);
event RewardsStop(uint256 blockNumber);
event TokenRecovery(address indexed token, uint256 amount);
event Withdraw(address indexed user, uint256 amount);
event DepositAndExpend(address indexed user, uint256 amount, uint256 endTimestamp);
event BoostContractUpdated(address indexed boostContract);
event BoostMultiplierUpdated(address indexed user, uint256 oldMultiplier, uint256 newMultiplier);
/**
* @notice Constructor
*/
constructor() {
WRAPPER_FACTORY = msg.sender;
}
/**
* @dev Throws if caller is not the boost contract.
*/
modifier onlyBoostContract() {
require(boostContract == msg.sender, "Ownable: caller is not the boost contract");
_;
}
/*
* @notice Initialize the contract
* @param _stakedToken: staked token address
* @param _rewardToken: reward token address
* @param _rewardPerSecond: reward per second (in rewardToken)
* @param _startTimestamp: start timestamp
* @param _endTimestamp: end timestamp
* @param _admin: admin address with ownership
*/
function initialize(
IERC20Metadata _stakedToken,
IERC20Metadata _rewardToken,
uint256 _rewardPerSecond,
uint256 _startTimestamp,
uint256 _endTimestamp,
address _admin,
address _boostContract
) external {
require(!isInitialized, "Already initialized");
require(msg.sender == WRAPPER_FACTORY, "Not factory");
require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");
require(block.timestamp < _startTimestamp, "New startTimestamp must be higher than current timestamp");
// Make this contract initialized
isInitialized = true;
stakedToken = _stakedToken;
rewardToken = _rewardToken;
rewardPerSecond = _rewardPerSecond;
startTimestamp = _startTimestamp;
endTimestamp = _endTimestamp;
boostContract = _boostContract;
uint256 decimalsRewardToken = uint256(rewardToken.decimals());
require(decimalsRewardToken < 30, "Must be inferior to 30");
PRECISION_FACTOR = uint256(10**(uint256(30) - decimalsRewardToken));
require(PRECISION_FACTOR * rewardPerSecond / (10**decimalsRewardToken) >= 10_000_000, "rewardPerSecond must be larger");
// Set the lastRewardBlock as the startTimestamp
lastRewardTimestamp = startTimestamp;
// Transfer ownership to the admin address who becomes owner of the contract
transferOwnership(_admin);
}
/*
* @notice Deposit staked tokens and collect reward tokens (if any)
* @param _amount: amount to deposit (in stakeToken)
* @param _noHarvest: flag for harvest or not
*/
function deposit(uint256 _amount, bool _noHarvest) external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
// always update pool to be safe
_updatePool();
if (user.amount > 0) {
// get user unaccounted pending rewards and add to unsettledRewards
user.unsettledRewards += _pendingReward(msg.sender);
// transfer the rewards and clear `unsettledRewards`
if (!_noHarvest && user.unsettledRewards > 0) {
// SafeTransfer CAKE
rewardToken.safeTransfer(msg.sender, user.unsettledRewards);
// reset accumulative value
user.unsettledRewards = 0;
}
}
if (_amount > 0) {
// get true deposit amount (safe tax/rebase token)
uint256 _amountBefore = IERC20Metadata(stakedToken).balanceOf(address(this));
stakedToken.safeTransferFrom(msg.sender, address(this), _amount);
uint256 _amountAfter = IERC20Metadata(stakedToken).balanceOf(address(this));
_amount = _amountAfter - _amountBefore;
// update user.amount
user.amount = user.amount + _amount;
}
// update multiplier
_updateBoostMultiplier(msg.sender, 0);
// update debt
user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
emit Deposit(msg.sender, _amount);
}
/*
* @notice Deposit reward tokens and expand end timestamp
* @param _amount: amount to deposit (in stakeToken)
*/
function depositRewardAndExpend(uint256 _amount) external nonReentrant {
require(block.timestamp < endTimestamp, "Pool should not ended");
uint256 _rewardAmountBefore = IERC20Metadata(rewardToken).balanceOf(address(this));
IERC20Metadata(rewardToken).safeTransferFrom(msg.sender, address(this), _amount);
uint256 _rewardAmountAfter = IERC20Metadata(rewardToken).balanceOf(address(this));
uint256 _rewardAmount = _rewardAmountAfter - _rewardAmountBefore;
uint256 newEndTimestamp = endTimestamp + _rewardAmount / rewardPerSecond;
require(endTimestamp < newEndTimestamp, "New endTimestamp must be larger than old endTimestamp");
endTimestamp = newEndTimestamp;
emit DepositAndExpend(msg.sender, _rewardAmount, endTimestamp);
}
/*
* @notice Withdraw staked tokens and collect reward tokens
* @param _amount: amount to withdraw (in rewardToken)
* @param _noHarvest: flag for harvest or not
*/
function withdraw(uint256 _amount, bool _noHarvest) external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
require(user.amount >= _amount, "Amount to withdraw too high");
// always update pool to be safe
_updatePool();
// get user unaccounted pending rewards and add to unsettledRewards
user.unsettledRewards += _pendingReward(msg.sender);
if (_amount > 0) {
user.amount = user.amount - _amount;
stakedToken.safeTransfer(msg.sender, _amount);
}
// transfer the rewards and clear `unsettledRewards`
if (!_noHarvest && user.unsettledRewards > 0) {
// SafeTransfer CAKE
rewardToken.safeTransfer(msg.sender, user.unsettledRewards);
// reset accumulative value
user.unsettledRewards = 0;
}
// update multiplier
_updateBoostMultiplier(msg.sender, 0);
// update debt
user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
emit Withdraw(msg.sender, _amount);
}
/*
* @notice Withdraw staked tokens without caring about rewards rewards
* @dev Needs to be for emergency.
*/
function emergencyWithdraw() external nonReentrant {
UserInfo storage user = userInfo[msg.sender];
uint256 amountToTransfer = user.amount;
// remove boosted amount from total share first
totalBoostedShare = totalBoostedShare > user.boostedAmount ? totalBoostedShare - user.boostedAmount : 0;
// reset everything
user.amount = 0;
user.boostMultiplier = BOOST_PRECISION;
user.boostedAmount = 0;
user.rewardDebt = 0;
// reset accumulative value
user.unsettledRewards = 0;
if (amountToTransfer > 0) {
stakedToken.safeTransfer(msg.sender, amountToTransfer);
}
emit EmergencyWithdraw(msg.sender, amountToTransfer);
}
/*
* @notice Stop rewards
* @dev Only callable by owner. Needs to be for emergency.
*/
function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
rewardToken.safeTransfer(msg.sender, _amount);
}
/**
* @notice Allows the owner to recover tokens sent to the contract by mistake
* @param _token: token address
* @dev Callable by owner
*/
function recoverToken(address _token) external onlyOwner {
require(_token != address(stakedToken), "Operations: Cannot recover staked token");
require(_token != address(rewardToken), "Operations: Cannot recover reward token");
uint256 balance = IERC20Metadata(_token).balanceOf(address(this));
require(balance != 0, "Operations: Cannot recover zero balance");
IERC20Metadata(_token).safeTransfer(msg.sender, balance);
emit TokenRecovery(_token, balance);
}
/*
* @notice Stop rewards
* @dev Only callable by owner
*/
function stopReward() external onlyOwner {
endTimestamp = block.timestamp;
emit RewardsStop(endTimestamp);
}
/*
* @notice Update reward per block, if campaign is ended, admin can call restart and update rewardPerSecond there
* @dev Only callable by owner.
* @param _rewardPerSecond: the reward per second
*/
function updateRewardPerSecond(uint256 _rewardPerSecond) external onlyOwner {
require(block.timestamp < endTimestamp, "Pool should not ended");
uint256 decimalsRewardToken = uint256(rewardToken.decimals());
require(PRECISION_FACTOR * _rewardPerSecond / (10**decimalsRewardToken) >= 100_000_000, "rewardPerSecond must be larger");
_updatePool();
emit NewRewardPerSecond(rewardPerSecond, _rewardPerSecond, startTimestamp, endTimestamp);
rewardPerSecond = _rewardPerSecond;
}
/**
* @notice It allows the admin to update start and end blocks
* @dev This function is only callable by owner.
* @param _startTimestamp: the new start timestamp
* @param _endTimestamp: the new end timestamp
*/
function updateStartAndEndTimestamp(uint256 _startTimestamp, uint256 _endTimestamp) external onlyOwner {
require(block.timestamp < startTimestamp, "Pool has started");
require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");
require(block.timestamp < _startTimestamp, "New startTimestamp must be higher than current timestamp");
emit NewStartAndEndTimestamp(startTimestamp, _startTimestamp, endTimestamp, _endTimestamp, rewardPerSecond);
startTimestamp = _startTimestamp;
endTimestamp = _endTimestamp;
// Set the lastRewardTimestamp as the startTimestamp
lastRewardTimestamp = startTimestamp;
}
/// @notice Update boost contract address and max boost factor.
/// @param _newBoostContract The new address for handling all the share boosts.
function updateBoostContract(address _newBoostContract) external onlyOwner {
require(
_newBoostContract != address(0) && _newBoostContract != boostContract,
"New boost contract address must be valid"
);
boostContract = _newBoostContract;
emit BoostContractUpdated(_newBoostContract);
}
/// @notice Update user boost factor from boost contract.
/// @param _userAddress The user address for boost factor updates.
function updateBoostMultiplierByUser(
address _userAddress
) external nonReentrant {
UserInfo storage user = userInfo[_userAddress];
// always update pool to be safe
_updatePool();
if (user.amount > 0) {
// get user unaccounted pending rewards and add to unsettledRewards
user.unsettledRewards += _pendingReward(_userAddress);
}
// update multiplier based on the latest user.amount
_updateBoostMultiplier(_userAddress, 0);
// update debt
user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
}
/// @notice Update user boost factor from boost contract.
/// @param _userAddress The user address for boost factor updates.
/// @param _newMultiplier The multiplier update to user.
function updateBoostMultiplier(
address _userAddress,
uint256 _newMultiplier
) external onlyBoostContract nonReentrant {
UserInfo storage user = userInfo[_userAddress];
// always update pool to be safe
_updatePool();
if (user.amount > 0) {
// get user unaccounted pending rewards and add to unsettledRewards
user.unsettledRewards += _pendingReward(_userAddress);
}
// update multiplier based on the latest user.amount
_updateBoostMultiplier(_userAddress, _newMultiplier);
// update debt
user.rewardDebt = (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR;
}
/**
* @notice It allows the admin to restart
* @dev This function is only callable by owner.
* @param _startTimestamp: the new start timestamp
* @param _endTimestamp: the new end timestamp
* @param _rewardPerSecond: the new rewardPerSecond
*/
function restart(uint256 _startTimestamp, uint256 _endTimestamp, uint256 _rewardPerSecond) external onlyOwner {
require(block.timestamp > endTimestamp, "Pool should be ended");
require(block.timestamp <= _startTimestamp, "New startTimestamp must be higher than current timestamp");
require(_startTimestamp < _endTimestamp, "New startTimestamp must be lower than new endTimestamp");
// always update pool to be safe
_updatePool();
startTimestamp = _startTimestamp;
endTimestamp = _endTimestamp;
rewardPerSecond = _rewardPerSecond;
// Set the lastRewardTimestamp as the startTimestamp
lastRewardTimestamp = _startTimestamp;
emit Restart(_startTimestamp, _endTimestamp, _rewardPerSecond);
}
/*
* @notice View function to see total pending reward, including accounted but unsettled
* @param _userAddress: user address
* @return Pending + Unsettled reward for a given user
*/
function pendingReward(address _userAddress) external view returns (uint256) {
UserInfo memory user = userInfo[_userAddress];
return user.unsettledRewards + _pendingReward(_userAddress);
}
/*
* @notice View function to see pending reward based on accTokenPerShare&rewardDebt calculation
* @param _userAddress: user address
* @return Pending reward for a given user
*/
function _pendingReward(address _userAddress) internal view returns (uint256) {
UserInfo storage user = userInfo[_userAddress];
if (block.timestamp > lastRewardTimestamp && totalBoostedShare != 0) {
uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
uint256 cakeReward = multiplier * rewardPerSecond;
uint256 adjustedTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / totalBoostedShare;
return (user.boostedAmount * adjustedTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
} else {
return (user.boostedAmount * accTokenPerShare) / PRECISION_FACTOR - user.rewardDebt;
}
}
/*
* @notice Update reward variables of the given pool to be up-to-date.
*/
function _updatePool() internal {
if (block.timestamp <= lastRewardTimestamp) {
return;
}
if (totalBoostedShare == 0) {
lastRewardTimestamp = block.timestamp;
return;
}
uint256 multiplier = _getMultiplier(lastRewardTimestamp, block.timestamp);
uint256 cakeReward = multiplier * rewardPerSecond;
accTokenPerShare = accTokenPerShare + (cakeReward * PRECISION_FACTOR) / totalBoostedShare;
lastRewardTimestamp = block.timestamp;
}
/*
* @notice Return reward multiplier over the given _from to _to block.
* @param _from: block to start
* @param _to: block to finish
*/
function _getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) {
if (_to <= endTimestamp) {
return _to - _from;
} else if (_from >= endTimestamp) {
return 0;
} else {
return endTimestamp - _from;
}
}
/// @notice Update user boost factor.
/// @param _userAddress The user address for boost factor updates.
/// @param _newMultiplier The multiplier update to user.
function _updateBoostMultiplier(
address _userAddress,
uint256 _newMultiplier
) internal {
require(_userAddress != address(0), "The user address must be valid");
UserInfo storage user = userInfo[_userAddress];
if (_newMultiplier == 0) {
_newMultiplier = BOOST_PRECISION;
if (address(boostContract) != address(0)) {
_newMultiplier = IFarmBooster(boostContract).updatePositionBoostMultiplier(_userAddress);
}
}
// filter the invalid value
if (_newMultiplier < BOOST_PRECISION) {
_newMultiplier = BOOST_PRECISION;
}
if (_newMultiplier > MAX_BOOST_PRECISION) {
_newMultiplier = MAX_BOOST_PRECISION;
}
// get current multiplier
uint256 _oldMultiplier = user.boostMultiplier;
uint256 _oldBoostedAmount = user.boostedAmount;
// set new multiplier and calculate user's boosted shares
user.boostMultiplier = _newMultiplier;
user.boostedAmount = user.amount * _newMultiplier / BOOST_PRECISION;
// add user's new boosted shares to total
totalBoostedShare = totalBoostedShare + user.boostedAmount - _oldBoostedAmount;
emit BoostMultiplierUpdated(_userAddress, _oldMultiplier, _newMultiplier);
}
}{
"optimizer": {
"enabled": true,
"runs": 10
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wrapper","type":"address"},{"indexed":true,"internalType":"address","name":"stakedToken","type":"address"},{"indexed":true,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardPerSecond","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTimestamp","type":"uint256"}],"name":"NewWrapperContract","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"},{"inputs":[{"internalType":"contract IERC20Metadata","name":"_stakedToken","type":"address"},{"internalType":"contract IERC20Metadata","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_boostContract","type":"address"}],"name":"deployPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6128838061007e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632b08bbcf14610051578063715018a6146100665780638da5cb5b1461006e578063f2fde38b14610092575b600080fd5b61006461005f3660046104be565b6100a5565b005b610064610351565b610076610365565b6040516001600160a01b03909116815260200160405180910390f35b6100646100a0366004610539565b610374565b6100ad6103ed565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610111919061055d565b101561011c57600080fd5b6000866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561015c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610180919061055d565b101561018b57600080fd5b856001600160a01b0316876001600160a01b0316036101ec5760405162461bcd60e51b8152602060048201526018602482015277151bdad95b9cc81b5d5cdd08189948191a5999995c995b9d60421b60448201526064015b60405180910390fd5b6000604051806020016101fe9061049c565b601f1982820381018352601f9091011660408190526001600160601b031960608b811b821660208401528a901b166034820152604881018790529091506000906068016040516020818303038152906040528051906020012090506000818351602085016000f5604051630729da0b60e01b81526001600160a01b038c811660048301528b81166024830152604482018b9052606482018a90526084820189905287811660a483015286811660c483015291925090821690630729da0b9060e401600060405180830381600087803b1580156102d957600080fd5b505af11580156102ed573d6000803e3d6000fd5b5050604080518b8152602081018b90529081018990526001600160a01b03808d1693508d811692508416907f31fce962da6b447ba4333fbc1e47ae5f659e17b4aad8af883d160973d7c525dd9060600160405180910390a450505050505050505050565b6103596103ed565b610363600061044c565b565b6000546001600160a01b031690565b61037c6103ed565b6001600160a01b0381166103e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101e3565b6103ea8161044c565b50565b336103f6610365565b6001600160a01b0316146103635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101e3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6122d78061057783390190565b6001600160a01b03811681146103ea57600080fd5b600080600080600080600060e0888a0312156104d957600080fd5b87356104e4816104a9565b965060208801356104f4816104a9565b955060408801359450606088013593506080880135925060a0880135610519816104a9565b915060c0880135610529816104a9565b8091505092959891949750929550565b60006020828403121561054b57600080fd5b8135610556816104a9565b9392505050565b60006020828403121561056f57600080fd5b505191905056fe60a060405234801561001057600080fd5b5061001a33610027565b6001805533608052610077565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60805161223e610099600039600081816102570152610458015261223e6000f3fe608060405234801561001057600080fd5b506004361061018b5760003560e01c80630729da0b146101905780630d3b23bb146101a55780631959a002146101c15780633279beab1461020f57806338d0743614610222578063392e53cd146102355780633f6eef20146102525780634004c8e71461028657806369b0212814610299578063715018a6146102a6578063724148bc146102ae57806380dc0672146102c15780638da5cb5b146102c95780638f10369a146102d15780638f662915146102da5780639424f4a1146102e35780639a408321146102f65780639be65a60146103095780639dd2fcc31461031c578063a85adeab1461032f578063acb4019214610338578063bda2a8271461034b578063cc356c591461035e578063cc6db2da14610371578063cc7a262e1461037d578063ccd34cd514610390578063db2e21bc14610399578063dfcedeee146103a1578063e6fd48bc146103b4578063f2fde38b146103bd578063f40f0f52146103d0578063f7c618c1146103e3578063f8077fae146103f6575b600080fd5b6101a361019e366004611d23565b6103ff565b005b6101ae600c5481565b6040519081526020015b60405180910390f35b6101fe6101cf366004611d9e565b600d60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b6040516101b8959493929190611dbb565b6101a361021d366004611dde565b610673565b6101a3610230366004611e05565b610695565b6002546102429060ff1681565b60405190151581526020016101b8565b6102797f000000000000000000000000000000000000000000000000000000000000000081565b6040516101b89190611e35565b6101a3610294366004611dde565b610801565b6101ae6502ba7def300081565b6101a3610940565b6101a36102bc366004611e49565b610954565b6101a3610a45565b610279610a88565b6101ae60075481565b6101ae60035481565b6101a36102f1366004611d9e565b610a97565b6101a3610304366004611e05565b610b1d565b6101a3610317366004611d9e565b610d29565b6101a361032a366004611d9e565b610f3a565b6101ae60055481565b6101a3610346366004611e75565b61100f565b6101a3610359366004611dde565b611101565b6101a361036c366004611ea1565b611314565b6101ae64e8d4a5100081565b600954610279906001600160a01b031681565b6101ae60085481565b6101a36113f0565b600b54610279906001600160a01b031681565b6101ae60045481565b6101a36103cb366004611d9e565b6114b2565b6101ae6103de366004611d9e565b611528565b600a54610279906001600160a01b031681565b6101ae60065481565b60025460ff161561044d5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104b35760405162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b6044820152606401610444565b8284106104d25760405162461bcd60e51b815260040161044490611ec3565b8342106104f15760405162461bcd60e51b815260040161044490611f19565b6002805460ff19166001179055600980546001600160a01b03808a166001600160a01b031992831617909255600a80548984169083168117909155600788905560048781556005879055600b805494861694909316939093179091556040805163313ce56760e01b8152905160009363313ce567928082019260209290918290030181865afa158015610588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ac9190611f71565b60ff169050601e81106105fa5760405162461bcd60e51b815260206004820152601660248201527504d75737420626520696e666572696f7220746f2033360541b6044820152606401610444565b61060581601e611faa565b61061090600a6120a1565b6008556298968061062282600a6120a1565b60075460085461063291906120ad565b61063c91906120c4565b101561065a5760405162461bcd60e51b8152600401610444906120e6565b600454600655610669836114b2565b5050505050505050565b61067b611599565b600a54610692906001600160a01b031633836115f8565b50565b61069d611660565b336000908152600d6020526040902080548311156106fb5760405162461bcd60e51b815260206004820152601b60248201527a082dadeeadce840e8de40eed2e8d0c8e4c2ee40e8dede40d0d2ced602b1b6044820152606401610444565b6107036116b9565b61070c33611729565b81600401600082825461071f919061211d565b90915550508215610750578054610737908490611faa565b8155600954610750906001600160a01b031633856115f8565b81158015610762575060008160040154115b1561078e576004810154600a54610786916001600160a01b039091169033906115f8565b600060048201555b61079933600061180a565b60085460035482600301546107ae91906120ad565b6107b891906120c4565b600182015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a2506107fd60018055565b5050565b610809611599565b600554421061082a5760405162461bcd60e51b815260040161044490612130565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015610874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108989190611f71565b60ff1690506305f5e1006108ad82600a6120a1565b836008546108bb91906120ad565b6108c591906120c4565b10156108e35760405162461bcd60e51b8152600401610444906120e6565b6108eb6116b9565b600754600454600554604080519384526020840186905283019190915260608201527fa4b333dcae2e5aeb8d94686b544ef68feca7bf4b0a26eb4f1d75535ee32057db9060800160405180910390a150600755565b610948611599565b61095260006119da565b565b61095c611599565b60055442116109a45760405162461bcd60e51b8152602060048201526014602482015273141bdbdb081cda1bdd5b1908189948195b99195960621b6044820152606401610444565b824211156109c45760405162461bcd60e51b815260040161044490611f19565b8183106109e35760405162461bcd60e51b815260040161044490611ec3565b6109eb6116b9565b600483905560058290556007819055600683905560408051848152602081018490529081018290527f70f1d069446b84f9692adeeaced5e59453e7d8d648767a3dd1f6b26339ac260a9060600160405180910390a1505050565b610a4d611599565b4260058190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d3068065669060200160405180910390a1565b6000546001600160a01b031690565b610a9f611660565b6001600160a01b0381166000908152600d60205260409020610abf6116b9565b805415610ae857610acf82611729565b816004016000828254610ae2919061211d565b90915550505b610af382600061180a565b6008546003548260030154610b0891906120ad565b610b1291906120c4565b600191820155805550565b610b25611660565b336000908152600d60205260409020610b3c6116b9565b805415610ba257610b4c33611729565b816004016000828254610b5f919061211d565b909155505081158015610b76575060008160040154115b15610ba2576004810154600a54610b9a916001600160a01b039091169033906115f8565b600060048201555b8215610cc8576009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610bd9903090600401611e35565b602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061215f565b600954909150610c35906001600160a01b0316333087611a2a565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610c66903090600401611e35565b602060405180830381865afa158015610c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca7919061215f565b9050610cb38282611faa565b8354909550610cc390869061211d565b835550505b610cd333600061180a565b6008546003548260030154610ce891906120ad565b610cf291906120c4565b600182015560405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020016107eb565b610d31611599565b6009546001600160a01b0390811690821603610d9f5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b6064820152608401610444565b600a546001600160a01b0390811690821603610e0d5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b6064820152608401610444565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610e3c903090600401611e35565b602060405180830381865afa158015610e59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7d919061215f565b905080600003610edf5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b6064820152608401610444565b610ef36001600160a01b03831633836115f8565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e9882604051610f2e91815260200190565b60405180910390a25050565b610f42611599565b6001600160a01b03811615801590610f685750600b546001600160a01b03828116911614155b610fc55760405162461bcd60e51b815260206004820152602860248201527f4e657720626f6f737420636f6e74726163742061646472657373206d757374206044820152671899481d985b1a5960c21b6064820152608401610444565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517f9db3257d8452dc29fc64768708740e3e68aa80c4561af2e8fd1b00c978a80ead90600090a250565b600b546001600160a01b0316331461107b5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b6064820152608401610444565b611083611660565b6001600160a01b0382166000908152600d602052604090206110a36116b9565b8054156110cc576110b383611729565b8160040160008282546110c6919061211d565b90915550505b6110d6838361180a565b60085460035482600301546110eb91906120ad565b6110f591906120c4565b60019182015580555050565b611109611660565b600554421061112a5760405162461bcd60e51b815260040161044490612130565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a082319061115b903090600401611e35565b602060405180830381865afa158015611178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c919061215f565b600a549091506111b7906001600160a01b0316333085611a2a565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a08231906111e8903090600401611e35565b602060405180830381865afa158015611205573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611229919061215f565b905060006112378383611faa565b905060006007548261124991906120c4565b600554611256919061211d565b905080600554106112c75760405162461bcd60e51b815260206004820152603560248201527f4e657720656e6454696d657374616d70206d757374206265206c61726765722060448201527407468616e206f6c6420656e6454696d657374616d7605c1b6064820152608401610444565b6005819055604080518381526020810183905233917f1195d4e0e1fe4c75b7f7afeffe11631cfcb0fddbbc391ff27b4c17d9bd9a02fe910160405180910390a25050505061069260018055565b61131c611599565b60045442106113605760405162461bcd60e51b815260206004820152601060248201526f141bdbdb081a185cc81cdd185c9d195960821b6044820152606401610444565b80821061137f5760405162461bcd60e51b815260040161044490611ec3565b81421061139e5760405162461bcd60e51b815260040161044490611f19565b7fcc69e8f80c17756f236b8dc20d419a8907645c008f61695e4c133b1b6db32ce160045483600554846007546040516113db959493929190611dbb565b60405180910390a16004829055600555600655565b6113f8611660565b336000908152600d6020526040902080546003820154600c541161141d57600061142f565b8160030154600c5461142f9190611faa565b600c55600080835564e8d4a51000600284015560038301819055600183018190556004830155801561147257600954611472906001600160a01b031633836115f8565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505061095260018055565b6114ba611599565b6001600160a01b03811661151f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610444565b610692816119da565b6001600160a01b0381166000908152600d60209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082015261158383611729565b8160800151611592919061211d565b9392505050565b336115a2610a88565b6001600160a01b0316146109525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610444565b6040516001600160a01b03831660248201526044810182905261165b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a68565b505050565b6002600154036116b25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610444565b6002600155565b60065442116116c457565b600c546000036116d45742600655565b60006116e260065442611b3d565b90506000600754826116f491906120ad565b9050600c546008548261170791906120ad565b61171191906120c4565b60035461171e919061211d565b600355505042600655565b6001600160a01b0381166000908152600d60205260408120600654421180156117535750600c5415155b156117dc57600061176660065442611b3d565b905060006007548261177891906120ad565b90506000600c546008548361178d91906120ad565b61179791906120c4565b6003546117a4919061211d565b905083600101546008548286600301546117be91906120ad565b6117c891906120c4565b6117d29190611faa565b9695505050505050565b806001015460085460035483600301546117f691906120ad565b61180091906120c4565b6115929190611faa565b6001600160a01b0382166118605760405162461bcd60e51b815260206004820152601e60248201527f54686520757365722061646472657373206d7573742062652076616c696400006044820152606401610444565b6001600160a01b0382166000908152600d602052604081209082900361190f57600b5464e8d4a5100092506001600160a01b03161561190f57600b54604051638ba8d8bd60e01b81526001600160a01b0390911690638ba8d8bd906118c9908690600401611e35565b6020604051808303816000875af11580156118e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190c919061215f565b91505b64e8d4a510008210156119255764e8d4a5100091505b6502ba7def300082111561193d576502ba7def300091505b600281018054600383015491849055825490919064e8d4a51000906119639086906120ad565b61196d91906120c4565b60038401819055600c5482916119829161211d565b61198c9190611faa565b600c5560408051838152602081018690526001600160a01b038716917f459e4a2a3fe3fe5e131eabea44bfaf73943a596de711a1a1aba95eade5b36a76910160405180910390a25050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a629085906323b872dd60e01b90608401611624565b50505050565b6000611abd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b7e9092919063ffffffff16565b9050805160001480611ade575080806020019051810190611ade9190612178565b61165b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610444565b60006005548211611b5957611b528383611faa565b9050611b78565b6005548310611b6a57506000611b78565b82600554611b529190611faa565b92915050565b6060611b8d8484600085611b95565b949350505050565b606082471015611bf65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610444565b600080866001600160a01b03168587604051611c1291906121b9565b60006040518083038185875af1925050503d8060008114611c4f576040519150601f19603f3d011682016040523d82523d6000602084013e611c54565b606091505b5091509150611c6587838387611c70565b979650505050505050565b60608315611cdf578251600003611cd8576001600160a01b0385163b611cd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610444565b5081611b8d565b611b8d8383815115611cf45781518083602001fd5b8060405162461bcd60e51b815260040161044491906121d5565b6001600160a01b038116811461069257600080fd5b600080600080600080600060e0888a031215611d3e57600080fd5b8735611d4981611d0e565b96506020880135611d5981611d0e565b955060408801359450606088013593506080880135925060a0880135611d7e81611d0e565b915060c0880135611d8e81611d0e565b8091505092959891949750929550565b600060208284031215611db057600080fd5b813561159281611d0e565b948552602085019390935260408401919091526060830152608082015260a00190565b600060208284031215611df057600080fd5b5035919050565b801515811461069257600080fd5b60008060408385031215611e1857600080fd5b823591506020830135611e2a81611df7565b809150509250929050565b6001600160a01b0391909116815260200190565b600080600060608486031215611e5e57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215611e8857600080fd5b8235611e9381611d0e565b946020939093013593505050565b60008060408385031215611eb457600080fd5b50508035926020909101359150565b60208082526036908201527f4e657720737461727454696d657374616d70206d757374206265206c6f7765726040820152750207468616e206e657720656e6454696d657374616d760541b606082015260800190565b60208082526038908201527f4e657720737461727454696d657374616d70206d757374206265206869676865604082015277072207468616e2063757272656e742074696d657374616d760441b606082015260800190565b600060208284031215611f8357600080fd5b815160ff8116811461159257600080fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611b7857611b78611f94565b600181815b80851115611ff8578160001904821115611fde57611fde611f94565b80851615611feb57918102915b93841c9390800290611fc2565b509250929050565b60008261200f57506001611b78565b8161201c57506000611b78565b8160018114612032576002811461203c57612058565b6001915050611b78565b60ff84111561204d5761204d611f94565b50506001821b611b78565b5060208310610133831016604e8410600b841016171561207b575081810a611b78565b6120858383611fbd565b806000190482111561209957612099611f94565b029392505050565b60006115928383612000565b8082028115828204841417611b7857611b78611f94565b6000826120e157634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601e908201527f7265776172645065725365636f6e64206d757374206265206c61726765720000604082015260600190565b80820180821115611b7857611b78611f94565b602080825260159082015274141bdbdb081cda1bdd5b19081b9bdd08195b991959605a1b604082015260600190565b60006020828403121561217157600080fd5b5051919050565b60006020828403121561218a57600080fd5b815161159281611df7565b60005b838110156121b0578181015183820152602001612198565b50506000910152565b600082516121cb818460208701612195565b9190910192915050565b60208152600082518060208401526121f4816040850160208701612195565b601f01601f1916919091016040019291505056fea2646970667358221220de69156e95d455a8ebdaf30e82cce890dac89fc9a990d5c14116faa41d60167764736f6c63430008130033a26469706673582212200a91ad1f227c776dd45a5826fde9998f1afa9a6434b20243f24702462cd5df6664736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632b08bbcf14610051578063715018a6146100665780638da5cb5b1461006e578063f2fde38b14610092575b600080fd5b61006461005f3660046104be565b6100a5565b005b610064610351565b610076610365565b6040516001600160a01b03909116815260200160405180910390f35b6100646100a0366004610539565b610374565b6100ad6103ed565b6000876001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610111919061055d565b101561011c57600080fd5b6000866001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561015c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610180919061055d565b101561018b57600080fd5b856001600160a01b0316876001600160a01b0316036101ec5760405162461bcd60e51b8152602060048201526018602482015277151bdad95b9cc81b5d5cdd08189948191a5999995c995b9d60421b60448201526064015b60405180910390fd5b6000604051806020016101fe9061049c565b601f1982820381018352601f9091011660408190526001600160601b031960608b811b821660208401528a901b166034820152604881018790529091506000906068016040516020818303038152906040528051906020012090506000818351602085016000f5604051630729da0b60e01b81526001600160a01b038c811660048301528b81166024830152604482018b9052606482018a90526084820189905287811660a483015286811660c483015291925090821690630729da0b9060e401600060405180830381600087803b1580156102d957600080fd5b505af11580156102ed573d6000803e3d6000fd5b5050604080518b8152602081018b90529081018990526001600160a01b03808d1693508d811692508416907f31fce962da6b447ba4333fbc1e47ae5f659e17b4aad8af883d160973d7c525dd9060600160405180910390a450505050505050505050565b6103596103ed565b610363600061044c565b565b6000546001600160a01b031690565b61037c6103ed565b6001600160a01b0381166103e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101e3565b6103ea8161044c565b50565b336103f6610365565b6001600160a01b0316146103635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101e3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6122d78061057783390190565b6001600160a01b03811681146103ea57600080fd5b600080600080600080600060e0888a0312156104d957600080fd5b87356104e4816104a9565b965060208801356104f4816104a9565b955060408801359450606088013593506080880135925060a0880135610519816104a9565b915060c0880135610529816104a9565b8091505092959891949750929550565b60006020828403121561054b57600080fd5b8135610556816104a9565b9392505050565b60006020828403121561056f57600080fd5b505191905056fe60a060405234801561001057600080fd5b5061001a33610027565b6001805533608052610077565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60805161223e610099600039600081816102570152610458015261223e6000f3fe608060405234801561001057600080fd5b506004361061018b5760003560e01c80630729da0b146101905780630d3b23bb146101a55780631959a002146101c15780633279beab1461020f57806338d0743614610222578063392e53cd146102355780633f6eef20146102525780634004c8e71461028657806369b0212814610299578063715018a6146102a6578063724148bc146102ae57806380dc0672146102c15780638da5cb5b146102c95780638f10369a146102d15780638f662915146102da5780639424f4a1146102e35780639a408321146102f65780639be65a60146103095780639dd2fcc31461031c578063a85adeab1461032f578063acb4019214610338578063bda2a8271461034b578063cc356c591461035e578063cc6db2da14610371578063cc7a262e1461037d578063ccd34cd514610390578063db2e21bc14610399578063dfcedeee146103a1578063e6fd48bc146103b4578063f2fde38b146103bd578063f40f0f52146103d0578063f7c618c1146103e3578063f8077fae146103f6575b600080fd5b6101a361019e366004611d23565b6103ff565b005b6101ae600c5481565b6040519081526020015b60405180910390f35b6101fe6101cf366004611d9e565b600d60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b6040516101b8959493929190611dbb565b6101a361021d366004611dde565b610673565b6101a3610230366004611e05565b610695565b6002546102429060ff1681565b60405190151581526020016101b8565b6102797f000000000000000000000000000000000000000000000000000000000000000081565b6040516101b89190611e35565b6101a3610294366004611dde565b610801565b6101ae6502ba7def300081565b6101a3610940565b6101a36102bc366004611e49565b610954565b6101a3610a45565b610279610a88565b6101ae60075481565b6101ae60035481565b6101a36102f1366004611d9e565b610a97565b6101a3610304366004611e05565b610b1d565b6101a3610317366004611d9e565b610d29565b6101a361032a366004611d9e565b610f3a565b6101ae60055481565b6101a3610346366004611e75565b61100f565b6101a3610359366004611dde565b611101565b6101a361036c366004611ea1565b611314565b6101ae64e8d4a5100081565b600954610279906001600160a01b031681565b6101ae60085481565b6101a36113f0565b600b54610279906001600160a01b031681565b6101ae60045481565b6101a36103cb366004611d9e565b6114b2565b6101ae6103de366004611d9e565b611528565b600a54610279906001600160a01b031681565b6101ae60065481565b60025460ff161561044d5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104b35760405162461bcd60e51b815260206004820152600b60248201526a4e6f7420666163746f727960a81b6044820152606401610444565b8284106104d25760405162461bcd60e51b815260040161044490611ec3565b8342106104f15760405162461bcd60e51b815260040161044490611f19565b6002805460ff19166001179055600980546001600160a01b03808a166001600160a01b031992831617909255600a80548984169083168117909155600788905560048781556005879055600b805494861694909316939093179091556040805163313ce56760e01b8152905160009363313ce567928082019260209290918290030181865afa158015610588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ac9190611f71565b60ff169050601e81106105fa5760405162461bcd60e51b815260206004820152601660248201527504d75737420626520696e666572696f7220746f2033360541b6044820152606401610444565b61060581601e611faa565b61061090600a6120a1565b6008556298968061062282600a6120a1565b60075460085461063291906120ad565b61063c91906120c4565b101561065a5760405162461bcd60e51b8152600401610444906120e6565b600454600655610669836114b2565b5050505050505050565b61067b611599565b600a54610692906001600160a01b031633836115f8565b50565b61069d611660565b336000908152600d6020526040902080548311156106fb5760405162461bcd60e51b815260206004820152601b60248201527a082dadeeadce840e8de40eed2e8d0c8e4c2ee40e8dede40d0d2ced602b1b6044820152606401610444565b6107036116b9565b61070c33611729565b81600401600082825461071f919061211d565b90915550508215610750578054610737908490611faa565b8155600954610750906001600160a01b031633856115f8565b81158015610762575060008160040154115b1561078e576004810154600a54610786916001600160a01b039091169033906115f8565b600060048201555b61079933600061180a565b60085460035482600301546107ae91906120ad565b6107b891906120c4565b600182015560405183815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a2506107fd60018055565b5050565b610809611599565b600554421061082a5760405162461bcd60e51b815260040161044490612130565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa158015610874573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108989190611f71565b60ff1690506305f5e1006108ad82600a6120a1565b836008546108bb91906120ad565b6108c591906120c4565b10156108e35760405162461bcd60e51b8152600401610444906120e6565b6108eb6116b9565b600754600454600554604080519384526020840186905283019190915260608201527fa4b333dcae2e5aeb8d94686b544ef68feca7bf4b0a26eb4f1d75535ee32057db9060800160405180910390a150600755565b610948611599565b61095260006119da565b565b61095c611599565b60055442116109a45760405162461bcd60e51b8152602060048201526014602482015273141bdbdb081cda1bdd5b1908189948195b99195960621b6044820152606401610444565b824211156109c45760405162461bcd60e51b815260040161044490611f19565b8183106109e35760405162461bcd60e51b815260040161044490611ec3565b6109eb6116b9565b600483905560058290556007819055600683905560408051848152602081018490529081018290527f70f1d069446b84f9692adeeaced5e59453e7d8d648767a3dd1f6b26339ac260a9060600160405180910390a1505050565b610a4d611599565b4260058190556040519081527ffed9fcb0ca3d1e761a4b929792bb24082fba92dca81252646ad306d3068065669060200160405180910390a1565b6000546001600160a01b031690565b610a9f611660565b6001600160a01b0381166000908152600d60205260409020610abf6116b9565b805415610ae857610acf82611729565b816004016000828254610ae2919061211d565b90915550505b610af382600061180a565b6008546003548260030154610b0891906120ad565b610b1291906120c4565b600191820155805550565b610b25611660565b336000908152600d60205260409020610b3c6116b9565b805415610ba257610b4c33611729565b816004016000828254610b5f919061211d565b909155505081158015610b76575060008160040154115b15610ba2576004810154600a54610b9a916001600160a01b039091169033906115f8565b600060048201555b8215610cc8576009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610bd9903090600401611e35565b602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061215f565b600954909150610c35906001600160a01b0316333087611a2a565b6009546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610c66903090600401611e35565b602060405180830381865afa158015610c83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca7919061215f565b9050610cb38282611faa565b8354909550610cc390869061211d565b835550505b610cd333600061180a565b6008546003548260030154610ce891906120ad565b610cf291906120c4565b600182015560405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c906020016107eb565b610d31611599565b6009546001600160a01b0390811690821603610d9f5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207374616b6560448201526632103a37b5b2b760c91b6064820152608401610444565b600a546001600160a01b0390811690821603610e0d5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f76657220726577617260448201526632103a37b5b2b760c91b6064820152608401610444565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610e3c903090600401611e35565b602060405180830381865afa158015610e59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7d919061215f565b905080600003610edf5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b6064820152608401610444565b610ef36001600160a01b03831633836115f8565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e9882604051610f2e91815260200190565b60405180910390a25050565b610f42611599565b6001600160a01b03811615801590610f685750600b546001600160a01b03828116911614155b610fc55760405162461bcd60e51b815260206004820152602860248201527f4e657720626f6f737420636f6e74726163742061646472657373206d757374206044820152671899481d985b1a5960c21b6064820152608401610444565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517f9db3257d8452dc29fc64768708740e3e68aa80c4561af2e8fd1b00c978a80ead90600090a250565b600b546001600160a01b0316331461107b5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520626f6f73746044820152680818dbdb9d1c9858dd60ba1b6064820152608401610444565b611083611660565b6001600160a01b0382166000908152600d602052604090206110a36116b9565b8054156110cc576110b383611729565b8160040160008282546110c6919061211d565b90915550505b6110d6838361180a565b60085460035482600301546110eb91906120ad565b6110f591906120c4565b60019182015580555050565b611109611660565b600554421061112a5760405162461bcd60e51b815260040161044490612130565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a082319061115b903090600401611e35565b602060405180830381865afa158015611178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c919061215f565b600a549091506111b7906001600160a01b0316333085611a2a565b600a546040516370a0823160e01b81526000916001600160a01b0316906370a08231906111e8903090600401611e35565b602060405180830381865afa158015611205573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611229919061215f565b905060006112378383611faa565b905060006007548261124991906120c4565b600554611256919061211d565b905080600554106112c75760405162461bcd60e51b815260206004820152603560248201527f4e657720656e6454696d657374616d70206d757374206265206c61726765722060448201527407468616e206f6c6420656e6454696d657374616d7605c1b6064820152608401610444565b6005819055604080518381526020810183905233917f1195d4e0e1fe4c75b7f7afeffe11631cfcb0fddbbc391ff27b4c17d9bd9a02fe910160405180910390a25050505061069260018055565b61131c611599565b60045442106113605760405162461bcd60e51b815260206004820152601060248201526f141bdbdb081a185cc81cdd185c9d195960821b6044820152606401610444565b80821061137f5760405162461bcd60e51b815260040161044490611ec3565b81421061139e5760405162461bcd60e51b815260040161044490611f19565b7fcc69e8f80c17756f236b8dc20d419a8907645c008f61695e4c133b1b6db32ce160045483600554846007546040516113db959493929190611dbb565b60405180910390a16004829055600555600655565b6113f8611660565b336000908152600d6020526040902080546003820154600c541161141d57600061142f565b8160030154600c5461142f9190611faa565b600c55600080835564e8d4a51000600284015560038301819055600183018190556004830155801561147257600954611472906001600160a01b031633836115f8565b60405181815233907f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96959060200160405180910390a2505061095260018055565b6114ba611599565b6001600160a01b03811661151f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610444565b610692816119da565b6001600160a01b0381166000908152600d60209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082015261158383611729565b8160800151611592919061211d565b9392505050565b336115a2610a88565b6001600160a01b0316146109525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610444565b6040516001600160a01b03831660248201526044810182905261165b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a68565b505050565b6002600154036116b25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610444565b6002600155565b60065442116116c457565b600c546000036116d45742600655565b60006116e260065442611b3d565b90506000600754826116f491906120ad565b9050600c546008548261170791906120ad565b61171191906120c4565b60035461171e919061211d565b600355505042600655565b6001600160a01b0381166000908152600d60205260408120600654421180156117535750600c5415155b156117dc57600061176660065442611b3d565b905060006007548261177891906120ad565b90506000600c546008548361178d91906120ad565b61179791906120c4565b6003546117a4919061211d565b905083600101546008548286600301546117be91906120ad565b6117c891906120c4565b6117d29190611faa565b9695505050505050565b806001015460085460035483600301546117f691906120ad565b61180091906120c4565b6115929190611faa565b6001600160a01b0382166118605760405162461bcd60e51b815260206004820152601e60248201527f54686520757365722061646472657373206d7573742062652076616c696400006044820152606401610444565b6001600160a01b0382166000908152600d602052604081209082900361190f57600b5464e8d4a5100092506001600160a01b03161561190f57600b54604051638ba8d8bd60e01b81526001600160a01b0390911690638ba8d8bd906118c9908690600401611e35565b6020604051808303816000875af11580156118e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190c919061215f565b91505b64e8d4a510008210156119255764e8d4a5100091505b6502ba7def300082111561193d576502ba7def300091505b600281018054600383015491849055825490919064e8d4a51000906119639086906120ad565b61196d91906120c4565b60038401819055600c5482916119829161211d565b61198c9190611faa565b600c5560408051838152602081018690526001600160a01b038716917f459e4a2a3fe3fe5e131eabea44bfaf73943a596de711a1a1aba95eade5b36a76910160405180910390a25050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a629085906323b872dd60e01b90608401611624565b50505050565b6000611abd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b7e9092919063ffffffff16565b9050805160001480611ade575080806020019051810190611ade9190612178565b61165b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610444565b60006005548211611b5957611b528383611faa565b9050611b78565b6005548310611b6a57506000611b78565b82600554611b529190611faa565b92915050565b6060611b8d8484600085611b95565b949350505050565b606082471015611bf65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610444565b600080866001600160a01b03168587604051611c1291906121b9565b60006040518083038185875af1925050503d8060008114611c4f576040519150601f19603f3d011682016040523d82523d6000602084013e611c54565b606091505b5091509150611c6587838387611c70565b979650505050505050565b60608315611cdf578251600003611cd8576001600160a01b0385163b611cd85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610444565b5081611b8d565b611b8d8383815115611cf45781518083602001fd5b8060405162461bcd60e51b815260040161044491906121d5565b6001600160a01b038116811461069257600080fd5b600080600080600080600060e0888a031215611d3e57600080fd5b8735611d4981611d0e565b96506020880135611d5981611d0e565b955060408801359450606088013593506080880135925060a0880135611d7e81611d0e565b915060c0880135611d8e81611d0e565b8091505092959891949750929550565b600060208284031215611db057600080fd5b813561159281611d0e565b948552602085019390935260408401919091526060830152608082015260a00190565b600060208284031215611df057600080fd5b5035919050565b801515811461069257600080fd5b60008060408385031215611e1857600080fd5b823591506020830135611e2a81611df7565b809150509250929050565b6001600160a01b0391909116815260200190565b600080600060608486031215611e5e57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215611e8857600080fd5b8235611e9381611d0e565b946020939093013593505050565b60008060408385031215611eb457600080fd5b50508035926020909101359150565b60208082526036908201527f4e657720737461727454696d657374616d70206d757374206265206c6f7765726040820152750207468616e206e657720656e6454696d657374616d760541b606082015260800190565b60208082526038908201527f4e657720737461727454696d657374616d70206d757374206265206869676865604082015277072207468616e2063757272656e742074696d657374616d760441b606082015260800190565b600060208284031215611f8357600080fd5b815160ff8116811461159257600080fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115611b7857611b78611f94565b600181815b80851115611ff8578160001904821115611fde57611fde611f94565b80851615611feb57918102915b93841c9390800290611fc2565b509250929050565b60008261200f57506001611b78565b8161201c57506000611b78565b8160018114612032576002811461203c57612058565b6001915050611b78565b60ff84111561204d5761204d611f94565b50506001821b611b78565b5060208310610133831016604e8410600b841016171561207b575081810a611b78565b6120858383611fbd565b806000190482111561209957612099611f94565b029392505050565b60006115928383612000565b8082028115828204841417611b7857611b78611f94565b6000826120e157634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601e908201527f7265776172645065725365636f6e64206d757374206265206c61726765720000604082015260600190565b80820180821115611b7857611b78611f94565b602080825260159082015274141bdbdb081cda1bdd5b19081b9bdd08195b991959605a1b604082015260600190565b60006020828403121561217157600080fd5b5051919050565b60006020828403121561218a57600080fd5b815161159281611df7565b60005b838110156121b0578181015183820152602001612198565b50506000910152565b600082516121cb818460208701612195565b9190910192915050565b60208152600082518060208401526121f4816040850160208701612195565b601f01601f1916919091016040019291505056fea2646970667358221220de69156e95d455a8ebdaf30e82cce890dac89fc9a990d5c14116faa41d60167764736f6c63430008130033a26469706673582212200a91ad1f227c776dd45a5826fde9998f1afa9a6434b20243f24702462cd5df6664736f6c63430008130033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.