Source Code
Latest 25 from a total of 920 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Exit | 27372496 | 21 days ago | IN | 0 ETH | 0.00000355 | ||||
| Withdraw | 26607644 | 43 days ago | IN | 0 ETH | 0.00000412 | ||||
| Exit | 25589013 | 73 days ago | IN | 0 ETH | 0.00000461 | ||||
| Withdraw | 25558066 | 73 days ago | IN | 0 ETH | 0.00000507 | ||||
| Exit | 25546310 | 74 days ago | IN | 0 ETH | 0.00000553 | ||||
| Exit | 25545437 | 74 days ago | IN | 0 ETH | 0.00000507 | ||||
| Withdraw | 25450203 | 76 days ago | IN | 0 ETH | 0.0000061 | ||||
| Stake | 25205745 | 83 days ago | IN | 0 ETH | 0.00000634 | ||||
| Exit | 25036111 | 87 days ago | IN | 0 ETH | 0.00000399 | ||||
| Exit | 24791110 | 94 days ago | IN | 0 ETH | 0.00000461 | ||||
| Claim Reward | 24779985 | 95 days ago | IN | 0 ETH | 0.00000383 | ||||
| Exit | 24774035 | 95 days ago | IN | 0 ETH | 0.00000461 | ||||
| Exit | 24765810 | 95 days ago | IN | 0 ETH | 0.00000484 | ||||
| Claim Reward | 24758233 | 95 days ago | IN | 0 ETH | 0.00000383 | ||||
| Exit | 24732962 | 96 days ago | IN | 0 ETH | 0.00000507 | ||||
| Exit | 24725452 | 96 days ago | IN | 0 ETH | 0.00000657 | ||||
| Exit | 24707716 | 97 days ago | IN | 0 ETH | 0.00000691 | ||||
| Claim Reward | 24694185 | 97 days ago | IN | 0 ETH | 0.00000366 | ||||
| Stake | 24683430 | 98 days ago | IN | 0 ETH | 0.00000524 | ||||
| Exit | 24679513 | 98 days ago | IN | 0 ETH | 0.00000484 | ||||
| Claim Reward | 24676675 | 98 days ago | IN | 0 ETH | 0.00000403 | ||||
| Exit | 24673405 | 98 days ago | IN | 0 ETH | 0.00000648 | ||||
| Stake | 24672309 | 98 days ago | IN | 0 ETH | 0.00000384 | ||||
| Claim Reward | 24672282 | 98 days ago | IN | 0 ETH | 0.00000341 | ||||
| Claim Reward | 24666628 | 98 days ago | IN | 0 ETH | 0.00000403 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 27372496 | 21 days ago | 0 ETH | ||||
| 27372496 | 21 days ago | 0 ETH | ||||
| 26607644 | 43 days ago | 0 ETH | ||||
| 26607644 | 43 days ago | 0 ETH | ||||
| 25589013 | 73 days ago | 0 ETH | ||||
| 25589013 | 73 days ago | 0 ETH | ||||
| 25558066 | 73 days ago | 0 ETH | ||||
| 25558066 | 73 days ago | 0 ETH | ||||
| 25546310 | 74 days ago | 0 ETH | ||||
| 25546310 | 74 days ago | 0 ETH | ||||
| 25546298 | 74 days ago | 0 ETH | ||||
| 25546292 | 74 days ago | 0 ETH | ||||
| 25546212 | 74 days ago | 0 ETH | ||||
| 25546050 | 74 days ago | 0 ETH | ||||
| 25545437 | 74 days ago | 0 ETH | ||||
| 25545437 | 74 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25450203 | 76 days ago | 0 ETH | ||||
| 25205745 | 83 days ago | 0 ETH | ||||
| 25205745 | 83 days ago | 0 ETH | ||||
| 25036111 | 87 days ago | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Masonry
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./interfaces/IMothRedeem.sol";
import "./interfaces/IZapperGMoth.sol";
import "./utils/ContractGuard.sol";
import "./interfaces/IBasisAsset.sol";
import "./interfaces/ITreasury.sol";
import "./owner/Operator.sol";
contract ShareWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public share;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function stake(uint256 amount) public virtual {
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
share.safeTransferFrom(msg.sender, address(this), amount);
}
function withdraw(uint256 amount) public virtual {
uint256 masonUserShare = _balances[msg.sender];
require(masonUserShare >= amount, "Masonry: withdraw request greater than staked amount");
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = masonUserShare.sub(amount);
share.safeTransfer(msg.sender, amount);
}
}
/**************************************************************************************************************************************************
/$$ /$$ /$$ /$$ /$$$$$$$$ /$$
| $$$ /$$$ | $$ | $$ | $$_____/|__/
| $$$$ /$$$$ /$$$$$$ /$$$$$$ | $$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$ /$$$$$$
| $$ $$/$$ $$ /$$__ $$|_ $$_/ | $$__ $$ | $$$$$ | $$| $$__ $$ |____ $$| $$__ $$ /$$_____/ /$$__ $$
| $$ $$$| $$| $$ \ $$ | $$ | $$ \ $$ | $$__/ | $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$ | $$$$$$$$
| $$\ $ | $$| $$ | $$ | $$ /$$| $$ | $$ | $$ | $$| $$ | $$ /$$__ $$| $$ | $$| $$ | $$_____/
| $$ \/ | $$| $$$$$$/ | $$$$/| $$ | $$ | $$ | $$| $$ | $$| $$$$$$$| $$ | $$| $$$$$$$| $$$$$$$
|__/ |__/ \______/ \___/ |__/ |__/ |__/ |__/|__/ |__/ \_______/|__/ |__/ \_______/ \_______/
#### Website: https://moth.finance/
#### Author: kell
**************************************************************************************************************************************************/
contract Masonry is ShareWrapper, ContractGuard, Operator {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
/* ========== DATA STRUCTURES ========== */
struct MasonSeat {
uint256 lastSnapshotIndex;
uint256 rewardEarned;
uint256 epochTimerStart;
}
struct MasonrySnapshot {
uint256 time;
uint256 rewardReceived;
uint256 rewardPerShare;
}
/* ========== STATE VARIABLES ========== */
// flags
bool public initialized = false;
IERC20 public moth;
ITreasury public treasury;
// TODO - setters
address public constant USDC = 0x176211869cA2b568f2A7D4EE941E073a821EE1ff;
address public buybackWalletAddress;
address public mothRedeemAddress;
address public gmothZapperAddress;
bool public claimRewardOtherEnabled = false;
mapping(address => MasonSeat) public masons;
MasonrySnapshot[] public masonryHistory;
uint256 public withdrawLockupEpochs;
uint256 public rewardLockupEpochs;
uint256 public claimRewardsBurnEpochs;
/* ========== EVENTS ========== */
event Initialized(address indexed executor, uint256 at);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
event RewardOtherPaid(address indexed user, uint256 mode, uint256 reward);
event RewardAdded(address indexed user, uint256 reward);
/* ========== Modifiers =============== */
modifier masonUserExists {
require(balanceOf(msg.sender) > 0, "Masonry: The masonUser does not exist");
_;
}
modifier updateReward(address masonUser) {
if (masonUser != address(0)) {
MasonSeat memory seat = masons[masonUser];
seat.rewardEarned = earned(masonUser);
seat.lastSnapshotIndex = latestSnapshotIndex();
masons[masonUser] = seat;
}
_;
}
modifier notInitialized {
require(!initialized, "Masonry: already initialized");
_;
}
/* ========== GOVERNANCE ========== */
function initialize(
IERC20 _moth,
IERC20 _share,
ITreasury _treasury
) public notInitialized onlyOperator {
moth = _moth;
share = _share;
treasury = _treasury;
MasonrySnapshot memory genesisSnapshot = MasonrySnapshot({time : block.number, rewardReceived : 0, rewardPerShare : 0});
masonryHistory.push(genesisSnapshot);
withdrawLockupEpochs = 4; // Lock for 4 epochs (24h) before release withdraw
rewardLockupEpochs = 2; // Lock for 2 epochs (12h) before release claimReward
claimRewardsBurnEpochs = 8; // if the masonUser doesn't claim rewards in 2 days, the rewards will be burned
initialized = true;
emit Initialized(msg.sender, block.number);
}
function setOperator(address _operator) external onlyOperator {
transferOperator(_operator);
}
function renounceOperator() external onlyOperator {
_renounceOperator();
}
function setLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs, uint256 _claimRewardsBurnEpochs) external onlyOperator {
require(_withdrawLockupEpochs >= _rewardLockupEpochs && _withdrawLockupEpochs <= 56 && _claimRewardsBurnEpochs <= 56, "_withdrawLockupEpochs: out of range"); // <= 2 week
require(_withdrawLockupEpochs > 0 && _rewardLockupEpochs > 0 && _claimRewardsBurnEpochs > 0, "lockupEpochs must be greater than 0");
withdrawLockupEpochs = _withdrawLockupEpochs;
rewardLockupEpochs = _rewardLockupEpochs;
claimRewardsBurnEpochs = _claimRewardsBurnEpochs;
}
/* ========== VIEW FUNCTIONS ========== */
// =========== Snapshot getters =========== //
function latestSnapshotIndex() public view returns (uint256) {
return masonryHistory.length.sub(1);
}
function getLatestSnapshot() internal view returns (MasonrySnapshot memory) {
return masonryHistory[latestSnapshotIndex()];
}
function getLastSnapshotIndexOf(address masonUser) public view returns (uint256) {
return masons[masonUser].lastSnapshotIndex;
}
function getLastSnapshotOf(address masonUser) internal view returns (MasonrySnapshot memory) {
return masonryHistory[getLastSnapshotIndexOf(masonUser)];
}
function canWithdraw(address masonUser) external view returns (bool) {
return masons[masonUser].epochTimerStart.add(withdrawLockupEpochs) <= treasury.epoch();
}
function canClaimReward(address masonUser) external view returns (bool) {
return masons[masonUser].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch();
}
function rewardsWillBeBurned(address masonUser) external view returns (bool) {
return masons[masonUser].epochTimerStart.add(claimRewardsBurnEpochs) <= treasury.epoch(); // if the masonUser doesn't claim rewards in 2 weeks, the rewards will be burned
}
function epoch() external view returns (uint256) {
return treasury.epoch();
}
function nextEpochPoint() external view returns (uint256) {
return treasury.nextEpochPoint();
}
function getMothPrice() external view returns (uint256) {
return treasury.getMothPrice();
}
// =========== Users getters =========== //
function rewardPerShare() public view returns (uint256) {
return getLatestSnapshot().rewardPerShare;
}
function earned(address masonUser) public view returns (uint256) {
uint256 latestRPS = getLatestSnapshot().rewardPerShare;
uint256 storedRPS = getLastSnapshotOf(masonUser).rewardPerShare;
return balanceOf(masonUser).mul(latestRPS.sub(storedRPS)).div(1e18).add(masons[masonUser].rewardEarned);
}
/* ========== MUTATIVE FUNCTIONS ========== */
function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) {
require(amount > 0, "Masonry: Cannot stake 0");
super.stake(amount);
masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount) public override onlyOneBlock masonUserExists updateReward(msg.sender) {
require(amount > 0, "Masonry: Cannot withdraw 0");
require(masons[msg.sender].epochTimerStart.add(withdrawLockupEpochs) <= treasury.epoch(), "Masonry: still in withdraw lockup");
claimReward();
super.withdraw(amount);
emit Withdrawn(msg.sender, amount);
}
function exit() external {
withdraw(balanceOf(msg.sender));
}
function claimReward() public updateReward(msg.sender) {
uint256 reward = masons[msg.sender].rewardEarned;
if (reward > 0) {
require(masons[msg.sender].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch(), "Masonry: still in reward lockup");
bool willBurn = masons[msg.sender].epochTimerStart.add(claimRewardsBurnEpochs) <= treasury.epoch();
masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer
masons[msg.sender].rewardEarned = 0;
if (willBurn) {
moth.safeTransfer(buybackWalletAddress, reward);
emit RewardPaid(msg.sender, 0);
} else {
moth.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
}
function claimRewardOther(uint256 _mode) public updateReward(msg.sender) {
// _mode = 0 -> redeem
// _mode = 1 -> buy gsnake
require(claimRewardOtherEnabled, "Special claim not enabled");
require(_mode == 0 || _mode == 1, "Mode not supported");
uint256 reward = masons[msg.sender].rewardEarned;
if (reward > 0) {
require(masons[msg.sender].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch(), "Masonry: still in reward lockup");
bool willBurn = masons[msg.sender].epochTimerStart.add(claimRewardsBurnEpochs) <= treasury.epoch();
masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer
masons[msg.sender].rewardEarned = 0;
if (willBurn) {
moth.safeTransfer(buybackWalletAddress, reward);
emit RewardPaid(msg.sender, 0);
} else {
if (_mode == 0) {
moth.approve(mothRedeemAddress, reward);
uint256 redeemed = IMothRedeem(mothRedeemAddress).redeemMoth(reward);
moth.safeTransfer(msg.sender, redeemed);
emit RewardPaid(msg.sender, redeemed);
emit RewardOtherPaid(msg.sender, _mode, redeemed);
}
if (_mode == 1) {
moth.approve(mothRedeemAddress, reward);
uint256 redeemed = IMothRedeem(mothRedeemAddress).redeemMoth(reward);
share.approve(gmothZapperAddress, redeemed);
uint256 gmothAmount = IZapperGMoth(gmothZapperAddress).swapToGMoth(USDC, redeemed, address(share), msg.sender);
emit RewardPaid(msg.sender, 0);
emit RewardOtherPaid(msg.sender, _mode, gmothAmount);
}
}
}
}
function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator {
require(amount > 0, "Masonry: Cannot allocate 0");
require(totalSupply() > 0, "Masonry: Cannot allocate when totalSupply is 0");
// Create & add new snapshot
uint256 prevRPS = getLatestSnapshot().rewardPerShare;
uint256 nextRPS = prevRPS.add(amount.mul(1e18).div(totalSupply()));
MasonrySnapshot memory newSnapshot = MasonrySnapshot({
time: block.number,
rewardReceived: amount,
rewardPerShare: nextRPS
});
masonryHistory.push(newSnapshot);
moth.safeTransferFrom(msg.sender, address(this), amount);
emit RewardAdded(msg.sender, amount);
}
function governanceRecoverUnsupported(IERC20 _token, uint256 _amount, address _to) external onlyOperator {
// do not allow to drain core tokens
require(address(_token) != address(moth), "moth");
require(address(_token) != address(share), "share");
_token.safeTransfer(_to, _amount);
}
function setBuybackWalletAddress(address _buybackWalletAddress) external onlyOperator {
buybackWalletAddress = _buybackWalletAddress;
}
function setMothRedeemAddress(address _mothRedeemAddress) external onlyOperator {
mothRedeemAddress = _mothRedeemAddress;
}
function setGmothZapperAddress(address _gmothZapperAddress) external onlyOperator {
gmothZapperAddress = _gmothZapperAddress;
}
function setClaimRewardOtherEnabled(bool _enabled) external onlyOperator {
claimRewardOtherEnabled = _enabled;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBasisAsset {
function mint(address recipient, uint256 amount) external returns (bool);
function burn(uint256 amount) external;
function burnFrom(address from, uint256 amount) external;
function isOperator() external returns (bool);
function operator() external view returns (address);
function transferOperator(address newOperator_) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IMothRedeem {
function redeemMoth(uint256 amount) external returns (uint256); // Redeem Moth tokens for a reward
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ITreasury {
function epoch() external view returns (uint256);
function nextEpochPoint() external view returns (uint256);
function getMothPrice() external view returns (uint256);
function buyBonds(uint256 amount, uint256 targetPrice) external;
function redeemBonds(uint256 amount, uint256 targetPrice) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IZapperGMoth {
function swapToGMoth(address _from, uint amount, address _to, address recipient) external returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Operator is Context, Ownable {
address private _operator;
event OperatorTransferred(address indexed previousOperator, address indexed newOperator);
constructor() {
_operator = _msgSender();
emit OperatorTransferred(address(0), _operator);
}
function operator() public view returns (address) {
return _operator;
}
modifier onlyOperator() {
require(_operator == msg.sender, "operator: caller is not the operator");
_;
}
function isOperator() public view returns (bool) {
return _msgSender() == _operator;
}
function transferOperator(address newOperator_) public onlyOwner {
_transferOperator(newOperator_);
}
function _transferOperator(address newOperator_) internal {
require(newOperator_ != address(0), "operator: zero address given for new operator");
emit OperatorTransferred(address(0), newOperator_);
_operator = newOperator_;
}
function _renounceOperator() public onlyOwner {
emit OperatorTransferred(_operator, address(0));
_operator = address(0);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ContractGuard {
mapping(uint256 => mapping(address => bool)) private _status;
function checkSameOriginReentranted() internal view returns (bool) {
return _status[block.number][tx.origin];
}
function checkSameSenderReentranted() internal view returns (bool) {
return _status[block.number][msg.sender];
}
modifier onlyOneBlock() {
require(!checkSameOriginReentranted(), "ContractGuard: one block, one function");
require(!checkSameSenderReentranted(), "ContractGuard: one block, one function");
_;
_status[block.number][tx.origin] = true;
_status[block.number][msg.sender] = true;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"at","type":"uint256"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"mode","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardOtherPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_renounceOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateSeigniorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buybackWalletAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"canClaimReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mode","type":"uint256"}],"name":"claimRewardOther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewardOtherEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewardsBurnEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"getLastSnapshotIndexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMothPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gmothZapperAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_moth","type":"address"},{"internalType":"contract IERC20","name":"_share","type":"address"},{"internalType":"contract ITreasury","name":"_treasury","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestSnapshotIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"masonryHistory","outputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"rewardReceived","type":"uint256"},{"internalType":"uint256","name":"rewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"masons","outputs":[{"internalType":"uint256","name":"lastSnapshotIndex","type":"uint256"},{"internalType":"uint256","name":"rewardEarned","type":"uint256"},{"internalType":"uint256","name":"epochTimerStart","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"moth","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mothRedeemAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextEpochPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardLockupEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masonUser","type":"address"}],"name":"rewardsWillBeBurned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buybackWalletAddress","type":"address"}],"name":"setBuybackWalletAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setClaimRewardOtherEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gmothZapperAddress","type":"address"}],"name":"setGmothZapperAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_claimRewardsBurnEpochs","type":"uint256"}],"name":"setLockUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mothRedeemAddress","type":"address"}],"name":"setMothRedeemAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"share","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLockupEpochs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040526005805460ff60a01b19908116909155600a80549091169055348015602857600080fd5b506030336074565b600580546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a360c6565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612cd1806100d56000396000f3fe608060405234801561001057600080fd5b506004361061029f5760003560e01c8063715018a611610167578063b3ab15fb116100ce578063d558875111610087578063d5588751146105bc578063e0f6dc9e146105cf578063e249ba77146105fe578063e80b025114610611578063e9fad8ee14610624578063f2fde38b1461062c57600080fd5b8063b3ab15fb14610560578063b88a802f14610573578063c0c53b8b1461057b578063c5967c261461058e578063caa05eb914610596578063ceccf59a146105a957600080fd5b8063900cf0cf11610120578063900cf0cf1461050e57806397ffe1d714610516578063a694fc3a14610529578063a894a1ee1461053c578063a8d5fd6514610545578063b1135f601461055857600080fd5b8063715018a6146104915780637e599ee81461049957806389a30271146104ac5780638a27f103146104c75780638cd9a27f146104cf5780638da5cb5b146104fd57600080fd5b80633f9e3f041161020b5780635d241db6116101c45780635d241db6146103f357806361d027b31461040657806364a012a01461041957806366825d301461042c57806370a082311461043f578063714b46581461046857600080fd5b80633f9e3f04146103855780634456eda21461038d578063446a2ec8146103a057806346622f60146103a857806354575af4146103bb578063570ca735146103ce57600080fd5b806319262d301161025d57806319262d30146103255780631e85cd6514610338578063295299f91461034157806329605e77146103555780632ab6f8db1461036a5780632e1a7d4d1461037257600080fd5b80628cc262146102a4578063022ba18d146102ca578063046335d0146102d35780630666798a146102f6578063158ef93e1461030957806318160ddd1461031d575b600080fd5b6102b76102b23660046129a7565b61063f565b6040519081526020015b60405180910390f35b6102b7600e5481565b6102e66102e13660046129a7565b6106d0565b60405190151581526020016102c1565b6102e66103043660046129a7565b61076e565b6005546102e690600160a01b900460ff1681565b6001546102b7565b6102e66103333660046129a7565b610804565b6102b7600d5481565b600a546102e690600160a01b900460ff1681565b6103686103633660046129a7565b61089a565b005b6103686108ae565b6103686103803660046129cb565b6108eb565b6102b7610c21565b6005546001600160a01b031633146102e6565b6102b7610c37565b6103686103b63660046129a7565b610c4a565b6103686103c93660046129e4565b610c96565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016102c1565b600a546103db906001600160a01b031681565b6007546103db906001600160a01b031681565b6103686104273660046129a7565b610d66565b6009546103db906001600160a01b031681565b6102b761044d3660046129a7565b6001600160a01b031660009081526002602052604090205490565b6102b76104763660046129a7565b6001600160a01b03166000908152600b602052604090205490565b610368610db2565b6006546103db906001600160a01b031681565b6103db73176211869ca2b568f2a7d4ee941e073a821ee1ff81565b610368610dc4565b6104e26104dd3660046129cb565b610e16565b604080519384526020840192909252908201526060016102c1565b6004546001600160a01b03166103db565b6102b7610e49565b6103686105243660046129cb565b610eb7565b6103686105373660046129cb565b611187565b6102b7600f5481565b6000546103db906001600160a01b031681565b6102b76113a7565b61036861056e3660046129a7565b6113f1565b610368611424565b610368610589366004612a26565b61175f565b6102b7611920565b6103686105a4366004612a74565b61196a565b6103686105b7366004612a91565b6119b2565b6008546103db906001600160a01b031681565b6104e26105dd3660046129a7565b600b6020526000908152604090208054600182015460029092015490919083565b61036861060c3660046129cb565b611ad4565b61036861061f3660046129a7565b61225a565b6103686122a6565b61036861063a3660046129a7565b6122bf565b60008061064a612335565b604001519050600061065b846123af565b6040908101516001600160a01b0386166000908152600b60205291909120600101549091506106c8906106c2670de0b6b3a76400006106bc61069d8787612442565b6001600160a01b038a1660009081526002602052604090205490612457565b90612463565b9061246f565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa15801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190612abd565b600e546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156107b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dc9190612abd565b600f546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190612abd565b600d546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b6108a261247b565b6108ab816124d5565b50565b6005546001600160a01b031633146108e15760405162461bcd60e51b81526004016108d890612ad6565b60405180910390fd5b6108e9610dc4565b565b43600090815260036020908152604080832032845290915290205460ff16156109265760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff16156109615760405162461bcd60e51b81526004016108d890612b1a565b33600090815260026020526040812054116109cc5760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016108d8565b338015610a5d576001600160a01b0381166000908152600b60209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152610a1b8261063f565b6020820152610a28610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b60008211610aad5760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016108d8565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612abd565b600d54336000908152600b6020526040902060020154610b439161246f565b1115610b9b5760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016108d8565b610ba3611424565b610bac82612599565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600c54600090610c32906001612442565b905090565b6000610c41612335565b60400151905090565b6005546001600160a01b03163314610c745760405162461bcd60e51b81526004016108d890612ad6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610cc05760405162461bcd60e51b81526004016108d890612ad6565b6006546001600160a01b0390811690841603610d075760405162461bcd60e51b81526004016108d8906020808252600490820152630dadee8d60e31b604082015260600190565b6000546001600160a01b0390811690841603610d4d5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016108d8565b610d616001600160a01b0384168284612657565b505050565b6005546001600160a01b03163314610d905760405162461bcd60e51b81526004016108d890612ad6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610dba61247b565b6108e960006126ba565b610dcc61247b565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b600c8181548110610e2657600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c329190612abd565b43600090815260036020908152604080832032845290915290205460ff1615610ef25760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff1615610f2d5760405162461bcd60e51b81526004016108d890612b1a565b6005546001600160a01b03163314610f575760405162461bcd60e51b81526004016108d890612ad6565b60008111610fa75760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016108d8565b6000610fb260015490565b116110165760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016108d8565b6000611020612335565b604001519050600061105061104961103760015490565b6106bc86670de0b6b3a7640000612457565b839061246f565b6040805160608101825243815260208101868152918101838152600c805460018101825560009190915282517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760039092029182015592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8840155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c99092019190915560065491925090611111906001600160a01b031633308761270c565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff16156111c25760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff16156111fd5760405162461bcd60e51b81526004016108d890612b1a565b33801561128e576001600160a01b0381166000908152600b6020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261124c8261063f565b6020820152611259610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b600082116112de5760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016108d8565b6112e782612744565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561133a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135e9190612abd565b336000818152600b6020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610bda9085815260200190565b600754604080516305889afb60e51b815290516000926001600160a01b03169163b1135f609160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b6005546001600160a01b0316331461141b5760405162461bcd60e51b81526004016108d890612ad6565b6108ab8161089a565b3380156114b5576001600160a01b0381166000908152600b602090815260409182902082516060810184528154815260018201549281019290925260020154918101919091526114738261063f565b6020820152611480610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b336000908152600b6020526040902060010154801561175b57600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611521573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115459190612abd565b600e54336000908152600b60205260409020600201546115649161246f565b11156115b25760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016108d8565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156115fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116209190612abd565b600f54336000908152600b602052604090206002015461163f9161246f565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ba9190612abd565b336000908152600b6020526040812060028101929092556001909101558015611724576008546006546116fa916001600160a01b03918216911684612657565b604051600081523390600080516020612c7c833981519152906020015b60405180910390a2505050565b60065461173b906001600160a01b03163384612657565b6040518281523390600080516020612c7c83398151915290602001611717565b5050565b600554600160a01b900460ff16156117b95760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016108d8565b6005546001600160a01b031633146117e35760405162461bcd60e51b81526004016108d890612ad6565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600c80546001810182559752845160039097027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c781019790975590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8870155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9909501949094556004600d556002600e556008600f556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b6005546001600160a01b031633146119945760405162461bcd60e51b81526004016108d890612ad6565b600a8054911515600160a01b0260ff60a01b19909216919091179055565b6005546001600160a01b031633146119dc5760405162461bcd60e51b81526004016108d890612ad6565b8183101580156119ed575060388311155b80156119fa575060388111155b611a525760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016108d8565b600083118015611a625750600082115b8015611a6e5750600081115b611ac65760405162461bcd60e51b815260206004820152602360248201527f6c6f636b757045706f636873206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016108d8565b600d92909255600e55600f55565b338015611b65576001600160a01b0381166000908152600b60209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152611b238261063f565b6020820152611b30610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b600a54600160a01b900460ff16611bbe5760405162461bcd60e51b815260206004820152601960248201527f5370656369616c20636c61696d206e6f7420656e61626c65640000000000000060448201526064016108d8565b811580611bcb5750816001145b611c0c5760405162461bcd60e51b8152602060048201526012602482015271135bd919481b9bdd081cdd5c1c1bdc9d195960721b60448201526064016108d8565b336000908152600b60205260409020600101548015610d6157600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9c9190612abd565b600e54336000908152600b6020526040902060020154611cbb9161246f565b1115611d095760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016108d8565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015611d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d779190612abd565b600f54336000908152600b6020526040902060020154611d969161246f565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ded573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e119190612abd565b336000908152600b6020526040812060028101929092556001909101558015611e7a57600854600654611e51916001600160a01b03918216911684612657565b604051600081523390600080516020612c7c8339815191529060200160405180910390a2612254565b83600003611fe65760065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810185905291169063095ea7b3906044016020604051808303816000875af1158015611ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efb9190612b60565b5060095460405163da55cf4560e01b8152600481018490526000916001600160a01b03169063da55cf45906024016020604051808303816000875af1158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c9190612abd565b600654909150611f86906001600160a01b03163383612657565b6040518181523390600080516020612c7c8339815191529060200160405180910390a2604080518681526020810183905233917f7c1ea61d49b6a1e5b8de62a6b25d74edc1edb985558ca4ab20f0e5cd2d606864910160405180910390a2505b836001036122545760065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810185905291169063095ea7b3906044016020604051808303816000875af1158015612043573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120679190612b60565b5060095460405163da55cf4560e01b8152600481018490526000916001600160a01b03169063da55cf45906024016020604051808303816000875af11580156120b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d89190612abd565b600054600a5460405163095ea7b360e01b81526001600160a01b03918216600482015260248101849052929350169063095ea7b3906044016020604051808303816000875af115801561212f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121539190612b60565b50600a5460008054604051635cb221af60e01b815273176211869ca2b568f2a7d4ee941e073a821ee1ff6004820152602481018590526001600160a01b03918216604482015233606482015291921690635cb221af906084016020604051808303816000875af11580156121cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ef9190612abd565b604051600081529091503390600080516020612c7c8339815191529060200160405180910390a2604080518781526020810183905233917f7c1ea61d49b6a1e5b8de62a6b25d74edc1edb985558ca4ab20f0e5cd2d606864910160405180910390a250505b50505050565b6005546001600160a01b031633146122845760405162461bcd60e51b81526004016108d890612ad6565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600260205260409020546108e9906108eb565b6122c761247b565b6001600160a01b03811661232c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d8565b6108ab816126ba565b61235960405180606001604052806000815260200160008152602001600081525090565b600c612363610c21565b8154811061237357612373612b7d565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b6123d360405180606001604052806000815260200160008152602001600081525090565b600c6123f4836001600160a01b03166000908152600b602052604090205490565b8154811061240457612404612b7d565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b600061244e8284612ba9565b90505b92915050565b600061244e8284612bbc565b600061244e8284612bd3565b600061244e8284612bf5565b6004546001600160a01b031633146108e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108d8565b6001600160a01b0381166125415760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016108d8565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260026020526040902054818110156126165760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016108d8565b6001546126239083612442565b6001556126308183612442565b33600081815260026020526040812092909255905461175b916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610d6190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261279a565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526122549085906323b872dd60e01b90608401612683565b600154612751908261246f565b6001553360009081526002602052604090205461276e908261246f565b3360008181526002602052604081209290925590546108ab916001600160a01b0390911690308461270c565b60006127ef826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661286f9092919063ffffffff16565b90508051600014806128105750808060200190518101906128109190612b60565b610d615760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d8565b60606106c8848460008585600080866001600160a01b031685876040516128969190612c2c565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e9878383876128f4565b979650505050505050565b6060831561296357825160000361295c576001600160a01b0385163b61295c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d8565b50816106c8565b6106c883838151156129785781518083602001fd5b8060405162461bcd60e51b81526004016108d89190612c48565b6001600160a01b03811681146108ab57600080fd5b6000602082840312156129b957600080fd5b81356129c481612992565b9392505050565b6000602082840312156129dd57600080fd5b5035919050565b6000806000606084860312156129f957600080fd5b8335612a0481612992565b9250602084013591506040840135612a1b81612992565b809150509250925092565b600080600060608486031215612a3b57600080fd5b8335612a4681612992565b92506020840135612a5681612992565b91506040840135612a1b81612992565b80151581146108ab57600080fd5b600060208284031215612a8657600080fd5b81356129c481612a66565b600080600060608486031215612aa657600080fd5b505081359360208301359350604090920135919050565b600060208284031215612acf57600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b600060208284031215612b7257600080fd5b81516129c481612a66565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561245157612451612b93565b808202811582820484141761245157612451612b93565b600082612bf057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561245157612451612b93565b60005b83811015612c23578181015183820152602001612c0b565b50506000910152565b60008251612c3e818460208701612c08565b9190910192915050565b6020815260008251806020840152612c67816040850160208701612c08565b601f01601f1916919091016040019291505056fee2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486a2646970667358221220bb78ba17060d50f84b88aef91c112ccb00c73c464e840782d76c0dafe2529b9f64736f6c634300081a0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061029f5760003560e01c8063715018a611610167578063b3ab15fb116100ce578063d558875111610087578063d5588751146105bc578063e0f6dc9e146105cf578063e249ba77146105fe578063e80b025114610611578063e9fad8ee14610624578063f2fde38b1461062c57600080fd5b8063b3ab15fb14610560578063b88a802f14610573578063c0c53b8b1461057b578063c5967c261461058e578063caa05eb914610596578063ceccf59a146105a957600080fd5b8063900cf0cf11610120578063900cf0cf1461050e57806397ffe1d714610516578063a694fc3a14610529578063a894a1ee1461053c578063a8d5fd6514610545578063b1135f601461055857600080fd5b8063715018a6146104915780637e599ee81461049957806389a30271146104ac5780638a27f103146104c75780638cd9a27f146104cf5780638da5cb5b146104fd57600080fd5b80633f9e3f041161020b5780635d241db6116101c45780635d241db6146103f357806361d027b31461040657806364a012a01461041957806366825d301461042c57806370a082311461043f578063714b46581461046857600080fd5b80633f9e3f04146103855780634456eda21461038d578063446a2ec8146103a057806346622f60146103a857806354575af4146103bb578063570ca735146103ce57600080fd5b806319262d301161025d57806319262d30146103255780631e85cd6514610338578063295299f91461034157806329605e77146103555780632ab6f8db1461036a5780632e1a7d4d1461037257600080fd5b80628cc262146102a4578063022ba18d146102ca578063046335d0146102d35780630666798a146102f6578063158ef93e1461030957806318160ddd1461031d575b600080fd5b6102b76102b23660046129a7565b61063f565b6040519081526020015b60405180910390f35b6102b7600e5481565b6102e66102e13660046129a7565b6106d0565b60405190151581526020016102c1565b6102e66103043660046129a7565b61076e565b6005546102e690600160a01b900460ff1681565b6001546102b7565b6102e66103333660046129a7565b610804565b6102b7600d5481565b600a546102e690600160a01b900460ff1681565b6103686103633660046129a7565b61089a565b005b6103686108ae565b6103686103803660046129cb565b6108eb565b6102b7610c21565b6005546001600160a01b031633146102e6565b6102b7610c37565b6103686103b63660046129a7565b610c4a565b6103686103c93660046129e4565b610c96565b6005546001600160a01b03165b6040516001600160a01b0390911681526020016102c1565b600a546103db906001600160a01b031681565b6007546103db906001600160a01b031681565b6103686104273660046129a7565b610d66565b6009546103db906001600160a01b031681565b6102b761044d3660046129a7565b6001600160a01b031660009081526002602052604090205490565b6102b76104763660046129a7565b6001600160a01b03166000908152600b602052604090205490565b610368610db2565b6006546103db906001600160a01b031681565b6103db73176211869ca2b568f2a7d4ee941e073a821ee1ff81565b610368610dc4565b6104e26104dd3660046129cb565b610e16565b604080519384526020840192909252908201526060016102c1565b6004546001600160a01b03166103db565b6102b7610e49565b6103686105243660046129cb565b610eb7565b6103686105373660046129cb565b611187565b6102b7600f5481565b6000546103db906001600160a01b031681565b6102b76113a7565b61036861056e3660046129a7565b6113f1565b610368611424565b610368610589366004612a26565b61175f565b6102b7611920565b6103686105a4366004612a74565b61196a565b6103686105b7366004612a91565b6119b2565b6008546103db906001600160a01b031681565b6104e26105dd3660046129a7565b600b6020526000908152604090208054600182015460029092015490919083565b61036861060c3660046129cb565b611ad4565b61036861061f3660046129a7565b61225a565b6103686122a6565b61036861063a3660046129a7565b6122bf565b60008061064a612335565b604001519050600061065b846123af565b6040908101516001600160a01b0386166000908152600b60205291909120600101549091506106c8906106c2670de0b6b3a76400006106bc61069d8787612442565b6001600160a01b038a1660009081526002602052604090205490612457565b90612463565b9061246f565b949350505050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa15801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e9190612abd565b600e546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b111592915050565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156107b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107dc9190612abd565b600f546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa15801561084e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108729190612abd565b600d546001600160a01b0384166000908152600b60205260409020600201546107669161246f565b6108a261247b565b6108ab816124d5565b50565b6005546001600160a01b031633146108e15760405162461bcd60e51b81526004016108d890612ad6565b60405180910390fd5b6108e9610dc4565b565b43600090815260036020908152604080832032845290915290205460ff16156109265760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff16156109615760405162461bcd60e51b81526004016108d890612b1a565b33600090815260026020526040812054116109cc5760405162461bcd60e51b815260206004820152602560248201527f4d61736f6e72793a20546865206d61736f6e5573657220646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016108d8565b338015610a5d576001600160a01b0381166000908152600b60209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152610a1b8261063f565b6020820152610a28610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b60008211610aad5760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f74207769746864726177203000000000000060448201526064016108d8565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612abd565b600d54336000908152600b6020526040902060020154610b439161246f565b1115610b9b5760405162461bcd60e51b815260206004820152602160248201527f4d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b756044820152600760fc1b60648201526084016108d8565b610ba3611424565b610bac82612599565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b600c54600090610c32906001612442565b905090565b6000610c41612335565b60400151905090565b6005546001600160a01b03163314610c745760405162461bcd60e51b81526004016108d890612ad6565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610cc05760405162461bcd60e51b81526004016108d890612ad6565b6006546001600160a01b0390811690841603610d075760405162461bcd60e51b81526004016108d8906020808252600490820152630dadee8d60e31b604082015260600190565b6000546001600160a01b0390811690841603610d4d5760405162461bcd60e51b8152602060048201526005602482015264736861726560d81b60448201526064016108d8565b610d616001600160a01b0384168284612657565b505050565b6005546001600160a01b03163314610d905760405162461bcd60e51b81526004016108d890612ad6565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610dba61247b565b6108e960006126ba565b610dcc61247b565b6005546040516000916001600160a01b0316907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908390a3600580546001600160a01b0319169055565b600c8181548110610e2657600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c329190612abd565b43600090815260036020908152604080832032845290915290205460ff1615610ef25760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff1615610f2d5760405162461bcd60e51b81526004016108d890612b1a565b6005546001600160a01b03163314610f575760405162461bcd60e51b81526004016108d890612ad6565b60008111610fa75760405162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465203000000000000060448201526064016108d8565b6000610fb260015490565b116110165760405162461bcd60e51b815260206004820152602e60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f60448201526d074616c537570706c7920697320360941b60648201526084016108d8565b6000611020612335565b604001519050600061105061104961103760015490565b6106bc86670de0b6b3a7640000612457565b839061246f565b6040805160608101825243815260208101868152918101838152600c805460018101825560009190915282517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c760039092029182015592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8840155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c99092019190915560065491925090611111906001600160a01b031633308761270c565b60405184815233907fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e299060200160405180910390a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b43600090815260036020908152604080832032845290915290205460ff16156111c25760405162461bcd60e51b81526004016108d890612b1a565b43600090815260036020908152604080832033845290915290205460ff16156111fd5760405162461bcd60e51b81526004016108d890612b1a565b33801561128e576001600160a01b0381166000908152600b6020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261124c8261063f565b6020820152611259610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b600082116112de5760405162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b65203000000000000000000060448201526064016108d8565b6112e782612744565b600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561133a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135e9190612abd565b336000818152600b6020526040908190206002019290925590517f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d90610bda9085815260200190565b600754604080516305889afb60e51b815290516000926001600160a01b03169163b1135f609160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b6005546001600160a01b0316331461141b5760405162461bcd60e51b81526004016108d890612ad6565b6108ab8161089a565b3380156114b5576001600160a01b0381166000908152600b602090815260409182902082516060810184528154815260018201549281019290925260020154918101919091526114738261063f565b6020820152611480610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b336000908152600b6020526040902060010154801561175b57600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611521573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115459190612abd565b600e54336000908152600b60205260409020600201546115649161246f565b11156115b25760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016108d8565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa1580156115fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116209190612abd565b600f54336000908152600b602052604090206002015461163f9161246f565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ba9190612abd565b336000908152600b6020526040812060028101929092556001909101558015611724576008546006546116fa916001600160a01b03918216911684612657565b604051600081523390600080516020612c7c833981519152906020015b60405180910390a2505050565b60065461173b906001600160a01b03163384612657565b6040518281523390600080516020612c7c83398151915290602001611717565b5050565b600554600160a01b900460ff16156117b95760405162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a65640000000060448201526064016108d8565b6005546001600160a01b031633146117e35760405162461bcd60e51b81526004016108d890612ad6565b600680546001600160a01b038581166001600160a01b03199283161790925560008054858416908316178155600780549385169390921692909217905560408051606081018252438082526020808301858152838501868152600c80546001810182559752845160039097027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c781019790975590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8870155517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c9909501949094556004600d556002600e556008600f556005805460ff60a01b1916600160a01b17905591519182529133917f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce79910160405180910390a250505050565b600754604080516362cb3e1360e11b815290516000926001600160a01b03169163c5967c269160048083019260209291908290030181865afa158015610e93573d6000803e3d6000fd5b6005546001600160a01b031633146119945760405162461bcd60e51b81526004016108d890612ad6565b600a8054911515600160a01b0260ff60a01b19909216919091179055565b6005546001600160a01b031633146119dc5760405162461bcd60e51b81526004016108d890612ad6565b8183101580156119ed575060388311155b80156119fa575060388111155b611a525760405162461bcd60e51b815260206004820152602360248201527f5f77697468647261774c6f636b757045706f6368733a206f7574206f662072616044820152626e676560e81b60648201526084016108d8565b600083118015611a625750600082115b8015611a6e5750600081115b611ac65760405162461bcd60e51b815260206004820152602360248201527f6c6f636b757045706f636873206d75737420626520677265617465722074686160448201526206e20360ec1b60648201526084016108d8565b600d92909255600e55600f55565b338015611b65576001600160a01b0381166000908152600b60209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152611b238261063f565b6020820152611b30610c21565b81526001600160a01b0382166000908152600b6020908152604091829020835181559083015160018201559101516002909101555b600a54600160a01b900460ff16611bbe5760405162461bcd60e51b815260206004820152601960248201527f5370656369616c20636c61696d206e6f7420656e61626c65640000000000000060448201526064016108d8565b811580611bcb5750816001145b611c0c5760405162461bcd60e51b8152602060048201526012602482015271135bd919481b9bdd081cdd5c1c1bdc9d195960721b60448201526064016108d8565b336000908152600b60205260409020600101548015610d6157600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9c9190612abd565b600e54336000908152600b6020526040902060020154611cbb9161246f565b1115611d095760405162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b75700060448201526064016108d8565b6007546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf9160048083019260209291908290030181865afa158015611d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d779190612abd565b600f54336000908152600b6020526040902060020154611d969161246f565b11159050600760009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ded573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e119190612abd565b336000908152600b6020526040812060028101929092556001909101558015611e7a57600854600654611e51916001600160a01b03918216911684612657565b604051600081523390600080516020612c7c8339815191529060200160405180910390a2612254565b83600003611fe65760065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810185905291169063095ea7b3906044016020604051808303816000875af1158015611ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efb9190612b60565b5060095460405163da55cf4560e01b8152600481018490526000916001600160a01b03169063da55cf45906024016020604051808303816000875af1158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c9190612abd565b600654909150611f86906001600160a01b03163383612657565b6040518181523390600080516020612c7c8339815191529060200160405180910390a2604080518681526020810183905233917f7c1ea61d49b6a1e5b8de62a6b25d74edc1edb985558ca4ab20f0e5cd2d606864910160405180910390a2505b836001036122545760065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810185905291169063095ea7b3906044016020604051808303816000875af1158015612043573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120679190612b60565b5060095460405163da55cf4560e01b8152600481018490526000916001600160a01b03169063da55cf45906024016020604051808303816000875af11580156120b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d89190612abd565b600054600a5460405163095ea7b360e01b81526001600160a01b03918216600482015260248101849052929350169063095ea7b3906044016020604051808303816000875af115801561212f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121539190612b60565b50600a5460008054604051635cb221af60e01b815273176211869ca2b568f2a7d4ee941e073a821ee1ff6004820152602481018590526001600160a01b03918216604482015233606482015291921690635cb221af906084016020604051808303816000875af11580156121cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ef9190612abd565b604051600081529091503390600080516020612c7c8339815191529060200160405180910390a2604080518781526020810183905233917f7c1ea61d49b6a1e5b8de62a6b25d74edc1edb985558ca4ab20f0e5cd2d606864910160405180910390a250505b50505050565b6005546001600160a01b031633146122845760405162461bcd60e51b81526004016108d890612ad6565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600260205260409020546108e9906108eb565b6122c761247b565b6001600160a01b03811661232c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108d8565b6108ab816126ba565b61235960405180606001604052806000815260200160008152602001600081525090565b600c612363610c21565b8154811061237357612373612b7d565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b6123d360405180606001604052806000815260200160008152602001600081525090565b600c6123f4836001600160a01b03166000908152600b602052604090205490565b8154811061240457612404612b7d565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b600061244e8284612ba9565b90505b92915050565b600061244e8284612bbc565b600061244e8284612bd3565b600061244e8284612bf5565b6004546001600160a01b031633146108e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108d8565b6001600160a01b0381166125415760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b60648201526084016108d8565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260026020526040902054818110156126165760405162461bcd60e51b815260206004820152603460248201527f4d61736f6e72793a2077697468647261772072657175657374206772656174656044820152731c881d1a185b881cdd185ad95908185b5bdd5b9d60621b60648201526084016108d8565b6001546126239083612442565b6001556126308183612442565b33600081815260026020526040812092909255905461175b916001600160a01b0390911690845b6040516001600160a01b038316602482015260448101829052610d6190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261279a565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526122549085906323b872dd60e01b90608401612683565b600154612751908261246f565b6001553360009081526002602052604090205461276e908261246f565b3360008181526002602052604081209290925590546108ab916001600160a01b0390911690308461270c565b60006127ef826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661286f9092919063ffffffff16565b90508051600014806128105750808060200190518101906128109190612b60565b610d615760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d8565b60606106c8848460008585600080866001600160a01b031685876040516128969190612c2c565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e9878383876128f4565b979650505050505050565b6060831561296357825160000361295c576001600160a01b0385163b61295c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d8565b50816106c8565b6106c883838151156129785781518083602001fd5b8060405162461bcd60e51b81526004016108d89190612c48565b6001600160a01b03811681146108ab57600080fd5b6000602082840312156129b957600080fd5b81356129c481612992565b9392505050565b6000602082840312156129dd57600080fd5b5035919050565b6000806000606084860312156129f957600080fd5b8335612a0481612992565b9250602084013591506040840135612a1b81612992565b809150509250925092565b600080600060608486031215612a3b57600080fd5b8335612a4681612992565b92506020840135612a5681612992565b91506040840135612a1b81612992565b80151581146108ab57600080fd5b600060208284031215612a8657600080fd5b81356129c481612a66565b600080600060608486031215612aa657600080fd5b505081359360208301359350604090920135919050565b600060208284031215612acf57600080fd5b5051919050565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b60208082526026908201527f436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756040820152653731ba34b7b760d11b606082015260800190565b600060208284031215612b7257600080fd5b81516129c481612a66565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561245157612451612b93565b808202811582820484141761245157612451612b93565b600082612bf057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561245157612451612b93565b60005b83811015612c23578181015183820152602001612c0b565b50506000910152565b60008251612c3e818460208701612c08565b9190910192915050565b6020815260008251806020840152612c67816040850160208701612c08565b601f01601f1916919091016040019291505056fee2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486a2646970667358221220bb78ba17060d50f84b88aef91c112ccb00c73c464e840782d76c0dafe2529b9f64736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.