Latest 25 from a total of 43,014 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Unstake | 432421652 | 44 mins ago | IN | 0 ETH | 0.00000709 | ||||
| Stake | 432191429 | 16 hrs ago | IN | 0 ETH | 0.00000699 | ||||
| Unstake | 432158964 | 18 hrs ago | IN | 0 ETH | 0.00000119 | ||||
| Compound All | 431936857 | 34 hrs ago | IN | 0 ETH | 0.00001574 | ||||
| Compound MP | 431870175 | 38 hrs ago | IN | 0 ETH | 0.00000479 | ||||
| Compound MP | 431870082 | 38 hrs ago | IN | 0 ETH | 0.00000581 | ||||
| Unstake | 431844993 | 40 hrs ago | IN | 0 ETH | 0.00000725 | ||||
| Compound All | 431531055 | 2 days ago | IN | 0 ETH | 0.00001578 | ||||
| Unstake | 431498259 | 2 days ago | IN | 0 ETH | 0.00000719 | ||||
| Unstake | 431312308 | 3 days ago | IN | 0 ETH | 0.00000695 | ||||
| Compound MP | 431236099 | 3 days ago | IN | 0 ETH | 0.00000548 | ||||
| Compound MP | 431235692 | 3 days ago | IN | 0 ETH | 0.00000549 | ||||
| Unstake | 431151192 | 3 days ago | IN | 0 ETH | 0.00000719 | ||||
| Stake | 431121427 | 3 days ago | IN | 0 ETH | 0.0000065 | ||||
| Unstake | 431091956 | 3 days ago | IN | 0 ETH | 0.0000062 | ||||
| Stake | 431022089 | 4 days ago | IN | 0 ETH | 0.00000703 | ||||
| Unstake | 430838504 | 4 days ago | IN | 0 ETH | 0.00000608 | ||||
| Unstake | 430804032 | 4 days ago | IN | 0 ETH | 0.00000718 | ||||
| Unstake | 430692547 | 5 days ago | IN | 0 ETH | 0.00000649 | ||||
| Stake | 430556420 | 5 days ago | IN | 0 ETH | 0.00000845 | ||||
| Stake | 430457228 | 5 days ago | IN | 0 ETH | 0.00000695 | ||||
| Compound All | 430394287 | 5 days ago | IN | 0 ETH | 0.00001601 | ||||
| Unstake | 430190668 | 6 days ago | IN | 0 ETH | 0.0000069 | ||||
| Unstake | 430110299 | 6 days ago | IN | 0 ETH | 0.00000728 | ||||
| Unstake | 430028666 | 6 days ago | IN | 0 ETH | 0.00000649 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WooStakingLocal
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* 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 SOFTWARE.
*/
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IWooStakingLocal} from "./interfaces/IWooStakingLocal.sol";
import {IWooStakingManager} from "./interfaces/IWooStakingManager.sol";
import {BaseAdminOperation} from "./BaseAdminOperation.sol";
import {TransferHelper} from "./util/TransferHelper.sol";
contract WooStakingLocal is IWooStakingLocal, BaseAdminOperation, ReentrancyGuard {
using SafeERC20 for IERC20;
bool public isEmergency;
IWooStakingManager public stakingManager;
IERC20 public immutable want;
mapping(address => uint256) public balances;
constructor(address _want, address _stakingManager) {
require(_want != address(0), "WooStakingLocal: !_want");
require(_stakingManager != address(0), "WooStakingLocal: !_stakingManager");
want = IERC20(_want);
stakingManager = IWooStakingManager(_stakingManager);
isEmergency = false;
}
function stake(uint256 _amount) external whenNotPaused nonReentrant {
_stake(msg.sender, _amount);
}
// CAUTION: nonReentrant cannot be placed here:
// https://dashboard.tenderly.co/tx/fantom/0x80cf10fd96e3cce75391c2067e25dd73b0fe27621088d8fa111f24b57d3d1341
function stake(address _user, uint256 _amount) external whenNotPaused onlyAdmin {
_stake(_user, _amount);
}
function stakeForUsers(
address[] memory _users,
uint256[] memory _amounts,
uint256 _total
) external whenNotPaused onlyAdmin {
uint256 len = _users.length;
want.safeTransferFrom(msg.sender, address(this), _total);
for (uint256 i = 0; i < len; ++i) {
address _user = _users[i];
balances[_user] += _amounts[i];
stakingManager.stakeWoo(_user, _amounts[i]);
}
emit StakeForUsersOnLocal(_users, _amounts, _total);
}
function _stake(address _user, uint256 _amount) internal {
want.safeTransferFrom(msg.sender, address(this), _amount);
balances[_user] += _amount;
emit StakeOnLocal(_user, _amount);
stakingManager.stakeWoo(_user, _amount);
}
function unstake(uint256 _amount) external nonReentrant {
_unstake(msg.sender, _amount);
}
function unstakeAll() external nonReentrant {
_unstake(msg.sender, balances[msg.sender]);
}
function emergencyUnstake() external {
require(isEmergency, "WooStakingLocal: !allow");
uint256 _amount = balances[msg.sender];
balances[msg.sender] -= _amount;
want.safeTransfer(msg.sender, _amount);
emit UnstakeOnLocal(msg.sender, _amount);
}
function _unstake(address _user, uint256 _amount) internal {
require(balances[_user] >= _amount, "WooStakingLocal: !BALANCE");
balances[_user] -= _amount;
want.safeTransfer(_user, _amount);
emit UnstakeOnLocal(_user, _amount);
stakingManager.unstakeWoo(_user, _amount);
}
function setAutoCompound(bool _flag) external whenNotPaused nonReentrant {
address _user = msg.sender;
stakingManager.setAutoCompound(_user, _flag);
emit SetAutoCompoundOnLocal(_user, _flag);
}
function compoundMP() external whenNotPaused nonReentrant {
address _user = msg.sender;
stakingManager.compoundMP(_user);
emit CompoundMPOnLocal(_user);
}
function compoundAll() external whenNotPaused nonReentrant {
address _user = msg.sender;
stakingManager.compoundAll(_user);
emit CompoundAllOnLocal(_user);
}
// --------------------- Admin Functions --------------------- //
function setStakingManager(address _stakingManager) external onlyAdmin {
stakingManager = IWooStakingManager(_stakingManager);
// NOTE: don't forget to set stakingLocal as the admin of stakingManager
emit SetStakingManagerOnLocal(_stakingManager);
}
function setIsEmergency(bool _isEmergency) external onlyOwner {
isEmergency = _isEmergency;
}
function inCaseTokenGotStuck(address stuckToken) external override onlyOwner {
require(stuckToken != address(want), "WooStakingLocal: !want");
if (stuckToken == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
TransferHelper.safeTransferETH(_msgSender(), address(this).balance);
} else {
uint256 amount = IERC20(stuckToken).balanceOf(address(this));
TransferHelper.safeTransfer(stuckToken, _msgSender(), amount);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing 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.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 (last updated v4.8.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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return 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.4;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* 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 SOFTWARE.
*/
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {TransferHelper} from "./util/TransferHelper.sol";
abstract contract BaseAdminOperation is Pausable, Ownable {
event AdminUpdated(address indexed addr, bool flag);
mapping(address => bool) public isAdmin;
modifier onlyAdmin() {
require(_msgSender() == owner() || isAdmin[_msgSender()], "BaseAdminOperation: !admin");
_;
}
function pause() public onlyAdmin {
_pause();
}
function unpause() public onlyAdmin {
_unpause();
}
function setAdmin(address addr, bool flag) public onlyAdmin {
isAdmin[addr] = flag;
emit AdminUpdated(addr, flag);
}
function inCaseTokenGotStuck(address stuckToken) external virtual onlyOwner {
if (stuckToken == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) {
TransferHelper.safeTransferETH(_msgSender(), address(this).balance);
} else {
uint256 amount = IERC20(stuckToken).balanceOf(address(this));
TransferHelper.safeTransfer(stuckToken, _msgSender(), amount);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWooStakingLocal {
/* ----- Events ----- */
event StakeOnLocal(address indexed user, uint256 amount);
event StakeForUsersOnLocal(address[] users, uint256[] amounts, uint256 total);
event UnstakeOnLocal(address indexed user, uint256 amount);
event SetAutoCompoundOnLocal(address indexed user, bool flag);
event CompoundMPOnLocal(address indexed user);
event CompoundAllOnLocal(address indexed user);
event SetStakingManagerOnLocal(address indexed manager);
/* ----- State Variables ----- */
function want() external view returns (IERC20);
function balances(address user) external view returns (uint256 balance);
/* ----- Functions ----- */
function stake(uint256 _amount) external;
function stake(address _user, uint256 _amount) external;
function stakeForUsers(address[] memory _users, uint256[] memory _amounts, uint256 _total) external;
function unstake(uint256 _amount) external;
function unstakeAll() external;
function setAutoCompound(bool _flag) external;
function compoundMP() external;
function compoundAll() external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IWooStakingManager {
/* ----- Events ----- */
event StakeWooOnStakingManager(address indexed user, uint256 amount);
event UnstakeWooOnStakingManager(address indexed user, uint256 amount);
event AddMPOnStakingManager(address indexed user, uint256 amount);
event CompoundMPOnStakingManager(address indexed user);
event CompoundRewardsOnStakingManager(address indexed user, uint256 wooAmount);
event CompoundAllOnStakingManager(address indexed user);
event CompoundAllForUsersOnStakingManager(address[] users, uint256[] wooRewards);
event SetAutoCompoundOnStakingManager(address indexed user, bool flag);
event SetMPRewarderOnStakingManager(address indexed rewarder);
event SetWooPPOnStakingManager(address indexed wooPP);
event SetStakingLocalOnStakingManager(address indexed stakingProxy);
event SetCompounderOnStakingManager(address indexed compounder);
event AddRewarderOnStakingManager(address indexed rewarder);
event RemoveRewarderOnStakingManager(address indexed rewarder);
event ClaimRewardsOnStakingManager(address indexed user);
/* ----- State Variables ----- */
/* ----- Functions ----- */
function stakeWoo(address _user, uint256 _amount) external;
function unstakeWoo(address _user, uint256 _amount) external;
function mpBalance(address _user) external view returns (uint256);
function wooBalance(address _user) external view returns (uint256);
function wooTotalBalance() external view returns (uint256);
function totalBalance(address _user) external view returns (uint256);
function totalBalance() external view returns (uint256);
function compoundMP(address _user) external;
function addMP(address _user, uint256 _amount) external;
function compoundRewards(address _user) external;
function compoundAll(address _user) external;
function compoundAllForUsers(address[] memory _users) external;
function setAutoCompound(address _user, bool _flag) external;
function pendingRewards(
address _user
) external view returns (uint256 mpRewardAmount, address[] memory rewardTokens, uint256[] memory amounts);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(address token, address to, uint256 value) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::safeApprove: approve failed"
);
}
function safeTransfer(address token, address to, uint256 value) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::safeTransfer: transfer failed"
);
}
function safeTransferFrom(address token, address from, address to, uint256 value) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(
success && (data.length == 0 || abi.decode(data, (bool))),
"TransferHelper::transferFrom: transferFrom failed"
);
}
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, "TransferHelper::safeTransferETH: ETH transfer failed");
}
}{
"optimizer": {
"enabled": true,
"runs": 20000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_stakingManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"CompoundAllOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"CompoundMPOnLocal","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":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"SetAutoCompoundOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"SetStakingManagerOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"StakeForUsersOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakeOnLocal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnstakeOnLocal","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compoundAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundMP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEmergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"flag","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_flag","type":"bool"}],"name":"setAutoCompound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEmergency","type":"bool"}],"name":"setIsEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingManager","type":"address"}],"name":"setStakingManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_total","type":"uint256"}],"name":"stakeForUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingManager","outputs":[{"internalType":"contract IWooStakingManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a06040523480156200001157600080fd5b50604051620026f4380380620026f48339810160408190526200003491620001b9565b6000805460ff19169055620000493362000143565b60016002556001600160a01b038216620000aa5760405162461bcd60e51b815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a20215f77616e7400000000000000000060448201526064015b60405180910390fd5b6001600160a01b0381166200010c5760405162461bcd60e51b815260206004820152602160248201527f576f6f5374616b696e674c6f63616c3a20215f7374616b696e674d616e6167656044820152603960f91b6064820152608401620000a1565b6001600160a01b03918216608052600380546001600160a81b031916610100929093169190910260ff1916919091179055620001f1565b600080546001600160a01b03838116610100818102610100600160a81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b80516001600160a01b0381168114620001b457600080fd5b919050565b60008060408385031215620001cd57600080fd5b620001d8836200019c565b9150620001e8602084016200019c565b90509250929050565b6080516124c462000230600039600081816101a2015281816107fe01528181610e4201528181611029015281816113be015261180801526124c46000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c8063715018a6116100e3578063a694fc3a1161008c578063baddbe4911610066578063baddbe491461036e578063e1a4e72a14610381578063f2fde38b1461039457600080fd5b8063a694fc3a14610335578063adc9772e14610348578063b00bba6a1461035b57600080fd5b806386593454116100bd57806386593454146102f75780638da5cb5b1461030a5780639b05ddb31461032d57600080fd5b8063715018a6146102df5780637589cf2f146102e75780638456cb59146102ef57600080fd5b80633debccfa116101455780635c975abb1161011f5780635c975abb146102b45780635f9e8f82146102bf57806360aec637146102cc57600080fd5b80633debccfa146102915780633f4ba83a146102995780634b0bddd2146102a157600080fd5b806327e235e31161017657806327e235e3146102465780632e17de781461027457806335322f371461028957600080fd5b80631f1fcd511461019d57806322828cc2146101ee57806324d7806c14610213575b600080fd5b6101c47f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546101c490610100900473ffffffffffffffffffffffffffffffffffffffff1681565b610236610221366004611fce565b60016020526000908152604090205460ff1681565b60405190151581526020016101e5565b610266610254366004611fce565b60046020526000908152604090205481565b6040519081526020016101e5565b610287610282366004611ff0565b6103a7565b005b6102876103c6565b6102876103f4565b6102876104d9565b6102876102af366004612017565b6105b2565b60005460ff16610236565b6003546102369060ff1681565b6102876102da36600461204e565b610708565b610287610741565b610287610753565b61028761085d565b61028761030536600461204e565b610931565b600054610100900473ffffffffffffffffffffffffffffffffffffffff166101c4565b610287610a2f565b610287610343366004611ff0565b610b14565b61028761035636600461206b565b610b2e565b610287610369366004611fce565b610c10565b61028761037c3660046121a2565b610d52565b61028761038f366004611fce565b61101f565b6102876103a2366004611fce565b6111b5565b6103af611269565b6103b933826112da565b6103c36001600255565b50565b6103ce611269565b336000818152600460205260409020546103e891906112da565b6103f26001600255565b565b6103fc6114cc565b610404611269565b6003546040517f24a1ad95000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff16906324a1ad9590602401600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507fb088cc85d2ed06bb33bc2112efa493e4a9050b1490dfb96e57f024ee3a1dc1559150600090a2506103f26001600255565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053f57503360009081526001602052604090205460ff165b6105aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064015b60405180910390fd5b6103f2611539565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061061857503360009081526001602052604090205460ff165b61067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a11133910160405180910390a25050565b6107106115b6565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6107496115b6565b6103f2600061163d565b60035460ff166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a2021616c6c6f7700000000000000000060448201526064016105a1565b3360009081526004602052604081208054918291906107de838061229a565b90915550610825905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633836116ba565b60405181815233907fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a9060200160405180910390a250565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108c357503360009081526001602052604090205460ff165b610929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b6103f2611793565b6109396114cc565b610941611269565b6003546040517f601c26690000000000000000000000000000000000000000000000000000000081523360048201819052831515602483015291610100900473ffffffffffffffffffffffffffffffffffffffff169063601c266990604401600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff167ffbde27c6924feb14f42da6b37636eab64a51385afb5462e0f0990251b3a3dbbb83604051610a1c911515815260200190565b60405180910390a2506103c36001600255565b610a376114cc565b610a3f611269565b6003546040517fd32f79de000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff169063d32f79de90602401600060405180830381600087803b158015610ab057600080fd5b505af1158015610ac4573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507f9b44e7dabc2536afd9ad4d6e12ad7f2a62effeffe8192e6e0b456f6bfc7060589150600090a2506103f26001600255565b610b1c6114cc565b610b24611269565b6103b933826117ee565b610b366114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b9c57503360009081526001602052604090205460ff165b610c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b610c0c82826117ee565b5050565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c7657503360009081526001602052604090205460ff165b610cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040517fc95f57fb4cfc6ad8247eda12deb45012e894816aebdf7305e40ba95ef83b326790600090a250565b610d5a6114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc057503360009081526001602052604090205460ff165b610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b8251610e6a73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308561191a565b60005b81811015610fdd576000858281518110610e8957610e896122b3565b60200260200101519050848281518110610ea557610ea56122b3565b6020026020010151600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610efb91906122e2565b92505081905550600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b946104e82878581518110610f5357610f536122b3565b60200260200101516040518363ffffffff1660e01b8152600401610f9992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050505080610fd6906122f5565b9050610e6d565b507fd50749b86acca50b3fa503360ef9856906c87f618a418a50416eae9633fa19da8484846040516110119392919061232d565b60405180910390a150505050565b6110276115b6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f576f6f5374616b696e674c6f63616c3a202177616e740000000000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03611117576103c3334761197e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a891906123c7565b9050610c0c823383611a88565b6111bd6115b6565b73ffffffffffffffffffffffffffffffffffffffff8116611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105a1565b6103c38161163d565b60028054036112d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a1565b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054811115611369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576f6f5374616b696e674c6f63616c3a202142414c414e43450000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805483929061139e90849061229a565b909155506113e5905073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001683836116ba565b8173ffffffffffffffffffffffffffffffffffffffff167fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a8260405161142d91815260200190565b60405180910390a26003546040517fd317c6ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063d317c6ce906044015b600060405180830381600087803b1580156114b057600080fd5b505af11580156114c4573d6000803e3d6000fd5b505050505050565b60005460ff16156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a1565b611541611c1e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff6101009091041633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261178e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c8a565b505050565b61179b6114cc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861158c3390565b61183073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461191a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040812080548392906118659084906122e2565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907fb80198f3dce5b44c7655dc02c2d1e8af243e943a75d350bab8b566c62beadd119060200160405180910390a26003546040517fb946104e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063b946104e90604401611496565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526119789085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161170c565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516119b59190612404565b60006040518083038185875af1925050503d80600081146119f2576040519150601f19603f3d011682016040523d82523d6000602084013e6119f7565b606091505b505090508061178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c656400000000000000000000000060648201526084016105a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691611b1f9190612404565b6000604051808303816000865af19150503d8060008114611b5c576040519150601f19603f3d011682016040523d82523d6000602084013e611b61565b606091505b5091509150818015611b8b575080511580611b8b575080806020019051810190611b8b9190612420565b611c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016105a1565b5050505050565b60005460ff166103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a1565b6000611cec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d969092919063ffffffff16565b80519091501561178e5780806020019051810190611d0a9190612420565b61178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a1565b6060611da58484600085611dad565b949350505050565b606082471015611e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a1565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e689190612404565b60006040518083038185875af1925050503d8060008114611ea5576040519150601f19603f3d011682016040523d82523d6000602084013e611eaa565b606091505b5091509150611ebb87838387611ec6565b979650505050505050565b60608315611f5c578251600003611f555773ffffffffffffffffffffffffffffffffffffffff85163b611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a1565b5081611da5565b611da58383815115611f715781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a1919061243d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fc957600080fd5b919050565b600060208284031215611fe057600080fd5b611fe982611fa5565b9392505050565b60006020828403121561200257600080fd5b5035919050565b80151581146103c357600080fd5b6000806040838503121561202a57600080fd5b61203383611fa5565b9150602083013561204381612009565b809150509250929050565b60006020828403121561206057600080fd5b8135611fe981612009565b6000806040838503121561207e57600080fd5b61208783611fa5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561210b5761210b612095565b604052919050565b600067ffffffffffffffff82111561212d5761212d612095565b5060051b60200190565b600082601f83011261214857600080fd5b8135602061215d61215883612113565b6120c4565b82815260059290921b8401810191818101908684111561217c57600080fd5b8286015b848110156121975780358352918301918301612180565b509695505050505050565b6000806000606084860312156121b757600080fd5b833567ffffffffffffffff808211156121cf57600080fd5b818601915086601f8301126121e357600080fd5b813560206121f361215883612113565b82815260059290921b8401810191818101908a84111561221257600080fd5b948201945b838610156122375761222886611fa5565b82529482019490820190612217565b9750508701359250508082111561224d57600080fd5b5061225a86828701612137565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156122ad576122ad61226b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156122ad576122ad61226b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123265761232661226b565b5060010190565b606080825284519082018190526000906020906080840190828801845b8281101561237c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161234a565b5050508381038285015285518082528683019183019060005b818110156123b157835183529284019291840191600101612395565b5050809350505050826040830152949350505050565b6000602082840312156123d957600080fd5b5051919050565b60005b838110156123fb5781810151838201526020016123e3565b50506000910152565b600082516124168184602087016123e0565b9190910192915050565b60006020828403121561243257600080fd5b8151611fe981612009565b602081526000825180602084015261245c8160408501602087016123e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212203fcf999a44a68fe6cc4259b4c9aa52ac7128eaf56067f634d4f18971d145e2df64736f6c63430008110033000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101985760003560e01c8063715018a6116100e3578063a694fc3a1161008c578063baddbe4911610066578063baddbe491461036e578063e1a4e72a14610381578063f2fde38b1461039457600080fd5b8063a694fc3a14610335578063adc9772e14610348578063b00bba6a1461035b57600080fd5b806386593454116100bd57806386593454146102f75780638da5cb5b1461030a5780639b05ddb31461032d57600080fd5b8063715018a6146102df5780637589cf2f146102e75780638456cb59146102ef57600080fd5b80633debccfa116101455780635c975abb1161011f5780635c975abb146102b45780635f9e8f82146102bf57806360aec637146102cc57600080fd5b80633debccfa146102915780633f4ba83a146102995780634b0bddd2146102a157600080fd5b806327e235e31161017657806327e235e3146102465780632e17de781461027457806335322f371461028957600080fd5b80631f1fcd511461019d57806322828cc2146101ee57806324d7806c14610213575b600080fd5b6101c47f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6003546101c490610100900473ffffffffffffffffffffffffffffffffffffffff1681565b610236610221366004611fce565b60016020526000908152604090205460ff1681565b60405190151581526020016101e5565b610266610254366004611fce565b60046020526000908152604090205481565b6040519081526020016101e5565b610287610282366004611ff0565b6103a7565b005b6102876103c6565b6102876103f4565b6102876104d9565b6102876102af366004612017565b6105b2565b60005460ff16610236565b6003546102369060ff1681565b6102876102da36600461204e565b610708565b610287610741565b610287610753565b61028761085d565b61028761030536600461204e565b610931565b600054610100900473ffffffffffffffffffffffffffffffffffffffff166101c4565b610287610a2f565b610287610343366004611ff0565b610b14565b61028761035636600461206b565b610b2e565b610287610369366004611fce565b610c10565b61028761037c3660046121a2565b610d52565b61028761038f366004611fce565b61101f565b6102876103a2366004611fce565b6111b5565b6103af611269565b6103b933826112da565b6103c36001600255565b50565b6103ce611269565b336000818152600460205260409020546103e891906112da565b6103f26001600255565b565b6103fc6114cc565b610404611269565b6003546040517f24a1ad95000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff16906324a1ad9590602401600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507fb088cc85d2ed06bb33bc2112efa493e4a9050b1490dfb96e57f024ee3a1dc1559150600090a2506103f26001600255565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061053f57503360009081526001602052604090205460ff165b6105aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064015b60405180910390fd5b6103f2611539565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061061857503360009081526001602052604090205460ff165b61067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a11133910160405180910390a25050565b6107106115b6565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6107496115b6565b6103f2600061163d565b60035460ff166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f576f6f5374616b696e674c6f63616c3a2021616c6c6f7700000000000000000060448201526064016105a1565b3360009081526004602052604081208054918291906107de838061229a565b90915550610825905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633836116ba565b60405181815233907fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a9060200160405180910390a250565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108c357503360009081526001602052604090205460ff165b610929576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b6103f2611793565b6109396114cc565b610941611269565b6003546040517f601c26690000000000000000000000000000000000000000000000000000000081523360048201819052831515602483015291610100900473ffffffffffffffffffffffffffffffffffffffff169063601c266990604401600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff167ffbde27c6924feb14f42da6b37636eab64a51385afb5462e0f0990251b3a3dbbb83604051610a1c911515815260200190565b60405180910390a2506103c36001600255565b610a376114cc565b610a3f611269565b6003546040517fd32f79de000000000000000000000000000000000000000000000000000000008152336004820181905291610100900473ffffffffffffffffffffffffffffffffffffffff169063d32f79de90602401600060405180830381600087803b158015610ab057600080fd5b505af1158015610ac4573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841692507f9b44e7dabc2536afd9ad4d6e12ad7f2a62effeffe8192e6e0b456f6bfc7060589150600090a2506103f26001600255565b610b1c6114cc565b610b24611269565b6103b933826117ee565b610b366114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b9c57503360009081526001602052604090205460ff165b610c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b610c0c82826117ee565b5050565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c7657503360009081526001602052604090205460ff165b610cdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040517fc95f57fb4cfc6ad8247eda12deb45012e894816aebdf7305e40ba95ef83b326790600090a250565b610d5a6114cc565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc057503360009081526001602052604090205460ff165b610e26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4261736541646d696e4f7065726174696f6e3a202161646d696e00000000000060448201526064016105a1565b8251610e6a73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633308561191a565b60005b81811015610fdd576000858281518110610e8957610e896122b3565b60200260200101519050848281518110610ea557610ea56122b3565b6020026020010151600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610efb91906122e2565b92505081905550600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b946104e82878581518110610f5357610f536122b3565b60200260200101516040518363ffffffff1660e01b8152600401610f9992919073ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060405180830381600087803b158015610fb357600080fd5b505af1158015610fc7573d6000803e3d6000fd5b505050505080610fd6906122f5565b9050610e6d565b507fd50749b86acca50b3fa503360ef9856906c87f618a418a50416eae9633fa19da8484846040516110119392919061232d565b60405180910390a150505050565b6110276115b6565b7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f576f6f5374616b696e674c6f63616c3a202177616e740000000000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03611117576103c3334761197e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a891906123c7565b9050610c0c823383611a88565b6111bd6115b6565b73ffffffffffffffffffffffffffffffffffffffff8116611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105a1565b6103c38161163d565b60028054036112d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105a1565b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054811115611369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576f6f5374616b696e674c6f63616c3a202142414c414e43450000000000000060448201526064016105a1565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120805483929061139e90849061229a565b909155506113e5905073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1683836116ba565b8173ffffffffffffffffffffffffffffffffffffffff167fd4c650a73f8d15dab87b4e93c9caaa77b234195b0b873b806d75c1186125047a8260405161142d91815260200190565b60405180910390a26003546040517fd317c6ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063d317c6ce906044015b600060405180830381600087803b1580156114b057600080fd5b505af11580156114c4573d6000803e3d6000fd5b505050505050565b60005460ff16156103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105a1565b611541611c1e565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff6101009091041633146103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261178e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611c8a565b505050565b61179b6114cc565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861158c3390565b61183073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b1633308461191a565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040812080548392906118659084906122e2565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff8316907fb80198f3dce5b44c7655dc02c2d1e8af243e943a75d350bab8b566c62beadd119060200160405180910390a26003546040517fb946104e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526101009092049091169063b946104e90604401611496565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526119789085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161170c565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516119b59190612404565b60006040518083038185875af1925050503d80600081146119f2576040519150601f19603f3d011682016040523d82523d6000602084013e6119f7565b606091505b505090508061178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c656400000000000000000000000060648201526084016105a1565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691611b1f9190612404565b6000604051808303816000865af19150503d8060008114611b5c576040519150601f19603f3d011682016040523d82523d6000602084013e611b61565b606091505b5091509150818015611b8b575080511580611b8b575080806020019051810190611b8b9190612420565b611c17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016105a1565b5050505050565b60005460ff166103f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105a1565b6000611cec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611d969092919063ffffffff16565b80519091501561178e5780806020019051810190611d0a9190612420565b61178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105a1565b6060611da58484600085611dad565b949350505050565b606082471015611e3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105a1565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611e689190612404565b60006040518083038185875af1925050503d8060008114611ea5576040519150601f19603f3d011682016040523d82523d6000602084013e611eaa565b606091505b5091509150611ebb87838387611ec6565b979650505050505050565b60608315611f5c578251600003611f555773ffffffffffffffffffffffffffffffffffffffff85163b611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105a1565b5081611da5565b611da58383815115611f715781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a1919061243d565b803573ffffffffffffffffffffffffffffffffffffffff81168114611fc957600080fd5b919050565b600060208284031215611fe057600080fd5b611fe982611fa5565b9392505050565b60006020828403121561200257600080fd5b5035919050565b80151581146103c357600080fd5b6000806040838503121561202a57600080fd5b61203383611fa5565b9150602083013561204381612009565b809150509250929050565b60006020828403121561206057600080fd5b8135611fe981612009565b6000806040838503121561207e57600080fd5b61208783611fa5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561210b5761210b612095565b604052919050565b600067ffffffffffffffff82111561212d5761212d612095565b5060051b60200190565b600082601f83011261214857600080fd5b8135602061215d61215883612113565b6120c4565b82815260059290921b8401810191818101908684111561217c57600080fd5b8286015b848110156121975780358352918301918301612180565b509695505050505050565b6000806000606084860312156121b757600080fd5b833567ffffffffffffffff808211156121cf57600080fd5b818601915086601f8301126121e357600080fd5b813560206121f361215883612113565b82815260059290921b8401810191818101908a84111561221257600080fd5b948201945b838610156122375761222886611fa5565b82529482019490820190612217565b9750508701359250508082111561224d57600080fd5b5061225a86828701612137565b925050604084013590509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156122ad576122ad61226b565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156122ad576122ad61226b565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036123265761232661226b565b5060010190565b606080825284519082018190526000906020906080840190828801845b8281101561237c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161234a565b5050508381038285015285518082528683019183019060005b818110156123b157835183529284019291840191600101612395565b5050809350505050826040830152949350505050565b6000602082840312156123d957600080fd5b5051919050565b60005b838110156123fb5781810151838201526020016123e3565b50506000910152565b600082516124168184602087016123e0565b9190910192915050565b60006020828403121561243257600080fd5b8151611fe981612009565b602081526000825180602084015261245c8160408501602087016123e0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212203fcf999a44a68fe6cc4259b4c9aa52ac7128eaf56067f634d4f18971d145e2df64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb
-----Decoded View---------------
Arg [0] : _want (address): 0xcAFcD85D8ca7Ad1e1C6F82F651fA15E33AEfD07b
Arg [1] : _stakingManager (address): 0xa9E245C1FA7E17263Cc7C896488A3da8072924Fb
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b
Arg [1] : 000000000000000000000000a9e245c1fa7e17263cc7c896488a3da8072924fb
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$6,048,051.93
Net Worth in ETH
3,072.605867
Token Allocations
WOO
100.00%
Multichain Portfolio | 34 Chains
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.
${zeroWidthWarningMessage} Check the actual text at ENS.
`;
}
const ensOnL2NoteHtml = ensOnL2Note != "" ? `Additional Info
Full Name:
${ensNameForkIconSrc}
Note:
- Name tag is displayed due to forward and reverse resolution. Find out more.
- ${ensOnL2NoteHtml}
Other names resolving to this address:
${listOtherENSNames}
${moreOtherENSNames}
`;
return result;
}
// ===== UD name tag
const displayUDName = '';
const primaryUDName = '';
const showUDPublicNote = 'false';
let otherUDNamesHtml = "";
function initUDNamePopOver() {
//required to allow bootstrap popover to support table
$.fn.popover.Constructor.Default.allowList.table = [];
$.fn.popover.Constructor.Default.allowList.tr = [];
$.fn.popover.Constructor.Default.allowList.td = [];
$.fn.popover.Constructor.Default.allowList.th = [];
$.fn.popover.Constructor.Default.allowList.div = [];
$.fn.popover.Constructor.Default.allowList.tbody = [];
$.fn.popover.Constructor.Default.allowList.thead = [];
//allowList my inline styling for bootstrap
$.fn.popover.Constructor.Default.allowList['*'].push('style')
let unicodeWarningHtml = "";
if ($("#hdnIsUDContainUnicodeChars").val() == "true") {
unicodeWarningHtml =
`
${unicodeWarningMessage} Check the actual text at Unstoppable Domains.
`;
}
let zeroWidthWarningHtml = "";
if ($("#hdnIsUDContainZeroWidthChars").val() == "true") {
zeroWidthWarningHtml =
`
${unicodeWarningMessage} Check the actual text at Unstoppable Domains.
`;
}
const contentHtml =
`Additional Info
Full Name:
Note:
- Name tag is displayed due to forward and reverse resolution. Find out more
Other names resolving to this address:
${listOtherUDNames}
${moreOtherUDNames}
`;
return result;
}
// ===== end UD name tag
const tooltipForTokenHolding = '46 Token Contracts';
var adjustPosition = 0;
$(document).ready(function () {
switchAmountToValue(document.getElementById("headerAmountValue"), 'Value (USD)', 'Amount', true);
switchAmountToValue(document.getElementById("headerIntAmountValue"), 'Value (USD)', 'Amount', true);
switchMethodColumn(document.getElementById("headerMethod"), 'Method', 'Action', true);
onDocumentReady();
$("[rel='tooltip']").tooltip();
$("[data-bs-toggle-second='tooltip']").tooltip({ trigger: 'hover' });
$("[rel='tooltipEns']").each(function () {
$(this).tooltip({ title: $(this).attr("tooltip-title") });
});
if (hash != '') {
activaTab(hash);
};
onAddressDocReady();
// Note: this is causing "Copied" tooltip not showing when copy button is clicked in V3, and seems like not applicable to v3, comment out first in case there is issue
//$('[data-bs-toggle="tooltip"]').click(function () {
// $('[data-bs-toggle="tooltip"]').tooltip("hide");
//});
document.getElementById("copyaddressbutton").classList.remove("disabled");
if ($("#txtSearchContract").length) {
initialiseKeyupOnDocReady();
}
if (!!$('#ensName')[0]) {
initEnsNamePopOver();
}
if (!!$("#udName")[0]) {
initUDNamePopOver();
}
handleToggle();
if (window.matchMedia("(max-width: 767px)").matches) {
// Mobile
adjustPosition = 90;
} else {
// Others
adjustPosition = 50;
}
if (tooltipForTokenHolding) {
const dropdownMenuBalance = document.getElementById("dropdownMenuBalance");
if (dropdownMenuBalance) {
const dropdownWrapper = dropdownMenuBalance.closest(".dropdown");
if (dropdownWrapper) {
dropdownWrapper.setAttribute("title", tooltipForTokenHolding);
new bootstrap.Tooltip(dropdownWrapper);
}
}
}
});
function displayAudit() {
$('html, body').animate({
scrollTop: $("#auditReportId").offset().top - adjustPosition
});
}
var cThemeMode = getCookie('displaymode');
function handleToggle() {
var className = document.getElementsByClassName('editor');
var classNameCount = className.length;
for (var j = 0; j t.innerWidth()) {
if (mb + d > tb) {
t.css('padding-bottom', ((mb + d) - tb));
}
}
else {
t.css('overflow', 'visible');
}
}).on('hidden.bs.dropdown', function () {
$(this).css({ 'padding-bottom': '', 'overflow': '' });
});
var btn_ERC20_sort = {
count: 0,
reminder_count: 2,
list: [],
default_list: [],
ERC20_sort_start: function (count) {
if (document.getElementsByClassName('list-custom-divider-ERC20')[0]) {
var self = this
if (count != undefined) {
self.count = count
}
var before_el = document.getElementsByClassName('list-custom-divider-ERC20')[0]
var parent_el = before_el.parentNode
var element_selector = parent_el.querySelectorAll(".list-custom-ERC20");
if (self.list.length == 0) {
element_selector.forEach(function (e) {
self.list.push(e);
self.default_list.push(e);
});
}
$(".list-custom-ERC20").remove()
var type = self.count % self.reminder_count
self.sortList(type, parent_el, before_el);
self.count++
}
},
sortList: function (type, parent_el, before_el) {
var self = this
var sorted_list = []
var icon_el = $(before_el).find('button').find('i')
switch (type) {
case 1:
icon_el.attr("class", "fad fa-sort-up")
sorted_list = self.sortUsdAsc()
break;
default:
icon_el.attr("class", "fad fa-sort-down")
sorted_list = self.sortUsdDesc()
}
for (var i = sorted_list.length - 1; i >= 0; i--) {
before_el.insertAdjacentElement('afterend', sorted_list[i])
}
},
sortUsdAsc: function () {
var self = this
var sort_list = self.list
sort_list.sort(function (a, b) {
var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1);
var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1);
if (target_a_value == -1 || target_b_value == -1) {
return 1;
}
if (target_a_value target_b_value) {
return 1;
}
return 0
});
return sort_list
},
sortUsdDesc: function () {
var self = this
var sort_list = self.list
sort_list.sort(function (a, b) {
var target_a_value = self.formatCurrencyToNumber(a.querySelector('.list-usd-value').textContent.trim() || -1);
var target_b_value = self.formatCurrencyToNumber(b.querySelector('.list-usd-value').textContent.trim() || -1);
if (target_a_value target_b_value) {
return -1;
}
return 0
});
return sort_list
},
formatCurrencyToNumber: function (strCurrency) {
if (typeof strCurrency == "number")
return strCurrency
else
return Number(strCurrency.replace(/[^0-9.-]+/g, ""));
},
}
function hrefTokenHolding() {
var location = "/tokenholdings?a=0x2cfa72e7f58dc82b990529450ffa83791db7d8e2"
var queryString = $("input.form-control.form-control-xs.search.mb-3")[0].value
if (queryString) {
location += "&q=" + queryString
}
window.location.href = location
}
$(document).ready(function () {
$("#btn_ERC20_sort").on("click", function (event) {
event.preventDefault();
setTimeout(function () {
btn_ERC20_sort.ERC20_sort_start()
}, 10)
})
btn_ERC20_sort.ERC20_sort_start()
var mainAddress = $("#hdnAddress").val();
// user search for method filters
var searchFuncTimeOut;
$("#ContentPlaceHolder1_inputMethodName").on("keyup", function ($event) {
if (searchFuncTimeOut) {
clearTimeout(searchFuncTimeOut)
}
var searchTerm = $(this).val();
searchFuncTimeOut = setTimeout(function () {
searchFunctions( searchTerm);
}, 350);
});
var isSearchFunctions = false;
$("#dropdownMethod").on("click", function (e) {
if (isSearchFunctions === false) {
searchFunctions('');
isSearchFunctions = true;
}
});
const litDefaultMethodFilterHtml = '';
function searchFunctions(searchTerm) {
if (searchTerm === '' || searchTerm.length > 3) {
const curPath = encodeURIComponent(window.location.search);
$.ajax({
type: 'Get',
url: `/functionSearchHandler.ashx?ca=${mainAddress}&func=${searchTerm ?? ''}&curPath=${curPath}`,
success: function (response) {
$("#searchFunctionResult").html('');
if (response && response.length > 0) {
for (var i = 0; i
${response[i].name}
${response[i].methodId}
`
);
}
$("[data-bs-toggle='tooltip']").tooltip();
}
else {
$("#searchFunctionResult").append(
`