Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 30 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Profile | 18908943 | 369 days ago | IN | 0 ETH | 0.00248342 | ||||
Create Profile | 18337799 | 449 days ago | IN | 0 ETH | 0.00091891 | ||||
Create Profile | 17827837 | 521 days ago | IN | 0 ETH | 0.00818694 | ||||
Update Profile | 17524882 | 563 days ago | IN | 0 ETH | 0.0008433 | ||||
Update Profile | 16549812 | 700 days ago | IN | 0 ETH | 0.00154077 | ||||
Create Profile | 16549805 | 700 days ago | IN | 0 ETH | 0.00459819 | ||||
Create Profile | 16373819 | 725 days ago | IN | 0 ETH | 0.00487975 | ||||
Create Profile | 16373410 | 725 days ago | IN | 0 ETH | 0.00473125 | ||||
Update Profile | 16330952 | 731 days ago | IN | 0 ETH | 0.00075303 | ||||
Update Profile | 16287976 | 737 days ago | IN | 0 ETH | 0.00068358 | ||||
Create Profile | 16266061 | 740 days ago | IN | 0 ETH | 0.00274069 | ||||
Create Profile | 16253713 | 742 days ago | IN | 0 ETH | 0.00154815 | ||||
Update Profile | 16251641 | 742 days ago | IN | 0 ETH | 0.00066397 | ||||
Create Profile | 16217057 | 747 days ago | IN | 0 ETH | 0.001713 | ||||
Update Profile | 16183549 | 752 days ago | IN | 0 ETH | 0.00116376 | ||||
Create Profile | 16182669 | 752 days ago | IN | 0 ETH | 0.00274632 | ||||
Create Profile | 16182237 | 752 days ago | IN | 0 ETH | 0.0013664 | ||||
Update Profile | 16145105 | 757 days ago | IN | 0 ETH | 0.0006994 | ||||
Update Profile | 16137505 | 758 days ago | IN | 0 ETH | 0.00077151 | ||||
Update Profile | 16137421 | 758 days ago | IN | 0 ETH | 0.00132783 | ||||
Update Profile | 16127297 | 759 days ago | IN | 0 ETH | 0.00054015 | ||||
Create Profile | 16123264 | 760 days ago | IN | 0 ETH | 0.00372065 | ||||
Create Profile | 16122887 | 760 days ago | IN | 0 ETH | 0.00350577 | ||||
Create Profile | 16122289 | 760 days ago | IN | 0 ETH | 0.00132507 | ||||
Update Profile | 16121085 | 760 days ago | IN | 0 ETH | 0.00072241 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CrawlerPlayer
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler Player Profile and Stash Manager /// @author Studio Avante /// @notice Creates and maintain Player profile and stash /// @dev Serves CrawlerToken.sol, depends on ICrawlerToken (chambers tokens) // pragma solidity ^0.8.16; import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; import { ERC165Checker } from '@openzeppelin/contracts/utils/introspection/ERC165Checker.sol'; import { ICrawlerToken } from './ICrawlerToken.sol'; import { ICrawlerQuery } from './ICrawlerQuery.sol'; import { Crawl } from './Crawl.sol'; contract CrawlerPlayer is Ownable { ICrawlerQuery public _query; struct Profile { address pfpContract; uint256 pfpId; uint8 classId; uint8 style; uint16 value1; uint16 value2; uint16 value3; uint16 value4; uint16 value5; bool hidden; string name; } struct Stash { uint128 coins; uint128 worth; uint32[8] gems; } mapping(address => Profile) private _profiles; mapping(address => Stash) private _stash; event CreatedProfile(address indexed player); event UpdatedProfile(address indexed player); event Give(address indexed to, Crawl.Gem indexed gem, uint16 indexed coins, uint16 worth); event Take(address indexed from, Crawl.Gem indexed gem, uint16 indexed coins, uint16 worth); /// @dev modifier to test profile existence, reverts if it does not modifier ifExists(address player) { require(_profiles[player].style != 0, 'Profile not found'); require(!_profiles[player].hidden || msg.sender == player, 'Profile unavailable'); _; } //--------------- // Admin // /// @notice Admin function function setQueryContract(address queryContract_) public onlyOwner { _query = ICrawlerQuery(queryContract_); } //--------------- // Public // /// @notice Check if a player has a public profile /// @param player The Player wallet address /// @return result True if the Player has a public profile, False if not, or profile is not public function playerHasProfile(address player) public view returns (bool) { return (_profiles[player].style != 0 && (!_profiles[player].hidden || msg.sender == player)); } /// @notice Returns a Player public profile /// @param player The Player wallet address /// @return result Profile struct /// PFP and Class id will return empty if player does not own /// reverts if Player has no profile or profile is not public function getPlayerProfile(address player) public view ifExists(player) returns (Profile memory result) { result = _profiles[player]; // Check PFP ownership if(!_query.isOwner(result.pfpContract, result.pfpId, player)) { result.pfpContract = address(0); result.pfpId = 0; } // Check class ownership if(result.classId != 0 && !_query.isOwner(address(_query.getCardsContract()), result.classId, player)) { result.classId = 0; } // Get class from owned cards if(result.classId == 0) { uint256[] memory cards = _query.getOwnedCards(player, 1); for(uint8 i = 0 ; i < cards.length ; ++i) { if(cards[i] > 0) { result.classId = i + 1; break; } } } } /// @notice Returns a Player Stash /// @param player The Player wallet address /// @return result Stash struct, reverts if Player has no profile or profile is not public function getPlayerStash(address player) public view ifExists(player) returns (Stash memory) { return _stash[player]; } /// @notice Creates a public profile and stash for the sender wallet, reverts if Player already have a profile /// @param name Display name /// @param pfpContract The PFP contract address, or address(0) if no PFP /// @param pfpId The PFP token id, ownership will be validated by getPlayerProfile() /// @param classId Class token id to be used, from CardsMinter, ownership will be validated by getPlayerProfile() /// @param style The PFP style, reverts if 0 /// @param value1 Reserved for styling and customization /// @param value2 Reserved for styling and customization /// @param value3 Reserved for styling and customization /// @param value4 Reserved for styling and customization /// @param value5 Reserved for styling and customization function createProfile( string calldata name, address pfpContract, uint256 pfpId, uint8 classId, uint8 style, uint16 value1, uint16 value2, uint16 value3, uint16 value4, uint16 value5) public { // create new profile require(_profiles[msg.sender].style == 0, 'Your profile already exists'); _updateProfile(name, pfpContract, pfpId, classId, style, value1, value2, value3, value4, value5, false); // Create stash from player's Crawler tokens ICrawlerToken chambers = _query.getChambersContract(); Stash memory stash; for(uint256 i = 0 ; i < chambers.balanceOf(msg.sender) ; ++i) { uint256 tokenId = chambers.tokenOfOwnerByIndex(msg.sender, i); Crawl.Hoard memory hoard = chambers.tokenIdToHoard(tokenId); stash.gems[uint8(hoard.gemType)]++; stash.coins += hoard.coins; stash.worth += hoard.worth; } _stash[msg.sender] = stash; emit CreatedProfile(msg.sender); } /// @notice Updates a public profile for the sender wallet, reverts if Player does not have a profile /// @param name Display name /// @param pfpContract The PFP contract address, or address(0) if no PFP /// @param pfpId The PFP token id, ownership will be validated by getPlayerProfile() /// @param classId Class token id to be used, from CardsMinter, ownership will be validated by getPlayerProfile() /// @param style The PFP style, reverts if 0 /// @param value1 Reserved for styling and customization /// @param value2 Reserved for styling and customization /// @param value3 Reserved for styling and customization /// @param value4 Reserved for styling and customization /// @param value5 Reserved for styling and customization function updateProfile( string calldata name, address pfpContract, uint256 pfpId, uint8 classId, uint8 style, uint16 value1, uint16 value2, uint16 value3, uint16 value4, uint16 value5) public ifExists(msg.sender) { _updateProfile(name, pfpContract, pfpId, classId, style, value1, value2, value3, value4, value5, _profiles[msg.sender].hidden); emit UpdatedProfile(msg.sender); } /// @dev internal profile updater function _updateProfile( string calldata name, address pfpContract, uint256 pfpId, uint8 classId, uint8 style, uint16 value1, uint16 value2, uint16 value3, uint16 value4, uint16 value5, bool hidden ) internal { require(style != 0, 'Invalid style'); _profiles[msg.sender] = Profile( pfpContract, pfpId, classId, style, value1, value2, value3, value4, value5, hidden, name ); } /// @notice Updates the profile visibility for the sender wallet, reverts if Player does not have a profile /// @param hidden True to hide, profile will be kept private, False if profile is public function hideProfile(bool hidden) public ifExists(msg.sender) { _profiles[msg.sender].hidden = hidden; } //--------------- // Crawler only // /// @notice Transfer a Chamber's Hoard to another wallet, works only if called by CrawlerToken contract function transferChamberHoard(address from, address to, Crawl.Hoard memory hoard) public { if(address(_query) != address(0) && msg.sender == address(_query.getChambersContract())) { // Take from emit Take(from, hoard.gemType, hoard.coins, hoard.worth); if(_profiles[from].style != 0) { Stash storage stash = _stash[from]; stash.gems[uint8(hoard.gemType)] = safe_sub32(stash.gems[uint8(hoard.gemType)], 1); stash.coins = safe_sub128(stash.coins, hoard.coins); stash.worth = safe_sub128(stash.worth, hoard.worth); } // Give to emit Give(to, hoard.gemType, hoard.coins, hoard.worth); if(_profiles[to].style != 0) { Stash storage stash = _stash[to]; stash.gems[uint8(hoard.gemType)] = safe_add32(stash.gems[uint8(hoard.gemType)], 1); stash.coins = safe_add128(stash.coins, hoard.coins); stash.worth = safe_add128(stash.worth, hoard.worth); } } } /// @dev overflows should not happen, but just to be safe and avoid reverting transfers... function safe_add128(uint128 a, uint128 b) internal pure returns (uint128) { unchecked { uint128 c = a + b; if (c < a) return type(uint128).max; return c; } } function safe_add32(uint32 a, uint32 b) internal pure returns (uint32) { unchecked { uint32 c = a + b; if (c < a) return type(uint32).max; return c; } } function safe_sub128(uint128 a, uint128 b) internal pure returns (uint128) { if (b > a) return 0; return a - b; } function safe_sub32(uint32 a, uint32 b) internal pure returns (uint32) { if (b > a) return 0; return a - b; } }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler IERC721Enumerable implementation Interface /// @author Studio Avante // pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Cards Store interface /// @author Studio Avante /// @notice Cards Store interface /// @dev Serves CardsMinter.sol pragma solidity ^0.8.16; interface ICardsStore { function getVersion() external view returns (uint8); function exists(uint256 id) external view returns (bool); function getCardCount() external view returns (uint256); function getCardSupply(uint256 id) external view returns (uint256); function getCardPrice(uint256 id) external view returns (uint256); function beforeMint(uint256 id, uint256 currentSupply, uint256 balance, uint256 value) external view; function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler Cards Minter Interface /// @author Studio Avante /// @dev use this interface for contract interaction pragma solidity ^0.8.16; import { IERC1155 } from '@openzeppelin/contracts/token/ERC1155/IERC1155.sol'; interface ICardsMinter is IERC1155 { /// @notice Check if the purchases are paused /// @return bool True if paused, False if unpaused function isPaused() external view returns (bool); /// @notice Returns a Token unit price, not considering availability /// @param id Token id /// @return price Price of the token, in WEI function getPrice(uint256 id) external view returns (uint256); /// @notice Run all require tests for a successful purchase() /// @param id Token id /// @param value Value that will be sent to purchase(), in WEI /// @return bool True if purchase is allowed, False if not /// @return reason The reason when purchase now allowed function canPurchase(uint256 id, uint256 value) external view returns (bool, string memory); /// @notice Purchases 1 Token for the Sender. The message value must be equal or higher than getPrice(id) /// @param id Token id /// @param data Nevermind, use [] function purchase(uint256 id, bytes memory data) external view; /// @notice Burn tokens. Sender must be owner or approved /// @param id Token id /// @param amount The amount of tokens to burn function burn(uint256 id, uint256 amount) external view; /// @notice Returns a token metadata, compliant with ERC1155Metadata_URI /// @param id Token id /// @return metadata Token metadata, as json string base64 encoded function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler Chamber Minter Interface /// @author Studio Avante // pragma solidity ^0.8.16; import { IERC165 } from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import { IERC721Metadata } from '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import { IERC721Enumerable } from './extras/IERC721Enumerable.sol'; import { Crawl } from './Crawl.sol'; interface ICrawlerToken is IERC165, IERC721, IERC721Metadata, IERC721Enumerable { function isPaused() external view returns (bool); function getPrices() external view returns (uint256, uint256); function calculateMintPrice(address to) external view returns (uint256); function tokenIdToCoord(uint256 tokenId) external view returns (uint256); function coordToSeed(uint256 coord) external view returns (Crawl.ChamberSeed memory); function coordToChamberData(uint8 chapterNumber, uint256 coord, bool generateMaps) external view returns (Crawl.ChamberData memory); function tokenIdToHoard(uint256 tokenId) external view returns (Crawl.Hoard memory); // Metadata calls function getChamberMetadata(uint8 chapterNumber, uint256 coord) external view returns (string memory); function getMapMetadata(uint8 chapterNumber, uint256 coord) external view returns (string memory); function getTokenMetadata(uint8 chapterNumber, uint256 coord) external view returns (string memory); }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler Query Utility Interface /// @author Studio Avante // pragma solidity ^0.8.16; import { ICrawlerToken } from './ICrawlerToken.sol'; import { ICardsMinter } from './external/ICardsMinter.sol'; import { ICardsStore } from './external/ICardsStore.sol'; interface ICrawlerQuery { function getChambersContract() external view returns (ICrawlerToken); function getCardsContract() external view returns (ICardsMinter); function getStoreContract() external view returns (ICardsStore); function getOwnedChambers(address account) external view returns (uint256[] memory result); function getOwnedCards(address account, uint8 cardType) external view returns (uint256[] memory result); function isOwner(address tokenContract, uint256 id, address account) external view returns (bool); function getURI(address tokenContract, uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // // ██████████ // █ █ // █ █ // █ █ // █ █ // █ ░░░░ █ // █ ▓▓▓▓▓▓ █ // █ ████████ █ // // https://endlesscrawler.io // @EndlessCrawler // /// @title Endless Crawler Game Definitions and Library /// @author Studio Avante /// @notice Contains common definitions and functions // pragma solidity ^0.8.16; library Crawl { //----------------------------------- // ChamberSeed, per token static data // generated on mint, stored on-chain // struct ChamberSeed { uint256 tokenId; uint256 seed; uint232 yonder; uint8 chapter; Crawl.Terrain terrain; Crawl.Dir entryDir; } //------------------------------------ // ChamberData, per token dynamic data // generated on demand // struct ChamberData { // from ChamberSeed (static) uint256 coord; uint256 tokenId; uint256 seed; uint232 yonder; uint8 chapter; // Chapter minted Crawl.Terrain terrain; Crawl.Dir entryDir; // generated on demand (deterministic) Crawl.Hoard hoard; uint8 gemPos; // gem bitmap position // dynamic until all doors are unlocked uint8[4] doors; // bitmap position in NEWS order uint8[4] locks; // lock status in NEWS order // optional uint256 bitmap; // bit map, 0 is void/walls, 1 is path bytes tilemap; // tile map // custom data CustomData[] customData; } struct Hoard { Crawl.Gem gemType; uint16 coins; // coins value uint16 worth; // gem + coins value } enum CustomDataType { Custom0, Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8, Custom9, Tile, Palette, Background, Foreground, CharSet, Music } struct CustomData { CustomDataType dataType; bytes data; } //----------------------- // Terrain types // // 2 Water | 3 Air // --------|-------- // 1 Earth | 4 Fire // enum Terrain { Empty, // 0 Earth, // 1 Water, // 2 Air, // 3 Fire // 4 } /// @dev Returns the opposite of a Terrain // Opposite terrains cannot access to each other // Earth <> Air // Water <> Fire function getOppositeTerrain(Crawl.Terrain terrain) internal pure returns (Crawl.Terrain) { uint256 t = uint256(terrain); return t >= 3 ? Crawl.Terrain(t-2) : t >= 1 ? Crawl.Terrain(t+2) : Crawl.Terrain.Empty; } //----------------------- // Gem types // enum Gem { Silver, // 0 Gold, // 1 Sapphire, // 2 Emerald, // 3 Ruby, // 4 Diamond, // 5 Ethernite, // 6 Kao, // 7 Coin // 8 (not a gem!) } /// @dev Returns the Worth value of a Gem function getGemValue(Crawl.Gem gem) internal pure returns (uint16) { if (gem == Crawl.Gem.Silver) return 50; if (gem == Crawl.Gem.Gold) return 100; if (gem == Crawl.Gem.Sapphire) return 150; if (gem == Crawl.Gem.Emerald) return 200; if (gem == Crawl.Gem.Ruby) return 300; if (gem == Crawl.Gem.Diamond) return 500; if (gem == Crawl.Gem.Ethernite) return 800; return 1001; // Crawl.Gem.Kao } /// @dev Calculates a Chamber Worth value function calcWorth(Crawl.Gem gem, uint16 coins) internal pure returns (uint16) { return getGemValue(gem) + coins; } //-------------------------- // Directions, in NEWS order // enum Dir { North, // 0 East, // 1 West, // 2 South // 3 } uint256 internal constant mask_South = uint256(type(uint64).max); uint256 internal constant mask_West = (mask_South << 64); uint256 internal constant mask_East = (mask_South << 128); uint256 internal constant mask_North = (mask_South << 192); /// @dev Flips a direction /// North <> South /// East <> West function flipDir(Crawl.Dir dir) internal pure returns (Crawl.Dir) { return Crawl.Dir(3 - uint256(dir)); } /// @dev Flips a door possition at a direction to connect to neighboring chamber function flipDoorPosition(uint8 doorPos, Crawl.Dir dir) internal pure returns (uint8 result) { if (dir == Crawl.Dir.North) return doorPos > 0 ? doorPos + (15 * 16) : 0; if (dir == Crawl.Dir.South) return doorPos > 0 ? doorPos - (15 * 16) : 0; if (dir == Crawl.Dir.West) return doorPos > 0 ? doorPos + 15 : 0; return doorPos > 0 ? doorPos - 15 : 0; // Crawl.Dir.East } //----------------------- // Coords // // coords have 4 components packed in uint256 // in NEWS direction: // (N)orth, (E)ast, (W)est, (S)outh // o-------o-------o-------o-------o // 0 32 128 192 256 /// @dev Extracts the North component from a Chamber coordinate function getNorth(uint256 coord) internal pure returns (uint256 result) { return (coord >> 192); } /// @dev Extracts the East component from a Chamber coordinate function getEast(uint256 coord) internal pure returns (uint256) { return ((coord & mask_East) >> 128); } /// @dev Extracts the West component from a Chamber coordinate function getWest(uint256 coord) internal pure returns (uint256) { return ((coord & mask_West) >> 64); } /// @dev Extracts the South component from a Chamber coordinate function getSouth(uint256 coord) internal pure returns (uint256) { return coord & mask_South; } /// @dev Builds a Chamber coordinate from its direction components /// a coord is composed of 4 uint64 components packed in a uint256 /// Components are combined in NEWS order: Nort, East, West, South /// @param north North component, zero if South /// @param east East component, zero id West /// @param west West component, zero if East /// @param south South component, zero if North /// @return result Chamber coordinate function makeCoord(uint256 north, uint256 east, uint256 west, uint256 south) internal pure returns (uint256 result) { // North or South need to be positive, but not both if(north > 0) { require(south == 0, 'Crawl.makeCoord(): bad North/South'); result += (north << 192); } else if(south > 0) { result += south; } else { revert('Crawl.makeCoord(): need North or South'); } // West or East need to be positive, but not both if(east > 0) { require(west == 0, 'Crawl.makeCoord(): bad West/East'); result += (east << 128); } else if(west > 0) { result += (west << 64); } else { revert('Crawl.makeCoord(): need West or East'); } } /// @dev Offsets a Chamber coordinate in one direction /// @param coord Chamber coordinate /// @param dir Direction to offset /// @return coord The new coordinate. If reached limits, return same coord // TODO: Use assembly? function offsetCoord(uint256 coord, Crawl.Dir dir) internal pure returns (uint256) { if(dir == Crawl.Dir.North) { if(coord & mask_South > 1) return coord - 1; // --South if(coord & mask_North != mask_North) return (coord & ~mask_South) + (1 << 192); // ++North } else if(dir == Crawl.Dir.East) { if(coord & mask_West > (1 << 64)) return coord - (1 << 64); // --West if(coord & mask_East != mask_East) return (coord & ~mask_West) + (1 << 128); // ++East } else if(dir == Crawl.Dir.West) { if(coord & mask_East > (1 << 128)) return coord - (1 << 128); // --East if(coord & mask_West != mask_West) return (coord & ~mask_East) + (1 << 64); // ++West } else { //if(dir == Crawl.Dir.South) { if(coord & mask_North > (1 << 192)) return coord - (1 << 192); // --North if(coord & mask_South != mask_South) return (coord & ~mask_North) + 1; // ++South } return coord; } //----------------------- // String Builders // /// @dev Returns a token description for tokenURI() function tokenName(string memory tokenId) public pure returns (string memory) { return string.concat('Chamber #', tokenId); } /// @dev Short string representation of a Chamebr coordinate and Yonder function coordsToString(uint256 coord, uint256 yonder, string memory separator) public pure returns (string memory) { return string.concat( ((coord & Crawl.mask_North) > 0 ? string.concat('N', toString((coord & Crawl.mask_North)>>192)) : string.concat('S', toString(coord & Crawl.mask_South))), ((coord & Crawl.mask_East) > 0 ? string.concat(separator, 'E', toString((coord & Crawl.mask_East)>>128)) : string.concat(separator, 'W', toString((coord & Crawl.mask_West)>>64))), (yonder > 0 ? string.concat(separator, 'Y', toString(yonder)) : '') ); } /// @dev Renders IERC721Metadata attributes for tokenURI() /// Reference: https://docs.opensea.io/docs/metadata-standards function renderAttributesMetadata(string[] memory labels, string[] memory values) public pure returns (string memory result) { for(uint256 i = 0 ; i < labels.length ; ++i) { result = string.concat(result, '{' '"trait_type":"', labels[i], '",' '"value":"', values[i], '"' '}', (i < (labels.length - 1) ? ',' : '') ); } } /// @dev Returns a Chamber metadata, without maps /// @param chamber The Chamber, no maps required /// @return metadata Metadata, as plain json string function renderChamberMetadata(Crawl.ChamberData memory chamber, string memory additionalMetadata) internal pure returns (string memory) { return string.concat( '{' '"tokenId":"', toString(chamber.tokenId), '",' '"name":"', tokenName(toString(chamber.tokenId)), '",' '"chapter":"', toString(chamber.chapter), '",' '"terrain":"', toString(uint256(chamber.terrain)), '",' '"gem":"', toString(uint256(chamber.hoard.gemType)), '",' '"coins":"', toString(chamber.hoard.coins), '",' '"worth":"', toString(chamber.hoard.worth), '",' '"coord":"', toString(chamber.coord), '",' '"yonder":"', toString(chamber.yonder), '",', _renderCompassMetadata(chamber.coord), _renderLocksMetadata(chamber.locks), additionalMetadata, '}' ); } function _renderCompassMetadata(uint256 coord) private pure returns (string memory) { return string.concat( '"compass":{', ((coord & Crawl.mask_North) > 0 ? string.concat('"north":"', toString((coord & Crawl.mask_North)>>192)) : string.concat('"south":"', toString(coord & Crawl.mask_South))), ((coord & Crawl.mask_East) > 0 ? string.concat('","east":"', toString((coord & Crawl.mask_East)>>128)) : string.concat('","west":"', toString((coord & Crawl.mask_West)>>64))), '"},' ); } function _renderLocksMetadata(uint8[4] memory locks) private pure returns (string memory) { return string.concat( '"locks":[', (locks[0] == 0 ? 'false,' : 'true,'), (locks[1] == 0 ? 'false,' : 'true,'), (locks[2] == 0 ? 'false,' : 'true,'), (locks[3] == 0 ? 'false' : 'true'), '],' ); } //----------------------- // Utils // /// @dev converts uint8 tile position to a bitmap position mask function tilePosToBitmap(uint8 tilePos) internal pure returns (uint256) { return (1 << (255 - tilePos)); } /// @dev overSeed has ~50% more bits function overSeed(uint256 seed_) internal pure returns (uint256) { return seed_ | uint256(keccak256(abi.encodePacked(seed_))); } /// @dev underSeed has ~50% less bits function underSeed(uint256 seed_) internal pure returns (uint256) { return seed_ & uint256(keccak256(abi.encodePacked(seed_))); } /// @dev maps seed value modulus to range function mapSeed(uint256 seed_, uint256 min_, uint256 maxExcl_) internal pure returns (uint256) { return min_ + (seed_ % (maxExcl_ - min_)); } /// @dev maps seed value modulus to bitmap position (takes 8 bits) /// the position lands in a 12x12 space at the center of the 16x16 map function mapSeedToBitmapPosition(uint256 seed_) internal pure returns (uint8) { uint8 i = uint8(seed_ % 144); return ((i / 12) + 2) * 16 + (i % 12) + 2; } /// @dev min function function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /// @dev max function function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } //----------------------------- // OpenZeppelin Strings library // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.8/contracts/utils/Strings.sol // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v4.8/contracts/utils/math/Math.sol // bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /// @dev Return the log in base 10, rounded down, of a positive value. function log10(uint256 value) private pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /// @dev Return the log in base 256, rounded down, of a positive value. function log256(uint256 value) private pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /// @dev Converts a `uint256` to its ASCII `string` decimal representation. function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /// @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. /// defined as public to be excluded from the contract ABI and avoid Stack Too Deep error function toHexString(uint256 value) public pure returns (string memory) { unchecked { return toHexString(value, log256(value) + 1); } } /// @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. /// defined as public to be excluded from the contract ABI and avoid Stack Too Deep error function toHexString(uint256 value, uint256 length) public pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /// @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. function toHexString(address addr) public pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /// @dev Converts a single `bytes1` to its ASCII `string` hexadecimal function toHexString(bytes1 value) public pure returns (string memory) { bytes memory buffer = new bytes(2); buffer[0] = _SYMBOLS[uint8(value>>4) & 0xf]; buffer[1] = _SYMBOLS[uint8(value) & 0xf]; return string(buffer); } /// @dev Converts a `bytes` to its ASCII `string` hexadecimal, without '0x' prefix function toHexString(bytes memory value, uint256 start, uint256 length) public pure returns (string memory) { require(start < value.length, "Strings: hex start overflow"); require(start + length <= value.length, "Strings: hex length overflow"); bytes memory buffer = new bytes(2 * length); for (uint256 i = 0; i < length; i++) { buffer[i*2+0] = _SYMBOLS[uint8(value[start+i]>>4) & 0xf]; buffer[i*2+1] = _SYMBOLS[uint8(value[start+i]) & 0xf]; } return string(buffer); } /// @dev Converts a `bytes` to its ASCII `string` hexadecimal, without '0x' prefix function toHexString(bytes memory value) public pure returns (string memory) { return toHexString(value, 0, value.length); } }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { // prepare call bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); // perform static call bool success; uint256 returnSize; uint256 returnValue; assembly { success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) returnSize := returndatasize() returnValue := mload(0x00) } return success && returnSize >= 0x20 && returnValue > 0; } }
// 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/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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`. * * 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; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions 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); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"CreatedProfile","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"enum Crawl.Gem","name":"gem","type":"uint8"},{"indexed":true,"internalType":"uint16","name":"coins","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"worth","type":"uint16"}],"name":"Give","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"enum Crawl.Gem","name":"gem","type":"uint8"},{"indexed":true,"internalType":"uint16","name":"coins","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"worth","type":"uint16"}],"name":"Take","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"}],"name":"UpdatedProfile","type":"event"},{"inputs":[],"name":"_query","outputs":[{"internalType":"contract ICrawlerQuery","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"pfpContract","type":"address"},{"internalType":"uint256","name":"pfpId","type":"uint256"},{"internalType":"uint8","name":"classId","type":"uint8"},{"internalType":"uint8","name":"style","type":"uint8"},{"internalType":"uint16","name":"value1","type":"uint16"},{"internalType":"uint16","name":"value2","type":"uint16"},{"internalType":"uint16","name":"value3","type":"uint16"},{"internalType":"uint16","name":"value4","type":"uint16"},{"internalType":"uint16","name":"value5","type":"uint16"}],"name":"createProfile","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getPlayerProfile","outputs":[{"components":[{"internalType":"address","name":"pfpContract","type":"address"},{"internalType":"uint256","name":"pfpId","type":"uint256"},{"internalType":"uint8","name":"classId","type":"uint8"},{"internalType":"uint8","name":"style","type":"uint8"},{"internalType":"uint16","name":"value1","type":"uint16"},{"internalType":"uint16","name":"value2","type":"uint16"},{"internalType":"uint16","name":"value3","type":"uint16"},{"internalType":"uint16","name":"value4","type":"uint16"},{"internalType":"uint16","name":"value5","type":"uint16"},{"internalType":"bool","name":"hidden","type":"bool"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct CrawlerPlayer.Profile","name":"result","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getPlayerStash","outputs":[{"components":[{"internalType":"uint128","name":"coins","type":"uint128"},{"internalType":"uint128","name":"worth","type":"uint128"},{"internalType":"uint32[8]","name":"gems","type":"uint32[8]"}],"internalType":"struct CrawlerPlayer.Stash","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"hidden","type":"bool"}],"name":"hideProfile","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"playerHasProfile","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"queryContract_","type":"address"}],"name":"setQueryContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"enum Crawl.Gem","name":"gemType","type":"uint8"},{"internalType":"uint16","name":"coins","type":"uint16"},{"internalType":"uint16","name":"worth","type":"uint16"}],"internalType":"struct Crawl.Hoard","name":"hoard","type":"tuple"}],"name":"transferChamberHoard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"pfpContract","type":"address"},{"internalType":"uint256","name":"pfpId","type":"uint256"},{"internalType":"uint8","name":"classId","type":"uint8"},{"internalType":"uint8","name":"style","type":"uint8"},{"internalType":"uint16","name":"value1","type":"uint16"},{"internalType":"uint16","name":"value2","type":"uint16"},{"internalType":"uint16","name":"value3","type":"uint16"},{"internalType":"uint16","name":"value4","type":"uint16"},{"internalType":"uint16","name":"value5","type":"uint16"}],"name":"updateProfile","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5062000032620000266200003860201b60201c565b6200004060201b60201c565b62000104565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61390280620001146000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806378c5f5e31161007157806378c5f5e3146101795780638da5cb5b14610195578063b4562266146101b3578063d50f8989146101cf578063f2efbdde146101ff578063f2fde38b1461021b576100b4565b8063060b7711146100b95780630764aa63146100d75780632425b684146101075780635cec843f146101375780636a71cb5314610153578063715018a61461016f575b600080fd5b6100c1610237565b6040516100ce919061248b565b60405180910390f35b6100f160048036038101906100ec91906124f8565b61025d565b6040516100fe9190612540565b60405180910390f35b610121600480360381019061011c91906124f8565b61034b565b60405161012e9190612684565b60405180910390f35b610151600480360381019061014c91906124f8565b610606565b005b61016d600480360381019061016891906127f4565b610652565b005b610177610ca3565b005b610193600480360381019061018e919061291b565b610cb7565b005b61019d61119f565b6040516101aa9190612a2a565b60405180910390f35b6101cd60048036038101906101c8919061291b565b6111c8565b005b6101e960048036038101906101e491906124f8565b6113d8565b6040516101f69190612bfe565b60405180910390f35b61021960048036038101906102149190612c4c565b611aec565b005b610235600480360381019061023091906124f8565b611ca6565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff16141580156103445750600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16158061034357508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b5b9050919050565b610353612252565b816000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff16036103e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e090612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16158061047057508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a690612d42565b60405180910390fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152602001600182016008806020026040519081016040528092919082600880156105f5576020028201916000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116105b85790505b505050505081525050915050919050565b61060e611d29565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415801561076c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c63190aa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190612da0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15610c9e57806020015161ffff168160000151600881111561079157610790612dcd565b5b8473ffffffffffffffffffffffffffffffffffffffff167f69789ebc6e83aad329ad66a834476b5fb21ce7540eaa1452ca9978303994618084604001516040516107db9190612e0b565b60405180910390a46000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610a07576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506108d5816001018360000151600881111561089e5761089d612dcd565b5b60ff16600881106108b2576108b1612e26565b5b600891828204019190066004029054906101000a900463ffffffff166001611da7565b81600101836000015160088111156108f0576108ef612dcd565b5b60ff166008811061090457610903612e26565b5b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff16021790555061095f8160000160009054906101000a90046fffffffffffffffffffffffffffffffff16836020015161ffff16611ddb565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506109cb8160000160109054906101000a90046fffffffffffffffffffffffffffffffff16836040015161ffff16611ddb565b8160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b806020015161ffff1681600001516008811115610a2757610a26612dcd565b5b8373ffffffffffffffffffffffffffffffffffffffff167ff7255739ad35e71077ecca2deab400633d3b94535d299947ace4b501731fa4c08460400151604051610a719190612e0b565b60405180910390a46000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610c9d576000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050610b6b8160010183600001516008811115610b3457610b33612dcd565b5b60ff1660088110610b4857610b47612e26565b5b600891828204019190066004029054906101000a900463ffffffff166001611e27565b8160010183600001516008811115610b8657610b85612dcd565b5b60ff1660088110610b9a57610b99612e26565b5b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550610bf58160000160009054906101000a90046fffffffffffffffffffffffffffffffff16836020015161ffff16611e5b565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550610c618160000160109054906101000a90046fffffffffffffffffffffffffffffffff16836040015161ffff16611e5b565b8160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5b505050565b610cab611d29565b610cb56000611eb3565b565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610d4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4390612ea1565b60405180910390fd5b610d618b8b8b8b8b8b8b8b8b8b8b6000611f77565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c63190aa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df49190612da0565b9050610dfe612252565b60005b8273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610e3a9190612a2a565b602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b9190612ed6565b8110156110735760008373ffffffffffffffffffffffffffffffffffffffff16632f745c5933846040518363ffffffff1660e01b8152600401610ebf929190612f12565b602060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f009190612ed6565b905060008473ffffffffffffffffffffffffffffffffffffffff1663831e1907836040518263ffffffff1660e01b8152600401610f3d9190612f3b565b606060405180830381865afa158015610f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7e9190612fe4565b9050836040015181600001516008811115610f9c57610f9b612dcd565b5b60ff1660088110610fb057610faf612e26565b5b602002018051809190610fc290613040565b63ffffffff1663ffffffff1681525050806020015161ffff1684600001818151610fec919061306c565b9150906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff1681525050806040015161ffff1684602001818151611033919061306c565b9150906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff168152505050508061106c906130b0565b9050610e01565b5080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060408201518160010190600861114992919061229d565b509050503373ffffffffffffffffffffffffffffffffffffffff167f85aed5c70d62330017534c644b19b770dfd22833cfb22e46518b855d6fb88cf460405160405180910390a250505050505050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b336000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff160361125e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125590612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff1615806112e557508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131b90612d42565b60405180910390fd5b6113878c8c8c8c8c8c8c8c8c8c8c600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16611f77565b3373ffffffffffffffffffffffffffffffffffffffff167f43f9bfba4e1199234a4382a76cd253105c9e58e90f80f298e4718b5c11c4245960405160405180910390a2505050505050505050505050565b6113e0612340565b816000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1603611476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146d90612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff1615806114fd57508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61153c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153390612d42565b60405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806101600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900460ff1660ff1660ff1681526020016002820160029054906101000a900461ffff1661ffff1661ffff1681526020016002820160049054906101000a900461ffff1661ffff1661ffff1681526020016002820160069054906101000a900461ffff1661ffff1661ffff1681526020016002820160089054906101000a900461ffff1661ffff1661ffff16815260200160028201600a9054906101000a900461ffff1661ffff1661ffff16815260200160028201600c9054906101000a900460ff161515151581526020016003820180546116ec90613127565b80601f016020809104026020016040519081016040528092919081815260200182805461171890613127565b80156117655780601f1061173a57610100808354040283529160200191611765565b820191906000526020600020905b81548152906001019060200180831161174857829003601f168201915b5050505050815250509150600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663514c78c183600001518460200151866040518463ffffffff1660e01b81526004016117d793929190613158565b602060405180830381865afa1580156117f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181891906131a4565b611861576000826000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008260200181815250505b6000826040015160ff16141580156119aa5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663514c78c1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca0825106040518163ffffffff1660e01b8152600401602060405180830381865afa15801561191f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611943919061320f565b8460400151866040518463ffffffff1660e01b81526004016119679392919061326d565b602060405180830381865afa158015611984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a891906131a4565b155b156119c3576000826040019060ff16908160ff16815250505b6000826040015160ff1603611ae6576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ff8273d8560016040518363ffffffff1660e01b8152600401611a329291906132df565b600060405180830381865afa158015611a4f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611a7891906133cb565b905060005b81518160ff161015611ae3576000828260ff1681518110611aa157611aa0612e26565b5b60200260200101511115611ad257600181611abc9190613414565b846040019060ff16908160ff1681525050611ae3565b80611adc90613449565b9050611a7d565b50505b50919050565b336000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1603611b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7990612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff161580611c0957508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3f90612d42565b60405180910390fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c6101000a81548160ff0219169083151502179055505050565b611cae611d29565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d14906134e4565b60405180910390fd5b611d2681611eb3565b50565b611d3161224a565b73ffffffffffffffffffffffffffffffffffffffff16611d4f61119f565b73ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9c90613550565b60405180910390fd5b565b60008263ffffffff168263ffffffff161115611dc65760009050611dd5565b8183611dd29190613570565b90505b92915050565b6000826fffffffffffffffffffffffffffffffff16826fffffffffffffffffffffffffffffffff161115611e125760009050611e21565b8183611e1e91906135a8565b90505b92915050565b60008082840190508363ffffffff168163ffffffff161015611e505763ffffffff915050611e55565b809150505b92915050565b6000808284019050836fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161015611ea8576fffffffffffffffffffffffffffffffff915050611ead565b809150505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008760ff1603611fbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb490613638565b60405180910390fd5b6040518061016001604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018960ff1681526020018860ff1681526020018761ffff1681526020018661ffff1681526020018561ffff1681526020018461ffff1681526020018361ffff16815260200182151581526020018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815250600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548160ff021916908360ff16021790555060808201518160020160026101000a81548161ffff021916908361ffff16021790555060a08201518160020160046101000a81548161ffff021916908361ffff16021790555060c08201518160020160066101000a81548161ffff021916908361ffff16021790555060e08201518160020160086101000a81548161ffff021916908361ffff16021790555061010082015181600201600a6101000a81548161ffff021916908361ffff16021790555061012082015181600201600c6101000a81548160ff02191690831515021790555061014082015181600301908161223891906137fa565b50905050505050505050505050505050565b600033905090565b604051806060016040528060006fffffffffffffffffffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff1681526020016122976123cc565b81525090565b82600860070160089004810192821561232f5791602002820160005b838211156122fd57835183826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026122b9565b801561232d5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026122fd565b505b50905061233c91906123ef565b5090565b604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600060ff168152602001600060ff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600015158152602001606081525090565b604051806101000160405280600890602082028036833780820191505090505090565b5b808211156124085760008160009055506001016123f0565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061245161244c6124478461240c565b61242c565b61240c565b9050919050565b600061246382612436565b9050919050565b600061247582612458565b9050919050565b6124858161246a565b82525050565b60006020820190506124a0600083018461247c565b92915050565b6000604051905090565b600080fd5b600080fd5b60006124c58261240c565b9050919050565b6124d5816124ba565b81146124e057600080fd5b50565b6000813590506124f2816124cc565b92915050565b60006020828403121561250e5761250d6124b0565b5b600061251c848285016124e3565b91505092915050565b60008115159050919050565b61253a81612525565b82525050565b60006020820190506125556000830184612531565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6125808161255b565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600063ffffffff82169050919050565b6125bf816125a6565b82525050565b60006125d183836125b6565b60208301905092915050565b6000602082019050919050565b6125f381612586565b6125fd8184612591565b92506126088261259c565b8060005b8381101561263957815161262087826125c5565b965061262b836125dd565b92505060018101905061260c565b505050505050565b610140820160008201516126586000850182612577565b50602082015161266b6020850182612577565b50604082015161267e60408501826125ea565b50505050565b60006101408201905061269a6000830184612641565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6126ee826126a5565b810181811067ffffffffffffffff8211171561270d5761270c6126b6565b5b80604052505050565b60006127206124a6565b905061272c82826126e5565b919050565b6009811061273e57600080fd5b50565b60008135905061275081612731565b92915050565b600061ffff82169050919050565b61276d81612756565b811461277857600080fd5b50565b60008135905061278a81612764565b92915050565b6000606082840312156127a6576127a56126a0565b5b6127b06060612716565b905060006127c084828501612741565b60008301525060206127d48482850161277b565b60208301525060406127e88482850161277b565b60408301525092915050565b600080600060a0848603121561280d5761280c6124b0565b5b600061281b868287016124e3565b935050602061282c868287016124e3565b925050604061283d86828701612790565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f84011261286c5761286b612847565b5b8235905067ffffffffffffffff8111156128895761288861284c565b5b6020830191508360018202830111156128a5576128a4612851565b5b9250929050565b6000819050919050565b6128bf816128ac565b81146128ca57600080fd5b50565b6000813590506128dc816128b6565b92915050565b600060ff82169050919050565b6128f8816128e2565b811461290357600080fd5b50565b600081359050612915816128ef565b92915050565b60008060008060008060008060008060006101408c8e031215612941576129406124b0565b5b60008c013567ffffffffffffffff81111561295f5761295e6124b5565b5b61296b8e828f01612856565b9b509b5050602061297e8e828f016124e3565b995050604061298f8e828f016128cd565b98505060606129a08e828f01612906565b97505060806129b18e828f01612906565b96505060a06129c28e828f0161277b565b95505060c06129d38e828f0161277b565b94505060e06129e48e828f0161277b565b9350506101006129f68e828f0161277b565b925050610120612a088e828f0161277b565b9150509295989b509295989b9093969950565b612a24816124ba565b82525050565b6000602082019050612a3f6000830184612a1b565b92915050565b612a4e816124ba565b82525050565b612a5d816128ac565b82525050565b612a6c816128e2565b82525050565b612a7b81612756565b82525050565b612a8a81612525565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612aca578082015181840152602081019050612aaf565b60008484015250505050565b6000612ae182612a90565b612aeb8185612a9b565b9350612afb818560208601612aac565b612b04816126a5565b840191505092915050565b600061016083016000830151612b286000860182612a45565b506020830151612b3b6020860182612a54565b506040830151612b4e6040860182612a63565b506060830151612b616060860182612a63565b506080830151612b746080860182612a72565b5060a0830151612b8760a0860182612a72565b5060c0830151612b9a60c0860182612a72565b5060e0830151612bad60e0860182612a72565b50610100830151612bc2610100860182612a72565b50610120830151612bd7610120860182612a81565b50610140830151848203610140860152612bf18282612ad6565b9150508091505092915050565b60006020820190508181036000830152612c188184612b0f565b905092915050565b612c2981612525565b8114612c3457600080fd5b50565b600081359050612c4681612c20565b92915050565b600060208284031215612c6257612c616124b0565b5b6000612c7084828501612c37565b91505092915050565b600082825260208201905092915050565b7f50726f66696c65206e6f7420666f756e64000000000000000000000000000000600082015250565b6000612cc0601183612c79565b9150612ccb82612c8a565b602082019050919050565b60006020820190508181036000830152612cef81612cb3565b9050919050565b7f50726f66696c6520756e617661696c61626c6500000000000000000000000000600082015250565b6000612d2c601383612c79565b9150612d3782612cf6565b602082019050919050565b60006020820190508181036000830152612d5b81612d1f565b9050919050565b6000612d6d826124ba565b9050919050565b612d7d81612d62565b8114612d8857600080fd5b50565b600081519050612d9a81612d74565b92915050565b600060208284031215612db657612db56124b0565b5b6000612dc484828501612d8b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b612e0581612756565b82525050565b6000602082019050612e206000830184612dfc565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f596f75722070726f66696c6520616c7265616479206578697374730000000000600082015250565b6000612e8b601b83612c79565b9150612e9682612e55565b602082019050919050565b60006020820190508181036000830152612eba81612e7e565b9050919050565b600081519050612ed0816128b6565b92915050565b600060208284031215612eec57612eeb6124b0565b5b6000612efa84828501612ec1565b91505092915050565b612f0c816128ac565b82525050565b6000604082019050612f276000830185612a1b565b612f346020830184612f03565b9392505050565b6000602082019050612f506000830184612f03565b92915050565b600081519050612f6581612731565b92915050565b600081519050612f7a81612764565b92915050565b600060608284031215612f9657612f956126a0565b5b612fa06060612716565b90506000612fb084828501612f56565b6000830152506020612fc484828501612f6b565b6020830152506040612fd884828501612f6b565b60408301525092915050565b600060608284031215612ffa57612ff96124b0565b5b600061300884828501612f80565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061304b826125a6565b915063ffffffff820361306157613060613011565b5b600182019050919050565b60006130778261255b565b91506130828361255b565b925082820190506fffffffffffffffffffffffffffffffff8111156130aa576130a9613011565b5b92915050565b60006130bb826128ac565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036130ed576130ec613011565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061313f57607f821691505b602082108103613152576131516130f8565b5b50919050565b600060608201905061316d6000830186612a1b565b61317a6020830185612f03565b6131876040830184612a1b565b949350505050565b60008151905061319e81612c20565b92915050565b6000602082840312156131ba576131b96124b0565b5b60006131c88482850161318f565b91505092915050565b60006131dc826124ba565b9050919050565b6131ec816131d1565b81146131f757600080fd5b50565b600081519050613209816131e3565b92915050565b600060208284031215613225576132246124b0565b5b6000613233848285016131fa565b91505092915050565b600061325761325261324d846128e2565b61242c565b6128ac565b9050919050565b6132678161323c565b82525050565b60006060820190506132826000830186612a1b565b61328f602083018561325e565b61329c6040830184612a1b565b949350505050565b6000819050919050565b60006132c96132c46132bf846132a4565b61242c565b6128e2565b9050919050565b6132d9816132ae565b82525050565b60006040820190506132f46000830185612a1b565b61330160208301846132d0565b9392505050565b600067ffffffffffffffff821115613323576133226126b6565b5b602082029050602081019050919050565b600061334761334284613308565b612716565b9050808382526020820190506020840283018581111561336a57613369612851565b5b835b81811015613393578061337f8882612ec1565b84526020840193505060208101905061336c565b5050509392505050565b600082601f8301126133b2576133b1612847565b5b81516133c2848260208601613334565b91505092915050565b6000602082840312156133e1576133e06124b0565b5b600082015167ffffffffffffffff8111156133ff576133fe6124b5565b5b61340b8482850161339d565b91505092915050565b600061341f826128e2565b915061342a836128e2565b9250828201905060ff81111561344357613442613011565b5b92915050565b6000613454826128e2565b915060ff820361346757613466613011565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006134ce602683612c79565b91506134d982613472565b604082019050919050565b600060208201905081810360008301526134fd816134c1565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061353a602083612c79565b915061354582613504565b602082019050919050565b600060208201905081810360008301526135698161352d565b9050919050565b600061357b826125a6565b9150613586836125a6565b9250828203905063ffffffff8111156135a2576135a1613011565b5b92915050565b60006135b38261255b565b91506135be8361255b565b925082820390506fffffffffffffffffffffffffffffffff8111156135e6576135e5613011565b5b92915050565b7f496e76616c6964207374796c6500000000000000000000000000000000000000600082015250565b6000613622600d83612c79565b915061362d826135ec565b602082019050919050565b6000602082019050818103600083015261365181613615565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026136ba7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261367d565b6136c4868361367d565b95508019841693508086168417925050509392505050565b60006136f76136f26136ed846128ac565b61242c565b6128ac565b9050919050565b6000819050919050565b613711836136dc565b61372561371d826136fe565b84845461368a565b825550505050565b600090565b61373a61372d565b613745818484613708565b505050565b5b818110156137695761375e600082613732565b60018101905061374b565b5050565b601f8211156137ae5761377f81613658565b6137888461366d565b81016020851015613797578190505b6137ab6137a38561366d565b83018261374a565b50505b505050565b600082821c905092915050565b60006137d1600019846008026137b3565b1980831691505092915050565b60006137ea83836137c0565b9150826002028217905092915050565b61380382612a90565b67ffffffffffffffff81111561381c5761381b6126b6565b5b6138268254613127565b61383182828561376d565b600060209050601f8311600181146138645760008415613852578287015190505b61385c85826137de565b8655506138c4565b601f19841661387286613658565b60005b8281101561389a57848901518255600182019150602085019450602081019050613875565b868310156138b757848901516138b3601f8916826137c0565b8355505b6001600288020188555050505b50505050505056fea264697066735822122025de34bd344a73324d6dcd3e556ec57b5b0abcf7806939eb31ee82ec07783dbf64736f6c63430008100033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806378c5f5e31161007157806378c5f5e3146101795780638da5cb5b14610195578063b4562266146101b3578063d50f8989146101cf578063f2efbdde146101ff578063f2fde38b1461021b576100b4565b8063060b7711146100b95780630764aa63146100d75780632425b684146101075780635cec843f146101375780636a71cb5314610153578063715018a61461016f575b600080fd5b6100c1610237565b6040516100ce919061248b565b60405180910390f35b6100f160048036038101906100ec91906124f8565b61025d565b6040516100fe9190612540565b60405180910390f35b610121600480360381019061011c91906124f8565b61034b565b60405161012e9190612684565b60405180910390f35b610151600480360381019061014c91906124f8565b610606565b005b61016d600480360381019061016891906127f4565b610652565b005b610177610ca3565b005b610193600480360381019061018e919061291b565b610cb7565b005b61019d61119f565b6040516101aa9190612a2a565b60405180910390f35b6101cd60048036038101906101c8919061291b565b6111c8565b005b6101e960048036038101906101e491906124f8565b6113d8565b6040516101f69190612bfe565b60405180910390f35b61021960048036038101906102149190612c4c565b611aec565b005b610235600480360381019061023091906124f8565b611ca6565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff16141580156103445750600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16158061034357508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b5b9050919050565b610353612252565b816000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff16036103e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e090612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16158061047057508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a690612d42565b60405180910390fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020016000820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff168152602001600182016008806020026040519081016040528092919082600880156105f5576020028201916000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116105b85790505b505050505081525050915050919050565b61060e611d29565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415801561076c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c63190aa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073d9190612da0565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15610c9e57806020015161ffff168160000151600881111561079157610790612dcd565b5b8473ffffffffffffffffffffffffffffffffffffffff167f69789ebc6e83aad329ad66a834476b5fb21ce7540eaa1452ca9978303994618084604001516040516107db9190612e0b565b60405180910390a46000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610a07576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506108d5816001018360000151600881111561089e5761089d612dcd565b5b60ff16600881106108b2576108b1612e26565b5b600891828204019190066004029054906101000a900463ffffffff166001611da7565b81600101836000015160088111156108f0576108ef612dcd565b5b60ff166008811061090457610903612e26565b5b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff16021790555061095f8160000160009054906101000a90046fffffffffffffffffffffffffffffffff16836020015161ffff16611ddb565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506109cb8160000160109054906101000a90046fffffffffffffffffffffffffffffffff16836040015161ffff16611ddb565b8160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b806020015161ffff1681600001516008811115610a2757610a26612dcd565b5b8373ffffffffffffffffffffffffffffffffffffffff167ff7255739ad35e71077ecca2deab400633d3b94535d299947ace4b501731fa4c08460400151604051610a719190612e0b565b60405180910390a46000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610c9d576000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050610b6b8160010183600001516008811115610b3457610b33612dcd565b5b60ff1660088110610b4857610b47612e26565b5b600891828204019190066004029054906101000a900463ffffffff166001611e27565b8160010183600001516008811115610b8657610b85612dcd565b5b60ff1660088110610b9a57610b99612e26565b5b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550610bf58160000160009054906101000a90046fffffffffffffffffffffffffffffffff16836020015161ffff16611e5b565b8160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550610c618160000160109054906101000a90046fffffffffffffffffffffffffffffffff16836040015161ffff16611e5b565b8160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550505b5b505050565b610cab611d29565b610cb56000611eb3565b565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1614610d4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4390612ea1565b60405180910390fd5b610d618b8b8b8b8b8b8b8b8b8b8b6000611f77565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c63190aa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df49190612da0565b9050610dfe612252565b60005b8273ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610e3a9190612a2a565b602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b9190612ed6565b8110156110735760008373ffffffffffffffffffffffffffffffffffffffff16632f745c5933846040518363ffffffff1660e01b8152600401610ebf929190612f12565b602060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f009190612ed6565b905060008473ffffffffffffffffffffffffffffffffffffffff1663831e1907836040518263ffffffff1660e01b8152600401610f3d9190612f3b565b606060405180830381865afa158015610f5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7e9190612fe4565b9050836040015181600001516008811115610f9c57610f9b612dcd565b5b60ff1660088110610fb057610faf612e26565b5b602002018051809190610fc290613040565b63ffffffff1663ffffffff1681525050806020015161ffff1684600001818151610fec919061306c565b9150906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff1681525050806040015161ffff1684602001818151611033919061306c565b9150906fffffffffffffffffffffffffffffffff1690816fffffffffffffffffffffffffffffffff168152505050508061106c906130b0565b9050610e01565b5080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060208201518160000160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060408201518160010190600861114992919061229d565b509050503373ffffffffffffffffffffffffffffffffffffffff167f85aed5c70d62330017534c644b19b770dfd22833cfb22e46518b855d6fb88cf460405160405180910390a250505050505050505050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b336000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff160361125e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125590612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff1615806112e557508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611324576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131b90612d42565b60405180910390fd5b6113878c8c8c8c8c8c8c8c8c8c8c600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff16611f77565b3373ffffffffffffffffffffffffffffffffffffffff167f43f9bfba4e1199234a4382a76cd253105c9e58e90f80f298e4718b5c11c4245960405160405180910390a2505050505050505050505050565b6113e0612340565b816000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1603611476576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146d90612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff1615806114fd57508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61153c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153390612d42565b60405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020604051806101600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820160009054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900460ff1660ff1660ff1681526020016002820160029054906101000a900461ffff1661ffff1661ffff1681526020016002820160049054906101000a900461ffff1661ffff1661ffff1681526020016002820160069054906101000a900461ffff1661ffff1661ffff1681526020016002820160089054906101000a900461ffff1661ffff1661ffff16815260200160028201600a9054906101000a900461ffff1661ffff1661ffff16815260200160028201600c9054906101000a900460ff161515151581526020016003820180546116ec90613127565b80601f016020809104026020016040519081016040528092919081815260200182805461171890613127565b80156117655780601f1061173a57610100808354040283529160200191611765565b820191906000526020600020905b81548152906001019060200180831161174857829003601f168201915b5050505050815250509150600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663514c78c183600001518460200151866040518463ffffffff1660e01b81526004016117d793929190613158565b602060405180830381865afa1580156117f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181891906131a4565b611861576000826000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008260200181815250505b6000826040015160ff16141580156119aa5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663514c78c1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ca0825106040518163ffffffff1660e01b8152600401602060405180830381865afa15801561191f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611943919061320f565b8460400151866040518463ffffffff1660e01b81526004016119679392919061326d565b602060405180830381865afa158015611984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a891906131a4565b155b156119c3576000826040019060ff16908160ff16815250505b6000826040015160ff1603611ae6576000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631ff8273d8560016040518363ffffffff1660e01b8152600401611a329291906132df565b600060405180830381865afa158015611a4f573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611a7891906133cb565b905060005b81518160ff161015611ae3576000828260ff1681518110611aa157611aa0612e26565b5b60200260200101511115611ad257600181611abc9190613414565b846040019060ff16908160ff1681525050611ae3565b80611adc90613449565b9050611a7d565b50505b50919050565b336000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160019054906101000a900460ff1660ff1603611b82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7990612cd6565b60405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c9054906101000a900460ff161580611c0957508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3f90612d42565b60405180910390fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600c6101000a81548160ff0219169083151502179055505050565b611cae611d29565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d14906134e4565b60405180910390fd5b611d2681611eb3565b50565b611d3161224a565b73ffffffffffffffffffffffffffffffffffffffff16611d4f61119f565b73ffffffffffffffffffffffffffffffffffffffff1614611da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9c90613550565b60405180910390fd5b565b60008263ffffffff168263ffffffff161115611dc65760009050611dd5565b8183611dd29190613570565b90505b92915050565b6000826fffffffffffffffffffffffffffffffff16826fffffffffffffffffffffffffffffffff161115611e125760009050611e21565b8183611e1e91906135a8565b90505b92915050565b60008082840190508363ffffffff168163ffffffff161015611e505763ffffffff915050611e55565b809150505b92915050565b6000808284019050836fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff161015611ea8576fffffffffffffffffffffffffffffffff915050611ead565b809150505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008760ff1603611fbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb490613638565b60405180910390fd5b6040518061016001604052808b73ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018960ff1681526020018860ff1681526020018761ffff1681526020018661ffff1681526020018561ffff1681526020018461ffff1681526020018361ffff16815260200182151581526020018d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815250600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548160ff021916908360ff16021790555060808201518160020160026101000a81548161ffff021916908361ffff16021790555060a08201518160020160046101000a81548161ffff021916908361ffff16021790555060c08201518160020160066101000a81548161ffff021916908361ffff16021790555060e08201518160020160086101000a81548161ffff021916908361ffff16021790555061010082015181600201600a6101000a81548161ffff021916908361ffff16021790555061012082015181600201600c6101000a81548160ff02191690831515021790555061014082015181600301908161223891906137fa565b50905050505050505050505050505050565b600033905090565b604051806060016040528060006fffffffffffffffffffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff1681526020016122976123cc565b81525090565b82600860070160089004810192821561232f5791602002820160005b838211156122fd57835183826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026122b9565b801561232d5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026122fd565b505b50905061233c91906123ef565b5090565b604051806101600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600060ff168152602001600060ff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600015158152602001606081525090565b604051806101000160405280600890602082028036833780820191505090505090565b5b808211156124085760008160009055506001016123f0565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061245161244c6124478461240c565b61242c565b61240c565b9050919050565b600061246382612436565b9050919050565b600061247582612458565b9050919050565b6124858161246a565b82525050565b60006020820190506124a0600083018461247c565b92915050565b6000604051905090565b600080fd5b600080fd5b60006124c58261240c565b9050919050565b6124d5816124ba565b81146124e057600080fd5b50565b6000813590506124f2816124cc565b92915050565b60006020828403121561250e5761250d6124b0565b5b600061251c848285016124e3565b91505092915050565b60008115159050919050565b61253a81612525565b82525050565b60006020820190506125556000830184612531565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b6125808161255b565b82525050565b600060089050919050565b600081905092915050565b6000819050919050565b600063ffffffff82169050919050565b6125bf816125a6565b82525050565b60006125d183836125b6565b60208301905092915050565b6000602082019050919050565b6125f381612586565b6125fd8184612591565b92506126088261259c565b8060005b8381101561263957815161262087826125c5565b965061262b836125dd565b92505060018101905061260c565b505050505050565b610140820160008201516126586000850182612577565b50602082015161266b6020850182612577565b50604082015161267e60408501826125ea565b50505050565b60006101408201905061269a6000830184612641565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6126ee826126a5565b810181811067ffffffffffffffff8211171561270d5761270c6126b6565b5b80604052505050565b60006127206124a6565b905061272c82826126e5565b919050565b6009811061273e57600080fd5b50565b60008135905061275081612731565b92915050565b600061ffff82169050919050565b61276d81612756565b811461277857600080fd5b50565b60008135905061278a81612764565b92915050565b6000606082840312156127a6576127a56126a0565b5b6127b06060612716565b905060006127c084828501612741565b60008301525060206127d48482850161277b565b60208301525060406127e88482850161277b565b60408301525092915050565b600080600060a0848603121561280d5761280c6124b0565b5b600061281b868287016124e3565b935050602061282c868287016124e3565b925050604061283d86828701612790565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f84011261286c5761286b612847565b5b8235905067ffffffffffffffff8111156128895761288861284c565b5b6020830191508360018202830111156128a5576128a4612851565b5b9250929050565b6000819050919050565b6128bf816128ac565b81146128ca57600080fd5b50565b6000813590506128dc816128b6565b92915050565b600060ff82169050919050565b6128f8816128e2565b811461290357600080fd5b50565b600081359050612915816128ef565b92915050565b60008060008060008060008060008060006101408c8e031215612941576129406124b0565b5b60008c013567ffffffffffffffff81111561295f5761295e6124b5565b5b61296b8e828f01612856565b9b509b5050602061297e8e828f016124e3565b995050604061298f8e828f016128cd565b98505060606129a08e828f01612906565b97505060806129b18e828f01612906565b96505060a06129c28e828f0161277b565b95505060c06129d38e828f0161277b565b94505060e06129e48e828f0161277b565b9350506101006129f68e828f0161277b565b925050610120612a088e828f0161277b565b9150509295989b509295989b9093969950565b612a24816124ba565b82525050565b6000602082019050612a3f6000830184612a1b565b92915050565b612a4e816124ba565b82525050565b612a5d816128ac565b82525050565b612a6c816128e2565b82525050565b612a7b81612756565b82525050565b612a8a81612525565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612aca578082015181840152602081019050612aaf565b60008484015250505050565b6000612ae182612a90565b612aeb8185612a9b565b9350612afb818560208601612aac565b612b04816126a5565b840191505092915050565b600061016083016000830151612b286000860182612a45565b506020830151612b3b6020860182612a54565b506040830151612b4e6040860182612a63565b506060830151612b616060860182612a63565b506080830151612b746080860182612a72565b5060a0830151612b8760a0860182612a72565b5060c0830151612b9a60c0860182612a72565b5060e0830151612bad60e0860182612a72565b50610100830151612bc2610100860182612a72565b50610120830151612bd7610120860182612a81565b50610140830151848203610140860152612bf18282612ad6565b9150508091505092915050565b60006020820190508181036000830152612c188184612b0f565b905092915050565b612c2981612525565b8114612c3457600080fd5b50565b600081359050612c4681612c20565b92915050565b600060208284031215612c6257612c616124b0565b5b6000612c7084828501612c37565b91505092915050565b600082825260208201905092915050565b7f50726f66696c65206e6f7420666f756e64000000000000000000000000000000600082015250565b6000612cc0601183612c79565b9150612ccb82612c8a565b602082019050919050565b60006020820190508181036000830152612cef81612cb3565b9050919050565b7f50726f66696c6520756e617661696c61626c6500000000000000000000000000600082015250565b6000612d2c601383612c79565b9150612d3782612cf6565b602082019050919050565b60006020820190508181036000830152612d5b81612d1f565b9050919050565b6000612d6d826124ba565b9050919050565b612d7d81612d62565b8114612d8857600080fd5b50565b600081519050612d9a81612d74565b92915050565b600060208284031215612db657612db56124b0565b5b6000612dc484828501612d8b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b612e0581612756565b82525050565b6000602082019050612e206000830184612dfc565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f596f75722070726f66696c6520616c7265616479206578697374730000000000600082015250565b6000612e8b601b83612c79565b9150612e9682612e55565b602082019050919050565b60006020820190508181036000830152612eba81612e7e565b9050919050565b600081519050612ed0816128b6565b92915050565b600060208284031215612eec57612eeb6124b0565b5b6000612efa84828501612ec1565b91505092915050565b612f0c816128ac565b82525050565b6000604082019050612f276000830185612a1b565b612f346020830184612f03565b9392505050565b6000602082019050612f506000830184612f03565b92915050565b600081519050612f6581612731565b92915050565b600081519050612f7a81612764565b92915050565b600060608284031215612f9657612f956126a0565b5b612fa06060612716565b90506000612fb084828501612f56565b6000830152506020612fc484828501612f6b565b6020830152506040612fd884828501612f6b565b60408301525092915050565b600060608284031215612ffa57612ff96124b0565b5b600061300884828501612f80565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061304b826125a6565b915063ffffffff820361306157613060613011565b5b600182019050919050565b60006130778261255b565b91506130828361255b565b925082820190506fffffffffffffffffffffffffffffffff8111156130aa576130a9613011565b5b92915050565b60006130bb826128ac565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036130ed576130ec613011565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061313f57607f821691505b602082108103613152576131516130f8565b5b50919050565b600060608201905061316d6000830186612a1b565b61317a6020830185612f03565b6131876040830184612a1b565b949350505050565b60008151905061319e81612c20565b92915050565b6000602082840312156131ba576131b96124b0565b5b60006131c88482850161318f565b91505092915050565b60006131dc826124ba565b9050919050565b6131ec816131d1565b81146131f757600080fd5b50565b600081519050613209816131e3565b92915050565b600060208284031215613225576132246124b0565b5b6000613233848285016131fa565b91505092915050565b600061325761325261324d846128e2565b61242c565b6128ac565b9050919050565b6132678161323c565b82525050565b60006060820190506132826000830186612a1b565b61328f602083018561325e565b61329c6040830184612a1b565b949350505050565b6000819050919050565b60006132c96132c46132bf846132a4565b61242c565b6128e2565b9050919050565b6132d9816132ae565b82525050565b60006040820190506132f46000830185612a1b565b61330160208301846132d0565b9392505050565b600067ffffffffffffffff821115613323576133226126b6565b5b602082029050602081019050919050565b600061334761334284613308565b612716565b9050808382526020820190506020840283018581111561336a57613369612851565b5b835b81811015613393578061337f8882612ec1565b84526020840193505060208101905061336c565b5050509392505050565b600082601f8301126133b2576133b1612847565b5b81516133c2848260208601613334565b91505092915050565b6000602082840312156133e1576133e06124b0565b5b600082015167ffffffffffffffff8111156133ff576133fe6124b5565b5b61340b8482850161339d565b91505092915050565b600061341f826128e2565b915061342a836128e2565b9250828201905060ff81111561344357613442613011565b5b92915050565b6000613454826128e2565b915060ff820361346757613466613011565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006134ce602683612c79565b91506134d982613472565b604082019050919050565b600060208201905081810360008301526134fd816134c1565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061353a602083612c79565b915061354582613504565b602082019050919050565b600060208201905081810360008301526135698161352d565b9050919050565b600061357b826125a6565b9150613586836125a6565b9250828203905063ffffffff8111156135a2576135a1613011565b5b92915050565b60006135b38261255b565b91506135be8361255b565b925082820390506fffffffffffffffffffffffffffffffff8111156135e6576135e5613011565b5b92915050565b7f496e76616c6964207374796c6500000000000000000000000000000000000000600082015250565b6000613622600d83612c79565b915061362d826135ec565b602082019050919050565b6000602082019050818103600083015261365181613615565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026136ba7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261367d565b6136c4868361367d565b95508019841693508086168417925050509392505050565b60006136f76136f26136ed846128ac565b61242c565b6128ac565b9050919050565b6000819050919050565b613711836136dc565b61372561371d826136fe565b84845461368a565b825550505050565b600090565b61373a61372d565b613745818484613708565b505050565b5b818110156137695761375e600082613732565b60018101905061374b565b5050565b601f8211156137ae5761377f81613658565b6137888461366d565b81016020851015613797578190505b6137ab6137a38561366d565b83018261374a565b50505b505050565b600082821c905092915050565b60006137d1600019846008026137b3565b1980831691505092915050565b60006137ea83836137c0565b9150826002028217905092915050565b61380382612a90565b67ffffffffffffffff81111561381c5761381b6126b6565b5b6138268254613127565b61383182828561376d565b600060209050601f8311600181146138645760008415613852578287015190505b61385c85826137de565b8655506138c4565b601f19841661387286613658565b60005b8281101561389a57848901518255600182019150602085019450602081019050613875565b868310156138b757848901516138b3601f8916826137c0565b8355505b6001600288020188555050505b50505050505056fea264697066735822122025de34bd344a73324d6dcd3e556ec57b5b0abcf7806939eb31ee82ec07783dbf64736f6c63430008100033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.