Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Single Unstake | 15288032 | 835 days ago | IN | 0 ETH | 0.00061102 | ||||
Single Unstake | 15288020 | 835 days ago | IN | 0 ETH | 0.0007015 | ||||
Single Unstake | 15287909 | 835 days ago | IN | 0 ETH | 0.00061092 | ||||
Set Lock In | 15287897 | 835 days ago | IN | 0 ETH | 0.00043155 | ||||
Withdraw Equity | 15287883 | 835 days ago | IN | 0 ETH | 0.00069357 | ||||
0x60806040 | 15286426 | 835 days ago | IN | 0 ETH | 0.0127302 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x58Cc03aa...0B45afE51 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
EstateStaking
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /** _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /::\ \ /::\____\ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ \:::\ \ /:::/ / /::::\ \ /::::\ \ /::::\ \ \:::\ \ /::::\ \ \:::\ \ /::::\ \ /::::\ \ \:::\ \ /:::/ / /::::::\ \ /::::::\ \ /::::::\ \ \:::\ \ /::::::\ \ \:::\ \ /::::::\ \ /::::::\ \ \:::\ \ /:::/ / /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ /:::/\:::\ \ \:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ /:::/____/ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ \:::\ \ /:::/__\:::\ \ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /::::\ \ /::::\ \ /::::\ \:::\ \ /::::\ \:::\ \ \:::\ \:::\ \ /::::\ \ /::::\ \:::\ \ /::::\ \ /::::\ \:::\ \ \:::\ \:::\ \ /::::::\ \ /::::::\ \ _____ /::::::\ \:::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ /::::::\ \ /::::::\ \:::\ \ /::::::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ /:::/\:::\ \ /:::/\:::\ \ /\ \ /:::/\:::\ \:::\ \ /:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /:::/\:::\ \ /:::/\:::\ \:::\ \ /:::/\:::\ \ /:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /:::/ \:::\____\/:::/ \:::\ /::\____\/:::/__\:::\ \:::\____\ /:::/__\:::\ \:::\____\/::\ \:::\ \:::\____\ /:::/ \:::\____\/:::/ \:::\ \:::\____\ /:::/ \:::\____\/:::/__\:::\ \:::\____\/::\ \:::\ \:::\____\ /:::/ \::/ /\::/ \:::\ /:::/ /\:::\ \:::\ \::/ / \:::\ \:::\ \::/ /\:::\ \:::\ \::/ / /:::/ \::/ /\::/ \:::\ /:::/ / /:::/ \::/ /\:::\ \:::\ \::/ /\:::\ \:::\ \::/ / /:::/ / \/____/ \/____/ \:::\/:::/ / \:::\ \:::\ \/____/ \:::\ \:::\ \/____/ \:::\ \:::\ \/____/ /:::/ / \/____/ \/____/ \:::\/:::/ / /:::/ / \/____/ \:::\ \:::\ \/____/ \:::\ \:::\ \/____/ /:::/ / \::::::/ / \:::\ \:::\ \ \:::\ \:::\ \ \:::\ \:::\ \ /:::/ / \::::::/ / /:::/ / \:::\ \:::\ \ \:::\ \:::\ \ /:::/ / \::::/ / \:::\ \:::\____\ \:::\ \:::\____\ \:::\ \:::\____\ /:::/ / \::::/ / /:::/ / \:::\ \:::\____\ \:::\ \:::\____\ \::/ / /:::/ / \:::\ \::/ / \:::\ \::/ / \:::\ /:::/ / \::/ / /:::/ / \::/ / \:::\ \::/ / \:::\ /:::/ / \/____/ /:::/ / \:::\ \/____/ \:::\ \/____/ \:::\/:::/ / \/____/ /:::/ / \/____/ \:::\ \/____/ \:::\/:::/ / /:::/ / \:::\ \ \:::\ \ \::::::/ / /:::/ / \:::\ \ \::::::/ / /:::/ / \:::\____\ \:::\____\ \::::/ / /:::/ / \:::\____\ \::::/ / \::/ / \::/ / \::/ / \::/ / \::/ / \::/ / \::/ / \/____/ \/____/ \/____/ \/____/ \/____/ \/____/ \/____/ * @title EstatesStaking * EstatesStaking - a contract for staking The Estates ERC-721 Tokens */ pragma solidity ^0.8.11; import "./IEstateStaking.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; interface IEstate { function safeTransferFrom(address from,address to,uint256 tokenId) external; function balanceOf(address owner) external view returns (uint256); function estateGeneration(uint256 tokenId) external view returns (uint256); } interface IEquity { function grantEquity(address to, uint256 amount) external; } contract EstateStaking is IEstateStaking, Ownable, ERC721Holder { IEstate public estatesContract; IEquity public equityContract; // || ADMIN SWITCHES || // Halt staking bool stakingEnabled = true; // Grant equity while staked bool grantEquity = true; // Minimum staking period of 7 days uint64 public LOCK_IN = 604800; // || YIELD || // Daily rate of award per level 1 estate uint256 public BASE_RATE = 10 ether; // Yield tracking mapping(address => uint256) public unclaimedRewards; mapping(address => uint256) public lastUpdate; event RewardGranted(address user, uint256 amount); // || USER BALANCES || // NFT tokenId to time staked and owner's address. mapping(uint64 => StakedToken) public stakes; // Gen balances per owner (necessary as different gens give different rewards) struct genBalance { uint gen1; uint gen2; uint gen3; uint gen4; } mapping (address => genBalance) public generationBalance; // || BREED FROM STAKED || event Upgraded(uint256 newEstate, uint256 parent1, uint256 parent2); constructor( address _estatesContract, address _equityContract, address _ownerAddress ) { require(_estatesContract != address(0),"nft contract cannot be 0x0"); require(_equityContract != address(0),"equity contract cannot be 0x0"); estatesContract = IEstate(_estatesContract); equityContract = IEquity(_equityContract); if (_ownerAddress != msg.sender) { transferOwnership(_ownerAddress); } } /** *********************************** **/ /** ********* RewardFunctions ****** **/ /** *********************************** **/ function getPendingReward(address user) internal view returns (uint256) { // gen2 yields 2.4 gen1 // gen3 yields 2.5 gen2 // gen4 yields 2.6 gen3 uint dayrate = (generationBalance[user].gen1 + (generationBalance[user].gen2*12/5) + (generationBalance[user].gen3*6) + (generationBalance[user].gen4*78/5)); // return weighted estates held * rate *days since last updated return (dayrate * BASE_RATE * (block.timestamp - lastUpdate[user])) / 86400; } // Update yield ledger function updateRewardAndTimestamp(address user) internal { if (user != address(0)) { unclaimedRewards[user] += getPendingReward(user); lastUpdate[user] = block.timestamp; } } function withdrawEquity() public { require(grantEquity, "Withdrawing equity has been paused."); uint256 reward = unclaimedRewards[msg.sender] + getPendingReward(msg.sender); equityContract.grantEquity(msg.sender, reward); // reset rewards to zero unclaimedRewards[msg.sender] = 0; lastUpdate[msg.sender] = block.timestamp; emit RewardGranted(msg.sender,reward); } /** *********************************** **/ /** ********* Staking Functions ****** **/ /** *********************************** **/ function setStake(uint64 tokenId, address user) external { require(stakingEnabled, "Staking has been paused."); require( msg.sender == address(estatesContract), "Only estates contract set stake" ); updateRewardAndTimestamp(user); // assign owner and timestamp to this token stakes[tokenId] = StakedToken(user, uint64(block.timestamp)); // update generation balance for user uint gen = estatesContract.estateGeneration(tokenId); // this is awkward I know... if (gen == 0){ generationBalance[user].gen1 += 1; } else if (gen == 1){ generationBalance[user].gen2 += 1; } else if (gen == 2){ generationBalance[user].gen3 += 1; } else { generationBalance[user].gen4 += 1; } emit StartStake(user, tokenId); } function setGroupStake(uint64[] memory tokenIds, address user) external { require(stakingEnabled, "Staking has been paused."); require( msg.sender == address(estatesContract), "Only estates contract set stake" ); updateRewardAndTimestamp(user); for (uint64 i = 0; i < tokenIds.length; ++i) { // assign owner and timestamp to this token stakes[tokenIds[i]] = StakedToken(user, uint64(block.timestamp)); // update generation balance for user uint gen = estatesContract.estateGeneration(tokenIds[i]); // this is awkward I know... if (gen == 0){ generationBalance[user].gen1 += 1; } else if (gen == 1){ generationBalance[user].gen2 += 1; } else if (gen == 2){ generationBalance[user].gen3 += 1; } else { generationBalance[user].gen4 += 1; } emit StartStake(user, tokenIds[i]); } } // slightly cheaper version of setStake that assumes the token has already been transferred to the staking contract and is gen1 function stakeMint(uint256 firstTokenId, address user, uint256 _vol) public { require( msg.sender == address(estatesContract), "Only estates contract can mint to stake" ); updateRewardAndTimestamp(user); for (uint256 i=0; i<_vol; ++i) { stakes[uint64(firstTokenId+i)] = StakedToken(user, uint64(block.timestamp)); emit StartStake(user, uint64(firstTokenId+i)); } generationBalance[user].gen1 += _vol; } function unstake(uint64 tokenId) internal { require(stakes[tokenId].user != address(0), "TokenId not staked"); require(stakes[tokenId].user == msg.sender,"Sender didn't stake token"); uint64 stakeLength = uint64(block.timestamp) - stakes[tokenId].timeStaked; require(stakeLength > LOCK_IN, "Can not remove token until lock-in period is over"); // update gen balance uint gen = estatesContract.estateGeneration(tokenId); if (gen == 0){ generationBalance[msg.sender].gen1 -= 1; } else if (gen == 1){ generationBalance[msg.sender].gen2 -= 1; } else if (gen == 2){ generationBalance[msg.sender].gen3 -= 1; } else { generationBalance[msg.sender].gen4 -= 1; } delete stakes[tokenId]; estatesContract.safeTransferFrom(address(this),msg.sender,uint256(tokenId)); emit Unstake(msg.sender,tokenId,stakeLength); } function singleUnstake(uint64 tokenId) public override { // withdraw any unclaimed rewards if (grantEquity) { withdrawEquity(); } else { updateRewardAndTimestamp(msg.sender); } unstake(tokenId); } function groupUnstake(uint64[] memory tokenIds) external override { // withdraw any unclaimed rewards if (grantEquity) { withdrawEquity(); } else { updateRewardAndTimestamp(msg.sender); } for (uint64 i = 0; i < tokenIds.length; ++i) { unstake(tokenIds[i]); } } /** *********************************** **/ /** ********* View Functions ****** **/ /** *********************************** **/ function getTokenOwner(uint64 tokenId) external view returns (address) { return stakes[uint64(tokenId)].user; } // NEVER CALL THIS ON CHAIN, VERY EXPENSIVE function viewStakes(address _address) public view returns (uint256[] memory) { uint256[] memory _tokens = new uint256[](18750); uint256 tookCount = 0; for (uint64 i = 0; i < 18750; i++) { if (stakes[i].user == _address) { _tokens[tookCount] = i; tookCount++; } } uint256[] memory trimmedResult = new uint256[](tookCount); for (uint256 j = 0; j < trimmedResult.length; j++) { trimmedResult[j] = _tokens[j]; } return trimmedResult; } // Gets COMBINED balance of UNSTAKED and STAKED estates, useful for collabland etc function balanceOf(address _address) external view returns (uint256) { return estatesContract.balanceOf(_address) + viewStakes(_address).length; } function getTotalUnclaimed(address user) external view returns (uint256 unclaimed) { return unclaimedRewards[user] + getPendingReward(user); } /** *********************************** **/ /** ********* Owner Functions ****** **/ /** *********************************** **/ // Enable or disable staking function setStaking(bool _enable) external onlyOwner { stakingEnabled = _enable; } // Enable or disable equity granting function setGrantEquity(bool _grant) external onlyOwner { grantEquity = _grant; } // Set the lockin period for staking function setLockIn(uint64 _lockin) external onlyOwner { LOCK_IN = _lockin; } // Set the base rate for rewards function setBaseRate(uint256 _rate) external onlyOwner { BASE_RATE = 1 ether * _rate; } // Set Estates contract function setEstatesContract(address _address) external onlyOwner { estatesContract = IEstate(_address); } // Set $Equity contract function setEquityContract(address _address) external onlyOwner { equityContract = IEquity(_address); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; interface IEstateStaking is IERC721Receiver { struct StakedToken { address user; uint64 timeStaked; } /// @notice Emits when a user stakes their NFT. /// @param owner the wallet address of the owner of the NFT being staked. /// @param tokenId the tokenId of the Estates NFT being staked. event StartStake(address indexed owner, uint64 tokenId); /// @notice Emits when a user unstakes their NFT. /// @param owner the wallet address of the owner of the NFT being unstaked. /// @param tokenId the tokenId of the Estates NFT being unstaked. /// @param duration the duration the NFT was staked for. event Unstake( address indexed owner, uint64 tokenId, uint64 duration ); /// @notice Retrieves a user's NFT from the staking contract /// @param tokenId the tokenId of the staked NFT function singleUnstake(uint64 tokenId) external; /// @notice Unstakes serveral of a user's NFTs /// @param tokenIds the tokenId of the NFT to be staked function groupUnstake(uint64[] memory tokenIds) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "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
[{"inputs":[{"internalType":"address","name":"_estatesContract","type":"address"},{"internalType":"address","name":"_equityContract","type":"address"},{"internalType":"address","name":"_ownerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"StartStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint64","name":"tokenId","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"duration","type":"uint64"}],"name":"Unstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newEstate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"parent1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"parent2","type":"uint256"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"BASE_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_IN","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"equityContract","outputs":[{"internalType":"contract IEquity","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estatesContract","outputs":[{"internalType":"contract IEstate","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"generationBalance","outputs":[{"internalType":"uint256","name":"gen1","type":"uint256"},{"internalType":"uint256","name":"gen2","type":"uint256"},{"internalType":"uint256","name":"gen3","type":"uint256"},{"internalType":"uint256","name":"gen4","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"getTokenOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalUnclaimed","outputs":[{"internalType":"uint256","name":"unclaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"tokenIds","type":"uint64[]"}],"name":"groupUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setBaseRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setEquityContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setEstatesContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_grant","type":"bool"}],"name":"setGrantEquity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"tokenIds","type":"uint64[]"},{"internalType":"address","name":"user","type":"address"}],"name":"setGroupStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_lockin","type":"uint64"}],"name":"setLockIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"},{"internalType":"address","name":"user","type":"address"}],"name":"setStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"setStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"tokenId","type":"uint64"}],"name":"singleUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"firstTokenId","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"_vol","type":"uint256"}],"name":"stakeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"stakes","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint64","name":"timeStaked","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"unclaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"viewStakes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEquity","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063af14be5d11610097578063f12e288211610071578063f12e2882146104b4578063f234574d146104e7578063f2fde38b146104fa578063fc02aaae1461050d57600080fd5b8063af14be5d1461041d578063cb03fb1e14610481578063d798cc0b146104a157600080fd5b8063949813b8116100d3578063949813b8146103b75780639c21d6b1146103d75780639c89959d146103ea578063a43c992c146103fd57600080fd5b80638da5cb5b146103805780638ee5711414610391578063910730a8146103a457600080fd5b806370a08231116101665780637eb65af2116101405780637eb65af21461031c5780638355aebf1461032f5780638bcd02791461035a5780638c85c3c81461036d57600080fd5b806370a08231146102cd578063715018a6146102e057806378d76dce146102e857600080fd5b80633deefe41116101a25780633deefe411461024657806341910f901461029b5780634b423d02146102b2578063517c57d9146102ba57600080fd5b8063146a5392146101c9578063150b7a02146101de5780631d08837b14610233575b600080fd5b6101dc6101d7366004611b86565b610520565b005b6102156101ec366004611be8565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6101dc610241366004611ca8565b6105ae565b61027b610254366004611b86565b60076020526000908152604090208054600182015460028301546003909301549192909184565b60408051948552602085019390935291830152606082015260800161022a565b6102a460035481565b60405190815260200161022a565b6101dc610620565b6101dc6102c8366004611cc1565b61079b565b6102a46102db366004611b86565b61093f565b6101dc6109e2565b60025461030390600160b01b900467ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161022a565b6101dc61032a366004611b86565b610a48565b600254610342906001600160a01b031681565b6040516001600160a01b03909116815260200161022a565b6101dc610368366004611d95565b610ad1565b6102a461037b366004611b86565b610b4f565b6000546001600160a01b0316610342565b6101dc61039f366004611dd2565b610b7d565b6101dc6103b2366004611e05565b610e38565b6102a46103c5366004611b86565b60046020526000908152604090205481565b6101dc6103e5366004611e27565b610ecb565b6101dc6103f8366004611e05565b611239565b61041061040b366004611b86565b6112cc565b60405161022a9190611e6c565b61045961042b366004611eb0565b6006602052600090815260409020546001600160a01b03811690600160a01b900467ffffffffffffffff1682565b604080516001600160a01b03909316835267ffffffffffffffff90911660208301520161022a565b6102a461048f366004611b86565b60056020526000908152604090205481565b6101dc6104af366004611eb0565b61142b565b6103426104c2366004611eb0565b67ffffffffffffffff166000908152600660205260409020546001600160a01b031690565b6101dc6104f5366004611eb0565b6114c7565b6101dc610508366004611b86565b6114fb565b600154610342906001600160a01b031681565b6000546001600160a01b0316331461057f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b61061a81670de0b6b3a7640000611ee1565b60035550565b600254600160a81b900460ff1661069f5760405162461bcd60e51b815260206004820152602360248201527f5769746864726177696e672065717569747920686173206265656e207061757360448201527f65642e00000000000000000000000000000000000000000000000000000000006064820152608401610576565b60006106aa336115da565b336000908152600460205260409020546106c49190611f00565b6002546040517f69d79417000000000000000000000000000000000000000000000000000000008152336004820152602481018390529192506001600160a01b0316906369d7941790604401600060405180830381600087803b15801561072a57600080fd5b505af115801561073e573d6000803e3d6000fd5b50503360008181526004602090815260408083208390556005825291829020429055815192835282018590527f6e1afd29522b0aaf986597bcc53f5fb4daae2af7cfd41d00c384ab1bdf912b23935001905060405180910390a150565b6001546001600160a01b0316331461081b5760405162461bcd60e51b815260206004820152602760248201527f4f6e6c79206573746174657320636f6e74726163742063616e206d696e74207460448201527f6f207374616b65000000000000000000000000000000000000000000000000006064820152608401610576565b610824826116f5565b60005b8181101561090c57604080518082019091526001600160a01b038416815267ffffffffffffffff42166020820152600660006108638488611f00565b67ffffffffffffffff90811682526020808301939093526040909101600020835181549490930151909116600160a01b026001600160e01b03199093166001600160a01b03928316179290921790915583167fa0300337279bbac8f01103290febbcdf98d881b85a4300cc743b3714a18938eb6108e08387611f00565b60405167ffffffffffffffff909116815260200160405180910390a261090581611f18565b9050610827565b506001600160a01b03821660009081526007602052604081208054839290610935908490611f00565b9091555050505050565b600061094a826112cc565b516001546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa1580156109ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d29190611f33565b6109dc9190611f00565b92915050565b6000546001600160a01b03163314610a3c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b610a466000611756565b565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600254600160a81b900460ff1615610af057610aeb610620565b610af9565b610af9336116f5565b60005b81518167ffffffffffffffff161015610b4b57610b3b828267ffffffffffffffff1681518110610b2e57610b2e611f4c565b60200260200101516117b3565b610b4481611f62565b9050610afc565b5050565b6000610b5a826115da565b6001600160a01b0383166000908152600460205260409020546109dc9190611f00565b600254600160a01b900460ff16610bd65760405162461bcd60e51b815260206004820152601860248201527f5374616b696e6720686173206265656e207061757365642e00000000000000006044820152606401610576565b6001546001600160a01b03163314610c305760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c79206573746174657320636f6e747261637420736574207374616b65006044820152606401610576565b610c39816116f5565b6040805180820182526001600160a01b03808416825267ffffffffffffffff428116602080850191825287831660009081526006909152858120945185549251909316600160a01b026001600160e01b031990921692841692909217179092556001549251631f731a9760e11b815291921690633ee6352e90610cd090869060040167ffffffffffffffff91909116815260200190565b602060405180830381865afa158015610ced573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d119190611f33565b905080610d4c576001600160a01b0382166000908152600760205260408120805460019290610d41908490611f00565b90915550610dea9050565b8060011415610d83576001600160a01b03821660009081526007602052604081206001908101805491929091610d41908490611f00565b8060021415610db8576001600160a01b0382166000908152600760205260408120600201805460019290610d41908490611f00565b6001600160a01b0382166000908152600760205260408120600301805460019290610de4908490611f00565b90915550505b60405167ffffffffffffffff841681526001600160a01b038316907fa0300337279bbac8f01103290febbcdf98d881b85a4300cc743b3714a18938eb906020015b60405180910390a2505050565b6000546001600160a01b03163314610e925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b60028054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b600254600160a01b900460ff16610f245760405162461bcd60e51b815260206004820152601860248201527f5374616b696e6720686173206265656e207061757365642e00000000000000006044820152606401610576565b6001546001600160a01b03163314610f7e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c79206573746174657320636f6e747261637420736574207374616b65006044820152606401610576565b610f87816116f5565b60005b82518167ffffffffffffffff161015611234576040518060400160405280836001600160a01b031681526020014267ffffffffffffffff1681525060066000858467ffffffffffffffff1681518110610fe557610fe5611f4c565b60209081029190910181015167ffffffffffffffff908116835282820193909352604090910160009081208451815495909301518416600160a01b026001600160e01b03199095166001600160a01b0393841617949094179093556001548651911691633ee6352e918791861690811061106157611061611f4c565b60200260200101516040518263ffffffff1660e01b8152600401611095919067ffffffffffffffff91909116815260200190565b602060405180830381865afa1580156110b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d69190611f33565b905080611111576001600160a01b0383166000908152600760205260408120805460019290611106908490611f00565b909155506111af9050565b8060011415611148576001600160a01b03831660009081526007602052604081206001908101805491929091611106908490611f00565b806002141561117d576001600160a01b0383166000908152600760205260408120600201805460019290611106908490611f00565b6001600160a01b03831660009081526007602052604081206003018054600192906111a9908490611f00565b90915550505b826001600160a01b03167fa0300337279bbac8f01103290febbcdf98d881b85a4300cc743b3714a18938eb858467ffffffffffffffff16815181106111f6576111f6611f4c565b602002602001015160405161121b919067ffffffffffffffff91909116815260200190565b60405180910390a25061122d81611f62565b9050610f8a565b505050565b6000546001600160a01b031633146112935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b60028054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6040805161493e808252620927e082019092526060916000919060208201620927c0803683370190505090506000805b61493e8167ffffffffffffffff1610156113855767ffffffffffffffff81166000908152600660205260409020546001600160a01b0386811691161415611373578067ffffffffffffffff1683838151811061135a5761135a611f4c565b60209081029190910101528161136f81611f18565b9250505b8061137d81611f62565b9150506112fc565b5060008167ffffffffffffffff8111156113a1576113a1611ba1565b6040519080825280602002602001820160405280156113ca578160200160208202803683370190505b50905060005b8151811015611422578381815181106113eb576113eb611f4c565b602002602001015182828151811061140557611405611f4c565b60209081029190910101528061141a81611f18565b9150506113d0565b50949350505050565b6000546001600160a01b031633146114855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b6002805467ffffffffffffffff909216600160b01b027fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b600254600160a81b900460ff16156114e6576114e1610620565b6114ef565b6114ef336116f5565b6114f8816117b3565b50565b6000546001600160a01b031633146115555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610576565b6001600160a01b0381166115d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610576565b6114f881611756565b6001600160a01b038116600090815260076020526040812060030154819060059061160690604e611ee1565b6116109190611f8a565b6001600160a01b038416600090815260076020526040902060020154611637906006611ee1565b6001600160a01b03851660009081526007602052604090206001015460059061166190600c611ee1565b61166b9190611f8a565b6001600160a01b03861660009081526007602052604090205461168e9190611f00565b6116989190611f00565b6116a29190611f00565b6001600160a01b03841660009081526005602052604090205490915062015180906116cd9042611fac565b6003546116da9084611ee1565b6116e49190611ee1565b6116ee9190611f8a565b9392505050565b6001600160a01b038116156114f85761170d816115da565b6001600160a01b03821660009081526004602052604081208054909190611735908490611f00565b90915550506001600160a01b03166000908152600560205260409020429055565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b67ffffffffffffffff81166000908152600660205260409020546001600160a01b03166118225760405162461bcd60e51b815260206004820152601260248201527f546f6b656e4964206e6f74207374616b656400000000000000000000000000006044820152606401610576565b67ffffffffffffffff81166000908152600660205260409020546001600160a01b031633146118935760405162461bcd60e51b815260206004820152601960248201527f53656e646572206469646e2774207374616b6520746f6b656e000000000000006044820152606401610576565b67ffffffffffffffff80821660009081526006602052604081205490916118c291600160a01b90041642611fc3565b60025490915067ffffffffffffffff600160b01b9091048116908216116119515760405162461bcd60e51b815260206004820152603160248201527f43616e206e6f742072656d6f766520746f6b656e20756e74696c206c6f636b2d60448201527f696e20706572696f64206973206f7665720000000000000000000000000000006064820152608401610576565b600154604051631f731a9760e11b815267ffffffffffffffff841660048201526000916001600160a01b031690633ee6352e90602401602060405180830381865afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c89190611f33565b9050806119fa573360009081526007602052604081208054600192906119ef908490611fac565b90915550611a7d9050565b8060011415611a285733600090815260076020526040812060019081018054919290916119ef908490611fac565b8060021415611a54573360009081526007602052604081206002018054600192906119ef908490611fac565b336000908152600760205260408120600301805460019290611a77908490611fac565b90915550505b67ffffffffffffffff83166000818152600660205260409081902080546001600160e01b031916905560015490517f42842e0e00000000000000000000000000000000000000000000000000000000815230600482015233602482015260448101929092526001600160a01b0316906342842e0e90606401600060405180830381600087803b158015611b0f57600080fd5b505af1158015611b23573d6000803e3d6000fd5b50506040805167ffffffffffffffff8088168252861660208201523393507fee5822df4f609b31400150ad62416606b198b73a67cb664225ce6c1a2cb3ab4a925001610e2b565b80356001600160a01b0381168114611b8157600080fd5b919050565b600060208284031215611b9857600080fd5b6116ee82611b6a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611be057611be0611ba1565b604052919050565b60008060008060808587031215611bfe57600080fd5b611c0785611b6a565b93506020611c16818701611b6a565b935060408601359250606086013567ffffffffffffffff80821115611c3a57600080fd5b818801915088601f830112611c4e57600080fd5b813581811115611c6057611c60611ba1565b611c72601f8201601f19168501611bb7565b91508082528984828501011115611c8857600080fd5b808484018584013760008482840101525080935050505092959194509250565b600060208284031215611cba57600080fd5b5035919050565b600080600060608486031215611cd657600080fd5b83359250611ce660208501611b6a565b9150604084013590509250925092565b803567ffffffffffffffff81168114611b8157600080fd5b600082601f830112611d1f57600080fd5b8135602067ffffffffffffffff821115611d3b57611d3b611ba1565b8160051b611d4a828201611bb7565b9283528481018201928281019087851115611d6457600080fd5b83870192505b84831015611d8a57611d7b83611cf6565b82529183019190830190611d6a565b979650505050505050565b600060208284031215611da757600080fd5b813567ffffffffffffffff811115611dbe57600080fd5b611dca84828501611d0e565b949350505050565b60008060408385031215611de557600080fd5b611dee83611cf6565b9150611dfc60208401611b6a565b90509250929050565b600060208284031215611e1757600080fd5b813580151581146116ee57600080fd5b60008060408385031215611e3a57600080fd5b823567ffffffffffffffff811115611e5157600080fd5b611e5d85828601611d0e565b925050611dfc60208401611b6a565b6020808252825182820181905260009190848201906040850190845b81811015611ea457835183529284019291840191600101611e88565b50909695505050505050565b600060208284031215611ec257600080fd5b6116ee82611cf6565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611efb57611efb611ecb565b500290565b60008219821115611f1357611f13611ecb565b500190565b6000600019821415611f2c57611f2c611ecb565b5060010190565b600060208284031215611f4557600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600067ffffffffffffffff80831681811415611f8057611f80611ecb565b6001019392505050565b600082611fa757634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611fbe57611fbe611ecb565b500390565b600067ffffffffffffffff83811690831681811015611fe457611fe4611ecb565b03939250505056fea2646970667358221220d607d872839ae30cb77d21c3ed6e01d0ec2a5ec34a710aa93572750c2e42a8be64736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.