More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 157 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Many From ... | 13923936 | 1139 days ago | IN | 0 ETH | 0.01988365 | ||||
Add Many To King... | 13918611 | 1139 days ago | IN | 0 ETH | 0.02385261 | ||||
Claim Many From ... | 13911694 | 1140 days ago | IN | 0 ETH | 0.01841822 | ||||
Add Many To King... | 13904894 | 1141 days ago | IN | 0 ETH | 0.02618266 | ||||
Claim Many From ... | 13895974 | 1143 days ago | IN | 0 ETH | 0.02496661 | ||||
Add Many To King... | 13894692 | 1143 days ago | IN | 0 ETH | 0.14248465 | ||||
Claim Many From ... | 13882018 | 1145 days ago | IN | 0 ETH | 0.02270901 | ||||
Add Many To King... | 13879509 | 1145 days ago | IN | 0 ETH | 0.01316969 | ||||
Add Many To King... | 13877304 | 1146 days ago | IN | 0 ETH | 0.01533838 | ||||
Claim Many From ... | 13876133 | 1146 days ago | IN | 0 ETH | 0.0120112 | ||||
Add Many To King... | 13875678 | 1146 days ago | IN | 0 ETH | 0.00867327 | ||||
Add Many To King... | 13873000 | 1146 days ago | IN | 0 ETH | 0.01409481 | ||||
Claim Many From ... | 13871984 | 1147 days ago | IN | 0 ETH | 0.01662218 | ||||
Claim Many From ... | 13871835 | 1147 days ago | IN | 0 ETH | 0.00853957 | ||||
Claim Many From ... | 13871758 | 1147 days ago | IN | 0 ETH | 0.01314328 | ||||
Add Many To King... | 13868524 | 1147 days ago | IN | 0 ETH | 0.01570678 | ||||
Add Many To King... | 13867889 | 1147 days ago | IN | 0 ETH | 0.01657363 | ||||
Add Many To King... | 13866490 | 1147 days ago | IN | 0 ETH | 0.01233043 | ||||
Add Many To King... | 13865518 | 1148 days ago | IN | 0 ETH | 0.01308298 | ||||
Add Many To King... | 13862875 | 1148 days ago | IN | 0 ETH | 0.01600073 | ||||
Add Many To King... | 13862765 | 1148 days ago | IN | 0 ETH | 0.01482728 | ||||
Claim Many From ... | 13862199 | 1148 days ago | IN | 0 ETH | 0.00992867 | ||||
Add Many To King... | 13862157 | 1148 days ago | IN | 0 ETH | 0.01550028 | ||||
Claim Many From ... | 13861999 | 1148 days ago | IN | 0 ETH | 0.01155496 | ||||
Add Many To King... | 13861718 | 1148 days ago | IN | 0 ETH | 0.01085501 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Kingdom
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./interfaces/IHNDGame.sol"; import "./interfaces/IHND.sol"; import "./interfaces/IEXP.sol"; import "./interfaces/IKingdom.sol"; contract Kingdom is IKingdom, Ownable, ReentrancyGuard, IERC721Receiver, Pausable { // maximum rank for a Hero/Demon uint8 public constant MAX_RANK = 8; // struct to store a stake's token, owner, and earning values struct Stake { uint16 tokenId; uint80 value; address owner; } uint256 private totalRankStaked; uint256 private numHeroesStaked; event TokenStaked(address indexed owner, uint256 indexed tokenId, bool indexed isHero, uint256 value); event HeroClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); event DemonClaimed(uint256 indexed tokenId, bool indexed unstaked, uint256 earned); // reference to the HND NFT contract IHND public HNDNFT; // reference to the HND NFT contract IHNDGame public HNDGame; // reference to the $EXP contract for minting $EXP earnings IEXP public expToken; // maps tokenId to stake mapping(uint256 => Stake) private kingdom; // maps rank to all Demon staked with that rank mapping(uint256 => Stake[]) private army; // tracks location of each Demon in Army mapping(uint256 => uint256) private armyIndices; // any rewards distributed when no demons are stakd mapping(address => uint256[]) public stakedTokenOwners; //holds mapping of their position in stakedTokenOwners mapping(uint256 => uint256) private stakedTokenIndex; uint256 private unaccountedRewards = 0; // amount of $EXP due for each rank point staked uint256 private expPerRank = 0; // heroes earn 10000 $EXP per day uint256 public constant DAILY_EXP_RATE = 10000 ether; // gen0 heroes earn 10000 $EXP per day uint256 public constant GEN0_DAILY_EXP_RATE = 15000 ether; // heroes must have 2 days worth of $EXP to unstake or else they're still guarding the Kingdom uint256 public constant MINIMUM_TO_EXIT = 2 days; // demons take a 20% tax on all $EXP claimede uint256 public constant EXP_CLAIM_TAX_PERCENTAGE = 20; // when heroes are leaving demons have 50% chance to take 50% of their earned $EXP instead of 20% uint256 public constant EXP_STOLEN_DENOMINATOR = 2; // 10,000,000,000 $EXP used and cycled through during combat uint256 public constant MAXIMUM_GLOBAL_EXP = 10000000000 ether; // $EXP that has been dispensed from the faucet during combat uint256 public expFromFaucet; // the last time $EXP was claimed uint256 private lastClaimTimestamp; // emergency rescue to allow unstaking without any checks but without $EXP bool public rescueEnabled = false; mapping(address => bool) private admins; /** */ constructor() { _pause(); } /** CRITICAL TO SETUP */ modifier requireContractsSet() { require(address(HNDNFT) != address(0) && address(expToken) != address(0) && address(HNDGame) != address(0), "Contracts not set"); _; } function setContracts(address _HNDNFT, address _exp, address _HNDGame) external onlyOwner { HNDNFT = IHND(_HNDNFT); expToken = IEXP(_exp); HNDGame = IHNDGame(_HNDGame); } /** STAKING */ /** * adds Heros and Demons to the Kingdom and Army * @param account the address of the staker * @param tokenIds the IDs of the Heros and Demons to stake */ function addManyToKingdom(address account, uint16[] calldata tokenIds) external override nonReentrant { require(tx.origin == _msgSender() || _msgSender() == address(HNDGame), "Only EOA"); require(account == tx.origin, "account to sender mismatch"); for (uint i = 0; i < tokenIds.length; i++) { if (_msgSender() != address(HNDGame)) { // dont do this step if its a mint + stake require(HNDNFT.ownerOf(tokenIds[i]) == _msgSender(), "You don't own this token"); HNDNFT.transferFrom(_msgSender(), address(this), tokenIds[i]); } else if (tokenIds[i] == 0) { continue; // there may be gaps in the array for stolen tokens } if (HNDNFT.isHero(tokenIds[i])) _addHeroToKingdom(account, tokenIds[i]); else _addDemonToArmy(account, tokenIds[i]); } } /** * adds a single Hero to the Kingdom * @param account the address of the staker * @param tokenId the ID of the Hero to add to the Kingdom */ function _addHeroToKingdom(address account, uint256 tokenId) internal whenNotPaused _updateEarnings { kingdom[tokenId] = Stake({ owner: account, tokenId: uint16(tokenId), value: uint80(block.timestamp) }); stakedTokenIndex[tokenId] = stakedTokenOwners[account].length; stakedTokenOwners[account].push(tokenId); numHeroesStaked += 1; emit TokenStaked(account, tokenId, true, block.timestamp); } /** * adds a single Demon to the Army * @param account the address of the staker * @param tokenId the ID of the Demon to add to the Army */ function _addDemonToArmy(address account, uint256 tokenId) internal { uint8 rank = _rankForDemon(tokenId); totalRankStaked += rank; // Portion of earnings ranges from 8 to 5 armyIndices[tokenId] = army[rank].length; // Store the location of the demon in the Army army[rank].push(Stake({ owner: account, tokenId: uint16(tokenId), value: uint80(expPerRank) })); // Add the demon to the Army stakedTokenIndex[tokenId] = stakedTokenOwners[account].length; stakedTokenOwners[account].push(tokenId); emit TokenStaked(account, tokenId, false, expPerRank); } /** CLAIMING / UNSTAKING */ /** * realize $EXP earnings and optionally unstake tokens from the Kingdom * to unstake a Hero it will require it has 2 days worth of $EXP unclaimed * @param tokenIds the IDs of the tokens to claim earnings from * @param unstake whether or not to unstake ALL of the tokens listed in tokenIds */ function claimManyFromKingdom(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings nonReentrant { require(tx.origin == _msgSender() || _msgSender() == address(HNDGame), "Only EOA"); uint256 owed = 0; for (uint i = 0; i < tokenIds.length; i++) { if (HNDNFT.isHero(tokenIds[i])) { owed += _claimHeroFromKingdom(tokenIds[i], unstake); } else { owed += _claimDemonFromArmy(tokenIds[i], unstake); } } expToken.updateOriginAccess(); if (owed == 0) { return; } expToken.mint(_msgSender(), owed); } function calculateRewards(uint256 tokenId) external view returns (uint256 owed) { uint64 lastTokenWrite = HNDNFT.getTokenWriteBlock(tokenId); // Must check this, as getTokenTraits will be allowed since this contract is an admin require(lastTokenWrite < block.number, "hmmmm what doing?"); Stake memory stake = kingdom[tokenId]; if(HNDNFT.isHero(tokenId)) { if (expFromFaucet < MAXIMUM_GLOBAL_EXP) { owed = (block.timestamp - stake.value) * DAILY_EXP_RATE / 1 days; if (HNDNFT.getPaidTokens() >= tokenId) { // if they are a gen0 hero earn 15k owed = (block.timestamp - stake.value) * GEN0_DAILY_EXP_RATE / 1 days; } } else if (stake.value > lastClaimTimestamp) { owed = 0; // $EXP production stopped already } else { owed = (lastClaimTimestamp - stake.value) * DAILY_EXP_RATE / 1 days; // stop earning additional $EXP if it's all been earned if (HNDNFT.getPaidTokens() >= tokenId) { (lastClaimTimestamp - stake.value) * GEN0_DAILY_EXP_RATE / 1 days; } } } else { uint8 rank = _rankForDemon(tokenId); owed = (rank) * (expPerRank - stake.value); // Calculate portion of tokens based on Rank } } /** * realize $EXP earnings for a single Hero and optionally unstake it * if not unstaking, pay a 20% tax to the staked Demons * if unstaking, there is a 50% chance all $EXP is stolen * @param tokenId the ID of the Heros to claim earnings from * @param unstake whether or not to unstake the Heros * @return owed - the amount of $EXP earned */ function _claimHeroFromKingdom(uint256 tokenId, bool unstake) internal returns (uint256 owed) { require(HNDNFT.ownerOf(tokenId) == address(this), "Kingdom: Claiming unstaked hero!"); Stake memory stake = kingdom[tokenId]; require(stake.owner == _msgSender(), "Kingdom: Claiming unowned hero!"); require(!(unstake && block.timestamp - stake.value < MINIMUM_TO_EXIT), "Kingdom: Hero is still guarding!"); if (expFromFaucet < MAXIMUM_GLOBAL_EXP) { owed = (block.timestamp - stake.value) * DAILY_EXP_RATE / 1 days; } else if (stake.value > lastClaimTimestamp) { owed = 0; // $EXP production stopped already } else { owed = (lastClaimTimestamp - stake.value) * DAILY_EXP_RATE / 1 days; // stop earning additional $EXP if it's all been earned } if (unstake) { // 50% chance of half $EXP being stolen if (uint256(keccak256(abi.encode(blockhash(block.number-1), _msgSender(), tokenId))) % 2 == 1) { //steal half of $EXP accumulated _payDemonTax(owed/EXP_STOLEN_DENOMINATOR); // keep half the $EXP owed = (owed/EXP_STOLEN_DENOMINATOR); } delete kingdom[tokenId]; delete stakedTokenOwners[_msgSender()][stakedTokenIndex[tokenId]]; stakedTokenIndex[tokenId] = 0; numHeroesStaked -= 1; HNDNFT.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // send back Hero } else { _payDemonTax(owed * EXP_CLAIM_TAX_PERCENTAGE / 100); // percentage tax to staked demons // send leftover owed = owed * (100 - EXP_CLAIM_TAX_PERCENTAGE) / 100; // remainder goes to Hero owner // reset their stake kingdom[tokenId] = Stake({ owner: _msgSender(), tokenId: uint16(tokenId), value: uint80(block.timestamp) }); } emit HeroClaimed(tokenId, unstake, owed); } /** * realize $EXP earnings for a single Demon and optionally unstake it * Demons earn $EXP proportional to their rank * @param tokenId the ID of the Demon to claim earnings from * @param unstake whether or not to unstake the Demon * @return owed the amount of $EXP earned */ function _claimDemonFromArmy(uint256 tokenId, bool unstake) internal returns (uint256 owed) { require(HNDNFT.ownerOf(tokenId) == address(this), "Kingdom: Claiming unstaked demon!"); uint8 rank = _rankForDemon(tokenId); Stake memory stake = army[rank][armyIndices[tokenId]]; require(stake.owner == _msgSender(), "Kingdom: Claiming unowned demon!"); owed = (rank) * (expPerRank - stake.value); // Calculate portion of tokens based on Rank if (unstake) { totalRankStaked -= rank; // Remove rank from total staked Stake memory lastStake = army[rank][army[rank].length - 1]; army[rank][armyIndices[tokenId]] = lastStake; // Shuffle last Demon to current position armyIndices[lastStake.tokenId] = armyIndices[tokenId]; army[rank].pop(); // Remove duplicate delete armyIndices[tokenId]; // Delete old mapping delete stakedTokenOwners[_msgSender()][stakedTokenIndex[tokenId]]; stakedTokenIndex[tokenId] = 0; // Always remove last to guard against reentrance HNDNFT.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // Send back Demon } else { // we reset their stake army[rank][armyIndices[tokenId]] = Stake({ owner: _msgSender(), tokenId: uint16(tokenId), value: uint80(expPerRank) }); } emit DemonClaimed(tokenId, unstake, owed); } /** * emergency unstake tokens * @param tokenIds the IDs of the tokens to claim earnings from */ function rescue(uint256[] calldata tokenIds) external nonReentrant { require(rescueEnabled, "RESCUE DISABLED"); uint256 tokenId; Stake memory stake; Stake memory lastStake; uint8 rank; for (uint i = 0; i < tokenIds.length; i++) { tokenId = tokenIds[i]; if (HNDNFT.isHero(tokenId)) { stake = kingdom[tokenId]; require(stake.owner == _msgSender(), "must own token"); delete kingdom[tokenId]; numHeroesStaked -= 1; HNDNFT.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // send back Heros emit HeroClaimed(tokenId, true, 0); } else { rank = _rankForDemon(tokenId); stake = army[rank][armyIndices[tokenId]]; require(stake.owner == _msgSender(), "must own token"); totalRankStaked -= rank; // Remove Rank from total staked lastStake = army[rank][army[rank].length - 1]; army[rank][armyIndices[tokenId]] = lastStake; // Shuffle last Demon to current position armyIndices[lastStake.tokenId] = armyIndices[tokenId]; army[rank].pop(); // Remove duplicate delete armyIndices[tokenId]; // Delete old mapping HNDNFT.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // Send back Demon emit DemonClaimed(tokenId, true, 0); } } } /** ACCOUNTING */ /** * add $EXP to claimable pot for the Army * @param amount $EXP to add to the pot */ function _payDemonTax(uint256 amount) internal { if (totalRankStaked == 0) { // if there's no staked demons unaccountedRewards += amount; // keep track of $EXP due to demons return; } // makes sure to include any unaccounted $EXP expPerRank += (amount + unaccountedRewards) / totalRankStaked; unaccountedRewards = 0; } /** * add $EXP to claimable pot for the Army * @param amount $EXP to add to the pot */ function recycleExp(uint256 amount) override external { require(owner() == _msgSender() || admins[_msgSender()], "Only admins can call this"); expFromFaucet -= amount; } /** * tracks $EXP earnings to ensure it stops once 10 billion is eclipsed */ modifier _updateEarnings() { if (expFromFaucet < MAXIMUM_GLOBAL_EXP) { expFromFaucet += (block.timestamp - lastClaimTimestamp) * numHeroesStaked * DAILY_EXP_RATE / 1 days; lastClaimTimestamp = block.timestamp; } _; } /** ADMIN */ /** * allows owner to enable "rescue mode" * simplifies accounting, prioritizes tokens out in emergency */ function setRescueEnabled(bool _enabled) external onlyOwner { rescueEnabled = _enabled; } /** * enables owner to pause / unpause contract */ function setPaused(bool _paused) external requireContractsSet onlyOwner { if (_paused) _pause(); else _unpause(); } /** READ ONLY */ /** * gets the rank score for a Demon * @param tokenId the ID of the Demon to get the rank score for * @return the rank score of the Demon (5-8) */ function _rankForDemon(uint256 tokenId) internal view returns (uint8) { IHND.HeroDemon memory s = HNDNFT.getTokenTraits(tokenId); return MAX_RANK - s.rankIndex; // rank index is 0-3 } /** * chooses a random Demon thief when a newly minted token is stolen * @param seed a random value to choose a Demon from * @return the owner of the randomly selected Demon thief */ function randomDemonOwner(uint256 seed) external view override returns (address) { if (totalRankStaked == 0) { return address(0x0); } uint256 bucket = (seed & 0xFFFFFFFF) % totalRankStaked; // choose a value from 0 to total rank staked uint256 cumulative; seed >>= 32; // loop through each bucket of Demons with the same rank score for (uint i = MAX_RANK - 3; i <= MAX_RANK; i++) { cumulative += army[i].length * i; // if the value is not inside of that bucket, keep going if (bucket >= cumulative) continue; // get the address of a random Demon with that rank score return army[i][seed % army[i].length].owner; } return address(0x0); } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { require(from == address(0x0), "Cannot send to Kingdom directly"); return IERC721Receiver.onERC721Received.selector; } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { admins[addr] = true; } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { admins[addr] = false; } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IKingdom { function addManyToKingdom(address account, uint16[] calldata tokenIds) external; function randomDemonOwner(uint256 seed) external view returns (address); function recycleExp(uint256 amount) external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IEXP { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; function updateOriginAccess() external; function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; interface IHND is IERC721Enumerable { // game data storage struct HeroDemon { bool isHero; bool isFemale; uint8 body; uint8 face; uint8 eyes; uint8 headpiecehorns; uint8 gloves; uint8 armor; uint8 weapon; uint8 shield; uint8 shoes; uint8 tailflame; uint8 rankIndex; } function minted() external returns (uint16); function updateOriginAccess(uint16[] memory tokenIds) external; function mint(address recipient, uint256 seed) external; function burn(uint256 tokenId) external; function getMaxTokens() external view returns (uint256); function getPaidTokens() external view returns (uint256); function getTokenTraits(uint256 tokenId) external view returns (HeroDemon memory); function getTokenWriteBlock(uint256 tokenId) external view returns(uint64); function isHero(uint256 tokenId) external view returns(bool); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IHNDGame { }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/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 (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/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"unstaked","type":"bool"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"}],"name":"DemonClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"unstaked","type":"bool"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"}],"name":"HeroClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bool","name":"isHero","type":"bool"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DAILY_EXP_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXP_CLAIM_TAX_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXP_STOLEN_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GEN0_DAILY_EXP_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HNDGame","outputs":[{"internalType":"contract IHNDGame","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HNDNFT","outputs":[{"internalType":"contract IHND","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_GLOBAL_EXP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RANK","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_TO_EXIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"addManyToKingdom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"owed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"bool","name":"unstake","type":"bool"}],"name":"claimManyFromKingdom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expFromFaucet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expToken","outputs":[{"internalType":"contract IEXP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"randomDemonOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recycleExp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_HNDNFT","type":"address"},{"internalType":"address","name":"_exp","type":"address"},{"internalType":"address","name":"_HNDGame","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setRescueEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedTokenOwners","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600d819055600e556011805460ff191690553480156200002557600080fd5b5062000031336200004f565b600180556002805460ff19169055620000496200009f565b6200013d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff1615620000ea5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001203390565b6040516001600160a01b03909116815260200160405180910390a1565b613291806200014d6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370480275116101045780638da5cb5b116100a2578063c8d88afe11610071578063c8d88afe146103c4578063d0f09da7146103d7578063d3ea4350146103ea578063f2fde38b146103fd57600080fd5b80638da5cb5b14610375578063962cee32146103865780639e3bcb8d14610397578063b3066d49146103b157600080fd5b806376531008116100de57806376531008146103365780637cbe3663146103495780637dcc48981461035c5780637eace1911461036457600080fd5b80637048027514610308578063715018a61461031b578063763e9d0e1461032357600080fd5b806337a386b9116101715780635c975abb1161014b5780635c975abb146102b75780635dd6f92f146102c25780636a3ef057146102ed5780636ce1be011461030057600080fd5b806337a386b91461027d57806339db714f14610287578063435567bd146102a457600080fd5b80631011f7aa116101ad5780631011f7aa14610218578063150b7a021461022b57806316c38b3c146102575780631785f53c1461026a57600080fd5b80630261daf8146101d457806308c772fa146101fa5780630b1a44521461020f575b600080fd5b6101e76101e2366004612e62565b610410565b6040519081526020015b60405180910390f35b61020d610208366004612e0d565b610441565b005b6101e7600f5481565b61020d610226366004612e8e565b61088c565b61023e610239366004612d6e565b610c39565b6040516001600160e01b031990911681526020016101f1565b61020d610265366004612f1c565b610ca4565b61020d610278366004612ce9565b610d8b565b6101e76202a30081565b6011546102949060ff1681565b60405190151581526020016101f1565b6101e76b204fce5e3e2502611000000081565b60025460ff16610294565b6007546102d5906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b61020d6102fb366004612eda565b610df4565b6101e7600281565b61020d610316366004612ce9565b61142c565b61020d611498565b6102d5610331366004613078565b6114ec565b61020d610344366004612f1c565b6115db565b6006546102d5906001600160a01b031681565b6101e7601481565b6101e769021e19e0c9bab240000081565b6000546001600160a01b03166102d5565b6101e769032d26d12e980b60000081565b61039f600881565b60405160ff90911681526020016101f1565b61020d6103bf366004612d23565b611636565b61020d6103d2366004613078565b6116ca565b6005546102d5906001600160a01b031681565b6101e76103f8366004613078565b611758565b61020d61040b366004612ce9565b611b90565b600b602052816000526040600020818154811061042c57600080fd5b90600052602060002001600091509150505481565b600260015414156104995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600155323314806104bf57506006546001600160a01b0316336001600160a01b0316145b6104f65760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b6044820152606401610490565b6001600160a01b038316321461054e5760405162461bcd60e51b815260206004820152601a60248201527f6163636f756e7420746f2073656e646572206d69736d617463680000000000006044820152606401610490565b60005b81811015610882576006546001600160a01b0316336001600160a01b0316146107205760055433906001600160a01b0316636352211e85858581811061059957610599613202565b90506020020160208101906105ae9190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156105e857600080fd5b505afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190612d06565b6001600160a01b0316146106765760405162461bcd60e51b815260206004820152601860248201527f596f7520646f6e2774206f776e207468697320746f6b656e00000000000000006044820152606401610490565b6005546001600160a01b03166323b872dd333086868681811061069b5761069b613202565b90506020020160208101906106b09190613054565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015261ffff166044820152606401600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b50505050610754565b82828281811061073257610732613202565b90506020020160208101906107479190613054565b61ffff1661075457610870565b6005546001600160a01b03166336a54b9084848481811061077757610777613202565b905060200201602081019061078c9190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156107c657600080fd5b505afa1580156107da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fe9190612f39565b1561083c576108378484848481811061081957610819613202565b905060200201602081019061082e9190613054565b61ffff16611c46565b610870565b6108708484848481811061085257610852613202565b90506020020160208101906108679190613054565b61ffff16611e18565b8061087a81613191565b915050610551565b5050600180555050565b60025460ff16156108d25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6b204fce5e3e25026110000000600f541015610941576201518069021e19e0c9bab2400000600454601054426109089190613157565b6109129190613138565b61091c9190613138565b6109269190613124565b600f6000828254610937919061310c565b9091555050426010555b600260015414156109945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610490565b6002600155323314806109ba57506006546001600160a01b0316336001600160a01b0316145b6109f15760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b6044820152606401610490565b6000805b83811015610b44576005546001600160a01b03166336a54b90868684818110610a2057610a20613202565b9050602002016020810190610a359190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015610a6f57600080fd5b505afa158015610a83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa79190612f39565b15610af157610ae0858583818110610ac157610ac1613202565b9050602002016020810190610ad69190613054565b61ffff1684611f66565b610aea908361310c565b9150610b32565b610b25858583818110610b0657610b06613202565b9050602002016020810190610b1b9190613054565b61ffff16846124a6565b610b2f908361310c565b91505b80610b3c81613191565b9150506109f5565b50600760009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b505050508060001415610bbc5750610c30565b6007546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b50505050505b50506001805550565b60006001600160a01b03851615610c925760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742073656e6420746f204b696e67646f6d206469726563746c79006044820152606401610490565b50630a85bd0160e11b95945050505050565b6005546001600160a01b031615801590610cc857506007546001600160a01b031615155b8015610cde57506006546001600160a01b031615155b610d2a5760405162461bcd60e51b815260206004820152601160248201527f436f6e747261637473206e6f74207365740000000000000000000000000000006044820152606401610490565b6000546001600160a01b03163314610d725760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b8015610d8357610d80612a16565b50565b610d80612aae565b6000546001600160a01b03163314610dd35760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b03166000908152601260205260409020805460ff19169055565b60026001541415610e475760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610490565b600260015560115460ff16610e9e5760405162461bcd60e51b815260206004820152600f60248201527f5245534355452044495341424c454400000000000000000000000000000000006044820152606401610490565b60408051606080820183526000808352602080840182905283850182905284519283018552818352820181905292810183905282805b8581101561141f57868682818110610eee57610eee613202565b60055460405163036a54b960e41b815260209290920293909301356004820181905297506001600160a01b03909216916336a54b90915060240160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190612f39565b156110fd576000858152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b03169181018290529450331461100e5760405162461bcd60e51b815260206004820152600e60248201526d36bab9ba1037bbb7103a37b5b2b760911b6044820152606401610490565b60008581526008602052604081208190556004805460019290611032908490613157565b90915550506005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052608060648201526000608482015260a401600060405180830381600087803b1580156110a757600080fd5b505af11580156110bb573d6000803e3d6000fd5b505060405160008152600192508791507f68eda06c8660770b87a6b84bf77411ef7810ae3258c1561b6b8ed299c99763e49060200160405180910390a361140d565b61110685612b31565b60ff81166000908152600960209081526040808320898452600a9092529091205481549294509091811061113c5761113c613202565b600091825260209182902060408051606081018252929091015461ffff811683526201000081046001600160501b031693830193909352600160601b9092046001600160a01b0316918101829052945033146111cb5760405162461bcd60e51b815260206004820152600e60248201526d36bab9ba1037bbb7103a37b5b2b760911b6044820152606401610490565b8160ff16600360008282546111e09190613157565b909155505060ff82166000908152600960205260409020805461120590600190613157565b8154811061121557611215613202565b6000918252602080832060408051606081018252939091015461ffff811684526201000081046001600160501b031684840152600160601b90046001600160a01b03168382015260ff8616845260098252808420898552600a909252909220548254919550859291811061128b5761128b613202565b60009182526020808320845192018054858301516040968701516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390921662010000026bffffffffffffffffffffffff1990931661ffff968716179290921716179055888352600a815283832054875190921683528383209190915560ff851682526009905220805480611324576113246131ec565b600082815260208082206000199084018101839055909201909255868252600a905260408120556005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052608060648201526000608482015260a401600060405180830381600087803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b505060405160008152600192508791507f9a719a065927b31abf4734d7138001fc1ee887ecf5a3512f74c5878a7a2516c79060200160405180910390a35b8061141781613191565b915050610ed4565b5050600180555050505050565b6000546001600160a01b031633146114745760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000546001600160a01b031633146114e05760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6114ea6000612bce565b565b60006003546000141561150157506000919050565b60006003548363ffffffff1661151791906131ac565b60209390931c92905060008061152f6003600861316e565b60ff1690505b600881116115d057600081815260096020526040902054611557908290613138565b611561908361310c565b915081831061156f576115be565b6000818152600960205260409020805461158990876131ac565b8154811061159957611599613202565b600091825260209091200154600160601b90046001600160a01b031695945050505050565b806115c881613191565b915050611535565b506000949350505050565b6000546001600160a01b031633146116235760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6011805460ff1916911515919091179055565b6000546001600160a01b0316331461167e5760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b600580546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821617909155600780549385169382169390931790925560068054919093169116179055565b6000546001600160a01b03163314806116f257503360009081526012602052604090205460ff165b61173e5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c792061646d696e732063616e2063616c6c2074686973000000000000006044820152606401610490565b80600f60008282546117509190613157565b909155505050565b600554604051631d7a2e6d60e31b81526004810183905260009182916001600160a01b039091169063ebd173689060240160206040518083038186803b1580156117a157600080fd5b505afa1580156117b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d991906130aa565b9050438167ffffffffffffffff16106118345760405162461bcd60e51b815260206004820152601160248201527f686d6d6d6d207768617420646f696e673f0000000000000000000000000000006044820152606401610490565b6000838152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b0390811682840152600554925163036a54b960e41b815260048101879052919216906336a54b909060240160206040518083038186803b1580156118bf57600080fd5b505afa1580156118d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f79190612f39565b15611b50576b204fce5e3e25026110000000600f541015611a20576201518069021e19e0c9bab240000082602001516001600160501b03164261193a9190613157565b6119449190613138565b61194e9190613124565b925083600560009054906101000a90046001600160a01b03166001600160a01b0316634018b1f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561199f57600080fd5b505afa1580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d79190613091565b10611a1b576201518069032d26d12e980b60000082602001516001600160501b031642611a049190613157565b611a0e9190613138565b611a189190613124565b92505b611b89565b60105481602001516001600160501b03161115611a405760009250611b89565b6201518069021e19e0c9bab240000082602001516001600160501b0316601054611a6a9190613157565b611a749190613138565b611a7e9190613124565b925083600560009054906101000a90046001600160a01b03166001600160a01b0316634018b1f86040518163ffffffff1660e01b815260040160206040518083038186803b158015611acf57600080fd5b505afa158015611ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b079190613091565b10611a1b576201518069032d26d12e980b60000082602001516001600160501b0316601054611b369190613157565b611b409190613138565b611b4a9190613124565b50611b89565b6000611b5b85612b31565b905081602001516001600160501b0316600e54611b789190613157565b611b859060ff8316613138565b9350505b5050919050565b6000546001600160a01b03163314611bd85760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b038116611c3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610490565b610d8081612bce565b60025460ff1615611c8c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6b204fce5e3e25026110000000600f541015611cfb576201518069021e19e0c9bab240000060045460105442611cc29190613157565b611ccc9190613138565b611cd69190613138565b611ce09190613124565b600f6000828254611cf1919061310c565b9091555050426010555b6040805160608101825261ffff80841682526001600160501b0342811660208085019182526001600160a01b0380891686880181815260008a8152600885528981209851895496519251909416600160601b026bffffffffffffffffffffffff9290971662010000026bffffffffffffffffffffffff199096169390971692909217939093171692909217909355918152600b8083528382208054868452600c8552948320859055908352600184810182559082529181209092018390556004805491929091611dcc90849061310c565b909155505060405142815260019082906001600160a01b038516907f8612e8567c2b59ea0cd07546cc5fd09fdcb85f542e6d73367c39b009ce24a0bf9060200160405180910390a45050565b6000611e2382612b31565b90508060ff1660036000828254611e3a919061310c565b909155505060ff811660009081526009602081815260408084208054878652600a8452828620819055938352815160608101835261ffff8089168252600e80546001600160501b039081168488019081526001600160a01b03808e168689018181526001808d018a55988d528a8d20975197909b01805493519b51909216600160601b026bffffffffffffffffffffffff9b90941662010000026bffffffffffffffffffffffff199093169690951695909517179790971696909617909155808652600b80855283872080548a8952600c87528589208190559186529281018355918652928520018690559154915185927f8612e8567c2b59ea0cd07546cc5fd09fdcb85f542e6d73367c39b009ce24a0bf91611f5991815260200190565b60405180910390a4505050565b6005546040516331a9108f60e11b81526004810184905260009130916001600160a01b0390911690636352211e9060240160206040518083038186803b158015611faf57600080fd5b505afa158015611fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe79190612d06565b6001600160a01b03161461203d5760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a20436c61696d696e6720756e7374616b6564206865726f216044820152606401610490565b6000838152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b03169181018290529033146120dc5760405162461bcd60e51b815260206004820152601f60248201527f4b696e67646f6d3a20436c61696d696e6720756e6f776e6564206865726f21006044820152606401610490565b82801561210357506202a30081602001516001600160501b0316426121019190613157565b105b156121505760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a204865726f206973207374696c6c206775617264696e67216044820152606401610490565b6b204fce5e3e25026110000000600f5410156121a9576201518069021e19e0c9bab240000082602001516001600160501b03164261218e9190613157565b6121989190613138565b6121a29190613124565b915061220a565b60105481602001516001600160501b031611156121c9576000915061220a565b6201518069021e19e0c9bab240000082602001516001600160501b03166010546121f39190613157565b6121fd9190613138565b6122079190613124565b91505b821561238057600261221d600143613157565b60408051914060208084019190915233838301526060808401899052825180850390910181526080909301909152815191012061225a91906131ac565b6001141561228357612275612270600284613124565b612c2b565b612280600283613124565b91505b6000848152600860209081526040808320839055338352600b8252808320878452600c90925290912054815481106122bd576122bd613202565b60009182526020808320909101829055858252600c90526040812081905560048054600192906122ee908490613157565b90915550506005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101879052608060648201526000608482015260a401600060405180830381600087803b15801561236357600080fd5b505af1158015612377573d6000803e3d6000fd5b50505050612462565b61239a6064612390601485613138565b6122709190613124565b60646123a7601482613157565b6123b19084613138565b6123bb9190613124565b915060405180606001604052808561ffff168152602001426001600160501b031681526020016123e83390565b6001600160a01b0390811690915260008681526008602090815260409182902084518154928601519590930151909316600160601b026bffffffffffffffffffffffff6001600160501b0390951662010000026bffffffffffffffffffffffff1990921661ffff9093169290921717929092169190911790555b821515847f68eda06c8660770b87a6b84bf77411ef7810ae3258c1561b6b8ed299c99763e48460405161249791815260200190565b60405180910390a35092915050565b6005546040516331a9108f60e11b81526004810184905260009130916001600160a01b0390911690636352211e9060240160206040518083038186803b1580156124ef57600080fd5b505afa158015612503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125279190612d06565b6001600160a01b0316146125875760405162461bcd60e51b815260206004820152602160248201527f4b696e67646f6d3a20436c61696d696e6720756e7374616b65642064656d6f6e6044820152602160f81b6064820152608401610490565b600061259284612b31565b90506000600960008360ff168152602001908152602001600020600a600087815260200190815260200160002054815481106125d0576125d0613202565b600091825260209182902060408051606081018252929091015461ffff811683526201000081046001600160501b031693830193909352600160601b9092046001600160a01b03169181018290529150331461266e5760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a20436c61696d696e6720756e6f776e65642064656d6f6e216044820152606401610490565b80602001516001600160501b0316600e546126899190613157565b6126969060ff8416613138565b925083156128f7578160ff16600360008282546126b39190613157565b909155505060ff8216600090815260096020526040812080546126d890600190613157565b815481106126e8576126e8613202565b6000918252602080832060408051606081018252939091015461ffff811684526201000081046001600160501b031684840152600160601b90046001600160a01b03168382015260ff87168452600982528084208a8552600a909252909220548254919350839291811061275e5761275e613202565b60009182526020808320845192018054858301516040968701516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390921662010000026bffffffffffffffffffffffff1990931661ffff968716179290921716179055898352600a815283832054855190921683528383209190915560ff8616825260099052208054806127f7576127f76131ec565b600082815260208082206000199084018101839055909201909255878252600a81526040808320839055338352600b8252808320898452600c909252909120548154811061284757612847613202565b60009182526020808320909101829055878252600c905260408120556005546001600160a01b031663b88d4fde3061287c3390565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101899052608060648201526000608482015260a401600060405180830381600087803b1580156128d957600080fd5b505af11580156128ed573d6000803e3d6000fd5b50505050506129d1565b60405180606001604052808661ffff168152602001600e546001600160501b031681526020016129243390565b6001600160a01b0316905260ff83166000908152600960209081526040808320898452600a909252909120548154811061296057612960613202565b6000918252602091829020835191018054928401516040909401516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390951662010000026bffffffffffffffffffffffff1990941661ffff9093169290921792909217929092169190911790555b831515857f9a719a065927b31abf4734d7138001fc1ee887ecf5a3512f74c5878a7a2516c785604051612a0691815260200190565b60405180910390a3505092915050565b60025460ff1615612a5c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a913390565b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff16612b005760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610490565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a91565b6005546040516394e5684760e01b81526004810183905260009182916001600160a01b03909116906394e56847906024016101a06040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb39190612f56565b90508061018001516008612bc7919061316e565b9392505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600354612c445780600d6000828254611750919061310c565b600354600d54612c54908361310c565b612c5e9190613124565b600e6000828254612c6f919061310c565b90915550506000600d5550565b60008083601f840112612c8e57600080fd5b50813567ffffffffffffffff811115612ca657600080fd5b6020830191508360208260051b8501011115612cc157600080fd5b9250929050565b8051612cd38161322d565b919050565b805160ff81168114612cd357600080fd5b600060208284031215612cfb57600080fd5b8135612bc781613218565b600060208284031215612d1857600080fd5b8151612bc781613218565b600080600060608486031215612d3857600080fd5b8335612d4381613218565b92506020840135612d5381613218565b91506040840135612d6381613218565b809150509250925092565b600080600080600060808688031215612d8657600080fd5b8535612d9181613218565b94506020860135612da181613218565b935060408601359250606086013567ffffffffffffffff80821115612dc557600080fd5b818801915088601f830112612dd957600080fd5b813581811115612de857600080fd5b896020828501011115612dfa57600080fd5b9699959850939650602001949392505050565b600080600060408486031215612e2257600080fd5b8335612e2d81613218565b9250602084013567ffffffffffffffff811115612e4957600080fd5b612e5586828701612c7c565b9497909650939450505050565b60008060408385031215612e7557600080fd5b8235612e8081613218565b946020939093013593505050565b600080600060408486031215612ea357600080fd5b833567ffffffffffffffff811115612eba57600080fd5b612ec686828701612c7c565b9094509250506020840135612d638161322d565b60008060208385031215612eed57600080fd5b823567ffffffffffffffff811115612f0457600080fd5b612f1085828601612c7c565b90969095509350505050565b600060208284031215612f2e57600080fd5b8135612bc78161322d565b600060208284031215612f4b57600080fd5b8151612bc78161322d565b60006101a08284031215612f6957600080fd5b612f716130d4565b612f7a83612cc8565b8152612f8860208401612cc8565b6020820152612f9960408401612cd8565b6040820152612faa60608401612cd8565b6060820152612fbb60808401612cd8565b6080820152612fcc60a08401612cd8565b60a0820152612fdd60c08401612cd8565b60c0820152612fee60e08401612cd8565b60e0820152610100613001818501612cd8565b90820152610120613013848201612cd8565b90820152610140613025848201612cd8565b90820152610160613037848201612cd8565b90820152610180613049848201612cd8565b908201529392505050565b60006020828403121561306657600080fd5b813561ffff81168114612bc757600080fd5b60006020828403121561308a57600080fd5b5035919050565b6000602082840312156130a357600080fd5b5051919050565b6000602082840312156130bc57600080fd5b815167ffffffffffffffff81168114612bc757600080fd5b6040516101a0810167ffffffffffffffff8111828210171561310657634e487b7160e01b600052604160045260246000fd5b60405290565b6000821982111561311f5761311f6131c0565b500190565b600082613133576131336131d6565b500490565b6000816000190483118215151615613152576131526131c0565b500290565b600082821015613169576131696131c0565b500390565b600060ff821660ff841680821015613188576131886131c0565b90039392505050565b60006000198214156131a5576131a56131c0565b5060010190565b6000826131bb576131bb6131d6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610d8057600080fd5b8015158114610d8057600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212200d058e13c4b169aa7f6886dd4d317d63b59bf6a6939ace118bb8e6576e90065564736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806370480275116101045780638da5cb5b116100a2578063c8d88afe11610071578063c8d88afe146103c4578063d0f09da7146103d7578063d3ea4350146103ea578063f2fde38b146103fd57600080fd5b80638da5cb5b14610375578063962cee32146103865780639e3bcb8d14610397578063b3066d49146103b157600080fd5b806376531008116100de57806376531008146103365780637cbe3663146103495780637dcc48981461035c5780637eace1911461036457600080fd5b80637048027514610308578063715018a61461031b578063763e9d0e1461032357600080fd5b806337a386b9116101715780635c975abb1161014b5780635c975abb146102b75780635dd6f92f146102c25780636a3ef057146102ed5780636ce1be011461030057600080fd5b806337a386b91461027d57806339db714f14610287578063435567bd146102a457600080fd5b80631011f7aa116101ad5780631011f7aa14610218578063150b7a021461022b57806316c38b3c146102575780631785f53c1461026a57600080fd5b80630261daf8146101d457806308c772fa146101fa5780630b1a44521461020f575b600080fd5b6101e76101e2366004612e62565b610410565b6040519081526020015b60405180910390f35b61020d610208366004612e0d565b610441565b005b6101e7600f5481565b61020d610226366004612e8e565b61088c565b61023e610239366004612d6e565b610c39565b6040516001600160e01b031990911681526020016101f1565b61020d610265366004612f1c565b610ca4565b61020d610278366004612ce9565b610d8b565b6101e76202a30081565b6011546102949060ff1681565b60405190151581526020016101f1565b6101e76b204fce5e3e2502611000000081565b60025460ff16610294565b6007546102d5906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b61020d6102fb366004612eda565b610df4565b6101e7600281565b61020d610316366004612ce9565b61142c565b61020d611498565b6102d5610331366004613078565b6114ec565b61020d610344366004612f1c565b6115db565b6006546102d5906001600160a01b031681565b6101e7601481565b6101e769021e19e0c9bab240000081565b6000546001600160a01b03166102d5565b6101e769032d26d12e980b60000081565b61039f600881565b60405160ff90911681526020016101f1565b61020d6103bf366004612d23565b611636565b61020d6103d2366004613078565b6116ca565b6005546102d5906001600160a01b031681565b6101e76103f8366004613078565b611758565b61020d61040b366004612ce9565b611b90565b600b602052816000526040600020818154811061042c57600080fd5b90600052602060002001600091509150505481565b600260015414156104995760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600155323314806104bf57506006546001600160a01b0316336001600160a01b0316145b6104f65760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b6044820152606401610490565b6001600160a01b038316321461054e5760405162461bcd60e51b815260206004820152601a60248201527f6163636f756e7420746f2073656e646572206d69736d617463680000000000006044820152606401610490565b60005b81811015610882576006546001600160a01b0316336001600160a01b0316146107205760055433906001600160a01b0316636352211e85858581811061059957610599613202565b90506020020160208101906105ae9190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156105e857600080fd5b505afa1580156105fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106209190612d06565b6001600160a01b0316146106765760405162461bcd60e51b815260206004820152601860248201527f596f7520646f6e2774206f776e207468697320746f6b656e00000000000000006044820152606401610490565b6005546001600160a01b03166323b872dd333086868681811061069b5761069b613202565b90506020020160208101906106b09190613054565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015261ffff166044820152606401600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b50505050610754565b82828281811061073257610732613202565b90506020020160208101906107479190613054565b61ffff1661075457610870565b6005546001600160a01b03166336a54b9084848481811061077757610777613202565b905060200201602081019061078c9190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b1580156107c657600080fd5b505afa1580156107da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fe9190612f39565b1561083c576108378484848481811061081957610819613202565b905060200201602081019061082e9190613054565b61ffff16611c46565b610870565b6108708484848481811061085257610852613202565b90506020020160208101906108679190613054565b61ffff16611e18565b8061087a81613191565b915050610551565b5050600180555050565b60025460ff16156108d25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6b204fce5e3e25026110000000600f541015610941576201518069021e19e0c9bab2400000600454601054426109089190613157565b6109129190613138565b61091c9190613138565b6109269190613124565b600f6000828254610937919061310c565b9091555050426010555b600260015414156109945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610490565b6002600155323314806109ba57506006546001600160a01b0316336001600160a01b0316145b6109f15760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920454f4160c01b6044820152606401610490565b6000805b83811015610b44576005546001600160a01b03166336a54b90868684818110610a2057610a20613202565b9050602002016020810190610a359190613054565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015610a6f57600080fd5b505afa158015610a83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa79190612f39565b15610af157610ae0858583818110610ac157610ac1613202565b9050602002016020810190610ad69190613054565b61ffff1684611f66565b610aea908361310c565b9150610b32565b610b25858583818110610b0657610b06613202565b9050602002016020810190610b1b9190613054565b61ffff16846124a6565b610b2f908361310c565b91505b80610b3c81613191565b9150506109f5565b50600760009054906101000a90046001600160a01b03166001600160a01b0316639c47ee3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b505050508060001415610bbc5750610c30565b6007546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015610c1657600080fd5b505af1158015610c2a573d6000803e3d6000fd5b50505050505b50506001805550565b60006001600160a01b03851615610c925760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742073656e6420746f204b696e67646f6d206469726563746c79006044820152606401610490565b50630a85bd0160e11b95945050505050565b6005546001600160a01b031615801590610cc857506007546001600160a01b031615155b8015610cde57506006546001600160a01b031615155b610d2a5760405162461bcd60e51b815260206004820152601160248201527f436f6e747261637473206e6f74207365740000000000000000000000000000006044820152606401610490565b6000546001600160a01b03163314610d725760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b8015610d8357610d80612a16565b50565b610d80612aae565b6000546001600160a01b03163314610dd35760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b03166000908152601260205260409020805460ff19169055565b60026001541415610e475760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610490565b600260015560115460ff16610e9e5760405162461bcd60e51b815260206004820152600f60248201527f5245534355452044495341424c454400000000000000000000000000000000006044820152606401610490565b60408051606080820183526000808352602080840182905283850182905284519283018552818352820181905292810183905282805b8581101561141f57868682818110610eee57610eee613202565b60055460405163036a54b960e41b815260209290920293909301356004820181905297506001600160a01b03909216916336a54b90915060240160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190612f39565b156110fd576000858152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b03169181018290529450331461100e5760405162461bcd60e51b815260206004820152600e60248201526d36bab9ba1037bbb7103a37b5b2b760911b6044820152606401610490565b60008581526008602052604081208190556004805460019290611032908490613157565b90915550506005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052608060648201526000608482015260a401600060405180830381600087803b1580156110a757600080fd5b505af11580156110bb573d6000803e3d6000fd5b505060405160008152600192508791507f68eda06c8660770b87a6b84bf77411ef7810ae3258c1561b6b8ed299c99763e49060200160405180910390a361140d565b61110685612b31565b60ff81166000908152600960209081526040808320898452600a9092529091205481549294509091811061113c5761113c613202565b600091825260209182902060408051606081018252929091015461ffff811683526201000081046001600160501b031693830193909352600160601b9092046001600160a01b0316918101829052945033146111cb5760405162461bcd60e51b815260206004820152600e60248201526d36bab9ba1037bbb7103a37b5b2b760911b6044820152606401610490565b8160ff16600360008282546111e09190613157565b909155505060ff82166000908152600960205260409020805461120590600190613157565b8154811061121557611215613202565b6000918252602080832060408051606081018252939091015461ffff811684526201000081046001600160501b031684840152600160601b90046001600160a01b03168382015260ff8616845260098252808420898552600a909252909220548254919550859291811061128b5761128b613202565b60009182526020808320845192018054858301516040968701516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390921662010000026bffffffffffffffffffffffff1990931661ffff968716179290921716179055888352600a815283832054875190921683528383209190915560ff851682526009905220805480611324576113246131ec565b600082815260208082206000199084018101839055909201909255868252600a905260408120556005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052608060648201526000608482015260a401600060405180830381600087803b1580156113bb57600080fd5b505af11580156113cf573d6000803e3d6000fd5b505060405160008152600192508791507f9a719a065927b31abf4734d7138001fc1ee887ecf5a3512f74c5878a7a2516c79060200160405180910390a35b8061141781613191565b915050610ed4565b5050600180555050505050565b6000546001600160a01b031633146114745760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000546001600160a01b031633146114e05760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6114ea6000612bce565b565b60006003546000141561150157506000919050565b60006003548363ffffffff1661151791906131ac565b60209390931c92905060008061152f6003600861316e565b60ff1690505b600881116115d057600081815260096020526040902054611557908290613138565b611561908361310c565b915081831061156f576115be565b6000818152600960205260409020805461158990876131ac565b8154811061159957611599613202565b600091825260209091200154600160601b90046001600160a01b031695945050505050565b806115c881613191565b915050611535565b506000949350505050565b6000546001600160a01b031633146116235760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6011805460ff1916911515919091179055565b6000546001600160a01b0316331461167e5760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b600580546001600160a01b0394851673ffffffffffffffffffffffffffffffffffffffff1991821617909155600780549385169382169390931790925560068054919093169116179055565b6000546001600160a01b03163314806116f257503360009081526012602052604090205460ff165b61173e5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c792061646d696e732063616e2063616c6c2074686973000000000000006044820152606401610490565b80600f60008282546117509190613157565b909155505050565b600554604051631d7a2e6d60e31b81526004810183905260009182916001600160a01b039091169063ebd173689060240160206040518083038186803b1580156117a157600080fd5b505afa1580156117b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d991906130aa565b9050438167ffffffffffffffff16106118345760405162461bcd60e51b815260206004820152601160248201527f686d6d6d6d207768617420646f696e673f0000000000000000000000000000006044820152606401610490565b6000838152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b0390811682840152600554925163036a54b960e41b815260048101879052919216906336a54b909060240160206040518083038186803b1580156118bf57600080fd5b505afa1580156118d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f79190612f39565b15611b50576b204fce5e3e25026110000000600f541015611a20576201518069021e19e0c9bab240000082602001516001600160501b03164261193a9190613157565b6119449190613138565b61194e9190613124565b925083600560009054906101000a90046001600160a01b03166001600160a01b0316634018b1f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561199f57600080fd5b505afa1580156119b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119d79190613091565b10611a1b576201518069032d26d12e980b60000082602001516001600160501b031642611a049190613157565b611a0e9190613138565b611a189190613124565b92505b611b89565b60105481602001516001600160501b03161115611a405760009250611b89565b6201518069021e19e0c9bab240000082602001516001600160501b0316601054611a6a9190613157565b611a749190613138565b611a7e9190613124565b925083600560009054906101000a90046001600160a01b03166001600160a01b0316634018b1f86040518163ffffffff1660e01b815260040160206040518083038186803b158015611acf57600080fd5b505afa158015611ae3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b079190613091565b10611a1b576201518069032d26d12e980b60000082602001516001600160501b0316601054611b369190613157565b611b409190613138565b611b4a9190613124565b50611b89565b6000611b5b85612b31565b905081602001516001600160501b0316600e54611b789190613157565b611b859060ff8316613138565b9350505b5050919050565b6000546001600160a01b03163314611bd85760405162461bcd60e51b8152602060048201819052602482015260008051602061323c8339815191526044820152606401610490565b6001600160a01b038116611c3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610490565b610d8081612bce565b60025460ff1615611c8c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6b204fce5e3e25026110000000600f541015611cfb576201518069021e19e0c9bab240000060045460105442611cc29190613157565b611ccc9190613138565b611cd69190613138565b611ce09190613124565b600f6000828254611cf1919061310c565b9091555050426010555b6040805160608101825261ffff80841682526001600160501b0342811660208085019182526001600160a01b0380891686880181815260008a8152600885528981209851895496519251909416600160601b026bffffffffffffffffffffffff9290971662010000026bffffffffffffffffffffffff199096169390971692909217939093171692909217909355918152600b8083528382208054868452600c8552948320859055908352600184810182559082529181209092018390556004805491929091611dcc90849061310c565b909155505060405142815260019082906001600160a01b038516907f8612e8567c2b59ea0cd07546cc5fd09fdcb85f542e6d73367c39b009ce24a0bf9060200160405180910390a45050565b6000611e2382612b31565b90508060ff1660036000828254611e3a919061310c565b909155505060ff811660009081526009602081815260408084208054878652600a8452828620819055938352815160608101835261ffff8089168252600e80546001600160501b039081168488019081526001600160a01b03808e168689018181526001808d018a55988d528a8d20975197909b01805493519b51909216600160601b026bffffffffffffffffffffffff9b90941662010000026bffffffffffffffffffffffff199093169690951695909517179790971696909617909155808652600b80855283872080548a8952600c87528589208190559186529281018355918652928520018690559154915185927f8612e8567c2b59ea0cd07546cc5fd09fdcb85f542e6d73367c39b009ce24a0bf91611f5991815260200190565b60405180910390a4505050565b6005546040516331a9108f60e11b81526004810184905260009130916001600160a01b0390911690636352211e9060240160206040518083038186803b158015611faf57600080fd5b505afa158015611fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe79190612d06565b6001600160a01b03161461203d5760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a20436c61696d696e6720756e7374616b6564206865726f216044820152606401610490565b6000838152600860209081526040918290208251606081018452905461ffff811682526201000081046001600160501b031692820192909252600160601b9091046001600160a01b03169181018290529033146120dc5760405162461bcd60e51b815260206004820152601f60248201527f4b696e67646f6d3a20436c61696d696e6720756e6f776e6564206865726f21006044820152606401610490565b82801561210357506202a30081602001516001600160501b0316426121019190613157565b105b156121505760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a204865726f206973207374696c6c206775617264696e67216044820152606401610490565b6b204fce5e3e25026110000000600f5410156121a9576201518069021e19e0c9bab240000082602001516001600160501b03164261218e9190613157565b6121989190613138565b6121a29190613124565b915061220a565b60105481602001516001600160501b031611156121c9576000915061220a565b6201518069021e19e0c9bab240000082602001516001600160501b03166010546121f39190613157565b6121fd9190613138565b6122079190613124565b91505b821561238057600261221d600143613157565b60408051914060208084019190915233838301526060808401899052825180850390910181526080909301909152815191012061225a91906131ac565b6001141561228357612275612270600284613124565b612c2b565b612280600283613124565b91505b6000848152600860209081526040808320839055338352600b8252808320878452600c90925290912054815481106122bd576122bd613202565b60009182526020808320909101829055858252600c90526040812081905560048054600192906122ee908490613157565b90915550506005546001600160a01b031663b88d4fde30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101879052608060648201526000608482015260a401600060405180830381600087803b15801561236357600080fd5b505af1158015612377573d6000803e3d6000fd5b50505050612462565b61239a6064612390601485613138565b6122709190613124565b60646123a7601482613157565b6123b19084613138565b6123bb9190613124565b915060405180606001604052808561ffff168152602001426001600160501b031681526020016123e83390565b6001600160a01b0390811690915260008681526008602090815260409182902084518154928601519590930151909316600160601b026bffffffffffffffffffffffff6001600160501b0390951662010000026bffffffffffffffffffffffff1990921661ffff9093169290921717929092169190911790555b821515847f68eda06c8660770b87a6b84bf77411ef7810ae3258c1561b6b8ed299c99763e48460405161249791815260200190565b60405180910390a35092915050565b6005546040516331a9108f60e11b81526004810184905260009130916001600160a01b0390911690636352211e9060240160206040518083038186803b1580156124ef57600080fd5b505afa158015612503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125279190612d06565b6001600160a01b0316146125875760405162461bcd60e51b815260206004820152602160248201527f4b696e67646f6d3a20436c61696d696e6720756e7374616b65642064656d6f6e6044820152602160f81b6064820152608401610490565b600061259284612b31565b90506000600960008360ff168152602001908152602001600020600a600087815260200190815260200160002054815481106125d0576125d0613202565b600091825260209182902060408051606081018252929091015461ffff811683526201000081046001600160501b031693830193909352600160601b9092046001600160a01b03169181018290529150331461266e5760405162461bcd60e51b815260206004820181905260248201527f4b696e67646f6d3a20436c61696d696e6720756e6f776e65642064656d6f6e216044820152606401610490565b80602001516001600160501b0316600e546126899190613157565b6126969060ff8416613138565b925083156128f7578160ff16600360008282546126b39190613157565b909155505060ff8216600090815260096020526040812080546126d890600190613157565b815481106126e8576126e8613202565b6000918252602080832060408051606081018252939091015461ffff811684526201000081046001600160501b031684840152600160601b90046001600160a01b03168382015260ff87168452600982528084208a8552600a909252909220548254919350839291811061275e5761275e613202565b60009182526020808320845192018054858301516040968701516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390921662010000026bffffffffffffffffffffffff1990931661ffff968716179290921716179055898352600a815283832054855190921683528383209190915560ff8616825260099052208054806127f7576127f76131ec565b600082815260208082206000199084018101839055909201909255878252600a81526040808320839055338352600b8252808320898452600c909252909120548154811061284757612847613202565b60009182526020808320909101829055878252600c905260408120556005546001600160a01b031663b88d4fde3061287c3390565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101899052608060648201526000608482015260a401600060405180830381600087803b1580156128d957600080fd5b505af11580156128ed573d6000803e3d6000fd5b50505050506129d1565b60405180606001604052808661ffff168152602001600e546001600160501b031681526020016129243390565b6001600160a01b0316905260ff83166000908152600960209081526040808320898452600a909252909120548154811061296057612960613202565b6000918252602091829020835191018054928401516040909401516001600160a01b0316600160601b026bffffffffffffffffffffffff6001600160501b0390951662010000026bffffffffffffffffffffffff1990941661ffff9093169290921792909217929092169190911790555b831515857f9a719a065927b31abf4734d7138001fc1ee887ecf5a3512f74c5878a7a2516c785604051612a0691815260200190565b60405180910390a3505092915050565b60025460ff1615612a5c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610490565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a913390565b6040516001600160a01b03909116815260200160405180910390a1565b60025460ff16612b005760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610490565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a91565b6005546040516394e5684760e01b81526004810183905260009182916001600160a01b03909116906394e56847906024016101a06040518083038186803b158015612b7b57600080fd5b505afa158015612b8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bb39190612f56565b90508061018001516008612bc7919061316e565b9392505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600354612c445780600d6000828254611750919061310c565b600354600d54612c54908361310c565b612c5e9190613124565b600e6000828254612c6f919061310c565b90915550506000600d5550565b60008083601f840112612c8e57600080fd5b50813567ffffffffffffffff811115612ca657600080fd5b6020830191508360208260051b8501011115612cc157600080fd5b9250929050565b8051612cd38161322d565b919050565b805160ff81168114612cd357600080fd5b600060208284031215612cfb57600080fd5b8135612bc781613218565b600060208284031215612d1857600080fd5b8151612bc781613218565b600080600060608486031215612d3857600080fd5b8335612d4381613218565b92506020840135612d5381613218565b91506040840135612d6381613218565b809150509250925092565b600080600080600060808688031215612d8657600080fd5b8535612d9181613218565b94506020860135612da181613218565b935060408601359250606086013567ffffffffffffffff80821115612dc557600080fd5b818801915088601f830112612dd957600080fd5b813581811115612de857600080fd5b896020828501011115612dfa57600080fd5b9699959850939650602001949392505050565b600080600060408486031215612e2257600080fd5b8335612e2d81613218565b9250602084013567ffffffffffffffff811115612e4957600080fd5b612e5586828701612c7c565b9497909650939450505050565b60008060408385031215612e7557600080fd5b8235612e8081613218565b946020939093013593505050565b600080600060408486031215612ea357600080fd5b833567ffffffffffffffff811115612eba57600080fd5b612ec686828701612c7c565b9094509250506020840135612d638161322d565b60008060208385031215612eed57600080fd5b823567ffffffffffffffff811115612f0457600080fd5b612f1085828601612c7c565b90969095509350505050565b600060208284031215612f2e57600080fd5b8135612bc78161322d565b600060208284031215612f4b57600080fd5b8151612bc78161322d565b60006101a08284031215612f6957600080fd5b612f716130d4565b612f7a83612cc8565b8152612f8860208401612cc8565b6020820152612f9960408401612cd8565b6040820152612faa60608401612cd8565b6060820152612fbb60808401612cd8565b6080820152612fcc60a08401612cd8565b60a0820152612fdd60c08401612cd8565b60c0820152612fee60e08401612cd8565b60e0820152610100613001818501612cd8565b90820152610120613013848201612cd8565b90820152610140613025848201612cd8565b90820152610160613037848201612cd8565b90820152610180613049848201612cd8565b908201529392505050565b60006020828403121561306657600080fd5b813561ffff81168114612bc757600080fd5b60006020828403121561308a57600080fd5b5035919050565b6000602082840312156130a357600080fd5b5051919050565b6000602082840312156130bc57600080fd5b815167ffffffffffffffff81168114612bc757600080fd5b6040516101a0810167ffffffffffffffff8111828210171561310657634e487b7160e01b600052604160045260246000fd5b60405290565b6000821982111561311f5761311f6131c0565b500190565b600082613133576131336131d6565b500490565b6000816000190483118215151615613152576131526131c0565b500290565b600082821015613169576131696131c0565b500390565b600060ff821660ff841680821015613188576131886131c0565b90039392505050565b60006000198214156131a5576131a56131c0565b5060010190565b6000826131bb576131bb6131d6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0381168114610d8057600080fd5b8015158114610d8057600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212200d058e13c4b169aa7f6886dd4d317d63b59bf6a6939ace118bb8e6576e90065564736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.