Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FreaksNGuildsMigrated
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 512 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "./interfaces/InterfacesMigrated.sol"; import "./interfaces/Structs.sol"; import "../base/controllable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; contract FreaksNGuildsMigrated is Initializable, Controllable, UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable{ bytes32 internal entropySauce; IFBX public fbx; MetadataHandlerLike public metadaHandler; IFnG public fngOriginal; IHUNTING public hunting; uint256 public startingPrice; uint256 public priceIncrease; uint256 public maxSupply; uint256 public maxSupplyL1; uint256 public celestialSupply; uint256 public freakSupply; uint256 public mintPrice; uint256 private _currentIndex; uint256 internal _incrementor; mapping(uint256 => Freak) public freaks; mapping(uint256 => CelestialV2) public celestials; ICastle public castle; /*/////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ modifier onlyOwnerOrController(){ require(isController(msg.sender) || msg.sender == owner(), "noauth"); _; } modifier noCheaters() { uint256 size = 0; address acc = msg.sender; assembly { size := extcodesize(acc) } require(msg.sender == tx.origin, "you're trying to cheat!"); require(size == 0, "you're trying to cheat!"); _; // We'll use the last caller hash to add entropy to next caller entropySauce = keccak256(abi.encodePacked(acc, block.coinbase)); } /*/////////////////////////////////////////////////////////////// Initializer //////////////////////////////////////////////////////////////*/ function initialize( uint256 _startingPrice, uint256 _priceIncrease, uint256 _maxSupply, uint256 _maxSupplyL1, uint256 _startingIndex, address _fbx, address _metadataHandler, address _fngOriginal ) public initializer { __UUPSUpgradeable_init_unchained(); __Ownable_init_unchained(); __Pausable_init_unchained(); __ERC721_init_unchained("Freaks N Guilds Migrated", "FnG"); __ERC721Enumerable_init_unchained(); startingPrice = _startingPrice; priceIncrease = _priceIncrease; maxSupply = _maxSupply; maxSupplyL1 = _maxSupplyL1; _currentIndex = _startingIndex; fbx = IFBX(_fbx); metadaHandler = MetadataHandlerLike(_metadataHandler); fngOriginal = IFnG(_fngOriginal); _incrementor = 1000 ether; mintPrice = 2000 ether; _pause(); } /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} /*/////////////////////////////////////////////////////////////// ADMIN //////////////////////////////////////////////////////////////*/ function setCurIndex(uint256 currentIndex) external onlyOwner { _currentIndex = currentIndex; } /** @notice Allow owner to set pause state @param _pauseState new pause state */ function setPause(bool _pauseState) external onlyOwner { if (_pauseState == true) { _pause(); } else { _unpause(); } } /** @notice set contract addresses @param _fbx fbx address @param _metadataHandler metadataHandler address @param _fngOriginal fngOriginal address @param _hunting hunting address */ function setContracts( address _fbx, address _metadataHandler, address _fngOriginal, address _hunting, address _castle ) external onlyOwner { fbx = IFBX(_fbx); metadaHandler = MetadataHandlerLike(_metadataHandler); fngOriginal = IFnG(_fngOriginal); hunting = IHUNTING(_hunting); castle = ICastle(_castle); } function updateFreakAttributes(uint256 tokenId, Freak calldata attributes) external onlyOwnerOrController { require(_exists(tokenId), "noexist"); require(isFreak(tokenId), "not a freak"); freaks[tokenId] = attributes; } function updateCelestialAttributes(uint256 tokenId, CelestialV2 calldata attributes) external onlyOwnerOrController { require(_exists(tokenId), "noexist"); require(!isFreak(tokenId), "not a celestial"); celestials[tokenId] = attributes; } function burn(uint256 tokenId) external onlyOwnerOrController { if(isFreak(tokenId)){ delete freaks[tokenId]; freakSupply -= 1; }else{ delete celestials[tokenId]; celestialSupply -= 1; } _burn(tokenId); } /// @notice Add or edit contract controllers. /// @param addrs Array of addresses to be added/edited. /// @param state New controller state of addresses. function setControllers(address[] calldata addrs, bool state) external onlyOwner { for (uint256 i = 0; i < addrs.length; i++) super._setController(addrs[i], state); } /** @notice set new incrementor for mint price @param newPriceIncrease new price increase per 2000 minted */ function setPriceIncrease(uint256 newPriceIncrease) external onlyOwner { priceIncrease = newPriceIncrease; } function setMaxSupplyL1(uint256 newMaxSupplyL1) external onlyOwner { maxSupplyL1 = newMaxSupplyL1; } /*/////////////////////////////////////////////////////////////// MINT FUNCTIONS //////////////////////////////////////////////////////////////*/ /** @notice migrate freaks and celestials then call castle to travel @param freakIds list of freak IDs to migrate then travel @param celestialIds list of celestial IDs to migrate then travel @param fbxAmount amount of FBX to travel */ function migrateAndTravel(uint256[] calldata freakIds, uint256[] calldata celestialIds, uint256 fbxAmount) external { require(freakIds.length > 0 || celestialIds.length > 0, "no freaks or celestials to migrate"); for(uint256 i = 0; i < freakIds.length; i++){ require(fngOriginal.ownerOf(freakIds[i]) == msg.sender, "you don't own this ser"); require(fngOriginal.isFreak(freakIds[i]), "not a freak"); fngOriginal.transferFrom(msg.sender, address(this), (freakIds[i])); Freak memory freak = fngOriginal.getFreakAttributes(freakIds[i]); freaks[freakIds[i]] = freak; freakSupply++; _mint(address(castle), freakIds[i]); } for(uint256 i = 0; i < celestialIds.length; i++){ require(fngOriginal.ownerOf(celestialIds[i]) == msg.sender, "you don't own this ser"); require(!fngOriginal.isFreak(celestialIds[i]), "not a celestial"); fngOriginal.transferFrom(msg.sender, address(this), (celestialIds[i])); Celestial memory celestial = fngOriginal.getCelestialAttributes(celestialIds[i]); celestials[celestialIds[i]] = CelestialV2( celestial.healthMod, celestial.powMod, celestial.cPP, celestial.cLevel, 1, 1, 1 ); celestialSupply++; _mint(address(castle), celestialIds[i]); } castle.travelFromMigration(freakIds, celestialIds, fbxAmount, msg.sender); } /** @notice mint new FnG token with FBX @param amount amount of tokens to mint */ function mint(uint256 amount) external whenNotPaused noCheaters{ require(_currentIndex + amount <= (maxSupplyL1 + 1), "max"); uint256 currentPrice; uint256 rand = _rand(); for (uint256 i = 0; i < amount; i++) { uint256 rNum = rand % 100; uint256 celestialOdds = 12; uint256 celestialMax = 2700; if(_currentIndex > 20000){ celestialOdds = 10; celestialMax = 1000; } currentPrice += mintPrice; if (rNum < celestialOdds && celestialSupply < celestialMax) { _revealCelestial(rNum, _currentIndex); rand = _randomize(rand, _currentIndex); } else { _revealFreak(rNum, _currentIndex); rand = _randomize(rand, _currentIndex); } if (_currentIndex % 2000 == 0) { _incrementor = _incrementor + priceIncrease; mintPrice = mintPrice + _incrementor; } _mint(msg.sender, _currentIndex); _currentIndex++; } fbx.burn(msg.sender, currentPrice); } /** @notice mint function for bridge to mint token created on poly @param to address to mint to @param tokenId tokenId to mint @param attributes attributes of token */ function mintFreak(address to, uint256 tokenId, Freak calldata attributes) external onlyOwnerOrController{ require(!_exists(tokenId), "alrdym"); freaks[tokenId] = attributes; freakSupply++; _mint(to, tokenId); } /** @notice mint function for bridge to mint token created on poly @param to address to mint to @param tokenId tokenId to mint @param attributes attributes of token */ function mintCelestial(address to, uint256 tokenId, CelestialV2 calldata attributes) external onlyOwnerOrController{ require(!_exists(tokenId), "alrdym"); celestials[tokenId] = attributes; celestialSupply++; _mint(to, tokenId); } /*/////////////////////////////////////////////////////////////// VIEWERS //////////////////////////////////////////////////////////////*/ /** @notice check if tokenId is of type 'Freak' @param tokenId tokenId to check @return boolean */ function isFreak(uint256 tokenId) public view returns (bool) { require(_exists(tokenId), "noexist"); return freaks[tokenId].species != 0 ? true : false; } /** @notice get attribute of a Freak @param tokenId the token id of the Freak @return freak attibutues of the freak */ function getFreakAttributes(uint256 tokenId) external view returns (Freak memory freak) { require(_exists(tokenId), "noexist"); return freaks[tokenId]; } /** @notice get attribute of a Freak @param tokenId the token id of the Freak @return species attibutues of the freak */ function getSpecies(uint256 tokenId) external view returns (uint256 species) { require(isFreak(tokenId), "noF"); return freaks[tokenId].species; } /** @notice get attributes of celestial @param tokenId the token id of the celestial @return celestial attributes of the celestial */ function getCelestialAttributes(uint256 tokenId) external view returns (CelestialV2 memory celestial) { require(_exists(tokenId), "noexist"); return (celestials[tokenId]); } /** @notice get tokens by account @param account account to query */ function getTokens(address account) external view returns(uint256 [] memory){ uint256 balance = balanceOf(account); uint256 [] memory tokensOwned = new uint256[](balance); for(uint256 i = 0; i < balance; i++){ tokensOwned[i] = tokenOfOwnerByIndex(account, i); } return tokensOwned; } /// @dev Call the `metadaHandler` to retrieve the tokenURI for each character. function tokenURI(uint256 id) public view override returns (string memory) { require(_exists(id), "noexist"); if (!isFreak(id)) { // Celestial CelestialV2 memory celestial = celestials[id]; return metadaHandler.getCelestialTokenURI(id, celestial); } else if (isFreak(id)) { // Freak Freak memory freak = freaks[id]; return metadaHandler.getFreakTokenURI(id, freak); } else { return ""; // placeholder for compile } } /*/////////////////////////////////////////////////////////////// INTERNAL HELPERS //////////////////////////////////////////////////////////////*/ function _revealCelestial(uint256 rNum, uint256 id) internal { uint256 _rNum = _randomize(rNum, id); uint8 healthMod = _calcMod(id, _rNum); _rNum = _randomize(_rNum, id); uint8 powMod = _calcMod(id, _rNum); CelestialV2 memory celestial = CelestialV2(healthMod, powMod, 1, 1, 1, 1, 1); celestials[id] = celestial; celestialSupply += 1; } function _revealFreak(uint256 rNum, uint256 id) internal { uint256 _rNum = _randomize(rNum, id); uint8 species = uint8((_rNum % 3) + 1); _rNum = _randomize(_rNum, id); uint8 mainHand = uint8((_rNum % 3) + 1); _rNum = _randomize(_rNum, id); uint8 body = uint8((_rNum % 3) + 1); _rNum = _randomize(_rNum, id); uint8 power = _calcPow(species, _rNum); _rNum = _randomize(_rNum, id); uint8 health = _calcHealth(species, _rNum); _rNum = _randomize(_rNum, id); uint8 armor = uint8((_rNum % 3) + 1); uint8 criticalStrikeMod = 0; Freak memory freak = Freak(species, body, armor, mainHand, 0, power, health, criticalStrikeMod); freaks[id] = freak; freakSupply += 1; } /// @dev Create a bit more of randomness function _randomize(uint256 rand, uint256 spicy) internal pure returns (uint256) { return uint256(keccak256(abi.encode(rand, spicy))); } function _rand() internal view returns (uint256) { return uint256(keccak256(abi.encodePacked(msg.sender, block.timestamp, block.basefee, block.timestamp, entropySauce))); } function _calcMod(uint256 tokenId, uint256 rNum) internal pure returns (uint8) { // uint256 _rNum = _randomize(rNum, _rand(), id); // might need to cast? we will see... uint8 baseMod = 4; uint8 delta = 3; if(tokenId > 20000){ baseMod = 2; delta = 4; } return uint8((rNum % delta) + baseMod); } function _calcHealth(uint8 species, uint256 rNum) internal pure returns (uint8) { uint8 baseHealth = 90; // ogre if (species == 1) { baseHealth = 50; // troll } else if (species == 2) { baseHealth = 70; // fairy } // might need to cast? we will see... return uint8((rNum % 21) + baseHealth); } function _calcPow(uint8 species, uint256 rNum) internal pure returns (uint8) { uint8 basePow = 90; //ogre if (species == 1) { basePow = 115; // troll } else if (species == 2) { basePow = 65; //fairy } // might need to cast? we will see... return uint8((rNum % 21) + basePow); } /*/////////////////////////////////////////////////////////////// OVERRIDES //////////////////////////////////////////////////////////////*/ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) whenNotPaused { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } /// @notice See {ERC721-isApprovedForAll}. function isApprovedForAll(address owner, address operator) public view override returns (bool) { return isController(operator) || super.isApprovedForAll(owner, operator); } function _authorizeUpgrade(address) internal onlyOwner override {} }
// SPDX-License-Identifier: Unlicense pragma solidity 0.8.11; import "./Structs.sol"; interface MetadataHandlerLike { function getCelestialTokenURI(uint256 id, CelestialV2 memory character) external view returns (string memory); function getFreakTokenURI(uint256 id, Freak memory character) external view returns (string memory); } interface InventoryCelestialsLike { function getAttributes(CelestialV2 memory character, uint256 id) external pure returns (bytes memory); function getImage(uint256 id, CelestialV2 memory character) external view returns (bytes memory); } interface InventoryFreaksLike { function getAttributes(Freak memory character, uint256 id) external view returns (bytes memory); function getImage(Freak memory character) external view returns (bytes memory); } interface IFnG { function transferFrom( address from, address to, uint256 id ) external; function ownerOf(uint256 id) external returns (address owner); function isFreak(uint256 tokenId) external view returns (bool); function getSpecies(uint256 tokenId) external view returns (uint8); function getFreakAttributes(uint256 tokenId) external view returns (Freak memory); function setFreakAttributes(uint256 tokenId, Freak memory attributes) external; function getCelestialAttributes(uint256 tokenId) external view returns (Celestial memory); function setCelestialAttributes(uint256 tokenId, Celestial memory attributes) external; function burn(uint256 tokenId) external; function transferOwnership(address newOwner) external; } interface IFnGMig { function transferFrom( address from, address to, uint256 id ) external; function ownerOf(uint256 id) external returns (address owner); function isFreak(uint256 tokenId) external view returns (bool); function getSpecies(uint256 tokenId) external view returns (uint8); function getFreakAttributes(uint256 tokenId) external view returns (Freak memory); function updateFreakAttributes(uint256 tokenId, Freak calldata attributes) external; function setFreakAttributes(uint256 tokenId, Freak memory attributes) external; function getCelestialAttributes(uint256 tokenId) external view returns (CelestialV2 memory celestial); function updateCelestialAttributes(uint256 tokenId, CelestialV2 calldata attributes) external; function setCelestialAttributes(uint256 tokenId, CelestialV2 memory attributes) external; function burn(uint256 tokenId) external; function transferOwnership(address newOwner) external; function mintFreak(address to, uint256 tokenId, Freak calldata attributes) external; function mintCelestial(address to, uint256 tokenId, CelestialV2 calldata attributes) external; } interface IFBX { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; } interface ICKEY { function ownerOf(uint256 tokenId) external returns (address); } interface IVAULT { function depositsOf(address account) external view returns (uint256[] memory); function _depositedBlocks(address account, uint256 tokenId) external returns (uint256); } interface ERC20Like { function balanceOf(address from) external view returns (uint256 balance); function burn(address from, uint256 amount) external; function mint(address from, uint256 amount) external; function transfer(address to, uint256 amount) external; } interface ERC1155Like { function mint( address to, uint256 id, uint256 amount ) external; function burn( address from, uint256 id, uint256 amount ) external; } interface ERC721Like { function transferFrom( address from, address to, uint256 id ) external; function transfer(address to, uint256 id) external; function ownerOf(uint256 id) external returns (address owner); function mint(address to, uint256 tokenid) external; } interface PortalLike { function sendMessage(bytes calldata) external; } interface IHUNTING { function huntFromMigration( address owner, uint256[] calldata tokenIds, uint256 pool ) external; function observeFromMigration(address owner, uint256[] calldata tokenIds) external; } interface IChainlinkVRF { function isClaimed() external view returns (bool); function randomResult() external returns (uint256); function getRandomNumber() external returns (bytes32); } interface ICastle{ function travelFromHunting( uint256[] calldata freakIds, uint256[] calldata celestialIds, uint256 fbxAmount, address owner ) external; function travelFromMigration( uint256[] calldata freakIds, uint256[] calldata celestialIds, uint256 fbxAmount, address owner ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; struct Freak { uint8 species; uint8 body; uint8 armor; uint8 mainHand; uint8 offHand; uint8 power; uint8 health; uint8 criticalStrikeMod; } struct Celestial { uint8 healthMod; uint8 powMod; uint8 cPP; uint8 cLevel; } struct CelestialV2 { uint8 healthMod; uint8 powMod; uint8 cPP; uint8 cLevel; uint8 forging; uint8 skill1; uint8 skill2; } struct Layer { string name; string data; } struct LayerInput { string name; string data; uint8 layerIndex; uint8 itemIndex; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; /// @title Controllable abstract contract Controllable { /// @notice address => is controller. mapping(address => bool) private _isController; /// @notice Require the caller to be a controller. modifier onlyController() { require(_isController[msg.sender], "Controllable: Caller is not a controller"); _; } /// @notice Check if `addr` is a controller. function isController(address addr) public view returns (bool) { return _isController[addr]; } /// @notice Set the `addr` controller status to `status`. function _setController(address addr, bool status) internal { _isController[addr] = status; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev 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.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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 v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal 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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 512, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"castle","outputs":[{"internalType":"contract ICastle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"celestialSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"celestials","outputs":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"},{"internalType":"uint8","name":"forging","type":"uint8"},{"internalType":"uint8","name":"skill1","type":"uint8"},{"internalType":"uint8","name":"skill2","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fbx","outputs":[{"internalType":"contract IFBX","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fngOriginal","outputs":[{"internalType":"contract IFnG","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freakSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"freaks","outputs":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCelestialAttributes","outputs":[{"components":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"},{"internalType":"uint8","name":"forging","type":"uint8"},{"internalType":"uint8","name":"skill1","type":"uint8"},{"internalType":"uint8","name":"skill2","type":"uint8"}],"internalType":"struct CelestialV2","name":"celestial","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFreakAttributes","outputs":[{"components":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"internalType":"struct Freak","name":"freak","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSpecies","outputs":[{"internalType":"uint256","name":"species","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hunting","outputs":[{"internalType":"contract IHUNTING","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startingPrice","type":"uint256"},{"internalType":"uint256","name":"_priceIncrease","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxSupplyL1","type":"uint256"},{"internalType":"uint256","name":"_startingIndex","type":"uint256"},{"internalType":"address","name":"_fbx","type":"address"},{"internalType":"address","name":"_metadataHandler","type":"address"},{"internalType":"address","name":"_fngOriginal","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isFreak","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyL1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadaHandler","outputs":[{"internalType":"contract MetadataHandlerLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"freakIds","type":"uint256[]"},{"internalType":"uint256[]","name":"celestialIds","type":"uint256[]"},{"internalType":"uint256","name":"fbxAmount","type":"uint256"}],"name":"migrateAndTravel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"},{"internalType":"uint8","name":"forging","type":"uint8"},{"internalType":"uint8","name":"skill1","type":"uint8"},{"internalType":"uint8","name":"skill2","type":"uint8"}],"internalType":"struct CelestialV2","name":"attributes","type":"tuple"}],"name":"mintCelestial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"internalType":"struct Freak","name":"attributes","type":"tuple"}],"name":"mintFreak","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceIncrease","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fbx","type":"address"},{"internalType":"address","name":"_metadataHandler","type":"address"},{"internalType":"address","name":"_fngOriginal","type":"address"},{"internalType":"address","name":"_hunting","type":"address"},{"internalType":"address","name":"_castle","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setControllers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"currentIndex","type":"uint256"}],"name":"setCurIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupplyL1","type":"uint256"}],"name":"setMaxSupplyL1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pauseState","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPriceIncrease","type":"uint256"}],"name":"setPriceIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"healthMod","type":"uint8"},{"internalType":"uint8","name":"powMod","type":"uint8"},{"internalType":"uint8","name":"cPP","type":"uint8"},{"internalType":"uint8","name":"cLevel","type":"uint8"},{"internalType":"uint8","name":"forging","type":"uint8"},{"internalType":"uint8","name":"skill1","type":"uint8"},{"internalType":"uint8","name":"skill2","type":"uint8"}],"internalType":"struct CelestialV2","name":"attributes","type":"tuple"}],"name":"updateCelestialAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"species","type":"uint8"},{"internalType":"uint8","name":"body","type":"uint8"},{"internalType":"uint8","name":"armor","type":"uint8"},{"internalType":"uint8","name":"mainHand","type":"uint8"},{"internalType":"uint8","name":"offHand","type":"uint8"},{"internalType":"uint8","name":"power","type":"uint8"},{"internalType":"uint8","name":"health","type":"uint8"},{"internalType":"uint8","name":"criticalStrikeMod","type":"uint8"}],"internalType":"struct Freak","name":"attributes","type":"tuple"}],"name":"updateFreakAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b50600062000024600162000092565b905080156200003d576000805461ff0019166101001790555b80156200008b576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989062000082906001906200016c565b60405180910390a15b50620001cf565b60008054610100900460ff1615620000fb578160ff166001148015620000cb5750620000c9306200013f60201b620028ec1760201c565b155b620000f35760405162461bcd60e51b8152600401620000ea906200017c565b60405180910390fd5b506000919050565b60005460ff808416911610620001255760405162461bcd60e51b8152600401620000ea906200017c565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b600060ff82165b92915050565b62000166816200014e565b82525050565b602081016200015582846200015b565b602080825281016200015581602e81527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160208201526d191e481a5b9a5d1a585b1a5e995960921b604082015260600190565b608051615c866200020760003960008181610e7301528181610eb3015281816111f30152818161123301526113280152615c866000f3fe6080604052600436106103765760003560e01c80636c57f21e116101d1578063a22cb46511610102578063d5abeb01116100a0578063e985e9c51161006f578063e985e9c514610af3578063f2fde38b14610b13578063f63bf8bd14610b33578063f8c3405014610b5357600080fd5b8063d5abeb0114610a85578063d6fbf20214610a9c578063dcd169c814610ab3578063df52142a14610ad357600080fd5b8063b628148a116100dc578063b628148a14610a0e578063b88d4fde14610a25578063bedb86fb14610a45578063c87b56dd14610a6557600080fd5b8063a22cb46514610995578063b429afeb146109b5578063b56d0158146109ee57600080fd5b80637e1c45421161016f5780638da5cb5b116101495780638da5cb5b1461091557806395d89b41146109335780639e17114114610948578063a0712d681461097557600080fd5b80637e1c4542146108b55780637e8a0287146108d55780638b122274146108f557600080fd5b80637255e9aa116101ab5780637255e9aa1461083e57806374a348121461085e578063772b73251461087e5780637adef82d1461089557600080fd5b80636c57f21e1461078957806370a0823114610809578063715018a61461082957600080fd5b80633f19ac88116102ab57806352d1902d116102495780635d614d1a116102235780635d614d1a146106a85780636352211e146106c857806367e99e8a146106e85780636817c76c1461077257600080fd5b806352d1902d1461065a57806355a305aa1461066f5780635c975abb1461069057600080fd5b8063450efe2111610285578063450efe21146105d95780634f1ef286146106065780634f6ccce71461061957806351dd48b11461063957600080fd5b80633f19ac881461057857806342842e0e1461059957806342966c68146105b957600080fd5b8063194a397a116103185780632be6a2a9116102f25780632be6a2a9146104eb5780632f745c591461050b5780633659cfe61461052b5780633c5d62e01461054b57600080fd5b8063194a397a1461048a57806323b872dd146104aa5780632a5417da146104ca57600080fd5b8063095ea7b311610354578063095ea7b3146104005780630bd60ad5146104225780630e61cfff1461045057806318160ddd1461047457600080fd5b806301ffc9a71461037b57806306fdde03146103b1578063081812fc146103d3575b600080fd5b34801561038757600080fd5b5061039b610396366004613ccc565b610b6a565b6040516103a89190613cf7565b60405180910390f35b3480156103bd57600080fd5b506103c6610b7b565b6040516103a89190613d63565b3480156103df57600080fd5b506103f36103ee366004613d85565b610c0e565b6040516103a89190613dc0565b34801561040c57600080fd5b5061042061041b366004613de2565b610c69565b005b34801561042e57600080fd5b5061019654610443906001600160a01b031681565b6040516103a89190613e3e565b34801561045c57600080fd5b5061046761019b5481565b6040516103a89190613e52565b34801561048057600080fd5b5061016254610467565b34801561049657600080fd5b506104206104a5366004613e7b565b610cef565b3480156104b657600080fd5b506104206104c5366004613ecc565b610da6565b3480156104d657600080fd5b5061019554610443906001600160a01b031681565b3480156104f757600080fd5b50610467610506366004613d85565b610dd7565b34801561051757600080fd5b50610467610526366004613de2565b610e15565b34801561053757600080fd5b50610420610546366004613f12565b610e68565b34801561055757600080fd5b5061056b610566366004613d85565b610f5a565b6040516103a89190613fd3565b34801561058457600080fd5b506101a254610443906001600160a01b031681565b3480156105a557600080fd5b506104206105b4366004613ecc565b61105c565b3480156105c557600080fd5b506104206105d4366004613d85565b611077565b3480156105e557600080fd5b506105f96105f4366004613f12565b611146565b6040516103a8919061403f565b61042061061436600461413e565b6111e8565b34801561062557600080fd5b50610467610634366004613d85565b6112cb565b34801561064557600080fd5b5061019354610443906001600160a01b031681565b34801561066657600080fd5b5061046761131b565b34801561067b57600080fd5b5061019454610443906001600160a01b031681565b34801561069c57600080fd5b5060ca5460ff1661039b565b3480156106b457600080fd5b506104206106c33660046141de565b61138a565b3480156106d457600080fd5b506103f36106e3366004613d85565b611bf7565b3480156106f457600080fd5b5061075e610703366004613d85565b6101a06020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691600160281b8104821691600160301b8204811691600160381b90041688565b6040516103a898979695949392919061426d565b34801561077e57600080fd5b5061046761019d5481565b34801561079557600080fd5b506107f66107a4366004613d85565b6101a16020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691600160281b8104821691600160301b9091041687565b6040516103a897969594939291906142e4565b34801561081557600080fd5b50610467610824366004613f12565b611c2d565b34801561083557600080fd5b50610420611c72565b34801561084a57600080fd5b5061039b610859366004613d85565b611ca8565b34801561086a57600080fd5b5061042061087936600461434c565b611d03565b34801561088a57600080fd5b5061046761019c5481565b3480156108a157600080fd5b506104206108b0366004614415565b611e78565b3480156108c157600080fd5b506104206108d036600461446f565b611f20565b3480156108e157600080fd5b506104206108f03660046144c0565b611fbc565b34801561090157600080fd5b50610420610910366004613d85565b612076565b34801561092157600080fd5b506098546001600160a01b03166103f3565b34801561093f57600080fd5b506103c66120a6565b34801561095457600080fd5b50610968610963366004613d85565b6120b6565b6040516103a89190614577565b34801561098157600080fd5b50610420610990366004613d85565b6121a2565b3480156109a157600080fd5b506104206109b0366004614585565b612400565b3480156109c157600080fd5b5061039b6109d0366004613f12565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156109fa57600080fd5b50610420610a09366004613d85565b61240b565b348015610a1a57600080fd5b5061046761019a5481565b348015610a3157600080fd5b50610420610a403660046145b8565b61243b565b348015610a5157600080fd5b50610420610a60366004614637565b61246d565b348015610a7157600080fd5b506103c6610a80366004613d85565b6124b2565b348015610a9157600080fd5b506104676101995481565b348015610aa857600080fd5b506104676101975481565b348015610abf57600080fd5b50610420610ace366004613d85565b6126cb565b348015610adf57600080fd5b50610420610aee366004614658565b6126fb565b348015610aff57600080fd5b5061039b610b0e36600461468c565b6127b4565b348015610b1f57600080fd5b50610420610b2e366004613f12565b612805565b348015610b3f57600080fd5b50610420610b4e3660046146bf565b61285e565b348015610b5f57600080fd5b506104676101985481565b6000610b75826128fb565b92915050565b606061012e8054610b8b90614740565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb790614740565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b5050505050905090565b600081815261013060205260408120546001600160a01b0316610c4c5760405162461bcd60e51b8152600401610c43906147b3565b60405180910390fd5b50600090815261013260205260409020546001600160a01b031690565b6000610c7482611bf7565b9050806001600160a01b0316836001600160a01b03161415610ca85760405162461bcd60e51b8152600401610c4390614801565b336001600160a01b0382161480610cc45750610cc481336127b4565b610ce05760405162461bcd60e51b8152600401610c439061486b565b610cea8383612920565b505050565b3360009081526001602052604090205460ff1680610d1757506098546001600160a01b031633145b610d335760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b031615610d695760405162461bcd60e51b8152600401610c43906148c8565b60008281526101a1602052604090208190610d848282614aeb565b505061019b8054906000610d9783614b0b565b9190505550610cea838361298f565b610db03382612a80565b610dcc5760405162461bcd60e51b8152600401610c4390614b80565b610cea838383612b13565b6000610de282611ca8565b610dfe5760405162461bcd60e51b8152600401610c4390614baa565b5060009081526101a0602052604090205460ff1690565b6000610e2083611c2d565b8210610e3e5760405162461bcd60e51b8152600401610c4390614c02565b506001600160a01b0391909116600090815261016060209081526040808320938352929052205490565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610eb15760405162461bcd60e51b8152600401610c4390614c5b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610f0c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610f325760405162461bcd60e51b8152600401610c4390614cb4565b610f3b81612c43565b60408051600080825260208201909252610f5791839190612c6d565b50565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810191909152600082815261013060205260409020546001600160a01b0316610fd05760405162461bcd60e51b8152600401610c4390614ce2565b5060009081526101a0602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216938101939093526301000000820481166060840152640100000000820481166080840152600160281b8204811660a0840152600160301b8204811660c0840152600160381b9091041660e082015290565b610cea8383836040518060200160405280600081525061243b565b3360009081526001602052604090205460ff168061109f57506098546001600160a01b031633145b6110bb5760405162461bcd60e51b8152600401610c439061489b565b6110c481611ca8565b156111065760008181526101a060205260408120805467ffffffffffffffff1916905561019c8054600192906110fb908490614cf2565b9091555061113d9050565b60008181526101a160205260408120805466ffffffffffffff1916905561019b805460019290611137908490614cf2565b90915550505b610f5781612d61565b6060600061115383611c2d565b905060008167ffffffffffffffff81111561117057611170614050565b604051908082528060200260200182016040528015611199578160200160208202803683370190505b50905060005b828110156111e0576111b18582610e15565b8282815181106111c3576111c3614d09565b6020908102919091010152806111d881614b0b565b91505061119f565b509392505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156112315760405162461bcd60e51b8152600401610c4390614c5b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661128c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146112b25760405162461bcd60e51b8152600401610c4390614cb4565b6112bb82612c43565b6112c782826001612c6d565b5050565b60006112d76101625490565b82106112f55760405162461bcd60e51b8152600401610c4390614d68565b610162828154811061130957611309614d09565b90600052602060002001549050919050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146113655760405162461bcd60e51b8152600401610c4390614dd2565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b8315158061139757508115155b6113b35760405162461bcd60e51b8152600401610c4390614e21565b60005b84811015611784576101955433906001600160a01b0316636352211e8888858181106113e4576113e4614d09565b905060200201356040518263ffffffff1660e01b81526004016114079190613e52565b6020604051808303816000875af1158015611426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144a9190614e3c565b6001600160a01b0316146114705760405162461bcd60e51b8152600401610c4390614e91565b610195546001600160a01b0316637255e9aa87878481811061149457611494614d09565b905060200201356040518263ffffffff1660e01b81526004016114b79190613e52565b602060405180830381865afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f89190614eac565b6115145760405162461bcd60e51b8152600401610c4390614eef565b610195546001600160a01b03166323b872dd333089898681811061153a5761153a614d09565b905060200201356040518463ffffffff1660e01b815260040161155f93929190614eff565b600060405180830381600087803b15801561157957600080fd5b505af115801561158d573d6000803e3d6000fd5b505061019554600092506001600160a01b03169050633c5d62e08888858181106115b9576115b9614d09565b905060200201356040518263ffffffff1660e01b81526004016115dc9190613e52565b61010060405180830381865afa1580156115fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161e9190614ff6565b9050806101a0600089898681811061163857611638614d09565b6020908102929092013583525081810192909252604090810160009081208451815494860151938601516060870151608088015160a089015160c08a015160e0909a015160ff908116600160381b0267ff00000000000000199b8216600160301b029b909b1667ffff00000000000019928216600160281b0265ff000000000019948316640100000000029490941665ffff000000001995831663010000000263ff0000001997841662010000029790971663ffff0000199b84166101000261ffff19909d1693909816929092179a909a1798909816949094179290921716949094179390931792909216929092179290921790915561019c80549161173d83614b0b565b90915550506101a254611771906001600160a01b031688888581811061176557611765614d09565b9050602002013561298f565b508061177c81614b0b565b9150506113b6565b5060005b82811015611b82576101955433906001600160a01b0316636352211e8686858181106117b6576117b6614d09565b905060200201356040518263ffffffff1660e01b81526004016117d99190613e52565b6020604051808303816000875af11580156117f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181c9190614e3c565b6001600160a01b0316146118425760405162461bcd60e51b8152600401610c4390614e91565b610195546001600160a01b0316637255e9aa85858481811061186657611866614d09565b905060200201356040518263ffffffff1660e01b81526004016118899190613e52565b602060405180830381865afa1580156118a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ca9190614eac565b156118e75760405162461bcd60e51b8152600401610c439061504c565b610195546001600160a01b03166323b872dd333087878681811061190d5761190d614d09565b905060200201356040518463ffffffff1660e01b815260040161193293929190614eff565b600060405180830381600087803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b505061019554600092506001600160a01b03169050639e17114186868581811061198c5761198c614d09565b905060200201356040518263ffffffff1660e01b81526004016119af9190613e52565b608060405180830381865afa1580156119cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f091906150ce565b90506040518060e00160405280826000015160ff168152602001826020015160ff168152602001826040015160ff168152602001826060015160ff168152602001600160ff168152602001600160ff168152602001600160ff168152506101a16000878786818110611a6457611a64614d09565b6020908102929092013583525081810192909252604090810160009081208451815494860151938601516060870151608088015160a089015160c09099015160ff908116600160301b0266ff000000000000199a8216600160281b0265ff000000000019938316640100000000029390931665ffff000000001994831663010000000263ff0000001996841662010000029690961663ffff0000199a84166101000261ffff19909c169390971692909217999099179790971693909317919091171693909317929092179390931691909117905561019b805491611b4783614b0b565b90915550506101a254611b6f906001600160a01b031686868581811061176557611765614d09565b5080611b7a81614b0b565b915050611788565b506101a254604051636845b56b60e11b81526001600160a01b039091169063d08b6ad690611bbe90889088908890889088903390600401615141565b600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505050505050565b600081815261013060205260408120546001600160a01b031680610b755760405162461bcd60e51b8152600401610c43906151d5565b60006001600160a01b038216611c555760405162461bcd60e51b8152600401610c439061522c565b506001600160a01b03166000908152610131602052604090205490565b6098546001600160a01b03163314611c9c5760405162461bcd60e51b8152600401610c439061526e565b611ca66000612e0a565b565b600081815261013060205260408120546001600160a01b0316611cdd5760405162461bcd60e51b8152600401610c4390614ce2565b60008281526101a0602052604090205460ff16611cfb576000610b75565b600192915050565b6000611d0f6001612e5c565b90508015611d27576000805461ff0019166101001790555b611d2f612ee4565b611d37612f0b565b611d3f612f3b565b611d996040518060400160405280601881526020017f467265616b73204e204775696c6473204d69677261746564000000000000000081525060405180604001604052806003815260200162466e4760e81b815250612f6e565b611da1612ee4565b61019789905561019888905561019987905561019a86905561019e85905561019380546001600160a01b038087166001600160a01b0319928316179092556101948054868416908316179055610195805492851692909116919091179055683635c9adc5dea0000061019f55686c6b935b8bbd40000061019d55611e23612fbe565b8015611bec576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890611e6590600190615292565b60405180910390a1505050505050505050565b3360009081526001602052604090205460ff1680611ea057506098546001600160a01b031633145b611ebc5760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b031615611ef25760405162461bcd60e51b8152600401610c43906148c8565b60008281526101a0602052604090208190611f0d82826153ba565b505061019c8054906000610d9783614b0b565b6098546001600160a01b03163314611f4a5760405162461bcd60e51b8152600401610c439061526e565b60005b82811015611fb657611fa4848483818110611f6a57611f6a614d09565b9050602002016020810190611f7f9190613f12565b6001600160a01b03166000908152600160205260409020805460ff1916841515179055565b80611fae81614b0b565b915050611f4d565b50505050565b3360009081526001602052604090205460ff1680611fe457506098546001600160a01b031633145b6120005760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b03166120355760405162461bcd60e51b8152600401610c4390614ce2565b61203e82611ca8565b1561205b5760405162461bcd60e51b8152600401610c439061504c565b60008281526101a1602052604090208190611fb68282614aeb565b6098546001600160a01b031633146120a05760405162461bcd60e51b8152600401610c439061526e565b61019855565b606061012f8054610b8b90614740565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152600082815261013060205260409020546001600160a01b03166121245760405162461bcd60e51b8152600401610c4390614ce2565b5060009081526101a16020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316938201939093526301000000830482166060820152640100000000830482166080820152600160281b8304821660a0820152600160301b9092041660c082015290565b60ca5460ff16156121c55760405162461bcd60e51b8152600401610c43906153f8565b33803b903281146121e85760405162461bcd60e51b8152600401610c439061543c565b81156122065760405162461bcd60e51b8152600401610c439061543c565b61019a5461221590600161544c565b8361019e54612224919061544c565b11156122425760405162461bcd60e51b8152600401610c439061547e565b60008061224d61302d565b905060005b858110156123645760006122676064846154a4565b61019e54909150600c90610a8c90614e2010156122875750600a90506103e85b61019d54612295908761544c565b955081831080156122a857508061019b54105b156122ce576122ba8361019e54613069565b6122c78561019e54613210565b94506122eb565b6122db8361019e54613244565b6122e88561019e54613210565b94505b6107d061019e546122fc91906154a4565b61232b576101985461019f54612312919061544c565b61019f81905561019d54612326919061544c565b61019d555b6123383361019e5461298f565b61019e805490600061234983614b0b565b9190505550505050808061235c90614b0b565b915050612252565b5061019354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061239890339086906004016154b8565b600060405180830381600087803b1580156123b257600080fd5b505af11580156123c6573d6000803e3d6000fd5b50505050505080416040516020016123df9291906154fb565b60408051601f19818403018152919052805160209091012061019255505050565b6112c73383836134b0565b6098546001600160a01b031633146124355760405162461bcd60e51b8152600401610c439061526e565b61019a55565b6124453383612a80565b6124615760405162461bcd60e51b8152600401610c4390614b80565b611fb684848484613554565b6098546001600160a01b031633146124975760405162461bcd60e51b8152600401610c439061526e565b600181151514156124aa57610f57612fbe565b610f57613587565b600081815261013060205260409020546060906001600160a01b03166124ea5760405162461bcd60e51b8152600401610c4390614ce2565b6124f382611ca8565b6125ed5760008281526101a16020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316828501526301000000810483166060830152640100000000810483166080830152600160281b8104831660a0830152600160301b900490911660c08201526101945491516346f5ca7560e11b815290916001600160a01b031690638deb94ea906125a19086908590600401615521565b600060405180830381865afa1580156125be573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125e69190810190615595565b9392505050565b6125f682611ca8565b156126b25760008281526101a0602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216818501526301000000830482166060820152640100000000830482166080820152600160281b8304821660a0820152600160301b8304821660c0820152600160381b9092041660e082015261019454915163011c789160e31b815290916001600160a01b0316906308e3c488906125a190869085906004016155d0565b505060408051602081019091526000815290565b919050565b6098546001600160a01b031633146126f55760405162461bcd60e51b8152600401610c439061526e565b61019e55565b3360009081526001602052604090205460ff168061272357506098546001600160a01b031633145b61273f5760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b03166127745760405162461bcd60e51b8152600401610c4390614ce2565b61277d82611ca8565b6127995760405162461bcd60e51b8152600401610c4390614eef565b60008281526101a0602052604090208190611fb682826153ba565b6001600160a01b03811660009081526001602052604081205460ff16806125e657506001600160a01b038084166000908152610133602090815260408083209386168352929052205460ff166125e6565b6098546001600160a01b0316331461282f5760405162461bcd60e51b8152600401610c439061526e565b6001600160a01b0381166128555760405162461bcd60e51b8152600401610c439061562f565b610f5781612e0a565b6098546001600160a01b031633146128885760405162461bcd60e51b8152600401610c439061526e565b61019380546001600160a01b03199081166001600160a01b039788161790915561019480548216958716959095179094556101958054851693861693909317909255610196805484169185169190911790556101a280549092169216919091179055565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610b755750610b75826135da565b60008181526101326020526040902080546001600160a01b0319166001600160a01b038416908117909155819061295682611bf7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166129b55760405162461bcd60e51b8152600401610c4390615671565b600081815261013060205260409020546001600160a01b0316156129eb5760405162461bcd60e51b8152600401610c43906156b5565b6129f76000838361362a565b6001600160a01b038216600090815261013160205260408120805460019290612a2190849061544c565b90915550506000818152610130602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815261013060205260408120546001600160a01b0316612ab55760405162461bcd60e51b8152600401610c439061570e565b6000612ac083611bf7565b9050806001600160a01b0316846001600160a01b03161480612ae75750612ae781856127b4565b80612b0b5750836001600160a01b0316612b0084610c0e565b6001600160a01b0316145b949350505050565b826001600160a01b0316612b2682611bf7565b6001600160a01b031614612b4c5760405162461bcd60e51b8152600401610c4390615760565b6001600160a01b038216612b725760405162461bcd60e51b8152600401610c43906157b1565b612b7d83838361362a565b612b88600082612920565b6001600160a01b038316600090815261013160205260408120805460019290612bb2908490614cf2565b90915550506001600160a01b038216600090815261013160205260408120805460019290612be190849061544c565b90915550506000818152610130602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6098546001600160a01b03163314610f575760405162461bcd60e51b8152600401610c439061526e565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612ca057610cea83613658565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612cfa575060408051601f3d908101601f19168201909252612cf7918101906157cc565b60015b612d165760405162461bcd60e51b8152600401610c4390615847565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612d555760405162461bcd60e51b8152600401610c439061589d565b50610cea8383836136c0565b6000612d6c82611bf7565b9050612d7a8160008461362a565b612d85600083612920565b6001600160a01b038116600090815261013160205260408120805460019290612daf908490614cf2565b90915550506000828152610130602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b609880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008054610100900460ff1615612ea3578160ff166001148015612e7f5750303b155b612e9b5760405162461bcd60e51b8152600401610c4390615907565b506000919050565b60005460ff808416911610612eca5760405162461bcd60e51b8152600401610c4390615907565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff16611ca65760405162461bcd60e51b8152600401610c439061595f565b600054610100900460ff16612f325760405162461bcd60e51b8152600401610c439061595f565b611ca633612e0a565b600054610100900460ff16612f625760405162461bcd60e51b8152600401610c439061595f565b60ca805460ff19169055565b600054610100900460ff16612f955760405162461bcd60e51b8152600401610c439061595f565b8151612fa99061012e906020850190613c11565b508051610cea9061012f906020840190613c11565b60ca5460ff1615612fe15760405162461bcd60e51b8152600401610c43906153f8565b60ca805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586130163390565b6040516130239190613dc0565b60405180910390a1565b6000334248426101925460405160200161304b95949392919061596f565b6040516020818303038152906040528051906020012060001c905090565b60006130758383613210565b9050600061308383836136e5565b905061308f8284613210565b9150600061309d84846136e5565b905060006040518060e001604052808460ff1681526020018360ff168152602001600160ff168152602001600160ff168152602001600160ff168152602001600160ff168152602001600160ff168152509050806101a1600087815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff160217905550905050600161019b6000828254613203919061544c565b9091555050505050505050565b600082826040516020016132259291906159c8565b60408051601f1981840301815291905280516020909101209392505050565b60006132508383613210565b9050600061325f6003836154a4565b61326a90600161544c565b90506132768284613210565b915060006132856003846154a4565b61329090600161544c565b905061329c8385613210565b925060006132ab6003856154a4565b6132b690600161544c565b90506132c28486613210565b935060006132d08486613723565b90506132dc8587613210565b945060006132ea8587613764565b90506132f68688613210565b955060006133056003886154a4565b61331090600161544c565b90506000806040518061010001604052808960ff1681526020018760ff1681526020018460ff1681526020018860ff168152602001600060ff1681526020018660ff1681526020018560ff1681526020018360ff168152509050806101a060008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff160217905550905050600161019c600082825461349e919061544c565b90915550505050505050505050505050565b816001600160a01b0316836001600160a01b031614156134e25760405162461bcd60e51b8152600401610c4390615a0a565b6001600160a01b038381166000818152610133602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613547908590613cf7565b60405180910390a3505050565b61355f848484612b13565b61356b84848484613797565b611fb65760405162461bcd60e51b8152600401610c4390615a74565b60ca5460ff166135a95760405162461bcd60e51b8152600401610c4390615ab8565b60ca805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613016565b60006001600160e01b031982166380ac58cd60e01b148061360b57506001600160e01b03198216635b5e139f60e01b145b80610b7557506301ffc9a760e01b6001600160e01b0319831614610b75565b60ca5460ff161561364d5760405162461bcd60e51b8152600401610c43906153f8565b610cea838383613895565b6001600160a01b0381163b61367f5760405162461bcd60e51b8152600401610c4390615b12565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6136c98361394f565b6000825111806136d65750805b15610cea57611fb6838361398f565b600060046003614e208511156136fd57506002905060045b8160ff168160ff168561371091906154a4565b61371a919061544c565b95945050505050565b6000605a600160ff8516141561373b5750607361374b565b8360ff166002141561374b575060415b60ff811661375a6015856154a4565b612b0b919061544c565b6000605a600160ff8516141561377c5750603261374b565b8360ff166002141561374b575060468061375a6015856154a4565b60006001600160a01b0384163b1561388a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137db903390899088908890600401615b22565b6020604051808303816000875af1925050508015613816575060408051601f3d908101601f1916820190925261381391810190615b71565b60015b613870573d808015613844576040519150601f19603f3d011682016040523d82523d6000602084013e613849565b606091505b5080516138685760405162461bcd60e51b8152600401610c4390615a74565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b0b565b506001949350505050565b6001600160a01b0383166138f2576138ed816101628054600083815261016360205260408120829055600182018355919091527f29af0939a5988989bfee913a9ad10b9335cb63ebc9fd2b69e5f877d0455ac9190155565b613915565b816001600160a01b0316836001600160a01b031614613915576139158382613a3b565b6001600160a01b03821661392c57610cea81613add565b826001600160a01b0316826001600160a01b031614610cea57610cea8282613b92565b61395881613658565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6139b85760405162461bcd60e51b8152600401610c4390615bd5565b600080846001600160a01b0316846040516139d39190615c07565b600060405180830381855af49150503d8060008114613a0e576040519150601f19603f3d011682016040523d82523d6000602084013e613a13565b606091505b509150915061371a8282604051806060016040528060278152602001615c2a60279139613bd8565b60006001613a4884611c2d565b613a529190614cf2565b60008381526101616020526040902054909150808214613aa8576001600160a01b038416600090815261016060209081526040808320858452825280832054848452818420819055835261016190915290208190555b506000918252610161602090815260408084208490556001600160a01b03909416835261016081528383209183525290812055565b61016254600090613af090600190614cf2565b600083815261016360205260408120546101628054939450909284908110613b1a57613b1a614d09565b90600052602060002001549050806101628381548110613b3c57613b3c614d09565b60009182526020808320909101929092558281526101639091526040808220849055858252812055610162805480613b7657613b76615c13565b6001900381819060005260206000200160009055905550505050565b6000613b9d83611c2d565b6001600160a01b0390931660009081526101606020908152604080832086845282528083208590559382526101619052919091209190915550565b60608315613be75750816125e6565b825115613bf75782518084602001fd5b8160405162461bcd60e51b8152600401610c439190613d63565b828054613c1d90614740565b90600052602060002090601f016020900481019282613c3f5760008555613c85565b82601f10613c5857805160ff1916838001178555613c85565b82800160010185558215613c85579182015b82811115613c85578251825591602001919060010190613c6a565b50613c91929150613c95565b5090565b5b80821115613c915760008155600101613c96565b6001600160e01b031981165b8114610f5757600080fd5b8035610b7581613caa565b600060208284031215613ce157613ce1600080fd5b6000612b0b8484613cc1565b8015155b82525050565b60208101610b758284613ced565b60005b83811015613d20578181015183820152602001613d08565b83811115611fb65750506000910152565b6000613d3b825190565b808452602084019350613d52818560208601613d05565b601f01601f19169290920192915050565b602080825281016125e68184613d31565b80613cb6565b8035610b7581613d74565b600060208284031215613d9a57613d9a600080fd5b6000612b0b8484613d7a565b60006001600160a01b038216610b75565b613cf181613da6565b60208101610b758284613db7565b613cb681613da6565b8035610b7581613dce565b60008060408385031215613df857613df8600080fd5b6000613e048585613dd7565b9250506020613e1585828601613d7a565b9150509250929050565b6000610b7582613da6565b6000610b7582613e1f565b613cf181613e2a565b60208101610b758284613e35565b80613cf1565b60208101610b758284613e4c565b600060e08284031215613e7557613e75600080fd5b50919050565b60008060006101208486031215613e9457613e94600080fd5b6000613ea08686613dd7565b9350506020613eb186828701613d7a565b9250506040613ec286828701613e60565b9150509250925092565b600080600060608486031215613ee457613ee4600080fd5b6000613ef08686613dd7565b9350506020613f0186828701613dd7565b9250506040613ec286828701613d7a565b600060208284031215613f2757613f27600080fd5b6000612b0b8484613dd7565b60ff8116613cf1565b8051610100830190613f4e8482613f33565b506020820151613f616020850182613f33565b506040820151613f746040850182613f33565b506060820151613f876060850182613f33565b506080820151613f9a6080850182613f33565b5060a0820151613fad60a0850182613f33565b5060c0820151613fc060c0850182613f33565b5060e0820151611fb660e0850182613f33565b6101008101610b758284613f3c565b6000613fee8383613e4c565b505060200190565b6000614000825190565b80845260209384019383018060005b838110156140345781516140238882613fe2565b97506020830192505060010161400f565b509495945050505050565b602080825281016125e68184613ff6565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171561408c5761408c614050565b6040525050565b600061409e60405190565b90506126c68282614066565b600067ffffffffffffffff8211156140c4576140c4614050565b601f19601f83011660200192915050565b82818337506000910152565b60006140f46140ef846140aa565b614093565b90508281526020810184848401111561410f5761410f600080fd5b6111e08482856140d5565b600082601f83011261412e5761412e600080fd5b8135612b0b8482602086016140e1565b6000806040838503121561415457614154600080fd5b60006141608585613dd7565b925050602083013567ffffffffffffffff81111561418057614180600080fd5b613e158582860161411a565b60008083601f8401126141a1576141a1600080fd5b50813567ffffffffffffffff8111156141bc576141bc600080fd5b6020830191508360208202830111156141d7576141d7600080fd5b9250929050565b6000806000806000606086880312156141f9576141f9600080fd5b853567ffffffffffffffff81111561421357614213600080fd5b61421f8882890161418c565b9550955050602086013567ffffffffffffffff81111561424157614241600080fd5b61424d8882890161418c565b9350935050604061426088828901613d7a565b9150509295509295909350565b610100810161427c828b613f33565b614289602083018a613f33565b6142966040830189613f33565b6142a36060830188613f33565b6142b06080830187613f33565b6142bd60a0830186613f33565b6142ca60c0830185613f33565b6142d760e0830184613f33565b9998505050505050505050565b60e081016142f2828a613f33565b6142ff6020830189613f33565b61430c6040830188613f33565b6143196060830187613f33565b6143266080830186613f33565b61433360a0830185613f33565b61434060c0830184613f33565b98975050505050505050565b600080600080600080600080610100898b03121561436c5761436c600080fd5b60006143788b8b613d7a565b98505060206143898b828c01613d7a565b975050604061439a8b828c01613d7a565b96505060606143ab8b828c01613d7a565b95505060806143bc8b828c01613d7a565b94505060a06143cd8b828c01613dd7565b93505060c06143de8b828c01613dd7565b92505060e06143ef8b828c01613dd7565b9150509295985092959890939650565b60006101008284031215613e7557613e75600080fd5b6000806000610140848603121561442e5761442e600080fd5b600061443a8686613dd7565b935050602061444b86828701613d7a565b9250506040613ec2868287016143ff565b801515613cb6565b8035610b758161445c565b60008060006040848603121561448757614487600080fd5b833567ffffffffffffffff8111156144a1576144a1600080fd5b6144ad8682870161418c565b93509350506020613ec286828701614464565b60008061010083850312156144d7576144d7600080fd5b60006144e38585613d7a565b9250506020613e1585828601613e60565b805160e08301906145058482613f33565b5060208201516145186020850182613f33565b50604082015161452b6040850182613f33565b50606082015161453e6060850182613f33565b5060808201516145516080850182613f33565b5060a082015161456460a0850182613f33565b5060c0820151611fb660c0850182613f33565b60e08101610b7582846144f4565b6000806040838503121561459b5761459b600080fd5b60006145a78585613dd7565b9250506020613e1585828601614464565b600080600080608085870312156145d1576145d1600080fd5b60006145dd8787613dd7565b94505060206145ee87828801613dd7565b93505060406145ff87828801613d7a565b925050606085013567ffffffffffffffff81111561461f5761461f600080fd5b61462b8782880161411a565b91505092959194509250565b60006020828403121561464c5761464c600080fd5b6000612b0b8484614464565b600080610120838503121561466f5761466f600080fd5b600061467b8585613d7a565b9250506020613e15858286016143ff565b600080604083850312156146a2576146a2600080fd5b60006146ae8585613dd7565b9250506020613e1585828601613dd7565b600080600080600060a086880312156146da576146da600080fd5b60006146e68888613dd7565b95505060206146f788828901613dd7565b945050604061470888828901613dd7565b935050606061471988828901613dd7565b925050608061426088828901613dd7565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061475457607f821691505b60208210811415613e7557613e7561472a565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b60208082528101610b7581614767565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602082015291506147ac565b60208082528101610b75816147c3565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015291506147ac565b60208082528101610b7581614811565b60068152600060208201650dcdec2eae8d60d31b815291505b5060200190565b60208082528101610b758161487b565b6006815260006020820165616c7264796d60d01b81529150614894565b60208082528101610b75816148ab565b60ff8116613cb6565b60008135610b75816148d8565b600060ff835b81169019929092169190911792915050565b6000610b7560ff83165b60ff1690565b61491f82614906565b61492a8183546148ee565b8255505050565b600061ff006148f48460081b90565b61494982614906565b61492a818354614931565b600062ff00006148f48460101b90565b61496d82614906565b61492a818354614954565b600063ff0000006148f48460181b90565b61499282614906565b61492a818354614978565b600064ff000000006148f48460201b90565b6149b882614906565b61492a81835461499d565b600065ff00000000006148f48460281b90565b6149df82614906565b61492a8183546149c3565b600066ff0000000000006148f48460301b90565b614a0782614906565b61492a8183546149ea565b808280614a1e816148e1565b9050614a2a8184614916565b50829150506020830180614a3d816148e1565b9050614a498184614940565b50829150506040830180614a5c816148e1565b9050614a688184614964565b50829150506060830180614a7b816148e1565b9050614a878184614989565b50829150506080830180614a9a816148e1565b9050614aa681846149af565b508291505060a0830180614ab9816148e1565b9050614ac581846149d6565b508291505060c0830180614ad8816148e1565b9050614ae481846149fe565b5050505050565b6112c78282614a12565b634e487b7160e01b600052601160045260246000fd5b6000600019821415614b1f57614b1f614af5565b5060010190565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015291506147ac565b60208082528101610b7581614b26565b60038152600060208201623737a360e91b81529150614894565b60208082528101610b7581614b90565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015291506147ac565b60208082528101610b7581614bba565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b19195b1959d85d1958d85b1b60a21b602082015291506147ac565b60208082528101610b7581614c12565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b6163746976652070726f787960a01b602082015291506147ac565b60208082528101610b7581614c6b565b60078152600060208201661b9bd95e1a5cdd60ca1b81529150614894565b60208082528101610b7581614cc4565b600082821015614d0457614d04614af5565b500390565b634e487b7160e01b600052603260045260246000fd5b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015291506147ac565b60208082528101610b7581614d1f565b603881526000602082017f555550535570677261646561626c653a206d757374206e6f742062652063616c81527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015291506147ac565b60208082528101610b7581614d78565b602281526000602082017f6e6f20667265616b73206f722063656c65737469616c7320746f206d69677261815261746560f01b602082015291506147ac565b60208082528101610b7581614de2565b8051610b7581613dce565b600060208284031215614e5157614e51600080fd5b6000612b0b8484614e31565b601681526000602082017f796f7520646f6e2774206f776e2074686973207365720000000000000000000081529150614894565b60208082528101610b7581614e5d565b8051610b758161445c565b600060208284031215614ec157614ec1600080fd5b6000612b0b8484614ea1565b600b81526000602082016a6e6f74206120667265616b60a81b81529150614894565b60208082528101610b7581614ecd565b60608101614f0d8286613db7565b614f1a6020830185613db7565b612b0b6040830184613e4c565b8051610b75816148d8565b60006101008284031215614f4857614f48600080fd5b614f53610100614093565b90506000614f618484614f27565b8252506020614f7284848301614f27565b6020830152506040614f8684828501614f27565b6040830152506060614f9a84828501614f27565b6060830152506080614fae84828501614f27565b60808301525060a0614fc284828501614f27565b60a08301525060c0614fd684828501614f27565b60c08301525060e0614fea84828501614f27565b60e08301525092915050565b6000610100828403121561500c5761500c600080fd5b6000612b0b8484614f32565b600f81526000602082017f6e6f7420612063656c65737469616c000000000000000000000000000000000081529150614894565b60208082528101610b7581615018565b60006080828403121561507157615071600080fd5b61507b6080614093565b905060006150898484614f27565b825250602061509a84848301614f27565b60208301525060406150ae84828501614f27565b60408301525060606150c284828501614f27565b60608301525092915050565b6000608082840312156150e3576150e3600080fd5b6000612b0b848461505c565b81835260006020840193507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561512a5761512a600080fd5b60208302925061513b8385846140d5565b50500190565b6080808252810161515381888a6150ef565b905081810360208301526151688186886150ef565b90506151776040830185613e4c565b6151846060830184613db7565b979650505050505050565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015291506147ac565b60208082528101610b758161518f565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015291506147ac565b60208082528101610b75816151e5565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000614894565b60208082528101610b758161523c565b6000610b7582614910565b613cf18161527e565b60208101610b758284615289565b600067ff000000000000006148f48460381b90565b6152be82614906565b61492a8183546152a0565b8082806152d5816148e1565b90506152e18184614916565b508291505060208301806152f4816148e1565b90506153008184614940565b50829150506040830180615313816148e1565b905061531f8184614964565b50829150506060830180615332816148e1565b905061533e8184614989565b50829150506080830180615351816148e1565b905061535d81846149af565b508291505060a0830180615370816148e1565b905061537c81846149d6565b508291505060c083018061538f816148e1565b905061539b81846149fe565b508291505060e08301806153ae816148e1565b9050614ae481846152b5565b6112c782826152c9565b601081526000602082017f5061757361626c653a207061757365640000000000000000000000000000000081529150614894565b60208082528101610b75816153c4565b601781526000602082017f796f7527726520747279696e6720746f2063686561742100000000000000000081529150614894565b60208082528101610b7581615408565b6000821982111561545f5761545f614af5565b500190565b60038152600060208201620dac2f60eb1b81529150614894565b60208082528101610b7581615464565b634e487b7160e01b600052601260045260246000fd5b6000826154b3576154b361548e565b500690565b604081016154c68285613db7565b6125e66020830184613e4c565b6000610b758260601b90565b6000610b75826154d3565b613cf16154f682613da6565b6154df565b600061550782856154ea565b60148201915061551782846154ea565b5060140192915050565b61010081016155308285613e4c565b6125e660208301846144f4565b600061554b6140ef846140aa565b90508281526020810184848401111561556657615566600080fd5b6111e0848285613d05565b600082601f83011261558557615585600080fd5b8151612b0b84826020860161553d565b6000602082840312156155aa576155aa600080fd5b815167ffffffffffffffff8111156155c4576155c4600080fd5b612b0b84828501615571565b61012081016155df8285613e4c565b6125e66020830184613f3c565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506147ac565b60208082528101610b75816155ec565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000614894565b60208082528101610b758161563f565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529150614894565b60208082528101610b7581615681565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291506147ac565b60208082528101610b75816156c5565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b602082015291506147ac565b60208082528101610b758161571e565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602082015291506147ac565b60208082528101610b7581615770565b8051610b7581613d74565b6000602082840312156157e1576157e1600080fd5b6000612b0b84846157c1565b602e81526000602082017f45524331393637557067726164653a206e657720696d706c656d656e7461746981527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015291506147ac565b60208082528101610b75816157ed565b602981526000602082017f45524331393637557067726164653a20756e737570706f727465642070726f788152681a58589b195555525160ba1b602082015291506147ac565b60208082528101610b7581615857565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a6564000000000000000000000000000000000000602082015291506147ac565b60208082528101610b75816158ad565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b602082015291506147ac565b60208082528101610b7581615917565b600061597b82886154ea565b60148201915061598b8287613e4c565b60208201915061599b8286613e4c565b6020820191506159ab8285613e4c565b6020820191506159bb8284613e4c565b5060200195945050505050565b604081016154c68285613e4c565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150614894565b60208082528101610b75816159d6565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015291506147ac565b60208082528101610b7581615a1a565b601481526000602082017f5061757361626c653a206e6f742070617573656400000000000000000000000081529150614894565b60208082528101610b7581615a84565b602d81526000602082017f455243313936373a206e657720696d706c656d656e746174696f6e206973206e81526c1bdd08184818dbdb9d1c9858dd609a1b602082015291506147ac565b60208082528101610b7581615ac8565b60808101615b308287613db7565b615b3d6020830186613db7565b615b4a6040830185613e4c565b8181036060830152615b5c8184613d31565b9695505050505050565b8051610b7581613caa565b600060208284031215615b8657615b86600080fd5b6000612b0b8484615b66565b602681526000602082017f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f8152651b9d1c9858dd60d21b602082015291506147ac565b60208082528101610b7581615b92565b6000615bef825190565b615bfd818560208601613d05565b9290920192915050565b60006125e68284615be5565b634e487b7160e01b600052603160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220477e90dc6a9798a9411c0ea93fce60269bc876406f7de1d806a5e735ddb26c1164736f6c634300080b0033
Deployed Bytecode
0x6080604052600436106103765760003560e01c80636c57f21e116101d1578063a22cb46511610102578063d5abeb01116100a0578063e985e9c51161006f578063e985e9c514610af3578063f2fde38b14610b13578063f63bf8bd14610b33578063f8c3405014610b5357600080fd5b8063d5abeb0114610a85578063d6fbf20214610a9c578063dcd169c814610ab3578063df52142a14610ad357600080fd5b8063b628148a116100dc578063b628148a14610a0e578063b88d4fde14610a25578063bedb86fb14610a45578063c87b56dd14610a6557600080fd5b8063a22cb46514610995578063b429afeb146109b5578063b56d0158146109ee57600080fd5b80637e1c45421161016f5780638da5cb5b116101495780638da5cb5b1461091557806395d89b41146109335780639e17114114610948578063a0712d681461097557600080fd5b80637e1c4542146108b55780637e8a0287146108d55780638b122274146108f557600080fd5b80637255e9aa116101ab5780637255e9aa1461083e57806374a348121461085e578063772b73251461087e5780637adef82d1461089557600080fd5b80636c57f21e1461078957806370a0823114610809578063715018a61461082957600080fd5b80633f19ac88116102ab57806352d1902d116102495780635d614d1a116102235780635d614d1a146106a85780636352211e146106c857806367e99e8a146106e85780636817c76c1461077257600080fd5b806352d1902d1461065a57806355a305aa1461066f5780635c975abb1461069057600080fd5b8063450efe2111610285578063450efe21146105d95780634f1ef286146106065780634f6ccce71461061957806351dd48b11461063957600080fd5b80633f19ac881461057857806342842e0e1461059957806342966c68146105b957600080fd5b8063194a397a116103185780632be6a2a9116102f25780632be6a2a9146104eb5780632f745c591461050b5780633659cfe61461052b5780633c5d62e01461054b57600080fd5b8063194a397a1461048a57806323b872dd146104aa5780632a5417da146104ca57600080fd5b8063095ea7b311610354578063095ea7b3146104005780630bd60ad5146104225780630e61cfff1461045057806318160ddd1461047457600080fd5b806301ffc9a71461037b57806306fdde03146103b1578063081812fc146103d3575b600080fd5b34801561038757600080fd5b5061039b610396366004613ccc565b610b6a565b6040516103a89190613cf7565b60405180910390f35b3480156103bd57600080fd5b506103c6610b7b565b6040516103a89190613d63565b3480156103df57600080fd5b506103f36103ee366004613d85565b610c0e565b6040516103a89190613dc0565b34801561040c57600080fd5b5061042061041b366004613de2565b610c69565b005b34801561042e57600080fd5b5061019654610443906001600160a01b031681565b6040516103a89190613e3e565b34801561045c57600080fd5b5061046761019b5481565b6040516103a89190613e52565b34801561048057600080fd5b5061016254610467565b34801561049657600080fd5b506104206104a5366004613e7b565b610cef565b3480156104b657600080fd5b506104206104c5366004613ecc565b610da6565b3480156104d657600080fd5b5061019554610443906001600160a01b031681565b3480156104f757600080fd5b50610467610506366004613d85565b610dd7565b34801561051757600080fd5b50610467610526366004613de2565b610e15565b34801561053757600080fd5b50610420610546366004613f12565b610e68565b34801561055757600080fd5b5061056b610566366004613d85565b610f5a565b6040516103a89190613fd3565b34801561058457600080fd5b506101a254610443906001600160a01b031681565b3480156105a557600080fd5b506104206105b4366004613ecc565b61105c565b3480156105c557600080fd5b506104206105d4366004613d85565b611077565b3480156105e557600080fd5b506105f96105f4366004613f12565b611146565b6040516103a8919061403f565b61042061061436600461413e565b6111e8565b34801561062557600080fd5b50610467610634366004613d85565b6112cb565b34801561064557600080fd5b5061019354610443906001600160a01b031681565b34801561066657600080fd5b5061046761131b565b34801561067b57600080fd5b5061019454610443906001600160a01b031681565b34801561069c57600080fd5b5060ca5460ff1661039b565b3480156106b457600080fd5b506104206106c33660046141de565b61138a565b3480156106d457600080fd5b506103f36106e3366004613d85565b611bf7565b3480156106f457600080fd5b5061075e610703366004613d85565b6101a06020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691600160281b8104821691600160301b8204811691600160381b90041688565b6040516103a898979695949392919061426d565b34801561077e57600080fd5b5061046761019d5481565b34801561079557600080fd5b506107f66107a4366004613d85565b6101a16020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691600160281b8104821691600160301b9091041687565b6040516103a897969594939291906142e4565b34801561081557600080fd5b50610467610824366004613f12565b611c2d565b34801561083557600080fd5b50610420611c72565b34801561084a57600080fd5b5061039b610859366004613d85565b611ca8565b34801561086a57600080fd5b5061042061087936600461434c565b611d03565b34801561088a57600080fd5b5061046761019c5481565b3480156108a157600080fd5b506104206108b0366004614415565b611e78565b3480156108c157600080fd5b506104206108d036600461446f565b611f20565b3480156108e157600080fd5b506104206108f03660046144c0565b611fbc565b34801561090157600080fd5b50610420610910366004613d85565b612076565b34801561092157600080fd5b506098546001600160a01b03166103f3565b34801561093f57600080fd5b506103c66120a6565b34801561095457600080fd5b50610968610963366004613d85565b6120b6565b6040516103a89190614577565b34801561098157600080fd5b50610420610990366004613d85565b6121a2565b3480156109a157600080fd5b506104206109b0366004614585565b612400565b3480156109c157600080fd5b5061039b6109d0366004613f12565b6001600160a01b031660009081526001602052604090205460ff1690565b3480156109fa57600080fd5b50610420610a09366004613d85565b61240b565b348015610a1a57600080fd5b5061046761019a5481565b348015610a3157600080fd5b50610420610a403660046145b8565b61243b565b348015610a5157600080fd5b50610420610a60366004614637565b61246d565b348015610a7157600080fd5b506103c6610a80366004613d85565b6124b2565b348015610a9157600080fd5b506104676101995481565b348015610aa857600080fd5b506104676101975481565b348015610abf57600080fd5b50610420610ace366004613d85565b6126cb565b348015610adf57600080fd5b50610420610aee366004614658565b6126fb565b348015610aff57600080fd5b5061039b610b0e36600461468c565b6127b4565b348015610b1f57600080fd5b50610420610b2e366004613f12565b612805565b348015610b3f57600080fd5b50610420610b4e3660046146bf565b61285e565b348015610b5f57600080fd5b506104676101985481565b6000610b75826128fb565b92915050565b606061012e8054610b8b90614740565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb790614740565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b5050505050905090565b600081815261013060205260408120546001600160a01b0316610c4c5760405162461bcd60e51b8152600401610c43906147b3565b60405180910390fd5b50600090815261013260205260409020546001600160a01b031690565b6000610c7482611bf7565b9050806001600160a01b0316836001600160a01b03161415610ca85760405162461bcd60e51b8152600401610c4390614801565b336001600160a01b0382161480610cc45750610cc481336127b4565b610ce05760405162461bcd60e51b8152600401610c439061486b565b610cea8383612920565b505050565b3360009081526001602052604090205460ff1680610d1757506098546001600160a01b031633145b610d335760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b031615610d695760405162461bcd60e51b8152600401610c43906148c8565b60008281526101a1602052604090208190610d848282614aeb565b505061019b8054906000610d9783614b0b565b9190505550610cea838361298f565b610db03382612a80565b610dcc5760405162461bcd60e51b8152600401610c4390614b80565b610cea838383612b13565b6000610de282611ca8565b610dfe5760405162461bcd60e51b8152600401610c4390614baa565b5060009081526101a0602052604090205460ff1690565b6000610e2083611c2d565b8210610e3e5760405162461bcd60e51b8152600401610c4390614c02565b506001600160a01b0391909116600090815261016060209081526040808320938352929052205490565b306001600160a01b037f000000000000000000000000738740709df25d19d3a0af5c8784b3d186489148161415610eb15760405162461bcd60e51b8152600401610c4390614c5b565b7f000000000000000000000000738740709df25d19d3a0af5c8784b3d1864891486001600160a01b0316610f0c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610f325760405162461bcd60e51b8152600401610c4390614cb4565b610f3b81612c43565b60408051600080825260208201909252610f5791839190612c6d565b50565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810191909152600082815261013060205260409020546001600160a01b0316610fd05760405162461bcd60e51b8152600401610c4390614ce2565b5060009081526101a0602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216938101939093526301000000820481166060840152640100000000820481166080840152600160281b8204811660a0840152600160301b8204811660c0840152600160381b9091041660e082015290565b610cea8383836040518060200160405280600081525061243b565b3360009081526001602052604090205460ff168061109f57506098546001600160a01b031633145b6110bb5760405162461bcd60e51b8152600401610c439061489b565b6110c481611ca8565b156111065760008181526101a060205260408120805467ffffffffffffffff1916905561019c8054600192906110fb908490614cf2565b9091555061113d9050565b60008181526101a160205260408120805466ffffffffffffff1916905561019b805460019290611137908490614cf2565b90915550505b610f5781612d61565b6060600061115383611c2d565b905060008167ffffffffffffffff81111561117057611170614050565b604051908082528060200260200182016040528015611199578160200160208202803683370190505b50905060005b828110156111e0576111b18582610e15565b8282815181106111c3576111c3614d09565b6020908102919091010152806111d881614b0b565b91505061119f565b509392505050565b306001600160a01b037f000000000000000000000000738740709df25d19d3a0af5c8784b3d1864891481614156112315760405162461bcd60e51b8152600401610c4390614c5b565b7f000000000000000000000000738740709df25d19d3a0af5c8784b3d1864891486001600160a01b031661128c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146112b25760405162461bcd60e51b8152600401610c4390614cb4565b6112bb82612c43565b6112c782826001612c6d565b5050565b60006112d76101625490565b82106112f55760405162461bcd60e51b8152600401610c4390614d68565b610162828154811061130957611309614d09565b90600052602060002001549050919050565b6000306001600160a01b037f000000000000000000000000738740709df25d19d3a0af5c8784b3d18648914816146113655760405162461bcd60e51b8152600401610c4390614dd2565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b8315158061139757508115155b6113b35760405162461bcd60e51b8152600401610c4390614e21565b60005b84811015611784576101955433906001600160a01b0316636352211e8888858181106113e4576113e4614d09565b905060200201356040518263ffffffff1660e01b81526004016114079190613e52565b6020604051808303816000875af1158015611426573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144a9190614e3c565b6001600160a01b0316146114705760405162461bcd60e51b8152600401610c4390614e91565b610195546001600160a01b0316637255e9aa87878481811061149457611494614d09565b905060200201356040518263ffffffff1660e01b81526004016114b79190613e52565b602060405180830381865afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f89190614eac565b6115145760405162461bcd60e51b8152600401610c4390614eef565b610195546001600160a01b03166323b872dd333089898681811061153a5761153a614d09565b905060200201356040518463ffffffff1660e01b815260040161155f93929190614eff565b600060405180830381600087803b15801561157957600080fd5b505af115801561158d573d6000803e3d6000fd5b505061019554600092506001600160a01b03169050633c5d62e08888858181106115b9576115b9614d09565b905060200201356040518263ffffffff1660e01b81526004016115dc9190613e52565b61010060405180830381865afa1580156115fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161e9190614ff6565b9050806101a0600089898681811061163857611638614d09565b6020908102929092013583525081810192909252604090810160009081208451815494860151938601516060870151608088015160a089015160c08a015160e0909a015160ff908116600160381b0267ff00000000000000199b8216600160301b029b909b1667ffff00000000000019928216600160281b0265ff000000000019948316640100000000029490941665ffff000000001995831663010000000263ff0000001997841662010000029790971663ffff0000199b84166101000261ffff19909d1693909816929092179a909a1798909816949094179290921716949094179390931792909216929092179290921790915561019c80549161173d83614b0b565b90915550506101a254611771906001600160a01b031688888581811061176557611765614d09565b9050602002013561298f565b508061177c81614b0b565b9150506113b6565b5060005b82811015611b82576101955433906001600160a01b0316636352211e8686858181106117b6576117b6614d09565b905060200201356040518263ffffffff1660e01b81526004016117d99190613e52565b6020604051808303816000875af11580156117f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181c9190614e3c565b6001600160a01b0316146118425760405162461bcd60e51b8152600401610c4390614e91565b610195546001600160a01b0316637255e9aa85858481811061186657611866614d09565b905060200201356040518263ffffffff1660e01b81526004016118899190613e52565b602060405180830381865afa1580156118a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ca9190614eac565b156118e75760405162461bcd60e51b8152600401610c439061504c565b610195546001600160a01b03166323b872dd333087878681811061190d5761190d614d09565b905060200201356040518463ffffffff1660e01b815260040161193293929190614eff565b600060405180830381600087803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b505061019554600092506001600160a01b03169050639e17114186868581811061198c5761198c614d09565b905060200201356040518263ffffffff1660e01b81526004016119af9190613e52565b608060405180830381865afa1580156119cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f091906150ce565b90506040518060e00160405280826000015160ff168152602001826020015160ff168152602001826040015160ff168152602001826060015160ff168152602001600160ff168152602001600160ff168152602001600160ff168152506101a16000878786818110611a6457611a64614d09565b6020908102929092013583525081810192909252604090810160009081208451815494860151938601516060870151608088015160a089015160c09099015160ff908116600160301b0266ff000000000000199a8216600160281b0265ff000000000019938316640100000000029390931665ffff000000001994831663010000000263ff0000001996841662010000029690961663ffff0000199a84166101000261ffff19909c169390971692909217999099179790971693909317919091171693909317929092179390931691909117905561019b805491611b4783614b0b565b90915550506101a254611b6f906001600160a01b031686868581811061176557611765614d09565b5080611b7a81614b0b565b915050611788565b506101a254604051636845b56b60e11b81526001600160a01b039091169063d08b6ad690611bbe90889088908890889088903390600401615141565b600060405180830381600087803b158015611bd857600080fd5b505af1158015611bec573d6000803e3d6000fd5b505050505050505050565b600081815261013060205260408120546001600160a01b031680610b755760405162461bcd60e51b8152600401610c43906151d5565b60006001600160a01b038216611c555760405162461bcd60e51b8152600401610c439061522c565b506001600160a01b03166000908152610131602052604090205490565b6098546001600160a01b03163314611c9c5760405162461bcd60e51b8152600401610c439061526e565b611ca66000612e0a565b565b600081815261013060205260408120546001600160a01b0316611cdd5760405162461bcd60e51b8152600401610c4390614ce2565b60008281526101a0602052604090205460ff16611cfb576000610b75565b600192915050565b6000611d0f6001612e5c565b90508015611d27576000805461ff0019166101001790555b611d2f612ee4565b611d37612f0b565b611d3f612f3b565b611d996040518060400160405280601881526020017f467265616b73204e204775696c6473204d69677261746564000000000000000081525060405180604001604052806003815260200162466e4760e81b815250612f6e565b611da1612ee4565b61019789905561019888905561019987905561019a86905561019e85905561019380546001600160a01b038087166001600160a01b0319928316179092556101948054868416908316179055610195805492851692909116919091179055683635c9adc5dea0000061019f55686c6b935b8bbd40000061019d55611e23612fbe565b8015611bec576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890611e6590600190615292565b60405180910390a1505050505050505050565b3360009081526001602052604090205460ff1680611ea057506098546001600160a01b031633145b611ebc5760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b031615611ef25760405162461bcd60e51b8152600401610c43906148c8565b60008281526101a0602052604090208190611f0d82826153ba565b505061019c8054906000610d9783614b0b565b6098546001600160a01b03163314611f4a5760405162461bcd60e51b8152600401610c439061526e565b60005b82811015611fb657611fa4848483818110611f6a57611f6a614d09565b9050602002016020810190611f7f9190613f12565b6001600160a01b03166000908152600160205260409020805460ff1916841515179055565b80611fae81614b0b565b915050611f4d565b50505050565b3360009081526001602052604090205460ff1680611fe457506098546001600160a01b031633145b6120005760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b03166120355760405162461bcd60e51b8152600401610c4390614ce2565b61203e82611ca8565b1561205b5760405162461bcd60e51b8152600401610c439061504c565b60008281526101a1602052604090208190611fb68282614aeb565b6098546001600160a01b031633146120a05760405162461bcd60e51b8152600401610c439061526e565b61019855565b606061012f8054610b8b90614740565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810191909152600082815261013060205260409020546001600160a01b03166121245760405162461bcd60e51b8152600401610c4390614ce2565b5060009081526101a16020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316938201939093526301000000830482166060820152640100000000830482166080820152600160281b8304821660a0820152600160301b9092041660c082015290565b60ca5460ff16156121c55760405162461bcd60e51b8152600401610c43906153f8565b33803b903281146121e85760405162461bcd60e51b8152600401610c439061543c565b81156122065760405162461bcd60e51b8152600401610c439061543c565b61019a5461221590600161544c565b8361019e54612224919061544c565b11156122425760405162461bcd60e51b8152600401610c439061547e565b60008061224d61302d565b905060005b858110156123645760006122676064846154a4565b61019e54909150600c90610a8c90614e2010156122875750600a90506103e85b61019d54612295908761544c565b955081831080156122a857508061019b54105b156122ce576122ba8361019e54613069565b6122c78561019e54613210565b94506122eb565b6122db8361019e54613244565b6122e88561019e54613210565b94505b6107d061019e546122fc91906154a4565b61232b576101985461019f54612312919061544c565b61019f81905561019d54612326919061544c565b61019d555b6123383361019e5461298f565b61019e805490600061234983614b0b565b9190505550505050808061235c90614b0b565b915050612252565b5061019354604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061239890339086906004016154b8565b600060405180830381600087803b1580156123b257600080fd5b505af11580156123c6573d6000803e3d6000fd5b50505050505080416040516020016123df9291906154fb565b60408051601f19818403018152919052805160209091012061019255505050565b6112c73383836134b0565b6098546001600160a01b031633146124355760405162461bcd60e51b8152600401610c439061526e565b61019a55565b6124453383612a80565b6124615760405162461bcd60e51b8152600401610c4390614b80565b611fb684848484613554565b6098546001600160a01b031633146124975760405162461bcd60e51b8152600401610c439061526e565b600181151514156124aa57610f57612fbe565b610f57613587565b600081815261013060205260409020546060906001600160a01b03166124ea5760405162461bcd60e51b8152600401610c4390614ce2565b6124f382611ca8565b6125ed5760008281526101a16020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316828501526301000000810483166060830152640100000000810483166080830152600160281b8104831660a0830152600160301b900490911660c08201526101945491516346f5ca7560e11b815290916001600160a01b031690638deb94ea906125a19086908590600401615521565b600060405180830381865afa1580156125be573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125e69190810190615595565b9392505050565b6125f682611ca8565b156126b25760008281526101a0602090815260409182902082516101008082018552915460ff80821683529281048316938201939093526201000083048216818501526301000000830482166060820152640100000000830482166080820152600160281b8304821660a0820152600160301b8304821660c0820152600160381b9092041660e082015261019454915163011c789160e31b815290916001600160a01b0316906308e3c488906125a190869085906004016155d0565b505060408051602081019091526000815290565b919050565b6098546001600160a01b031633146126f55760405162461bcd60e51b8152600401610c439061526e565b61019e55565b3360009081526001602052604090205460ff168061272357506098546001600160a01b031633145b61273f5760405162461bcd60e51b8152600401610c439061489b565b600082815261013060205260409020546001600160a01b03166127745760405162461bcd60e51b8152600401610c4390614ce2565b61277d82611ca8565b6127995760405162461bcd60e51b8152600401610c4390614eef565b60008281526101a0602052604090208190611fb682826153ba565b6001600160a01b03811660009081526001602052604081205460ff16806125e657506001600160a01b038084166000908152610133602090815260408083209386168352929052205460ff166125e6565b6098546001600160a01b0316331461282f5760405162461bcd60e51b8152600401610c439061526e565b6001600160a01b0381166128555760405162461bcd60e51b8152600401610c439061562f565b610f5781612e0a565b6098546001600160a01b031633146128885760405162461bcd60e51b8152600401610c439061526e565b61019380546001600160a01b03199081166001600160a01b039788161790915561019480548216958716959095179094556101958054851693861693909317909255610196805484169185169190911790556101a280549092169216919091179055565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610b755750610b75826135da565b60008181526101326020526040902080546001600160a01b0319166001600160a01b038416908117909155819061295682611bf7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166129b55760405162461bcd60e51b8152600401610c4390615671565b600081815261013060205260409020546001600160a01b0316156129eb5760405162461bcd60e51b8152600401610c43906156b5565b6129f76000838361362a565b6001600160a01b038216600090815261013160205260408120805460019290612a2190849061544c565b90915550506000818152610130602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815261013060205260408120546001600160a01b0316612ab55760405162461bcd60e51b8152600401610c439061570e565b6000612ac083611bf7565b9050806001600160a01b0316846001600160a01b03161480612ae75750612ae781856127b4565b80612b0b5750836001600160a01b0316612b0084610c0e565b6001600160a01b0316145b949350505050565b826001600160a01b0316612b2682611bf7565b6001600160a01b031614612b4c5760405162461bcd60e51b8152600401610c4390615760565b6001600160a01b038216612b725760405162461bcd60e51b8152600401610c43906157b1565b612b7d83838361362a565b612b88600082612920565b6001600160a01b038316600090815261013160205260408120805460019290612bb2908490614cf2565b90915550506001600160a01b038216600090815261013160205260408120805460019290612be190849061544c565b90915550506000818152610130602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6098546001600160a01b03163314610f575760405162461bcd60e51b8152600401610c439061526e565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612ca057610cea83613658565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612cfa575060408051601f3d908101601f19168201909252612cf7918101906157cc565b60015b612d165760405162461bcd60e51b8152600401610c4390615847565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612d555760405162461bcd60e51b8152600401610c439061589d565b50610cea8383836136c0565b6000612d6c82611bf7565b9050612d7a8160008461362a565b612d85600083612920565b6001600160a01b038116600090815261013160205260408120805460019290612daf908490614cf2565b90915550506000828152610130602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b609880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008054610100900460ff1615612ea3578160ff166001148015612e7f5750303b155b612e9b5760405162461bcd60e51b8152600401610c4390615907565b506000919050565b60005460ff808416911610612eca5760405162461bcd60e51b8152600401610c4390615907565b506000805460ff191660ff92909216919091179055600190565b600054610100900460ff16611ca65760405162461bcd60e51b8152600401610c439061595f565b600054610100900460ff16612f325760405162461bcd60e51b8152600401610c439061595f565b611ca633612e0a565b600054610100900460ff16612f625760405162461bcd60e51b8152600401610c439061595f565b60ca805460ff19169055565b600054610100900460ff16612f955760405162461bcd60e51b8152600401610c439061595f565b8151612fa99061012e906020850190613c11565b508051610cea9061012f906020840190613c11565b60ca5460ff1615612fe15760405162461bcd60e51b8152600401610c43906153f8565b60ca805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586130163390565b6040516130239190613dc0565b60405180910390a1565b6000334248426101925460405160200161304b95949392919061596f565b6040516020818303038152906040528051906020012060001c905090565b60006130758383613210565b9050600061308383836136e5565b905061308f8284613210565b9150600061309d84846136e5565b905060006040518060e001604052808460ff1681526020018360ff168152602001600160ff168152602001600160ff168152602001600160ff168152602001600160ff168152602001600160ff168152509050806101a1600087815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff160217905550905050600161019b6000828254613203919061544c565b9091555050505050505050565b600082826040516020016132259291906159c8565b60408051601f1981840301815291905280516020909101209392505050565b60006132508383613210565b9050600061325f6003836154a4565b61326a90600161544c565b90506132768284613210565b915060006132856003846154a4565b61329090600161544c565b905061329c8385613210565b925060006132ab6003856154a4565b6132b690600161544c565b90506132c28486613210565b935060006132d08486613723565b90506132dc8587613210565b945060006132ea8587613764565b90506132f68688613210565b955060006133056003886154a4565b61331090600161544c565b90506000806040518061010001604052808960ff1681526020018760ff1681526020018460ff1681526020018860ff168152602001600060ff1681526020018660ff1681526020018560ff1681526020018360ff168152509050806101a060008c815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff160217905550905050600161019c600082825461349e919061544c565b90915550505050505050505050505050565b816001600160a01b0316836001600160a01b031614156134e25760405162461bcd60e51b8152600401610c4390615a0a565b6001600160a01b038381166000818152610133602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190613547908590613cf7565b60405180910390a3505050565b61355f848484612b13565b61356b84848484613797565b611fb65760405162461bcd60e51b8152600401610c4390615a74565b60ca5460ff166135a95760405162461bcd60e51b8152600401610c4390615ab8565b60ca805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613016565b60006001600160e01b031982166380ac58cd60e01b148061360b57506001600160e01b03198216635b5e139f60e01b145b80610b7557506301ffc9a760e01b6001600160e01b0319831614610b75565b60ca5460ff161561364d5760405162461bcd60e51b8152600401610c43906153f8565b610cea838383613895565b6001600160a01b0381163b61367f5760405162461bcd60e51b8152600401610c4390615b12565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6136c98361394f565b6000825111806136d65750805b15610cea57611fb6838361398f565b600060046003614e208511156136fd57506002905060045b8160ff168160ff168561371091906154a4565b61371a919061544c565b95945050505050565b6000605a600160ff8516141561373b5750607361374b565b8360ff166002141561374b575060415b60ff811661375a6015856154a4565b612b0b919061544c565b6000605a600160ff8516141561377c5750603261374b565b8360ff166002141561374b575060468061375a6015856154a4565b60006001600160a01b0384163b1561388a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137db903390899088908890600401615b22565b6020604051808303816000875af1925050508015613816575060408051601f3d908101601f1916820190925261381391810190615b71565b60015b613870573d808015613844576040519150601f19603f3d011682016040523d82523d6000602084013e613849565b606091505b5080516138685760405162461bcd60e51b8152600401610c4390615a74565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b0b565b506001949350505050565b6001600160a01b0383166138f2576138ed816101628054600083815261016360205260408120829055600182018355919091527f29af0939a5988989bfee913a9ad10b9335cb63ebc9fd2b69e5f877d0455ac9190155565b613915565b816001600160a01b0316836001600160a01b031614613915576139158382613a3b565b6001600160a01b03821661392c57610cea81613add565b826001600160a01b0316826001600160a01b031614610cea57610cea8282613b92565b61395881613658565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6139b85760405162461bcd60e51b8152600401610c4390615bd5565b600080846001600160a01b0316846040516139d39190615c07565b600060405180830381855af49150503d8060008114613a0e576040519150601f19603f3d011682016040523d82523d6000602084013e613a13565b606091505b509150915061371a8282604051806060016040528060278152602001615c2a60279139613bd8565b60006001613a4884611c2d565b613a529190614cf2565b60008381526101616020526040902054909150808214613aa8576001600160a01b038416600090815261016060209081526040808320858452825280832054848452818420819055835261016190915290208190555b506000918252610161602090815260408084208490556001600160a01b03909416835261016081528383209183525290812055565b61016254600090613af090600190614cf2565b600083815261016360205260408120546101628054939450909284908110613b1a57613b1a614d09565b90600052602060002001549050806101628381548110613b3c57613b3c614d09565b60009182526020808320909101929092558281526101639091526040808220849055858252812055610162805480613b7657613b76615c13565b6001900381819060005260206000200160009055905550505050565b6000613b9d83611c2d565b6001600160a01b0390931660009081526101606020908152604080832086845282528083208590559382526101619052919091209190915550565b60608315613be75750816125e6565b825115613bf75782518084602001fd5b8160405162461bcd60e51b8152600401610c439190613d63565b828054613c1d90614740565b90600052602060002090601f016020900481019282613c3f5760008555613c85565b82601f10613c5857805160ff1916838001178555613c85565b82800160010185558215613c85579182015b82811115613c85578251825591602001919060010190613c6a565b50613c91929150613c95565b5090565b5b80821115613c915760008155600101613c96565b6001600160e01b031981165b8114610f5757600080fd5b8035610b7581613caa565b600060208284031215613ce157613ce1600080fd5b6000612b0b8484613cc1565b8015155b82525050565b60208101610b758284613ced565b60005b83811015613d20578181015183820152602001613d08565b83811115611fb65750506000910152565b6000613d3b825190565b808452602084019350613d52818560208601613d05565b601f01601f19169290920192915050565b602080825281016125e68184613d31565b80613cb6565b8035610b7581613d74565b600060208284031215613d9a57613d9a600080fd5b6000612b0b8484613d7a565b60006001600160a01b038216610b75565b613cf181613da6565b60208101610b758284613db7565b613cb681613da6565b8035610b7581613dce565b60008060408385031215613df857613df8600080fd5b6000613e048585613dd7565b9250506020613e1585828601613d7a565b9150509250929050565b6000610b7582613da6565b6000610b7582613e1f565b613cf181613e2a565b60208101610b758284613e35565b80613cf1565b60208101610b758284613e4c565b600060e08284031215613e7557613e75600080fd5b50919050565b60008060006101208486031215613e9457613e94600080fd5b6000613ea08686613dd7565b9350506020613eb186828701613d7a565b9250506040613ec286828701613e60565b9150509250925092565b600080600060608486031215613ee457613ee4600080fd5b6000613ef08686613dd7565b9350506020613f0186828701613dd7565b9250506040613ec286828701613d7a565b600060208284031215613f2757613f27600080fd5b6000612b0b8484613dd7565b60ff8116613cf1565b8051610100830190613f4e8482613f33565b506020820151613f616020850182613f33565b506040820151613f746040850182613f33565b506060820151613f876060850182613f33565b506080820151613f9a6080850182613f33565b5060a0820151613fad60a0850182613f33565b5060c0820151613fc060c0850182613f33565b5060e0820151611fb660e0850182613f33565b6101008101610b758284613f3c565b6000613fee8383613e4c565b505060200190565b6000614000825190565b80845260209384019383018060005b838110156140345781516140238882613fe2565b97506020830192505060010161400f565b509495945050505050565b602080825281016125e68184613ff6565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171561408c5761408c614050565b6040525050565b600061409e60405190565b90506126c68282614066565b600067ffffffffffffffff8211156140c4576140c4614050565b601f19601f83011660200192915050565b82818337506000910152565b60006140f46140ef846140aa565b614093565b90508281526020810184848401111561410f5761410f600080fd5b6111e08482856140d5565b600082601f83011261412e5761412e600080fd5b8135612b0b8482602086016140e1565b6000806040838503121561415457614154600080fd5b60006141608585613dd7565b925050602083013567ffffffffffffffff81111561418057614180600080fd5b613e158582860161411a565b60008083601f8401126141a1576141a1600080fd5b50813567ffffffffffffffff8111156141bc576141bc600080fd5b6020830191508360208202830111156141d7576141d7600080fd5b9250929050565b6000806000806000606086880312156141f9576141f9600080fd5b853567ffffffffffffffff81111561421357614213600080fd5b61421f8882890161418c565b9550955050602086013567ffffffffffffffff81111561424157614241600080fd5b61424d8882890161418c565b9350935050604061426088828901613d7a565b9150509295509295909350565b610100810161427c828b613f33565b614289602083018a613f33565b6142966040830189613f33565b6142a36060830188613f33565b6142b06080830187613f33565b6142bd60a0830186613f33565b6142ca60c0830185613f33565b6142d760e0830184613f33565b9998505050505050505050565b60e081016142f2828a613f33565b6142ff6020830189613f33565b61430c6040830188613f33565b6143196060830187613f33565b6143266080830186613f33565b61433360a0830185613f33565b61434060c0830184613f33565b98975050505050505050565b600080600080600080600080610100898b03121561436c5761436c600080fd5b60006143788b8b613d7a565b98505060206143898b828c01613d7a565b975050604061439a8b828c01613d7a565b96505060606143ab8b828c01613d7a565b95505060806143bc8b828c01613d7a565b94505060a06143cd8b828c01613dd7565b93505060c06143de8b828c01613dd7565b92505060e06143ef8b828c01613dd7565b9150509295985092959890939650565b60006101008284031215613e7557613e75600080fd5b6000806000610140848603121561442e5761442e600080fd5b600061443a8686613dd7565b935050602061444b86828701613d7a565b9250506040613ec2868287016143ff565b801515613cb6565b8035610b758161445c565b60008060006040848603121561448757614487600080fd5b833567ffffffffffffffff8111156144a1576144a1600080fd5b6144ad8682870161418c565b93509350506020613ec286828701614464565b60008061010083850312156144d7576144d7600080fd5b60006144e38585613d7a565b9250506020613e1585828601613e60565b805160e08301906145058482613f33565b5060208201516145186020850182613f33565b50604082015161452b6040850182613f33565b50606082015161453e6060850182613f33565b5060808201516145516080850182613f33565b5060a082015161456460a0850182613f33565b5060c0820151611fb660c0850182613f33565b60e08101610b7582846144f4565b6000806040838503121561459b5761459b600080fd5b60006145a78585613dd7565b9250506020613e1585828601614464565b600080600080608085870312156145d1576145d1600080fd5b60006145dd8787613dd7565b94505060206145ee87828801613dd7565b93505060406145ff87828801613d7a565b925050606085013567ffffffffffffffff81111561461f5761461f600080fd5b61462b8782880161411a565b91505092959194509250565b60006020828403121561464c5761464c600080fd5b6000612b0b8484614464565b600080610120838503121561466f5761466f600080fd5b600061467b8585613d7a565b9250506020613e15858286016143ff565b600080604083850312156146a2576146a2600080fd5b60006146ae8585613dd7565b9250506020613e1585828601613dd7565b600080600080600060a086880312156146da576146da600080fd5b60006146e68888613dd7565b95505060206146f788828901613dd7565b945050604061470888828901613dd7565b935050606061471988828901613dd7565b925050608061426088828901613dd7565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061475457607f821691505b60208210811415613e7557613e7561472a565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b60208082528101610b7581614767565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602082015291506147ac565b60208082528101610b75816147c3565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015291506147ac565b60208082528101610b7581614811565b60068152600060208201650dcdec2eae8d60d31b815291505b5060200190565b60208082528101610b758161487b565b6006815260006020820165616c7264796d60d01b81529150614894565b60208082528101610b75816148ab565b60ff8116613cb6565b60008135610b75816148d8565b600060ff835b81169019929092169190911792915050565b6000610b7560ff83165b60ff1690565b61491f82614906565b61492a8183546148ee565b8255505050565b600061ff006148f48460081b90565b61494982614906565b61492a818354614931565b600062ff00006148f48460101b90565b61496d82614906565b61492a818354614954565b600063ff0000006148f48460181b90565b61499282614906565b61492a818354614978565b600064ff000000006148f48460201b90565b6149b882614906565b61492a81835461499d565b600065ff00000000006148f48460281b90565b6149df82614906565b61492a8183546149c3565b600066ff0000000000006148f48460301b90565b614a0782614906565b61492a8183546149ea565b808280614a1e816148e1565b9050614a2a8184614916565b50829150506020830180614a3d816148e1565b9050614a498184614940565b50829150506040830180614a5c816148e1565b9050614a688184614964565b50829150506060830180614a7b816148e1565b9050614a878184614989565b50829150506080830180614a9a816148e1565b9050614aa681846149af565b508291505060a0830180614ab9816148e1565b9050614ac581846149d6565b508291505060c0830180614ad8816148e1565b9050614ae481846149fe565b5050505050565b6112c78282614a12565b634e487b7160e01b600052601160045260246000fd5b6000600019821415614b1f57614b1f614af5565b5060010190565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015291506147ac565b60208082528101610b7581614b26565b60038152600060208201623737a360e91b81529150614894565b60208082528101610b7581614b90565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015291506147ac565b60208082528101610b7581614bba565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b19195b1959d85d1958d85b1b60a21b602082015291506147ac565b60208082528101610b7581614c12565b602c81526000602082017f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682081526b6163746976652070726f787960a01b602082015291506147ac565b60208082528101610b7581614c6b565b60078152600060208201661b9bd95e1a5cdd60ca1b81529150614894565b60208082528101610b7581614cc4565b600082821015614d0457614d04614af5565b500390565b634e487b7160e01b600052603260045260246000fd5b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015291506147ac565b60208082528101610b7581614d1f565b603881526000602082017f555550535570677261646561626c653a206d757374206e6f742062652063616c81527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000602082015291506147ac565b60208082528101610b7581614d78565b602281526000602082017f6e6f20667265616b73206f722063656c65737469616c7320746f206d69677261815261746560f01b602082015291506147ac565b60208082528101610b7581614de2565b8051610b7581613dce565b600060208284031215614e5157614e51600080fd5b6000612b0b8484614e31565b601681526000602082017f796f7520646f6e2774206f776e2074686973207365720000000000000000000081529150614894565b60208082528101610b7581614e5d565b8051610b758161445c565b600060208284031215614ec157614ec1600080fd5b6000612b0b8484614ea1565b600b81526000602082016a6e6f74206120667265616b60a81b81529150614894565b60208082528101610b7581614ecd565b60608101614f0d8286613db7565b614f1a6020830185613db7565b612b0b6040830184613e4c565b8051610b75816148d8565b60006101008284031215614f4857614f48600080fd5b614f53610100614093565b90506000614f618484614f27565b8252506020614f7284848301614f27565b6020830152506040614f8684828501614f27565b6040830152506060614f9a84828501614f27565b6060830152506080614fae84828501614f27565b60808301525060a0614fc284828501614f27565b60a08301525060c0614fd684828501614f27565b60c08301525060e0614fea84828501614f27565b60e08301525092915050565b6000610100828403121561500c5761500c600080fd5b6000612b0b8484614f32565b600f81526000602082017f6e6f7420612063656c65737469616c000000000000000000000000000000000081529150614894565b60208082528101610b7581615018565b60006080828403121561507157615071600080fd5b61507b6080614093565b905060006150898484614f27565b825250602061509a84848301614f27565b60208301525060406150ae84828501614f27565b60408301525060606150c284828501614f27565b60608301525092915050565b6000608082840312156150e3576150e3600080fd5b6000612b0b848461505c565b81835260006020840193507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561512a5761512a600080fd5b60208302925061513b8385846140d5565b50500190565b6080808252810161515381888a6150ef565b905081810360208301526151688186886150ef565b90506151776040830185613e4c565b6151846060830184613db7565b979650505050505050565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015291506147ac565b60208082528101610b758161518f565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015291506147ac565b60208082528101610b75816151e5565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000614894565b60208082528101610b758161523c565b6000610b7582614910565b613cf18161527e565b60208101610b758284615289565b600067ff000000000000006148f48460381b90565b6152be82614906565b61492a8183546152a0565b8082806152d5816148e1565b90506152e18184614916565b508291505060208301806152f4816148e1565b90506153008184614940565b50829150506040830180615313816148e1565b905061531f8184614964565b50829150506060830180615332816148e1565b905061533e8184614989565b50829150506080830180615351816148e1565b905061535d81846149af565b508291505060a0830180615370816148e1565b905061537c81846149d6565b508291505060c083018061538f816148e1565b905061539b81846149fe565b508291505060e08301806153ae816148e1565b9050614ae481846152b5565b6112c782826152c9565b601081526000602082017f5061757361626c653a207061757365640000000000000000000000000000000081529150614894565b60208082528101610b75816153c4565b601781526000602082017f796f7527726520747279696e6720746f2063686561742100000000000000000081529150614894565b60208082528101610b7581615408565b6000821982111561545f5761545f614af5565b500190565b60038152600060208201620dac2f60eb1b81529150614894565b60208082528101610b7581615464565b634e487b7160e01b600052601260045260246000fd5b6000826154b3576154b361548e565b500690565b604081016154c68285613db7565b6125e66020830184613e4c565b6000610b758260601b90565b6000610b75826154d3565b613cf16154f682613da6565b6154df565b600061550782856154ea565b60148201915061551782846154ea565b5060140192915050565b61010081016155308285613e4c565b6125e660208301846144f4565b600061554b6140ef846140aa565b90508281526020810184848401111561556657615566600080fd5b6111e0848285613d05565b600082601f83011261558557615585600080fd5b8151612b0b84826020860161553d565b6000602082840312156155aa576155aa600080fd5b815167ffffffffffffffff8111156155c4576155c4600080fd5b612b0b84828501615571565b61012081016155df8285613e4c565b6125e66020830184613f3c565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506147ac565b60208082528101610b75816155ec565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000614894565b60208082528101610b758161563f565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529150614894565b60208082528101610b7581615681565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291506147ac565b60208082528101610b75816156c5565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b602082015291506147ac565b60208082528101610b758161571e565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602082015291506147ac565b60208082528101610b7581615770565b8051610b7581613d74565b6000602082840312156157e1576157e1600080fd5b6000612b0b84846157c1565b602e81526000602082017f45524331393637557067726164653a206e657720696d706c656d656e7461746981527f6f6e206973206e6f742055555053000000000000000000000000000000000000602082015291506147ac565b60208082528101610b75816157ed565b602981526000602082017f45524331393637557067726164653a20756e737570706f727465642070726f788152681a58589b195555525160ba1b602082015291506147ac565b60208082528101610b7581615857565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a6564000000000000000000000000000000000000602082015291506147ac565b60208082528101610b75816158ad565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b602082015291506147ac565b60208082528101610b7581615917565b600061597b82886154ea565b60148201915061598b8287613e4c565b60208201915061599b8286613e4c565b6020820191506159ab8285613e4c565b6020820191506159bb8284613e4c565b5060200195945050505050565b604081016154c68285613e4c565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150614894565b60208082528101610b75816159d6565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015291506147ac565b60208082528101610b7581615a1a565b601481526000602082017f5061757361626c653a206e6f742070617573656400000000000000000000000081529150614894565b60208082528101610b7581615a84565b602d81526000602082017f455243313936373a206e657720696d706c656d656e746174696f6e206973206e81526c1bdd08184818dbdb9d1c9858dd609a1b602082015291506147ac565b60208082528101610b7581615ac8565b60808101615b308287613db7565b615b3d6020830186613db7565b615b4a6040830185613e4c565b8181036060830152615b5c8184613d31565b9695505050505050565b8051610b7581613caa565b600060208284031215615b8657615b86600080fd5b6000612b0b8484615b66565b602681526000602082017f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f8152651b9d1c9858dd60d21b602082015291506147ac565b60208082528101610b7581615b92565b6000615bef825190565b615bfd818560208601613d05565b9290920192915050565b60006125e68284615be5565b634e487b7160e01b600052603160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220477e90dc6a9798a9411c0ea93fce60269bc876406f7de1d806a5e735ddb26c1164736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.