Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- NFTv2
- Optimization enabled
- true
- Compiler version
- v0.8.17+commit.8df45f5f
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2023-08-13T16:26:50.518211Z
contracts/NFTv2.sol
/* SPDX-License-Identifier: UNLICENSED */
pragma solidity ^0.8.7;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC721MetadataUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC721ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "./ManageableUpgradeable.sol";
interface INFTv1 {
function _nodes(
uint256 id
)
external
view
returns (
uint256,
string memory,
uint8,
uint256,
uint256,
uint256,
uint256
);
function players(
address user
) external view returns (uint256, uint256, uint256);
function tokenOfOwnerByIndex(
address owner,
uint256 index
) external view returns (uint256);
function isBlacklisted(address user) external view returns (bool);
}
interface IManager {
function migrationCompound(address user) external;
}
contract NFTv2 is
Initializable,
OwnableUpgradeable,
ManageableUpgradeable,
ERC165Upgradeable,
IERC721Upgradeable,
IERC721MetadataUpgradeable,
IERC721EnumerableUpgradeable
{
using AddressUpgradeable for address;
using StringsUpgradeable for uint256;
struct Node {
uint256 id;
string name;
uint256 tier;
uint256 realValue;
uint256 value;
uint256 totalClaimed;
uint256 mintTimestamp;
uint256 claimTimestamp;
}
struct Player {
uint256 totalDeposit;
uint256 totalAirdrop;
uint256 totalClaimed;
}
mapping(address => uint256) private _balances;
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
mapping(uint256 => uint256) private _ownedTokensIndex;
mapping(uint256 => address) private _owners;
mapping(address => Player) public players;
mapping(uint256 => Node) public _nodes;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
mapping(address => bool) public isBlacklisted;
uint256[] private _allTokens;
mapping(uint256 => uint256) private _allTokensIndex;
string public _baseURI;
string public _name;
string private _symbol;
string public baseExtension;
uint256 public minted;
uint256 public maxSupply;
bool public mintingEnabled;
bool public transferEnabled;
bool public allowBurn;
IManager public MANAGER;
function initialize(
string memory baseURI,
string memory name_,
string memory symbol_,
address manager_
) public initializer {
__Ownable_init();
_baseURI = baseURI;
_name = name_;
_symbol = symbol_;
addManager(manager_);
baseExtension = ".json";
minted = 0;
maxSupply = 5000;
mintingEnabled = true;
transferEnabled = true;
allowBurn = false;
}
function increaseAlltokensByOne() public onlyOwner {
_allTokensIndex[_allTokens.length + 1] = _allTokens.length;
_allTokens.push(_allTokens.length + 1);
}
function setManager(address manager) public onlyOwner {
MANAGER = IManager(manager);
}
function supportsInterface(
bytes4 interfaceId
)
public
view
virtual
override(ERC165Upgradeable, IERC165Upgradeable)
returns (bool)
{
return
interfaceId == type(IERC721Upgradeable).interfaceId ||
interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
interfaceId == type(IERC721EnumerableUpgradeable).interfaceId ||
super.supportsInterface(interfaceId);
}
function userNodes(address user) public view returns (Node[] memory) {
uint256 balance = balanceOf(user);
Node[] memory hisNodes = new Node[](balance);
for (uint256 i = 0; i < balance; i++) {
hisNodes[i] = _nodes[tokenOfOwnerByIndex(user, i)];
}
return hisNodes;
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
modifier tokenExists(uint256 tokenId) {
require(_exists(tokenId), "ERC721: owner query for nonexistent token");
_;
}
function balanceOf(address owner) public view override returns (uint256) {
return _balances[owner];
}
function ownerOf(
uint256 tokenId
) public view override tokenExists(tokenId) returns (address) {
return _owners[tokenId];
}
function name() public view override returns (string memory) {
return _name;
}
function symbol() public view override returns (string memory) {
return _symbol;
}
function totalSupply() public view override returns (uint256) {
return _allTokens.length;
}
function tokenOfOwnerByIndex(
address owner,
uint256 index
) public view virtual override returns (uint256) {
require(
index < balanceOf(owner),
"ERC721Enumerable: owner index out of bounds"
);
return _ownedTokens[owner][index];
}
function tokenByIndex(
uint256 index
) public view virtual override returns (uint256) {
require(
index < totalSupply(),
"ERC721Enumerable: global index out of bounds"
);
return _allTokens[index];
}
function tokenURI(
uint256 tokenId
) public view override tokenExists(tokenId) returns (string memory) {
string memory baseURI = _baseURI;
return
bytes(baseURI).length > 0
? string(
abi.encodePacked(baseURI, baseExtension)
)
: "";
}
function approve(address to, uint256 tokenId) public override {
address owner = ownerOf(tokenId);
require(
!isBlacklisted[owner] && !isBlacklisted[to],
"ERC721: blacklisted"
);
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);
}
function getApproved(
uint256 tokenId
) public view override returns (address) {
require(
_exists(tokenId),
"ERC721: approved query for nonexistent token"
);
return _tokenApprovals[tokenId];
}
function setApprovalForAll(
address operator,
bool approved
) public override {
_setApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(
address owner,
address operator
) public view override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: transfer caller is not owner nor approved"
);
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
require(
_isApprovedOrOwner(_msgSender(), tokenId),
"ERC721: transfer caller is not owner nor approved"
);
_safeTransfer(from, to, tokenId, _data);
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
function _isApprovedOrOwner(
address spender,
uint256 tokenId
) internal view returns (bool) {
require(
_exists(tokenId),
"ERC721: operator query for nonexistent token"
);
address owner = ownerOf(tokenId);
return (spender == owner ||
isApprovedForAll(owner, spender) ||
getApproved(tokenId) == spender);
}
function _safeMint(address to, uint256 tokenId) internal {
_safeMint(to, tokenId, "");
}
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
function _mint(address to, uint256 tokenId) internal {
require(mintingEnabled, "ERC721: minting not enabled yet");
require(!isBlacklisted[to], "ERC721: blacklisted");
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
minted++;
require(minted <= maxSupply, "ERC721: max supplied reached");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
function _burn(uint256 tokenId) internal {
address owner = ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
function _transfer(address from, address to, uint256 tokenId) internal {
require(transferEnabled, "ERC721: transfers are not enabled");
require(
!isBlacklisted[from] && !isBlacklisted[to],
"ERC721: blacklisted"
);
require(
ownerOf(tokenId) == from,
"ERC721: transfer from incorrect owner"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
function _approve(address to, uint256 tokenId) internal {
_tokenApprovals[tokenId] = to;
emit Approval(ownerOf(tokenId), to, tokenId);
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal {
require(owner != operator, "ERC721: approve to caller");
require(
!isBlacklisted[owner] && !isBlacklisted[operator],
"ERC721: blacklisted"
);
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
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;
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal {
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0) && allowBurn) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
function _removeTokenFromOwnerEnumeration(
address from,
uint256 tokenId
) private {
uint256 lastTokenIndex = balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId;
_ownedTokensIndex[lastTokenId] = tokenIndex;
}
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId;
_allTokensIndex[lastTokenId] = tokenIndex;
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
function mint(
address to,
string memory nodeName,
uint256 tier,
uint256 value
) public onlyManager {
uint256 id = totalSupply() + 1;
_safeMint(to, id);
_nodes[id] = Node({
id: id,
name: nodeName,
tier: tier,
realValue: value,
value: value,
totalClaimed: 0,
mintTimestamp: block.timestamp,
claimTimestamp: block.timestamp
});
players[to].totalDeposit += value;
}
function mint(
address to,
string memory nodeName,
uint256 value,
uint256 totalClaimed,
uint8 tier,
uint256 mintTimestamp,
uint256 claimTimestamp
) public onlyOwner {
uint256 id = totalSupply() + 1;
_safeMint(to, id);
_nodes[id] = Node({
id: id,
name: nodeName,
tier: tier,
realValue: value,
value: value,
totalClaimed: totalClaimed,
mintTimestamp: mintTimestamp,
claimTimestamp: claimTimestamp
});
players[to].totalDeposit += value;
}
function updateClaimTimestamp(uint256 id) public onlyManager {
_nodes[id].claimTimestamp = block.timestamp;
}
function updateValue(uint256 id, uint256 rewards) public onlyManager {
players[ownerOf(id)].totalDeposit += rewards;
_nodes[id].value += rewards;
}
function subValue(uint256 id, uint256 rewards) public onlyManager {
if (_nodes[id].value < rewards) {
_nodes[id].value = _nodes[id].realValue;
return;
}
_nodes[id].value -= rewards;
if (_nodes[id].value < _nodes[id].realValue) {
_nodes[id].value = _nodes[id].realValue;
}
}
function updateRealValue(uint256 id, uint256 rewards) public onlyManager {
_nodes[id].realValue += rewards;
}
function updateName(uint256 id, string memory nodeName) public onlyManager {
_nodes[id].name = nodeName;
}
function updateTotalClaimed(
uint256 id,
uint256 rewards
) public onlyManager {
players[ownerOf(id)].totalClaimed += rewards;
_nodes[id].totalClaimed += rewards;
}
function addAirdrop(address to, uint256 quantity) public onlyManager {
players[to].totalAirdrop += quantity;
}
function updateMintingEnabled(bool value) public onlyOwner {
mintingEnabled = value;
}
function updateTransferEnabled(bool value) public onlyOwner {
transferEnabled = value;
}
function updateMaxSupply(uint256 value) public onlyOwner {
maxSupply = value;
}
function updateTiers(uint256[] memory ids, uint8 tier) public onlyOwner {
for (uint256 i = 0; i < ids.length; i++) {
_nodes[ids[i]].tier = tier;
}
}
function updateBaseURI(string memory baseURI) public onlyOwner {
_baseURI = baseURI;
}
}
@openzeppelin/contracts-upgradeable/interfaces/IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)
pragma solidity ^0.8.0;
import "../token/ERC721/IERC721ReceiverUpgradeable.sol";
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (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.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 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.
*
* 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.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* 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.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_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.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}
@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @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;
}
@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)
pragma solidity ^0.8.0;
import "../token/ERC20/IERC20Upgradeable.sol";
@openzeppelin/contracts-upgradeable/interfaces/IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
import "../token/ERC721/extensions/IERC721EnumerableUpgradeable.sol";
@openzeppelin/contracts-upgradeable/interfaces/IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../token/ERC721/extensions/IERC721MetadataUpgradeable.sol";
@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20Upgradeable {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol
// 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);
}
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol
// 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);
}
@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol
// 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);
}
@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// 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;
}
@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/MathUpgradeable.sol";
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = MathUpgradeable.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, MathUpgradeable.log256(value) + 1);
}
}
/**
* @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] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol
// 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;
}
@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol
// 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);
}
@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library MathUpgradeable {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}
contracts/ManageableUpgradeable.sol
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
abstract contract ManageableUpgradeable is OwnableUpgradeable {
mapping(address => bool) private _managers;
event ManagerAdded(address indexed manager_);
event ManagerRemoved(address indexed manager_);
function managers(address manager_) public view virtual returns (bool) {
return _managers[manager_];
}
modifier onlyManager() {
require(_managers[_msgSender()], "Manageable: caller is not the owner");
_;
}
function removeManager(address manager_) public virtual onlyOwner {
_managers[manager_] = false;
emit ManagerRemoved(manager_);
}
function addManager(address manager_) public virtual onlyOwner {
require(
manager_ != address(0),
"Manageable: new owner is the zero address"
);
_managers[manager_] = true;
emit ManagerAdded(manager_);
}
}
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IManager"}],"name":"MANAGER","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"_baseURI","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"_name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"string","name":"name","internalType":"string"},{"type":"uint256","name":"tier","internalType":"uint256"},{"type":"uint256","name":"realValue","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"totalClaimed","internalType":"uint256"},{"type":"uint256","name":"mintTimestamp","internalType":"uint256"},{"type":"uint256","name":"claimTimestamp","internalType":"uint256"}],"name":"_nodes","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addAirdrop","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"quantity","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addManager","inputs":[{"type":"address","name":"manager_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"allowBurn","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"baseExtension","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"increaseAlltokensByOne","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"baseURI","internalType":"string"},{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"address","name":"manager_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isBlacklisted","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"managers","inputs":[{"type":"address","name":"manager_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"string","name":"nodeName","internalType":"string"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"totalClaimed","internalType":"uint256"},{"type":"uint8","name":"tier","internalType":"uint8"},{"type":"uint256","name":"mintTimestamp","internalType":"uint256"},{"type":"uint256","name":"claimTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"string","name":"nodeName","internalType":"string"},{"type":"uint256","name":"tier","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minted","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"mintingEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"totalDeposit","internalType":"uint256"},{"type":"uint256","name":"totalAirdrop","internalType":"uint256"},{"type":"uint256","name":"totalClaimed","internalType":"uint256"}],"name":"players","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeManager","inputs":[{"type":"address","name":"manager_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setManager","inputs":[{"type":"address","name":"manager","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"subValue","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"rewards","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenByIndex","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenOfOwnerByIndex","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferEnabled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBaseURI","inputs":[{"type":"string","name":"baseURI","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateClaimTimestamp","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMaxSupply","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMintingEnabled","inputs":[{"type":"bool","name":"value","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateName","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"string","name":"nodeName","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateRealValue","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"rewards","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTiers","inputs":[{"type":"uint256[]","name":"ids","internalType":"uint256[]"},{"type":"uint8","name":"tier","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTotalClaimed","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"rewards","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateTransferEnabled","inputs":[{"type":"bool","name":"value","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateValue","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"rewards","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct NFTv2.Node[]","components":[{"type":"uint256"},{"type":"string"},{"type":"uint256"},{"type":"uint256"},{"type":"uint256"},{"type":"uint256"},{"type":"uint256"},{"type":"uint256"}]}],"name":"userNodes","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"approved","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","indexed":false}],"anonymous":false},{"type":"event","name":"ManagerAdded","inputs":[{"type":"address","name":"manager_","indexed":true}],"anonymous":false},{"type":"event","name":"ManagerRemoved","inputs":[{"type":"address","name":"manager_","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false}]
Contract Creation Code
0x608060405234801561001057600080fd5b506132af806100206000396000f3fe608060405234801561001057600080fd5b506004361061030c5760003560e01c80638da5cb5b1161019d578063d1cd9d1c116100e9578063eb324000116100a2578063f2fde38b1161007c578063f2fde38b14610710578063f94da54814610723578063fdff9b4d14610736578063fe575a871461076257600080fd5b8063eb324000146106e2578063f010b1c4146106f5578063f103b433146106fd57600080fd5b8063d1cd9d1c14610625578063d28d885214610638578063d5abeb0114610640578063db57795914610649578063e2eb41ff1461065c578063e985e9c5146106a657600080fd5b8063ac18de4311610156578063c668286211610130578063c6682862146105e4578063c77b5f68146105ec578063c87b56dd146105ff578063d0ebdbe71461061257600080fd5b8063ac18de431461059e578063b851d8fe146105b1578063b88d4fde146105d157600080fd5b80638da5cb5b1461053f578063931688cb1461055057806395d89b4114610563578063964ddbb21461056b5780639fd6db121461057e578063a22cb4651461058b57600080fd5b806345c2860d1161025c5780635b5008261161021557806363665f2e116101ef57806363665f2e146104f357806370a0823114610506578063715018a61461052f578063743976a01461053757600080fd5b80635b500826146104ba5780635c6d8da1146104cd5780636352211e146104e057600080fd5b806345c2860d146104535780634a5dc3aa146104665780634cd412d5146104795780634f02c4201461048b5780634f6ccce71461049457806353e76f2c146104a757600080fd5b806323b872dd116102c95780632f745c59116102a35780632f745c591461040757806335e061fc1461041a57806341eef4921461042d57806342842e0e1461044057600080fd5b806323b872dd146103ba5780632d06177a146103cd5780632e7d754b146103e057600080fd5b806301ffc9a71461031157806306fdde0314610339578063081812fc1461034e578063095ea7b31461037957806318160ddd1461038e5780631b2df850146103a0575b600080fd5b61032461031f366004612744565b610785565b60405190151581526020015b60405180910390f35b6103416107f2565b60405161033091906127b8565b61036161035c3660046127cb565b610884565b6040516001600160a01b039091168152602001610330565b61038c610387366004612800565b61091e565b005b60a1545b604051908152602001610330565b60a95461036190630100000090046001600160a01b031681565b61038c6103c836600461282a565b610a92565b61038c6103db366004612866565b610ac3565b6103f36103ee3660046127cb565b610b7f565b604051610330989796959493929190612881565b610392610415366004612800565b610c48565b60a9546103249062010000900460ff1681565b61038c61043b36600461299e565b610cec565b61038c61044e36600461282a565b610df2565b61038c610461366004612a23565b610e0d565b61038c610474366004612a45565b610ed4565b60a95461032490610100900460ff1681565b61039260a75481565b6103926104a23660046127cb565b610ffb565b61038c6104b5366004612aa3565b61108e565b61038c6104c8366004612a23565b6110d8565b61038c6104db366004612aea565b611176565b6103616104ee3660046127cb565b611300565b61038c610501366004612800565b611357565b610392610514366004612866565b6001600160a01b031660009081526098602052604090205490565b61038c6113b1565b6103416113c5565b6033546001600160a01b0316610361565b61038c61055e366004612b83565b611453565b610341611467565b61038c6105793660046127cb565b611476565b60a9546103249060ff1681565b61038c610599366004612bc8565b6114bc565b61038c6105ac366004612866565b6114c7565b6105c46105bf366004612866565b611518565b6040516103309190612bfb565b61038c6105df366004612caf565b611717565b61034161174f565b61038c6105fa366004612d2b565b61175c565b61034161060d3660046127cb565b61177e565b61038c610620366004612866565b611897565b61038c610633366004612d46565b6118cb565b610341611929565b61039260a85481565b61038c610657366004612a23565b611936565b61068b61066a366004612866565b609c6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610330565b6103246106b4366004612dfe565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b61038c6106f0366004612a23565b6119cb565b61038c611a1b565b61038c61070b3660046127cb565b611a6d565b61038c61071e366004612866565b611a7a565b61038c610731366004612d2b565b611af3565b610324610744366004612866565b6001600160a01b031660009081526065602052604090205460ff1690565b610324610770366004612866565b60a06020526000908152604090205460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806107b657506001600160e01b03198216635b5e139f60e01b145b806107d157506001600160e01b0319821663780e9d6360e01b145b806107ec57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060a4805461080190612e28565b80601f016020809104026020016040519081016040528092919081815260200182805461082d90612e28565b801561087a5780601f1061084f5761010080835404028352916020019161087a565b820191906000526020600020905b81548152906001019060200180831161085d57829003601f168201915b5050505050905090565b6000818152609b60205260408120546001600160a01b03166109025760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609e60205260409020546001600160a01b031690565b600061092982611300565b6001600160a01b038116600090815260a0602052604090205490915060ff1615801561096e57506001600160a01b038316600090815260a0602052604090205460ff16155b61098a5760405162461bcd60e51b81526004016108f990612e5c565b806001600160a01b0316836001600160a01b0316036109f55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108f9565b336001600160a01b0382161480610a115750610a1181336106b4565b610a835760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108f9565b610a8d8383611b0e565b505050565b610a9c3382611b7c565b610ab85760405162461bcd60e51b81526004016108f990612e89565b610a8d838383611c72565b610acb611ed8565b6001600160a01b038116610b335760405162461bcd60e51b815260206004820152602960248201527f4d616e61676561626c653a206e6577206f776e657220697320746865207a65726044820152686f206164647265737360b81b60648201526084016108f9565b6001600160a01b038116600081815260656020526040808220805460ff19166001179055517f3b4a40cccf2058c593542587329dd385be4f0b588db5471fbd9598e56dd7093a9190a250565b609d6020526000908152604090208054600182018054919291610ba190612e28565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd90612e28565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154908060070154905088565b6001600160a01b0382166000908152609860205260408120548210610cc35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108f9565b506001600160a01b03919091166000908152609960209081526040808320938352929052205490565b610cf4611ed8565b6000610cff60a15490565b610d0a906001612ef0565b9050610d168882611f32565b604080516101008101825282815260208082018a815260ff881683850152606083018a9052608083018a905260a0830189905260c0830187905260e083018690526000858152609d9092529290208151815591519091906001820190610d7c9082612f51565b506040828101516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e0909201516007909101556001600160a01b0389166000908152609c6020529081208054889290610de3908490612ef0565b90915550505050505050505050565b610a8d83838360405180602001604052806000815250611717565b3360009081526065602052604090205460ff16610e3c5760405162461bcd60e51b81526004016108f990613011565b6000828152609d6020526040902060040154811115610e7157506000908152609d602052604090206003810154600490910155565b6000828152609d602052604081206004018054839290610e92908490613054565b90915550506000828152609d6020526040902060038101546004909101541015610ed0576000828152609d6020526040902060038101546004909101555b5050565b3360009081526065602052604090205460ff16610f035760405162461bcd60e51b81526004016108f990613011565b6000610f0e60a15490565b610f19906001612ef0565b9050610f258582611f32565b604080516101008101825282815260208082018781528284018790526060830186905260808301869052600060a084018190524260c0850181905260e0850152858152609d9092529290208151815591519091906001820190610f889082612f51565b506040828101516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e0909201516007909101556001600160a01b0386166000908152609c6020529081208054849290610fef908490612ef0565b90915550505050505050565b600061100660a15490565b82106110695760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108f9565b60a1828154811061107c5761107c613067565b90600052602060002001549050919050565b3360009081526065602052604090205460ff166110bd5760405162461bcd60e51b81526004016108f990613011565b6000828152609d60205260409020600101610a8d8282612f51565b3360009081526065602052604090205460ff166111075760405162461bcd60e51b81526004016108f990613011565b80609c600061111585611300565b6001600160a01b03166001600160a01b0316815260200190815260200160002060000160008282546111479190612ef0565b90915550506000828152609d60205260408120600401805483929061116d908490612ef0565b90915550505050565b600054610100900460ff16158080156111965750600054600160ff909116105b806111b05750303b1580156111b0575060005460ff166001145b6112135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108f9565b6000805460ff191660011790558015611236576000805461ff0019166101001790555b61123e611f4c565b60a361124a8682612f51565b5060a46112578582612f51565b5060a56112648482612f51565b5061126e82610ac3565b604080518082019091526005815264173539b7b760d91b602082015260a6906112979082612f51565b50600060a75561138860a85560a9805462ffffff191661010117905580156112f9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000818152609b602052604081205482906001600160a01b03166113365760405162461bcd60e51b81526004016108f99061307d565b6000838152609b60205260409020546001600160a01b031691505b50919050565b3360009081526065602052604090205460ff166113865760405162461bcd60e51b81526004016108f990613011565b6001600160a01b0382166000908152609c60205260408120600101805483929061116d908490612ef0565b6113b9611ed8565b6113c36000611f7b565b565b60a380546113d290612e28565b80601f01602080910402602001604051908101604052809291908181526020018280546113fe90612e28565b801561144b5780601f106114205761010080835404028352916020019161144b565b820191906000526020600020905b81548152906001019060200180831161142e57829003601f168201915b505050505081565b61145b611ed8565b60a3610ed08282612f51565b606060a5805461080190612e28565b3360009081526065602052604090205460ff166114a55760405162461bcd60e51b81526004016108f990613011565b6000908152609d6020526040902042600790910155565b610ed0338383611fcd565b6114cf611ed8565b6001600160a01b038116600081815260656020526040808220805460ff19169055517fef69f7d97228658c92417be1b16b19058315de71fecb435d07b7d23728b6bd319190a250565b6060600061153b836001600160a01b031660009081526098602052604090205490565b905060008167ffffffffffffffff811115611558576115586128ce565b6040519080825280602002602001820160405280156115d157816020015b6115be60405180610100016040528060008152602001606081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816115765790505b50905060005b8281101561170f57609d60006115ed8784610c48565b8152602001908152602001600020604051806101000160405290816000820154815260200160018201805461162190612e28565b80601f016020809104026020016040519081016040528092919081815260200182805461164d90612e28565b801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b5050505050815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815250508282815181106116f1576116f1613067565b60200260200101819052508080611707906130c6565b9150506115d7565b509392505050565b6117213383611b7c565b61173d5760405162461bcd60e51b81526004016108f990612e89565b611749848484846120f9565b50505050565b60a680546113d290612e28565b611764611ed8565b60a980549115156101000261ff0019909216919091179055565b6060816117a2816000908152609b60205260409020546001600160a01b0316151590565b6117be5760405162461bcd60e51b81526004016108f99061307d565b600060a380546117cd90612e28565b80601f01602080910402602001604051908101604052809291908181526020018280546117f990612e28565b80156118465780601f1061181b57610100808354040283529160200191611846565b820191906000526020600020905b81548152906001019060200180831161182957829003601f168201915b50505050509050600081511161186b576040518060200160405280600081525061188f565b8060a660405160200161187f9291906130df565b6040516020818303038152906040525b949350505050565b61189f611ed8565b60a980546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b6118d3611ed8565b60005b8251811015610a8d578160ff16609d60008584815181106118f9576118f9613067565b60200260200101518152602001908152602001600020600201819055508080611921906130c6565b9150506118d6565b60a480546113d290612e28565b3360009081526065602052604090205460ff166119655760405162461bcd60e51b81526004016108f990613011565b80609c600061197385611300565b6001600160a01b03166001600160a01b0316815260200190815260200160002060020160008282546119a59190612ef0565b90915550506000828152609d60205260408120600501805483929061116d908490612ef0565b3360009081526065602052604090205460ff166119fa5760405162461bcd60e51b81526004016108f990613011565b6000828152609d60205260408120600301805483929061116d908490612ef0565b611a23611ed8565b60a15460a26000611a35836001612ef0565b815260208101919091526040016000205560a18054611a55906001612ef0565b81546001810183556000928352602090922090910155565b611a75611ed8565b60a855565b611a82611ed8565b6001600160a01b038116611ae75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f9565b611af081611f7b565b50565b611afb611ed8565b60a9805460ff1916911515919091179055565b6000818152609e6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b4382611300565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609b60205260408120546001600160a01b0316611bf55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108f9565b6000611c0083611300565b9050806001600160a01b0316846001600160a01b03161480611c4757506001600160a01b038082166000908152609f602090815260408083209388168352929052205460ff165b8061188f5750836001600160a01b0316611c6084610884565b6001600160a01b031614949350505050565b60a954610100900460ff16611cd35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a207472616e736665727320617265206e6f7420656e61626c656044820152601960fa1b60648201526084016108f9565b6001600160a01b038316600090815260a0602052604090205460ff16158015611d1557506001600160a01b038216600090815260a0602052604090205460ff16155b611d315760405162461bcd60e51b81526004016108f990612e5c565b826001600160a01b0316611d4482611300565b6001600160a01b031614611da85760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108f9565b6001600160a01b038216611e0a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108f9565b611e1583838361212c565b611e20600082611b0e565b6001600160a01b0383166000908152609860205260408120805460019290611e49908490613054565b90915550506001600160a01b0382166000908152609860205260408120805460019290611e77908490612ef0565b90915550506000818152609b602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6033546001600160a01b031633146113c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108f9565b610ed082826040518060200160405280600081525061222e565b600054610100900460ff16611f735760405162461bcd60e51b81526004016108f99061316c565b6113c3612261565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361202e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108f9565b6001600160a01b038316600090815260a0602052604090205460ff1615801561207057506001600160a01b038216600090815260a0602052604090205460ff16155b61208c5760405162461bcd60e51b81526004016108f990612e5c565b6001600160a01b038381166000818152609f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612104848484611c72565b61211084848484612291565b6117495760405162461bcd60e51b81526004016108f9906131b7565b6001600160a01b038316612187576121828160a18054600083815260a260205260408120829055600182018355919091527faadc37b8ba5645e62f4546802db221593a94729ccbfc5a97d01365a88f6498780155565b6121aa565b816001600160a01b0316836001600160a01b0316146121aa576121aa8382612392565b6001600160a01b0382161580156121c9575060a95462010000900460ff165b156121d757610a8d8161243d565b826001600160a01b0316826001600160a01b031614610a8d576001600160a01b0391909116600090815260986020908152604080832054609983528184208185528352818420859055938352609a90915290205550565b61223883836124ec565b6122456000848484612291565b610a8d5760405162461bcd60e51b81526004016108f9906131b7565b600054610100900460ff166122885760405162461bcd60e51b81526004016108f99061316c565b6113c333611f7b565b60006001600160a01b0384163b1561238757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122d5903390899088908890600401613209565b6020604051808303816000875af1925050508015612310575060408051601f3d908101601f1916820190925261230d91810190613246565b60015b61236d573d80801561233e576040519150601f19603f3d011682016040523d82523d6000602084013e612343565b606091505b5080516000036123655760405162461bcd60e51b81526004016108f9906131b7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061188f565b506001949350505050565b6001600160a01b0382166000908152609860205260408120546123b790600190613054565b6000838152609a602052604090205490915080821461240a576001600160a01b03841660009081526099602090815260408083208584528252808320548484528184208190558352609a90915290208190555b506000918252609a602090815260408084208490556001600160a01b039094168352609981528383209183525290812055565b60a15460009061244f90600190613054565b600083815260a2602052604081205460a1805493945090928490811061247757612477613067565b906000526020600020015490508060a1838154811061249857612498613067565b600091825260208083209091019290925582815260a2909152604080822084905585825281205560a18054806124d0576124d0613263565b6001900381819060005260206000200160009055905550505050565b60a95460ff1661253e5760405162461bcd60e51b815260206004820152601f60248201527f4552433732313a206d696e74696e67206e6f7420656e61626c6564207965740060448201526064016108f9565b6001600160a01b038216600090815260a0602052604090205460ff16156125775760405162461bcd60e51b81526004016108f990612e5c565b6001600160a01b0382166125cd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108f9565b6000818152609b60205260409020546001600160a01b0316156126325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108f9565b60a78054906000612642836130c6565b919050555060a85460a754111561269b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a206d617820737570706c69656420726561636865640000000060448201526064016108f9565b6126a76000838361212c565b6001600160a01b03821660009081526098602052604081208054600192906126d0908490612ef0565b90915550506000818152609b602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b031981168114611af057600080fd5b60006020828403121561275657600080fd5b81356127618161272e565b9392505050565b60005b8381101561278357818101518382015260200161276b565b50506000910152565b600081518084526127a4816020860160208601612768565b601f01601f19169290920160200192915050565b602081526000612761602083018461278c565b6000602082840312156127dd57600080fd5b5035919050565b80356001600160a01b03811681146127fb57600080fd5b919050565b6000806040838503121561281357600080fd5b61281c836127e4565b946020939093013593505050565b60008060006060848603121561283f57600080fd5b612848846127e4565b9250612856602085016127e4565b9150604084013590509250925092565b60006020828403121561287857600080fd5b612761826127e4565b60006101008a835280602084015261289b8184018b61278c565b604084019990995250506060810195909552608085019390935260a084019190915260c083015260e09091015292915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561290d5761290d6128ce565b604052919050565b600067ffffffffffffffff83111561292f5761292f6128ce565b612942601f8401601f19166020016128e4565b905082815283838301111561295657600080fd5b828260208301376000602084830101529392505050565b600082601f83011261297e57600080fd5b61276183833560208501612915565b803560ff811681146127fb57600080fd5b600080600080600080600060e0888a0312156129b957600080fd5b6129c2886127e4565b9650602088013567ffffffffffffffff8111156129de57600080fd5b6129ea8a828b0161296d565b9650506040880135945060608801359350612a076080890161298d565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612a3657600080fd5b50508035926020909101359150565b60008060008060808587031215612a5b57600080fd5b612a64856127e4565b9350602085013567ffffffffffffffff811115612a8057600080fd5b612a8c8782880161296d565b949794965050505060408301359260600135919050565b60008060408385031215612ab657600080fd5b82359150602083013567ffffffffffffffff811115612ad457600080fd5b612ae08582860161296d565b9150509250929050565b60008060008060808587031215612b0057600080fd5b843567ffffffffffffffff80821115612b1857600080fd5b612b248883890161296d565b95506020870135915080821115612b3a57600080fd5b612b468883890161296d565b94506040870135915080821115612b5c57600080fd5b50612b698782880161296d565b925050612b78606086016127e4565b905092959194509250565b600060208284031215612b9557600080fd5b813567ffffffffffffffff811115612bac57600080fd5b61188f8482850161296d565b803580151581146127fb57600080fd5b60008060408385031215612bdb57600080fd5b612be4836127e4565b9150612bf260208401612bb8565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015612ca157603f1989840301855281516101008151855288820151818a870152612c518287018261278c565b838a0151878b0152606080850151908801526080808501519088015260a0808501519088015260c0808501519088015260e093840151939096019290925250509386019390860190600101612c22565b509098975050505050505050565b60008060008060808587031215612cc557600080fd5b612cce856127e4565b9350612cdc602086016127e4565b925060408501359150606085013567ffffffffffffffff811115612cff57600080fd5b8501601f81018713612d1057600080fd5b612d1f87823560208401612915565b91505092959194509250565b600060208284031215612d3d57600080fd5b61276182612bb8565b60008060408385031215612d5957600080fd5b823567ffffffffffffffff80821115612d7157600080fd5b818501915085601f830112612d8557600080fd5b8135602082821115612d9957612d996128ce565b8160051b9250612daa8184016128e4565b8281529284018101928181019089851115612dc457600080fd5b948201945b84861015612de257853582529482019490820190612dc9565b9650612df1905087820161298d565b9450505050509250929050565b60008060408385031215612e1157600080fd5b612e1a836127e4565b9150612bf2602084016127e4565b600181811c90821680612e3c57607f821691505b60208210810361135157634e487b7160e01b600052602260045260246000fd5b602080825260139082015272115490cdcc8c4e88189b1858dadb1a5cdd1959606a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156107ec576107ec612eda565b601f821115610a8d57600081815260208120601f850160051c81016020861015612f2a5750805b601f850160051c820191505b81811015612f4957828155600101612f36565b505050505050565b815167ffffffffffffffff811115612f6b57612f6b6128ce565b612f7f81612f798454612e28565b84612f03565b602080601f831160018114612fb45760008415612f9c5750858301515b600019600386901b1c1916600185901b178555612f49565b600085815260208120601f198616915b82811015612fe357888601518255948401946001909101908401612fc4565b50858210156130015787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526023908201527f4d616e61676561626c653a2063616c6c6572206973206e6f7420746865206f776040820152623732b960e91b606082015260800190565b818103818111156107ec576107ec612eda565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6000600182016130d8576130d8612eda565b5060010190565b6000835160206130f28285838901612768565b81840191506000855461310481612e28565b6001828116801561311c57600181146131315761315d565b60ff198416875282151583028701945061315d565b896000528560002060005b848110156131555781548982015290830190870161313c565b505082870194505b50929998505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061323c9083018461278c565b9695505050505050565b60006020828403121561325857600080fd5b81516127618161272e565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205dd3a58cb792dce46af20d50f5057760c2018f06611a7ee67160609d81a60b8664736f6c63430008110033
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061030c5760003560e01c80638da5cb5b1161019d578063d1cd9d1c116100e9578063eb324000116100a2578063f2fde38b1161007c578063f2fde38b14610710578063f94da54814610723578063fdff9b4d14610736578063fe575a871461076257600080fd5b8063eb324000146106e2578063f010b1c4146106f5578063f103b433146106fd57600080fd5b8063d1cd9d1c14610625578063d28d885214610638578063d5abeb0114610640578063db57795914610649578063e2eb41ff1461065c578063e985e9c5146106a657600080fd5b8063ac18de4311610156578063c668286211610130578063c6682862146105e4578063c77b5f68146105ec578063c87b56dd146105ff578063d0ebdbe71461061257600080fd5b8063ac18de431461059e578063b851d8fe146105b1578063b88d4fde146105d157600080fd5b80638da5cb5b1461053f578063931688cb1461055057806395d89b4114610563578063964ddbb21461056b5780639fd6db121461057e578063a22cb4651461058b57600080fd5b806345c2860d1161025c5780635b5008261161021557806363665f2e116101ef57806363665f2e146104f357806370a0823114610506578063715018a61461052f578063743976a01461053757600080fd5b80635b500826146104ba5780635c6d8da1146104cd5780636352211e146104e057600080fd5b806345c2860d146104535780634a5dc3aa146104665780634cd412d5146104795780634f02c4201461048b5780634f6ccce71461049457806353e76f2c146104a757600080fd5b806323b872dd116102c95780632f745c59116102a35780632f745c591461040757806335e061fc1461041a57806341eef4921461042d57806342842e0e1461044057600080fd5b806323b872dd146103ba5780632d06177a146103cd5780632e7d754b146103e057600080fd5b806301ffc9a71461031157806306fdde0314610339578063081812fc1461034e578063095ea7b31461037957806318160ddd1461038e5780631b2df850146103a0575b600080fd5b61032461031f366004612744565b610785565b60405190151581526020015b60405180910390f35b6103416107f2565b60405161033091906127b8565b61036161035c3660046127cb565b610884565b6040516001600160a01b039091168152602001610330565b61038c610387366004612800565b61091e565b005b60a1545b604051908152602001610330565b60a95461036190630100000090046001600160a01b031681565b61038c6103c836600461282a565b610a92565b61038c6103db366004612866565b610ac3565b6103f36103ee3660046127cb565b610b7f565b604051610330989796959493929190612881565b610392610415366004612800565b610c48565b60a9546103249062010000900460ff1681565b61038c61043b36600461299e565b610cec565b61038c61044e36600461282a565b610df2565b61038c610461366004612a23565b610e0d565b61038c610474366004612a45565b610ed4565b60a95461032490610100900460ff1681565b61039260a75481565b6103926104a23660046127cb565b610ffb565b61038c6104b5366004612aa3565b61108e565b61038c6104c8366004612a23565b6110d8565b61038c6104db366004612aea565b611176565b6103616104ee3660046127cb565b611300565b61038c610501366004612800565b611357565b610392610514366004612866565b6001600160a01b031660009081526098602052604090205490565b61038c6113b1565b6103416113c5565b6033546001600160a01b0316610361565b61038c61055e366004612b83565b611453565b610341611467565b61038c6105793660046127cb565b611476565b60a9546103249060ff1681565b61038c610599366004612bc8565b6114bc565b61038c6105ac366004612866565b6114c7565b6105c46105bf366004612866565b611518565b6040516103309190612bfb565b61038c6105df366004612caf565b611717565b61034161174f565b61038c6105fa366004612d2b565b61175c565b61034161060d3660046127cb565b61177e565b61038c610620366004612866565b611897565b61038c610633366004612d46565b6118cb565b610341611929565b61039260a85481565b61038c610657366004612a23565b611936565b61068b61066a366004612866565b609c6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610330565b6103246106b4366004612dfe565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b61038c6106f0366004612a23565b6119cb565b61038c611a1b565b61038c61070b3660046127cb565b611a6d565b61038c61071e366004612866565b611a7a565b61038c610731366004612d2b565b611af3565b610324610744366004612866565b6001600160a01b031660009081526065602052604090205460ff1690565b610324610770366004612866565b60a06020526000908152604090205460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806107b657506001600160e01b03198216635b5e139f60e01b145b806107d157506001600160e01b0319821663780e9d6360e01b145b806107ec57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060a4805461080190612e28565b80601f016020809104026020016040519081016040528092919081815260200182805461082d90612e28565b801561087a5780601f1061084f5761010080835404028352916020019161087a565b820191906000526020600020905b81548152906001019060200180831161085d57829003601f168201915b5050505050905090565b6000818152609b60205260408120546001600160a01b03166109025760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609e60205260409020546001600160a01b031690565b600061092982611300565b6001600160a01b038116600090815260a0602052604090205490915060ff1615801561096e57506001600160a01b038316600090815260a0602052604090205460ff16155b61098a5760405162461bcd60e51b81526004016108f990612e5c565b806001600160a01b0316836001600160a01b0316036109f55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108f9565b336001600160a01b0382161480610a115750610a1181336106b4565b610a835760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108f9565b610a8d8383611b0e565b505050565b610a9c3382611b7c565b610ab85760405162461bcd60e51b81526004016108f990612e89565b610a8d838383611c72565b610acb611ed8565b6001600160a01b038116610b335760405162461bcd60e51b815260206004820152602960248201527f4d616e61676561626c653a206e6577206f776e657220697320746865207a65726044820152686f206164647265737360b81b60648201526084016108f9565b6001600160a01b038116600081815260656020526040808220805460ff19166001179055517f3b4a40cccf2058c593542587329dd385be4f0b588db5471fbd9598e56dd7093a9190a250565b609d6020526000908152604090208054600182018054919291610ba190612e28565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcd90612e28565b8015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b5050505050908060020154908060030154908060040154908060050154908060060154908060070154905088565b6001600160a01b0382166000908152609860205260408120548210610cc35760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108f9565b506001600160a01b03919091166000908152609960209081526040808320938352929052205490565b610cf4611ed8565b6000610cff60a15490565b610d0a906001612ef0565b9050610d168882611f32565b604080516101008101825282815260208082018a815260ff881683850152606083018a9052608083018a905260a0830189905260c0830187905260e083018690526000858152609d9092529290208151815591519091906001820190610d7c9082612f51565b506040828101516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e0909201516007909101556001600160a01b0389166000908152609c6020529081208054889290610de3908490612ef0565b90915550505050505050505050565b610a8d83838360405180602001604052806000815250611717565b3360009081526065602052604090205460ff16610e3c5760405162461bcd60e51b81526004016108f990613011565b6000828152609d6020526040902060040154811115610e7157506000908152609d602052604090206003810154600490910155565b6000828152609d602052604081206004018054839290610e92908490613054565b90915550506000828152609d6020526040902060038101546004909101541015610ed0576000828152609d6020526040902060038101546004909101555b5050565b3360009081526065602052604090205460ff16610f035760405162461bcd60e51b81526004016108f990613011565b6000610f0e60a15490565b610f19906001612ef0565b9050610f258582611f32565b604080516101008101825282815260208082018781528284018790526060830186905260808301869052600060a084018190524260c0850181905260e0850152858152609d9092529290208151815591519091906001820190610f889082612f51565b506040828101516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e0909201516007909101556001600160a01b0386166000908152609c6020529081208054849290610fef908490612ef0565b90915550505050505050565b600061100660a15490565b82106110695760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108f9565b60a1828154811061107c5761107c613067565b90600052602060002001549050919050565b3360009081526065602052604090205460ff166110bd5760405162461bcd60e51b81526004016108f990613011565b6000828152609d60205260409020600101610a8d8282612f51565b3360009081526065602052604090205460ff166111075760405162461bcd60e51b81526004016108f990613011565b80609c600061111585611300565b6001600160a01b03166001600160a01b0316815260200190815260200160002060000160008282546111479190612ef0565b90915550506000828152609d60205260408120600401805483929061116d908490612ef0565b90915550505050565b600054610100900460ff16158080156111965750600054600160ff909116105b806111b05750303b1580156111b0575060005460ff166001145b6112135760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108f9565b6000805460ff191660011790558015611236576000805461ff0019166101001790555b61123e611f4c565b60a361124a8682612f51565b5060a46112578582612f51565b5060a56112648482612f51565b5061126e82610ac3565b604080518082019091526005815264173539b7b760d91b602082015260a6906112979082612f51565b50600060a75561138860a85560a9805462ffffff191661010117905580156112f9576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000818152609b602052604081205482906001600160a01b03166113365760405162461bcd60e51b81526004016108f99061307d565b6000838152609b60205260409020546001600160a01b031691505b50919050565b3360009081526065602052604090205460ff166113865760405162461bcd60e51b81526004016108f990613011565b6001600160a01b0382166000908152609c60205260408120600101805483929061116d908490612ef0565b6113b9611ed8565b6113c36000611f7b565b565b60a380546113d290612e28565b80601f01602080910402602001604051908101604052809291908181526020018280546113fe90612e28565b801561144b5780601f106114205761010080835404028352916020019161144b565b820191906000526020600020905b81548152906001019060200180831161142e57829003601f168201915b505050505081565b61145b611ed8565b60a3610ed08282612f51565b606060a5805461080190612e28565b3360009081526065602052604090205460ff166114a55760405162461bcd60e51b81526004016108f990613011565b6000908152609d6020526040902042600790910155565b610ed0338383611fcd565b6114cf611ed8565b6001600160a01b038116600081815260656020526040808220805460ff19169055517fef69f7d97228658c92417be1b16b19058315de71fecb435d07b7d23728b6bd319190a250565b6060600061153b836001600160a01b031660009081526098602052604090205490565b905060008167ffffffffffffffff811115611558576115586128ce565b6040519080825280602002602001820160405280156115d157816020015b6115be60405180610100016040528060008152602001606081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816115765790505b50905060005b8281101561170f57609d60006115ed8784610c48565b8152602001908152602001600020604051806101000160405290816000820154815260200160018201805461162190612e28565b80601f016020809104026020016040519081016040528092919081815260200182805461164d90612e28565b801561169a5780601f1061166f5761010080835404028352916020019161169a565b820191906000526020600020905b81548152906001019060200180831161167d57829003601f168201915b5050505050815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820154815250508282815181106116f1576116f1613067565b60200260200101819052508080611707906130c6565b9150506115d7565b509392505050565b6117213383611b7c565b61173d5760405162461bcd60e51b81526004016108f990612e89565b611749848484846120f9565b50505050565b60a680546113d290612e28565b611764611ed8565b60a980549115156101000261ff0019909216919091179055565b6060816117a2816000908152609b60205260409020546001600160a01b0316151590565b6117be5760405162461bcd60e51b81526004016108f99061307d565b600060a380546117cd90612e28565b80601f01602080910402602001604051908101604052809291908181526020018280546117f990612e28565b80156118465780601f1061181b57610100808354040283529160200191611846565b820191906000526020600020905b81548152906001019060200180831161182957829003601f168201915b50505050509050600081511161186b576040518060200160405280600081525061188f565b8060a660405160200161187f9291906130df565b6040516020818303038152906040525b949350505050565b61189f611ed8565b60a980546001600160a01b039092166301000000026301000000600160b81b0319909216919091179055565b6118d3611ed8565b60005b8251811015610a8d578160ff16609d60008584815181106118f9576118f9613067565b60200260200101518152602001908152602001600020600201819055508080611921906130c6565b9150506118d6565b60a480546113d290612e28565b3360009081526065602052604090205460ff166119655760405162461bcd60e51b81526004016108f990613011565b80609c600061197385611300565b6001600160a01b03166001600160a01b0316815260200190815260200160002060020160008282546119a59190612ef0565b90915550506000828152609d60205260408120600501805483929061116d908490612ef0565b3360009081526065602052604090205460ff166119fa5760405162461bcd60e51b81526004016108f990613011565b6000828152609d60205260408120600301805483929061116d908490612ef0565b611a23611ed8565b60a15460a26000611a35836001612ef0565b815260208101919091526040016000205560a18054611a55906001612ef0565b81546001810183556000928352602090922090910155565b611a75611ed8565b60a855565b611a82611ed8565b6001600160a01b038116611ae75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f9565b611af081611f7b565b50565b611afb611ed8565b60a9805460ff1916911515919091179055565b6000818152609e6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b4382611300565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152609b60205260408120546001600160a01b0316611bf55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108f9565b6000611c0083611300565b9050806001600160a01b0316846001600160a01b03161480611c4757506001600160a01b038082166000908152609f602090815260408083209388168352929052205460ff165b8061188f5750836001600160a01b0316611c6084610884565b6001600160a01b031614949350505050565b60a954610100900460ff16611cd35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a207472616e736665727320617265206e6f7420656e61626c656044820152601960fa1b60648201526084016108f9565b6001600160a01b038316600090815260a0602052604090205460ff16158015611d1557506001600160a01b038216600090815260a0602052604090205460ff16155b611d315760405162461bcd60e51b81526004016108f990612e5c565b826001600160a01b0316611d4482611300565b6001600160a01b031614611da85760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108f9565b6001600160a01b038216611e0a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108f9565b611e1583838361212c565b611e20600082611b0e565b6001600160a01b0383166000908152609860205260408120805460019290611e49908490613054565b90915550506001600160a01b0382166000908152609860205260408120805460019290611e77908490612ef0565b90915550506000818152609b602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6033546001600160a01b031633146113c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108f9565b610ed082826040518060200160405280600081525061222e565b600054610100900460ff16611f735760405162461bcd60e51b81526004016108f99061316c565b6113c3612261565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361202e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108f9565b6001600160a01b038316600090815260a0602052604090205460ff1615801561207057506001600160a01b038216600090815260a0602052604090205460ff16155b61208c5760405162461bcd60e51b81526004016108f990612e5c565b6001600160a01b038381166000818152609f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612104848484611c72565b61211084848484612291565b6117495760405162461bcd60e51b81526004016108f9906131b7565b6001600160a01b038316612187576121828160a18054600083815260a260205260408120829055600182018355919091527faadc37b8ba5645e62f4546802db221593a94729ccbfc5a97d01365a88f6498780155565b6121aa565b816001600160a01b0316836001600160a01b0316146121aa576121aa8382612392565b6001600160a01b0382161580156121c9575060a95462010000900460ff165b156121d757610a8d8161243d565b826001600160a01b0316826001600160a01b031614610a8d576001600160a01b0391909116600090815260986020908152604080832054609983528184208185528352818420859055938352609a90915290205550565b61223883836124ec565b6122456000848484612291565b610a8d5760405162461bcd60e51b81526004016108f9906131b7565b600054610100900460ff166122885760405162461bcd60e51b81526004016108f99061316c565b6113c333611f7b565b60006001600160a01b0384163b1561238757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122d5903390899088908890600401613209565b6020604051808303816000875af1925050508015612310575060408051601f3d908101601f1916820190925261230d91810190613246565b60015b61236d573d80801561233e576040519150601f19603f3d011682016040523d82523d6000602084013e612343565b606091505b5080516000036123655760405162461bcd60e51b81526004016108f9906131b7565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061188f565b506001949350505050565b6001600160a01b0382166000908152609860205260408120546123b790600190613054565b6000838152609a602052604090205490915080821461240a576001600160a01b03841660009081526099602090815260408083208584528252808320548484528184208190558352609a90915290208190555b506000918252609a602090815260408084208490556001600160a01b039094168352609981528383209183525290812055565b60a15460009061244f90600190613054565b600083815260a2602052604081205460a1805493945090928490811061247757612477613067565b906000526020600020015490508060a1838154811061249857612498613067565b600091825260208083209091019290925582815260a2909152604080822084905585825281205560a18054806124d0576124d0613263565b6001900381819060005260206000200160009055905550505050565b60a95460ff1661253e5760405162461bcd60e51b815260206004820152601f60248201527f4552433732313a206d696e74696e67206e6f7420656e61626c6564207965740060448201526064016108f9565b6001600160a01b038216600090815260a0602052604090205460ff16156125775760405162461bcd60e51b81526004016108f990612e5c565b6001600160a01b0382166125cd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108f9565b6000818152609b60205260409020546001600160a01b0316156126325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108f9565b60a78054906000612642836130c6565b919050555060a85460a754111561269b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a206d617820737570706c69656420726561636865640000000060448201526064016108f9565b6126a76000838361212c565b6001600160a01b03821660009081526098602052604081208054600192906126d0908490612ef0565b90915550506000818152609b602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b031981168114611af057600080fd5b60006020828403121561275657600080fd5b81356127618161272e565b9392505050565b60005b8381101561278357818101518382015260200161276b565b50506000910152565b600081518084526127a4816020860160208601612768565b601f01601f19169290920160200192915050565b602081526000612761602083018461278c565b6000602082840312156127dd57600080fd5b5035919050565b80356001600160a01b03811681146127fb57600080fd5b919050565b6000806040838503121561281357600080fd5b61281c836127e4565b946020939093013593505050565b60008060006060848603121561283f57600080fd5b612848846127e4565b9250612856602085016127e4565b9150604084013590509250925092565b60006020828403121561287857600080fd5b612761826127e4565b60006101008a835280602084015261289b8184018b61278c565b604084019990995250506060810195909552608085019390935260a084019190915260c083015260e09091015292915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561290d5761290d6128ce565b604052919050565b600067ffffffffffffffff83111561292f5761292f6128ce565b612942601f8401601f19166020016128e4565b905082815283838301111561295657600080fd5b828260208301376000602084830101529392505050565b600082601f83011261297e57600080fd5b61276183833560208501612915565b803560ff811681146127fb57600080fd5b600080600080600080600060e0888a0312156129b957600080fd5b6129c2886127e4565b9650602088013567ffffffffffffffff8111156129de57600080fd5b6129ea8a828b0161296d565b9650506040880135945060608801359350612a076080890161298d565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215612a3657600080fd5b50508035926020909101359150565b60008060008060808587031215612a5b57600080fd5b612a64856127e4565b9350602085013567ffffffffffffffff811115612a8057600080fd5b612a8c8782880161296d565b949794965050505060408301359260600135919050565b60008060408385031215612ab657600080fd5b82359150602083013567ffffffffffffffff811115612ad457600080fd5b612ae08582860161296d565b9150509250929050565b60008060008060808587031215612b0057600080fd5b843567ffffffffffffffff80821115612b1857600080fd5b612b248883890161296d565b95506020870135915080821115612b3a57600080fd5b612b468883890161296d565b94506040870135915080821115612b5c57600080fd5b50612b698782880161296d565b925050612b78606086016127e4565b905092959194509250565b600060208284031215612b9557600080fd5b813567ffffffffffffffff811115612bac57600080fd5b61188f8482850161296d565b803580151581146127fb57600080fd5b60008060408385031215612bdb57600080fd5b612be4836127e4565b9150612bf260208401612bb8565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015612ca157603f1989840301855281516101008151855288820151818a870152612c518287018261278c565b838a0151878b0152606080850151908801526080808501519088015260a0808501519088015260c0808501519088015260e093840151939096019290925250509386019390860190600101612c22565b509098975050505050505050565b60008060008060808587031215612cc557600080fd5b612cce856127e4565b9350612cdc602086016127e4565b925060408501359150606085013567ffffffffffffffff811115612cff57600080fd5b8501601f81018713612d1057600080fd5b612d1f87823560208401612915565b91505092959194509250565b600060208284031215612d3d57600080fd5b61276182612bb8565b60008060408385031215612d5957600080fd5b823567ffffffffffffffff80821115612d7157600080fd5b818501915085601f830112612d8557600080fd5b8135602082821115612d9957612d996128ce565b8160051b9250612daa8184016128e4565b8281529284018101928181019089851115612dc457600080fd5b948201945b84861015612de257853582529482019490820190612dc9565b9650612df1905087820161298d565b9450505050509250929050565b60008060408385031215612e1157600080fd5b612e1a836127e4565b9150612bf2602084016127e4565b600181811c90821680612e3c57607f821691505b60208210810361135157634e487b7160e01b600052602260045260246000fd5b602080825260139082015272115490cdcc8c4e88189b1858dadb1a5cdd1959606a1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156107ec576107ec612eda565b601f821115610a8d57600081815260208120601f850160051c81016020861015612f2a5750805b601f850160051c820191505b81811015612f4957828155600101612f36565b505050505050565b815167ffffffffffffffff811115612f6b57612f6b6128ce565b612f7f81612f798454612e28565b84612f03565b602080601f831160018114612fb45760008415612f9c5750858301515b600019600386901b1c1916600185901b178555612f49565b600085815260208120601f198616915b82811015612fe357888601518255948401946001909101908401612fc4565b50858210156130015787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526023908201527f4d616e61676561626c653a2063616c6c6572206973206e6f7420746865206f776040820152623732b960e91b606082015260800190565b818103818111156107ec576107ec612eda565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6000600182016130d8576130d8612eda565b5060010190565b6000835160206130f28285838901612768565b81840191506000855461310481612e28565b6001828116801561311c57600181146131315761315d565b60ff198416875282151583028701945061315d565b896000528560002060005b848110156131555781548982015290830190870161313c565b505082870194505b50929998505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061323c9083018461278c565b9695505050505050565b60006020828403121561325857600080fd5b81516127618161272e565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205dd3a58cb792dce46af20d50f5057760c2018f06611a7ee67160609d81a60b8664736f6c63430008110033