ERC-20
Overview
Max Total Supply
0.32054524928398507 sMuse
Holders
1
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.32054524928398507 sMuseValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
StakedMuse
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default 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/ERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; // This contract is derived from xSushi from Sushiswap https://github.com/sushiswap/sushiswap/blob/master/contracts/SushiBar.sol // We added cooldown period // This contract handles swapping to and from sMuse, NFT20's staking token. contract StakedMuse is ERC20("stakedMUSE", "sMuse") { using SafeMath for uint256; IERC20 public muse = IERC20(0xB6Ca7399B4F9CA56FC27cBfF44F4d2e4Eef1fc81); mapping(address => uint256) public timeLock; uint256 public unlockPeriod = 10 days; address public owner; constructor() { owner = msg.sender; } // Enter the bar. Pay some Muse. Earn some shares. // Locks Muse and mints sMuse function enter(uint256 _amount) public { timeLock[msg.sender] = 0; //reset timelock in case they stake twice. // Gets the amount of Muse locked in the contract uint256 totalMuse = muse.balanceOf(address(this)); // Gets the amount of sMuse in existence uint256 totalShares = totalSupply(); // If no sMuse exists, mint it 1:1 to the amount put in if (totalShares == 0 || totalMuse == 0) { _mint(msg.sender, _amount); } // Calculate and mint the amount of sMuse the Muse is worth. The ratio will change overtime, as sMuse is burned/minted and Muse deposited + gained from fees / withdrawn. else { uint256 what = _amount.mul(totalShares).div(totalMuse); _mint(msg.sender, what); } // Lock the Muse in the contract muse.transferFrom(msg.sender, address(this), _amount); } function changeUnlockPeriod(uint256 _period) external { require(msg.sender == owner, "forbidden"); unlockPeriod = _period; } function startUnstake() public { timeLock[msg.sender] = block.timestamp + unlockPeriod; } // Leave the bar. Claim back your Muse. // Unlocks the staked + gained Muse and burns sMuse function unstake(uint256 _share) public { uint256 lockedUntil = timeLock[msg.sender]; timeLock[msg.sender] = 0; require( lockedUntil != 0 && block.timestamp >= lockedUntil && block.timestamp <= lockedUntil + 2 days, "!still locked" ); uint256 totalShares = totalSupply(); // Calculates the amount of Muse the sMuse is worth uint256 what = _share.mul(muse.balanceOf(address(this))).div( totalShares ); _burn(msg.sender, _share); muse.transfer(msg.sender, what); } function userInfo(address _user) public view returns ( uint256 balance, uint256 museValue, uint256 timelock, bool isClaimable, uint256 globalShares, uint256 globalBalance ) { balance = muse.balanceOf(_user); museValue = balance.mul(muse.balanceOf(address(this))).div( totalSupply() ); timelock = timeLock[_user]; isClaimable = (timelock != 0 && block.timestamp >= timelock && block.timestamp <= timelock + 2 days); globalShares = totalSupply(); globalBalance = muse.balanceOf(address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT 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 no longer needed starting with Solidity 0.8. 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 substraction 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. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * 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; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT 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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"changeUnlockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"muse","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"timeLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"museValue","type":"uint256"},{"internalType":"uint256","name":"timelock","type":"uint256"},{"internalType":"bool","name":"isClaimable","type":"bool"},{"internalType":"uint256","name":"globalShares","type":"uint256"},{"internalType":"uint256","name":"globalBalance","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600580546001600160a01b03191673b6ca7399b4f9ca56fc27cbff44f4d2e4eef1fc81179055620d2f006007553480156200003e57600080fd5b50604080518082018252600a8152697374616b65644d55534560b01b602080830191825283518085019094526005845264734d75736560d81b9084015281519192916200008e91600391620000bf565b508051620000a4906004906020840190620000bf565b5050600880546001600160a01b0319163317905550620001a2565b828054620000cd9062000165565b90600052602060002090601f016020900481019282620000f157600085556200013c565b82601f106200010c57805160ff19168380011785556200013c565b828001600101855582156200013c579182015b828111156200013c5782518255916020019190600101906200011f565b506200014a9291506200014e565b5090565b5b808211156200014a57600081556001016200014f565b6002810460018216806200017a57607f821691505b602082108114156200019c57634e487b7160e01b600052602260045260246000fd5b50919050565b61144d80620001b26000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80636de114bb116100ad578063a457c2d711610071578063a457c2d71461025f578063a59f3e0c14610272578063a9059cbb14610285578063dd62ed3e14610298578063f8e1f51e146102ab5761012c565b80636de114bb1461021457806370a082311461021c5780638da5cb5b1461022f578063911dd3a11461024457806395d89b41146102575761012c565b806323b872dd116100f457806323b872dd146101b15780632e17de78146101c4578063313ce567146101d957806339509351146101ee57806343496568146102015761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f5780631959a0021461018457806320d3a0b4146101a9575b600080fd5b6101396102b3565b6040516101469190610fdf565b60405180910390f35b61016261015d366004610f0a565b610345565b6040516101469190610fd4565b610177610362565b6040516101469190611317565b610197610192366004610e83565b610368565b60405161014696959493929190611320565b61017761056c565b6101626101bf366004610ecf565b610572565b6101d76101d2366004610f53565b610612565b005b6101e161079f565b604051610146919061134a565b6101626101fc366004610f0a565b6107a4565b61017761020f366004610e83565b6107f3565b6101d7610805565b61017761022a366004610e83565b610824565b610237610843565b6040516101469190610f83565b6101d7610252366004610f53565b610852565b610139610881565b61016261026d366004610f0a565b610890565b6101d7610280366004610f53565b61090b565b610162610293366004610f0a565b610a74565b6101776102a6366004610e9d565b610a88565b610237610ab3565b6060600380546102c2906113c6565b80601f01602080910402602001604051908101604052809291908181526020018280546102ee906113c6565b801561033b5780601f106103105761010080835404028352916020019161033b565b820191906000526020600020905b81548152906001019060200180831161031e57829003601f168201915b5050505050905090565b6000610359610352610ac2565b8484610ac6565b50600192915050565b60025490565b6005546040516370a0823160e01b8152600091829182918291829182916001600160a01b03909116906370a08231906103a5908a90600401610f83565b60206040518083038186803b1580156103bd57600080fd5b505afa1580156103d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f59190610f6b565b9550610491610402610362565b6005546040516370a0823160e01b815261048b916001600160a01b0316906370a0823190610434903090600401610f83565b60206040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190610f6b565b8990610b7a565b90610b8d565b6001600160a01b038816600090815260066020526040902054909550935083158015906104be5750834210155b80156104d657506104d2846202a300611358565b4211155b92506104e0610362565b6005546040516370a0823160e01b81529193506001600160a01b0316906370a0823190610511903090600401610f83565b60206040518083038186803b15801561052957600080fd5b505afa15801561053d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105619190610f6b565b905091939550919395565b60075481565b600061057f848484610b99565b6001600160a01b0384166000908152600160205260408120816105a0610ac2565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156105ec5760405162461bcd60e51b81526004016105e390611162565b60405180910390fd5b610607856105f8610ac2565b61060286856113af565b610ac6565b506001949350505050565b336000908152600660205260408120805491905580158015906106355750804210155b801561064d5750610649816202a300611358565b4211155b6106695760405162461bcd60e51b81526004016105e3906111eb565b6000610673610362565b6005546040516370a0823160e01b815291925060009161070891849161048b916001600160a01b0316906370a08231906106b1903090600401610f83565b60206040518083038186803b1580156106c957600080fd5b505afa1580156106dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107019190610f6b565b8790610b7a565b90506107143385610cc1565b60055460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906107469033908590600401610fbb565b602060405180830381600087803b15801561076057600080fd5b505af1158015610774573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107989190610f33565b5050505050565b601290565b60006103596107b1610ac2565b8484600160006107bf610ac2565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546106029190611358565b60066020526000908152604090205481565b6007546108129042611358565b33600090815260066020526040902055565b6001600160a01b0381166000908152602081905260409020545b919050565b6008546001600160a01b031681565b6008546001600160a01b0316331461087c5760405162461bcd60e51b81526004016105e3906110b7565b600755565b6060600480546102c2906113c6565b6000806001600061089f610ac2565b6001600160a01b03908116825260208083019390935260409182016000908120918816815292529020549050828110156108eb5760405162461bcd60e51b81526004016105e39061129b565b6109016108f6610ac2565b8561060286856113af565b5060019392505050565b3360009081526006602052604080822082905560055490516370a0823160e01b81526001600160a01b03909116906370a082319061094d903090600401610f83565b60206040518083038186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190610f6b565b905060006109a9610362565b90508015806109b6575081155b156109ca576109c53384610da7565b6109e8565b60006109da8361048b8685610b7a565b90506109e63382610da7565b505b6005546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610a1c90339030908890600401610f97565b602060405180830381600087803b158015610a3657600080fd5b505af1158015610a4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6e9190610f33565b50505050565b6000610359610a81610ac2565b8484610b99565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6005546001600160a01b031681565b3390565b6001600160a01b038316610aec5760405162461bcd60e51b81526004016105e390611257565b6001600160a01b038216610b125760405162461bcd60e51b81526004016105e3906110da565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610b6d908590611317565b60405180910390a3505050565b6000610b868284611390565b9392505050565b6000610b868284611370565b6001600160a01b038316610bbf5760405162461bcd60e51b81526004016105e390611212565b6001600160a01b038216610be55760405162461bcd60e51b81526004016105e390611032565b610bf0838383610e67565b6001600160a01b03831660009081526020819052604090205481811015610c295760405162461bcd60e51b81526004016105e39061111c565b610c3382826113af565b6001600160a01b038086166000908152602081905260408082209390935590851681529081208054849290610c69908490611358565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cb39190611317565b60405180910390a350505050565b6001600160a01b038216610ce75760405162461bcd60e51b81526004016105e3906111aa565b610cf382600083610e67565b6001600160a01b03821660009081526020819052604090205481811015610d2c5760405162461bcd60e51b81526004016105e390611075565b610d3682826113af565b6001600160a01b03841660009081526020819052604081209190915560028054849290610d649084906113af565b90915550506040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610b6d908690611317565b6001600160a01b038216610dcd5760405162461bcd60e51b81526004016105e3906112e0565b610dd960008383610e67565b8060026000828254610deb9190611358565b90915550506001600160a01b03821660009081526020819052604081208054839290610e18908490611358565b90915550506040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5b908590611317565b60405180910390a35050565b505050565b80356001600160a01b038116811461083e57600080fd5b600060208284031215610e94578081fd5b610b8682610e6c565b60008060408385031215610eaf578081fd5b610eb883610e6c565b9150610ec660208401610e6c565b90509250929050565b600080600060608486031215610ee3578081fd5b610eec84610e6c565b9250610efa60208501610e6c565b9150604084013590509250925092565b60008060408385031215610f1c578182fd5b610f2583610e6c565b946020939093013593505050565b600060208284031215610f44578081fd5b81518015158114610b86578182fd5b600060208284031215610f64578081fd5b5035919050565b600060208284031215610f7c578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602080835283518082850152825b8181101561100b57858101830151858201604001528201610fef565b8181111561101c5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604082015261636560f01b606082015260800190565b6020808252600990820152683337b93134b23232b760b91b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252600d908201526c085cdd1a5b1b081b1bd8dad959609a1b604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9586526020860194909452604085019290925215156060840152608083015260a082015260c00190565b60ff91909116815260200190565b6000821982111561136b5761136b611401565b500190565b60008261138b57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113aa576113aa611401565b500290565b6000828210156113c1576113c1611401565b500390565b6002810460018216806113da57607f821691505b602082108114156113fb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212200c10b823ebcdbed62929a81f34c8acc8bb3f3909a100e1cc0d00da85d3c8c5ab64736f6c63430008000033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80636de114bb116100ad578063a457c2d711610071578063a457c2d71461025f578063a59f3e0c14610272578063a9059cbb14610285578063dd62ed3e14610298578063f8e1f51e146102ab5761012c565b80636de114bb1461021457806370a082311461021c5780638da5cb5b1461022f578063911dd3a11461024457806395d89b41146102575761012c565b806323b872dd116100f457806323b872dd146101b15780632e17de78146101c4578063313ce567146101d957806339509351146101ee57806343496568146102015761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461016f5780631959a0021461018457806320d3a0b4146101a9575b600080fd5b6101396102b3565b6040516101469190610fdf565b60405180910390f35b61016261015d366004610f0a565b610345565b6040516101469190610fd4565b610177610362565b6040516101469190611317565b610197610192366004610e83565b610368565b60405161014696959493929190611320565b61017761056c565b6101626101bf366004610ecf565b610572565b6101d76101d2366004610f53565b610612565b005b6101e161079f565b604051610146919061134a565b6101626101fc366004610f0a565b6107a4565b61017761020f366004610e83565b6107f3565b6101d7610805565b61017761022a366004610e83565b610824565b610237610843565b6040516101469190610f83565b6101d7610252366004610f53565b610852565b610139610881565b61016261026d366004610f0a565b610890565b6101d7610280366004610f53565b61090b565b610162610293366004610f0a565b610a74565b6101776102a6366004610e9d565b610a88565b610237610ab3565b6060600380546102c2906113c6565b80601f01602080910402602001604051908101604052809291908181526020018280546102ee906113c6565b801561033b5780601f106103105761010080835404028352916020019161033b565b820191906000526020600020905b81548152906001019060200180831161031e57829003601f168201915b5050505050905090565b6000610359610352610ac2565b8484610ac6565b50600192915050565b60025490565b6005546040516370a0823160e01b8152600091829182918291829182916001600160a01b03909116906370a08231906103a5908a90600401610f83565b60206040518083038186803b1580156103bd57600080fd5b505afa1580156103d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f59190610f6b565b9550610491610402610362565b6005546040516370a0823160e01b815261048b916001600160a01b0316906370a0823190610434903090600401610f83565b60206040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104849190610f6b565b8990610b7a565b90610b8d565b6001600160a01b038816600090815260066020526040902054909550935083158015906104be5750834210155b80156104d657506104d2846202a300611358565b4211155b92506104e0610362565b6005546040516370a0823160e01b81529193506001600160a01b0316906370a0823190610511903090600401610f83565b60206040518083038186803b15801561052957600080fd5b505afa15801561053d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105619190610f6b565b905091939550919395565b60075481565b600061057f848484610b99565b6001600160a01b0384166000908152600160205260408120816105a0610ac2565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156105ec5760405162461bcd60e51b81526004016105e390611162565b60405180910390fd5b610607856105f8610ac2565b61060286856113af565b610ac6565b506001949350505050565b336000908152600660205260408120805491905580158015906106355750804210155b801561064d5750610649816202a300611358565b4211155b6106695760405162461bcd60e51b81526004016105e3906111eb565b6000610673610362565b6005546040516370a0823160e01b815291925060009161070891849161048b916001600160a01b0316906370a08231906106b1903090600401610f83565b60206040518083038186803b1580156106c957600080fd5b505afa1580156106dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107019190610f6b565b8790610b7a565b90506107143385610cc1565b60055460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906107469033908590600401610fbb565b602060405180830381600087803b15801561076057600080fd5b505af1158015610774573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107989190610f33565b5050505050565b601290565b60006103596107b1610ac2565b8484600160006107bf610ac2565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546106029190611358565b60066020526000908152604090205481565b6007546108129042611358565b33600090815260066020526040902055565b6001600160a01b0381166000908152602081905260409020545b919050565b6008546001600160a01b031681565b6008546001600160a01b0316331461087c5760405162461bcd60e51b81526004016105e3906110b7565b600755565b6060600480546102c2906113c6565b6000806001600061089f610ac2565b6001600160a01b03908116825260208083019390935260409182016000908120918816815292529020549050828110156108eb5760405162461bcd60e51b81526004016105e39061129b565b6109016108f6610ac2565b8561060286856113af565b5060019392505050565b3360009081526006602052604080822082905560055490516370a0823160e01b81526001600160a01b03909116906370a082319061094d903090600401610f83565b60206040518083038186803b15801561096557600080fd5b505afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190610f6b565b905060006109a9610362565b90508015806109b6575081155b156109ca576109c53384610da7565b6109e8565b60006109da8361048b8685610b7a565b90506109e63382610da7565b505b6005546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610a1c90339030908890600401610f97565b602060405180830381600087803b158015610a3657600080fd5b505af1158015610a4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6e9190610f33565b50505050565b6000610359610a81610ac2565b8484610b99565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6005546001600160a01b031681565b3390565b6001600160a01b038316610aec5760405162461bcd60e51b81526004016105e390611257565b6001600160a01b038216610b125760405162461bcd60e51b81526004016105e3906110da565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610b6d908590611317565b60405180910390a3505050565b6000610b868284611390565b9392505050565b6000610b868284611370565b6001600160a01b038316610bbf5760405162461bcd60e51b81526004016105e390611212565b6001600160a01b038216610be55760405162461bcd60e51b81526004016105e390611032565b610bf0838383610e67565b6001600160a01b03831660009081526020819052604090205481811015610c295760405162461bcd60e51b81526004016105e39061111c565b610c3382826113af565b6001600160a01b038086166000908152602081905260408082209390935590851681529081208054849290610c69908490611358565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cb39190611317565b60405180910390a350505050565b6001600160a01b038216610ce75760405162461bcd60e51b81526004016105e3906111aa565b610cf382600083610e67565b6001600160a01b03821660009081526020819052604090205481811015610d2c5760405162461bcd60e51b81526004016105e390611075565b610d3682826113af565b6001600160a01b03841660009081526020819052604081209190915560028054849290610d649084906113af565b90915550506040516000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610b6d908690611317565b6001600160a01b038216610dcd5760405162461bcd60e51b81526004016105e3906112e0565b610dd960008383610e67565b8060026000828254610deb9190611358565b90915550506001600160a01b03821660009081526020819052604081208054839290610e18908490611358565b90915550506040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610e5b908590611317565b60405180910390a35050565b505050565b80356001600160a01b038116811461083e57600080fd5b600060208284031215610e94578081fd5b610b8682610e6c565b60008060408385031215610eaf578081fd5b610eb883610e6c565b9150610ec660208401610e6c565b90509250929050565b600080600060608486031215610ee3578081fd5b610eec84610e6c565b9250610efa60208501610e6c565b9150604084013590509250925092565b60008060408385031215610f1c578182fd5b610f2583610e6c565b946020939093013593505050565b600060208284031215610f44578081fd5b81518015158114610b86578182fd5b600060208284031215610f64578081fd5b5035919050565b600060208284031215610f7c578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602080835283518082850152825b8181101561100b57858101830151858201604001528201610fef565b8181111561101c5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604082015261636560f01b606082015260800190565b6020808252600990820152683337b93134b23232b760b91b604082015260600190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252600d908201526c085cdd1a5b1b081b1bd8dad959609a1b604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b9586526020860194909452604085019290925215156060840152608083015260a082015260c00190565b60ff91909116815260200190565b6000821982111561136b5761136b611401565b500190565b60008261138b57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156113aa576113aa611401565b500290565b6000828210156113c1576113c1611401565b500390565b6002810460018216806113da57607f821691505b602082108114156113fb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea26469706673582212200c10b823ebcdbed62929a81f34c8acc8bb3f3909a100e1cc0d00da85d3c8c5ab64736f6c63430008000033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.