Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0x22c284489f4d4a568403dba9e879d054c08b591022b68e0a568c6f2f363dedfe | 31461864 | 404 days 11 hrs ago | FDoge Finance: Deployer | Contract Creation | 0 FTM |
[ Download CSV Export ]
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:
DogeBoardRoom
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "../interfaces/IERC20.sol"; import "../lib/SafeERC20.sol"; import "../utils/ContractGuard.sol"; import "../interfaces/IBasisAsset.sol"; import "../interfaces/ITreasury.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 masonShare = _balances[msg.sender]; require(masonShare >= amount, "Masonry: withdraw request greater than staked amount"); _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = masonShare.sub(amount); share.safeTransfer(msg.sender, amount); } } contract DogeBoardRoom is ShareWrapper, ContractGuard { 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 ========== */ // governance address public operator; // flags bool public initialized = false; IERC20 public tomb; ITreasury public treasury; mapping(address => Masonseat) public masons; MasonrySnapshot[] public masonryHistory; uint256 public withdrawLockupEpochs; uint256 public rewardLockupEpochs; /* ========== 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 RewardAdded(address indexed user, uint256 reward); /* ========== Modifiers =============== */ modifier onlyOperator() { require(operator == msg.sender, "Masonry: caller is not the operator"); _; } modifier masonExists() { require(balanceOf(msg.sender) > 0, "Masonry: The mason does not exist"); _; } modifier updateReward(address mason) { if (mason != address(0)) { Masonseat memory seat = masons[mason]; seat.rewardEarned = earned(mason); seat.lastSnapshotIndex = latestSnapshotIndex(); masons[mason] = seat; } _; } modifier notInitialized() { require(!initialized, "Masonry: already initialized"); _; } /* ========== GOVERNANCE ========== */ function initialize(IERC20 _tomb, IERC20 _share, ITreasury _treasury ) public notInitialized { tomb = _tomb; share = _share; treasury = _treasury; MasonrySnapshot memory genesisSnapshot = MasonrySnapshot({time: block.number, rewardReceived: 0, rewardPerShare: 0}); masonryHistory.push(genesisSnapshot); withdrawLockupEpochs = 6; // Lock for 6 epochs (36h) before release withdraw rewardLockupEpochs = 3; // Lock for 3 epochs (18h) before release claimReward initialized = true; operator = msg.sender; emit Initialized(msg.sender, block.number); } function setAddr(IERC20 _tomb, IERC20 _share, ITreasury _treasury) external onlyOperator { tomb = _tomb; share = _share; treasury = _treasury; } function setOperator(address _operator) external onlyOperator { operator = _operator; } function setLockUp(uint256 _withdrawLockupEpochs, uint256 _rewardLockupEpochs) external onlyOperator { require(_withdrawLockupEpochs >= _rewardLockupEpochs && _withdrawLockupEpochs <= 56, "_withdrawLockupEpochs: out of range"); // <= 2 week withdrawLockupEpochs = _withdrawLockupEpochs; rewardLockupEpochs = _rewardLockupEpochs; } /* ========== 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 mason) public view returns (uint256) { return masons[mason].lastSnapshotIndex; } function getLastSnapshotOf(address mason) internal view returns (MasonrySnapshot memory) { return masonryHistory[getLastSnapshotIndexOf(mason)]; } function canWithdraw(address mason) external view returns (bool) { return masons[mason].epochTimerStart.add(withdrawLockupEpochs) <= treasury.epoch(); } function canClaimReward(address mason) external view returns (bool) { return masons[mason].epochTimerStart.add(rewardLockupEpochs) <= treasury.epoch(); } function epoch() external view returns (uint256) { return treasury.epoch(); } function nextEpochPoint() external view returns (uint256) { return treasury.nextEpochPoint(); } function getTombPrice() external view returns (uint256) { return treasury.getTombPrice(); } // =========== Mason getters function rewardPerShare() public view returns (uint256) { return getLatestSnapshot().rewardPerShare; } function earned(address mason) public view returns (uint256) { uint256 latestRPS = getLatestSnapshot().rewardPerShare; uint256 storedRPS = getLastSnapshotOf(mason).rewardPerShare; return balanceOf(mason).mul(latestRPS.sub(storedRPS)).div(1e18).add(masons[mason].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 masonExists 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"); masons[msg.sender].epochTimerStart = treasury.epoch(); // reset timer masons[msg.sender].rewardEarned = 0; tomb.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } 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); tomb.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(tomb), "tomb"); require(address(_token) != address(share), "share"); _token.safeTransfer(_to, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; import "../interfaces/IERC20.sol"; import "../lib/SafeMath.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 ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } 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' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; 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; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.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.6.12; interface ITreasury { function epoch() external view returns (uint256); function nextEpochPoint() external view returns (uint256); function getTombPrice() external view returns (uint256); function buyBonds(uint256 amount, uint256 targetPrice) external; function redeemBonds(uint256 amount, uint256 targetPrice) external; }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.2; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"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":"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":[{"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":[{"internalType":"address","name":"mason","type":"address"}],"name":"canClaimReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"mason","type":"address"}],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mason","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":"mason","type":"address"}],"name":"getLastSnapshotIndexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTombPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_tomb","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":"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":"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":"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":"contract IERC20","name":"_tomb","type":"address"},{"internalType":"contract IERC20","name":"_share","type":"address"},{"internalType":"contract ITreasury","name":"_treasury","type":"address"}],"name":"setAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawLockupEpochs","type":"uint256"},{"internalType":"uint256","name":"_rewardLockupEpochs","type":"uint256"}],"name":"setLockUp","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":"tomb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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
60806040526004805460ff60a01b1916905534801561001d57600080fd5b506121a68061002d6000396000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c806361d027b311610104578063a8d5fd65116100a2578063c0c53b8b11610071578063c0c53b8b14610491578063c5967c26146104c9578063e0f6dc9e146104d1578063e9fad8ee146104f7576101d9565b8063a8d5fd6514610453578063b3ab15fb1461045b578063b88a802f14610481578063c040f23a14610489576101d9565b80638cd9a27f116100de5780638cd9a27f146103d6578063900cf0cf1461041157806397ffe1d714610419578063a694fc3a14610436576101d9565b806361d027b31461038257806370a082311461038a578063714b4658146103b0576101d9565b80631e85cd651161017c578063446a2ec81161014b578063446a2ec8146102e857806354575af4146102f0578063570ca735146103265780636153c8c11461034a576101d9565b80631e85cd65146102965780632e1a7d4d1461029e5780632ffaaa09146102bd5780633f9e3f04146102e0576101d9565b806309bb4f92116101b857806309bb4f9214610258578063158ef93e1461026057806318160ddd1461026857806319262d3014610270576101d9565b80628cc262146101de578063022ba18d14610216578063046335d01461021e575b600080fd5b610204600480360360208110156101f457600080fd5b50356001600160a01b03166104ff565b60408051918252519081900360200190f35b610204610580565b6102446004803603602081101561023457600080fd5b50356001600160a01b0316610586565b604080519115158252519081900360200190f35b610204610627565b6102446106b6565b6102046106c6565b6102446004803603602081101561028657600080fd5b50356001600160a01b03166106cc565b610204610765565b6102bb600480360360208110156102b457600080fd5b503561076b565b005b6102bb600480360360408110156102d357600080fd5b5080359060200135610a85565b610204610b25565b610204610b3b565b6102bb6004803603606081101561030657600080fd5b506001600160a01b03813581169160208101359160409091013516610b4e565b61032e610c78565b604080516001600160a01b039092168252519081900360200190f35b6102bb6004803603606081101561036057600080fd5b506001600160a01b038135811691602081013582169160409091013516610c87565b61032e610d1c565b610204600480360360208110156103a057600080fd5b50356001600160a01b0316610d2b565b610204600480360360208110156103c657600080fd5b50356001600160a01b0316610d46565b6103f3600480360360208110156103ec57600080fd5b5035610d61565b60408051938452602084019290925282820152519081900360600190f35b610204610d91565b6102bb6004803603602081101561042f57600080fd5b5035610dd6565b6102bb6004803603602081101561044c57600080fd5b50356110ba565b61032e61133f565b6102bb6004803603602081101561047157600080fd5b50356001600160a01b031661134e565b6102bb6113c6565b61032e611653565b6102bb600480360360608110156104a757600080fd5b506001600160a01b038135811691602081013582169160409091013516611662565b610204611849565b6103f3600480360360208110156104e757600080fd5b50356001600160a01b03166118a7565b6102bb6118c8565b60008061050a6118db565b604001519050600061051b84611933565b6040908101516001600160a01b03861660009081526007602052919091206001015490915061057890610572670de0b6b3a764000061056c61055d878761198e565b6105668a610d2b565b906119d9565b90611a32565b90611a74565b949350505050565b600a5481565b6006546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b1580156105cb57600080fd5b505afa1580156105df573d6000803e3d6000fd5b505050506040513d60208110156105f557600080fd5b5051600a546001600160a01b03841660009081526007602052604090206002015461061f91611a74565b111592915050565b600654604080517f09bb4f9200000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916309bb4f92916004808301926020929190829003018186803b15801561068557600080fd5b505afa158015610699573d6000803e3d6000fd5b505050506040513d60208110156106af57600080fd5b5051905090565b600454600160a01b900460ff1681565b60015490565b6006546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d602081101561073b57600080fd5b50516009546001600160a01b03841660009081526007602052604090206002015461061f91611a74565b60095481565b610773611ace565b156107af5760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b6107b7611aef565b156107f35760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b60006107fe33610d2b565b1161083a5760405162461bcd60e51b81526004018080602001828103825260218152602001806120df6021913960400191505060405180910390fd5b3380156108d457610849611ff4565b506001600160a01b0381166000908152600760209081526040918290208251606081018452815481526001820154928101929092526002015491810191909152610892826104ff565b602082015261089f610b25565b81526001600160a01b038216600090815260076020908152604091829020835181559083015160018201559101516002909101555b60008211610929576040805162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f742077697468647261772030000000000000604482015290519081900360640190fd5b600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b5051600954336000908152600760205260409020600201546109c291611a74565b11156109ff5760405162461bcd60e51b81526004018080602001828103825260218152602001806121006021913960400191505060405180910390fd5b610a076113c6565b610a1082611b10565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6004546001600160a01b03163314610ace5760405162461bcd60e51b81526004018080602001828103825260238152602001806120786023913960400191505060405180910390fd5b808210158015610adf575060388211155b610b1a5760405162461bcd60e51b81526004018080602001828103825260238152602001806120bc6023913960400191505060405180910390fd5b600991909155600a55565b600854600090610b3690600161198e565b905090565b6000610b456118db565b60400151905090565b6004546001600160a01b03163314610b975760405162461bcd60e51b81526004018080602001828103825260238152602001806120786023913960400191505060405180910390fd5b6005546001600160a01b0384811691161415610bfc576040805162461bcd60e51b8152602060048083019190915260248201527f746f6d6200000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000546001600160a01b0384811691161415610c5f576040805162461bcd60e51b815260206004820152600560248201527f7368617265000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b610c736001600160a01b0384168284611ba0565b505050565b6004546001600160a01b031681565b6004546001600160a01b03163314610cd05760405162461bcd60e51b81526004018080602001828103825260238152602001806120786023913960400191505060405180910390fd5b600580546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821617909155600080549385169382169390931790925560068054919093169116179055565b6006546001600160a01b031681565b6001600160a01b031660009081526002602052604090205490565b6001600160a01b031660009081526007602052604090205490565b60088181548110610d6e57fe5b600091825260209091206003909102018054600182015460029092015490925083565b6006546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b15801561068557600080fd5b610dde611ace565b15610e1a5760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b610e22611aef565b15610e5e5760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b6004546001600160a01b03163314610ea75760405162461bcd60e51b81526004018080602001828103825260238152602001806120786023913960400191505060405180910390fd5b60008111610efc576040805162461bcd60e51b815260206004820152601a60248201527f4d61736f6e72793a2043616e6e6f7420616c6c6f636174652030000000000000604482015290519081900360640190fd5b6000610f066106c6565b11610f425760405162461bcd60e51b815260040180806020018281038252602e815260200180612016602e913960400191505060405180910390fd5b6000610f4c6118db565b6040015190506000610f7b610f74610f626106c6565b61056c86670de0b6b3a76400006119d9565b8390611a74565b9050610f85611ff4565b5060408051606081018252438152602081018581529181018381526008805460018101825560009190915282517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee360039092029182015592517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee4840155517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee590920191909155600554611043906001600160a01b0316333087611c20565b60408051858152905133917fac24935fd910bc682b5ccb1a07b718cadf8cf2f6d1404c4f3ddc3662dae40e29919081900360200190a250504360009081526003602090815260408083203284529091528082208054600160ff19918216811790925533845291909220805490911690911790555050565b6110c2611ace565b156110fe5760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b611106611aef565b156111425760405162461bcd60e51b815260040180806020018281038252602681526020018061214b6026913960400191505060405180910390fd5b3380156111dc57611151611ff4565b506001600160a01b038116600090815260076020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261119a826104ff565b60208201526111a7610b25565b81526001600160a01b038216600090815260076020908152604091829020835181559083015160018201559101516002909101555b60008211611231576040805162461bcd60e51b815260206004820152601760248201527f4d61736f6e72793a2043616e6e6f74207374616b652030000000000000000000604482015290519081900360640190fd5b61123a82611cae565b600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561128857600080fd5b505afa15801561129c573d6000803e3d6000fd5b505050506040513d60208110156112b257600080fd5b505133600081815260076020908152604091829020600201939093558051858152905191927f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d92918290030190a250504360009081526003602090815260408083203284529091528082208054600160ff1991821681179092553384529190922080549091169091179055565b6000546001600160a01b031681565b6004546001600160a01b031633146113975760405162461bcd60e51b81526004018080602001828103825260238152602001806120786023913960400191505060405180910390fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b338015611460576113d5611ff4565b506001600160a01b038116600090815260076020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915261141e826104ff565b602082015261142b610b25565b81526001600160a01b038216600090815260076020908152604091829020835181559083015160018201559101516002909101555b33600090815260076020526040902060010154801561164f57600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114c757600080fd5b505afa1580156114db573d6000803e3d6000fd5b505050506040513d60208110156114f157600080fd5b5051600a543360009081526007602052604090206002015461151291611a74565b1115611565576040805162461bcd60e51b815260206004820152601f60248201527f4d61736f6e72793a207374696c6c20696e20726577617264206c6f636b757000604482015290519081900360640190fd5b600660009054906101000a90046001600160a01b03166001600160a01b031663900cf0cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115b357600080fd5b505afa1580156115c7573d6000803e3d6000fd5b505050506040513d60208110156115dd57600080fd5b50513360008181526007602052604081206002810193909355600190920191909155600554611618916001600160a01b039091169083611ba0565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6005546001600160a01b031681565b600454600160a01b900460ff16156116c1576040805162461bcd60e51b815260206004820152601c60248201527f4d61736f6e72793a20616c726561647920696e697469616c697a656400000000604482015290519081900360640190fd5b600580546001600160a01b0380861673ffffffffffffffffffffffffffffffffffffffff1992831617909255600080548584169083161790556006805492841692909116919091179055611713611ff4565b50604080516060810182524380825260006020808401828152848601838152600880546001810182559452855160039485027ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee381019190915591517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee4830155517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee5909101556006600955600a919091556004805473ffffffffffffffffffffffffffffffffffffffff197fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909116600160a01b171633908117909155845192835293519293927f25ff68dd81b34665b5ba7e553ee5511bf6812e12adb4a7e2c0d9e26b3099ce799281900390910190a250505050565b600654604080517fc5967c2600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163c5967c26916004808301926020929190829003018186803b15801561068557600080fd5b60076020526000908152604090208054600182015460029092015490919083565b6118d96118d433610d2b565b61076b565b565b6118e3611ff4565b60086118ed610b25565b815481106118f757fe5b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050905090565b61193b611ff4565b600861194683610d46565b8154811061195057fe5b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050919050565b60006119d083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d07565b90505b92915050565b6000826119e8575060006119d3565b828202828482816119f557fe5b04146119d05760405162461bcd60e51b815260040180806020018281038252602181526020018061209b6021913960400191505060405180910390fd5b60006119d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d9e565b6000828201838110156119d0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b43600090815260036020908152604080832032845290915290205460ff1690565b43600090815260036020908152604080832033845290915290205460ff1690565b3360009081526002602052604090205481811015611b5f5760405162461bcd60e51b81526004018080602001828103825260348152602001806120446034913960400191505060405180910390fd5b600154611b6c908361198e565b600155611b79818361198e565b33600081815260026020526040812092909255905461164f916001600160a01b0390911690845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610c73908490611e03565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611ca8908590611e03565b50505050565b600154611cbb9082611a74565b60015533600090815260026020526040902054611cd89082611a74565b336000818152600260205260408120929092559054611d04916001600160a01b03909116903084611c20565b50565b60008184841115611d965760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d5b578181015183820152602001611d43565b50505050905090810190601f168015611d885780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611ded5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611d5b578181015183820152602001611d43565b506000838581611df957fe5b0495945050505050565b611e15826001600160a01b0316611fbb565b611e66576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310611ea45780518252601f199092019160209182019101611e85565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611f06576040519150601f19603f3d011682016040523d82523d6000602084013e611f0b565b606091505b509150915081611f62576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611ca857808060200190516020811015611f7e57600080fd5b5051611ca85760405162461bcd60e51b815260040180806020018281038252602a815260200180612121602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610578575050151592915050565b6040518060600160405280600081526020016000815260200160008152509056fe4d61736f6e72793a2043616e6e6f7420616c6c6f63617465207768656e20746f74616c537570706c7920697320304d61736f6e72793a20776974686472617720726571756573742067726561746572207468616e207374616b656420616d6f756e744d61736f6e72793a2063616c6c6572206973206e6f7420746865206f70657261746f72536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775f77697468647261774c6f636b757045706f6368733a206f7574206f662072616e67654d61736f6e72793a20546865206d61736f6e20646f6573206e6f742065786973744d61736f6e72793a207374696c6c20696e207769746864726177206c6f636b75705361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564436f6e747261637447756172643a206f6e6520626c6f636b2c206f6e652066756e6374696f6ea2646970667358221220f0d0e7fa62446755c8cbe5d88f76e2c04fe8bd136416ce8f609afeafe8f2a00c64736f6c634300060c0033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.