Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Source Code
Overview
Max Total Supply
545 SEED
Holders
434
Transfers
-
0
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
SeeDao
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract SeeDao is ERC721Enumerable, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Address for address;
IERC721 public v3Token;
IERC721 public sdToken;
IERC20 public rally;
IERC20 public bank;
IERC20 public fwb;
IERC20 public ff;
string public baseTokenURI;
uint256 public singlePrice;
uint256 public migrateLimit = 72;
uint256 public limit = 150;
uint256 public supply = 150;
uint256 public totalLimit = 10000;
uint256 public bankBalance = 2000000000000000000000;
uint256 public rallyBalance = 400000000000000000000;
uint256 public fwbBalance = 2000000000000000000;
uint256 public ffBalance = 50000000000000000000;
uint256 public payGas = 20000000000000000;
bool public onSale;
bool public ogMint;
bool public onClaim;
bool public onMigrate;
mapping (uint256 => bool) public claimed;
mapping (address => bool) public daoClaimed;
mapping (uint256 => bytes32) public roots;
mapping (uint256 => mapping(address => bool)) public minted;
mapping (uint256 => bool) public migrated;
mapping (address => uint256) public approvedAmount;
mapping (address => bool) public approvedContract;
constructor(address token, address sdAddr, address rallyAddr, address bankAddr, address fwbAddr, address ffAddr) ERC721("SeeDao", "SEED") {
v3Token = IERC721(token);
sdToken = IERC721(sdAddr);
rally = IERC20(rallyAddr);
bank = IERC20(bankAddr);
fwb = IERC20(fwbAddr);
ff = IERC20(ffAddr);
}
/** mint */
function _mintSeed(uint256 num, address to) internal {
require(totalSupply() + num <= totalLimit, "exceed limit");
for(uint256 i = 0; i < num; i++) {
uint256 tokenIndex = totalSupply();
_safeMint(to, tokenIndex);
}
}
// mint for sale
function mint(uint256 num) external payable nonReentrant {
require(!msg.sender.isContract(), "contract not allowed");
require(onSale, "not on sale");
uint256 totalPrice = num.mul(singlePrice);
require(msg.value >= totalPrice, "wrong ether value");
_mintSeed(num, msg.sender);
}
// claim for OG
function claim(uint256 tokenId) public nonReentrant {
require(!msg.sender.isContract(), "contract not allowed");
require(ogMint, "not on claim");
require(v3Token.ownerOf(tokenId) == msg.sender, "not owner");
require(!claimed[tokenId], "already claimed");
_mintSeed(1, msg.sender);
claimed[tokenId] = true;
}
// claim for dao holder
function claimDAO() public nonReentrant {
require(!msg.sender.isContract(), "contract not allowed");
require(onClaim, "not on claim");
require(
rally.balanceOf(msg.sender) >= rallyBalance ||
bank.balanceOf(msg.sender) >= bankBalance ||
fwb.balanceOf(msg.sender) >= fwbBalance ||
ff.balanceOf(msg.sender) >= ffBalance,
"low balance"
);
require(!daoClaimed[msg.sender], "already claimed");
require(limit > 0, "out of supply");
limit = limit.sub(1);
daoClaimed[msg.sender] = true;
_mintSeed(1, msg.sender);
}
// mint for whitelist
function mintWhiteList(uint256 id, bytes32[] calldata proof) external nonReentrant {
require(!minted[id][msg.sender], "already minted");
require(supply > 0, "out of supply");
require(
MerkleProof.verify(
proof, roots[id], keccak256(abi.encodePacked(msg.sender))
),
"invalid proof");
supply = supply.sub(1);
minted[id][msg.sender] = true;
_mintSeed(1, msg.sender);
}
function migrate(uint256 id, uint256 vId) external nonReentrant {
require(id < migrateLimit, "out of range");
require(onMigrate, "not on migrate");
require(!msg.sender.isContract(), "contract not allowed");
require(sdToken.ownerOf(id) == msg.sender && v3Token.ownerOf(vId) == msg.sender, "not owner");
require(!migrated[id] && !claimed[vId], "already migrated or claimed");
_mintSeed(1, msg.sender);
migrated[id] = true;
claimed[vId] = true;
(bool success, ) = msg.sender.call{value: payGas}("");
require(success, "refund failed");
}
function verifyWhiteList(uint256 id, address user, bytes32[] calldata proof) external view returns (bool) {
return MerkleProof.verify(proof, roots[id], keccak256(abi.encodePacked(user)));
}
function approvedMint(address to, uint256 num) external nonReentrant {
require(approvedContract[msg.sender], "not approved");
require(num <= approvedAmount[msg.sender], "out of amount");
approvedAmount[msg.sender] = approvedAmount[msg.sender].sub(num);
_mintSeed(num, to);
}
/** admin method */
function addContract(address plat, uint256 n) external onlyOwner {
require(plat.isContract(), "not contract");
require(!approvedContract[plat], "already approved");
approvedContract[plat] = true;
approvedAmount[plat] = n;
}
function removeApproved(address plat) external onlyOwner {
require(approvedContract[plat], "not approved");
approvedContract[plat] = false;
}
function getApprovedAmount(address plat) external view returns (uint256) {
return approvedAmount[plat];
}
function giveAway(address to, uint256 num) public onlyOwner {
_mintSeed(num, to);
}
/** setter */
function setPrice(uint256 price) public onlyOwner {
singlePrice = price;
}
function setRoot(uint256 id, bytes32 root) public onlyOwner {
roots[id] = root;
}
/** flips */
function pauseOG() public onlyOwner {
require(ogMint, "already paused");
ogMint = false;
}
function unpauseOG() public onlyOwner {
require(!ogMint, "already unpaused");
ogMint = true;
}
function pauseSale() public onlyOwner {
require(onSale, "already paused");
onSale = false;
}
function unpauseSale() public onlyOwner {
require(!onSale, "already unpaused");
onSale = true;
}
function pauseClaim() public onlyOwner {
require(onClaim, "already paused");
onClaim = false;
}
function unpauseClaim() public onlyOwner {
require(!onClaim, "already unpaused");
onClaim = true;
}
function pauseMigrate() public onlyOwner {
require(onMigrate, "already paused");
onMigrate = false;
}
function unpauseMigrate() public onlyOwner {
require(!onMigrate, "already unpaused");
onMigrate = true;
}
/** URI */
function setBaseURI(string memory baseURI) public onlyOwner {
baseTokenURI = baseURI;
}
function _baseURI() internal view virtual override returns (string memory) {
return baseTokenURI;
}
receive() external payable {}
function withdraw() public onlyOwner {
uint256 val = address(this).balance;
payable(owner()).transfer(val);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "./IERC721Enumerable.sol";
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
} else {
// Hash(current element of the proof + current computed hash)
computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
}
}
// Check if the computed hash (root) is equal to the provided root
return computedHash == root;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @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
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.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 ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"sdAddr","type":"address"},{"internalType":"address","name":"rallyAddr","type":"address"},{"internalType":"address","name":"bankAddr","type":"address"},{"internalType":"address","name":"fwbAddr","type":"address"},{"internalType":"address","name":"ffAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"plat","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"addContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"num","type":"uint256"}],"name":"approvedMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bank","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bankBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"daoClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ff","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ffBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fwb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fwbBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"plat","type":"address"}],"name":"getApprovedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"num","type":"uint256"}],"name":"giveAway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"vId","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrateLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"migrated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onMigrate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"payGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rally","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rallyBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"plat","type":"address"}],"name":"removeApproved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sdToken","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"singlePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseMigrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseOG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v3Token","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"verifyWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604052604860145560966015556096601655612710601755686c6b935b8bbd4000006018556815af1d78b58c400000601955671bc16d674ec80000601a556802b5e3af16b1880000601b5566470de4df820000601c553480156200006457600080fd5b5060405162003f2338038062003f23833981016040819052620000879162000295565b604080518082018252600681526553656544616f60d01b60208083019182528351808501909452600484526314d1515160e21b908401528151919291620000d191600091620001d2565b508051620000e7906001906020840190620001d2565b50505062000104620000fe6200017c60201b60201c565b62000180565b6001600b55600c80546001600160a01b03199081166001600160a01b0398891617909155600d8054821696881696909617909555600e8054861694871694909417909355600f805485169286169290921790915560108054841691851691909117905560118054909216921691909117905562000352565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001e09062000315565b90600052602060002090601f0160209004810192826200020457600085556200024f565b82601f106200021f57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024f57825182559160200191906001019062000232565b506200025d92915062000261565b5090565b5b808211156200025d576000815560010162000262565b80516001600160a01b03811681146200029057600080fd5b919050565b60008060008060008060c08789031215620002ae578182fd5b620002b98762000278565b9550620002c96020880162000278565b9450620002d96040880162000278565b9350620002e96060880162000278565b9250620002f96080880162000278565b91506200030960a0880162000278565b90509295509295509295565b600181811c908216806200032a57607f821691505b602082108114156200034c57634e487b7160e01b600052602260045260246000fd5b50919050565b613bc180620003626000396000f3fe6080604052600436106104085760003560e01c8063742a728011610213578063b5522e8911610123578063cd169e1f116100ab578063de065caa1161007a578063de065caa14610bf2578063e7ac92c414610c07578063e985e9c514610c1d578063ee0446b214610c66578063f2fde38b14610c9357600080fd5b8063cd169e1f14610b77578063d547cfb714610b98578063da9e60ae14610bad578063dbe7e3bd14610bc257600080fd5b8063bb33d729116100f2578063bb33d72914610ad6578063c2b40ae414610aeb578063c87b56dd14610b17578063c9b3d66714610b37578063ca80014414610b5757600080fd5b8063b5522e8914610a60578063b88d4fde14610a80578063b8b35ce214610aa0578063ba03d08014610ab657600080fd5b8063934f81f4116101a6578063a22cb46511610175578063a22cb465146109c4578063a356d21e146109e4578063a36298c714610a04578063a4d66daf14610a1a578063b1a6505f14610a3057600080fd5b8063934f81f41461094657806395d89b411461097c5780639fcb863814610991578063a0712d68146109b157600080fd5b80637c7b4e5d116101e25780637c7b4e5d146108de5780638da5cb5b146108f35780638ff095f91461091157806391b7f5ed1461092657600080fd5b8063742a72801461086857806376cdb03b1461087e578063776c23fb1461089e5780637be5254e146108be57600080fd5b80633ccfd60b1161031957806355367ba9116102a15780636887a0e5116102705780636887a0e5146107b25780636e5975a2146107ed5780636ea876f61461080357806370a0823114610833578063715018a61461085357600080fd5b806355367ba91461073d57806355f804b3146107525780636352211e14610772578063667d31681461079257600080fd5b80634761f9d8116102e85780634761f9d8146106b3578063486d7367146106d35780634b35a0ef146106e85780634d10b546146106fd5780634f6ccce71461071d57600080fd5b80633ccfd60b146106485780633e54bacb1461065d57806342842e0e1461067d5780634320bf021461069d57600080fd5b806318160ddd1161039c57806328657aa51161036b57806328657aa5146105c25780632f745c59146105d8578063326687b9146105f8578063379607f5146106125780633aa22a161461063257600080fd5b806318160ddd146105595780631a2bea851461056e578063237849de1461058d57806323b872dd146105a257600080fd5b806306fdde03116103d857806306fdde03146104c7578063081812fc146104e9578063095ea7b3146105095780630e359f161461052957600080fd5b806230bffe1461041457806301ffc9a714610451578063047fc9aa14610481578063048f06f2146104a557600080fd5b3661040f57005b600080fd5b34801561042057600080fd5b50600e54610434906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561045d57600080fd5b5061047161046c366004613655565b610cb3565b6040519015158152602001610448565b34801561048d57600080fd5b5061049760165481565b604051908152602001610448565b3480156104b157600080fd5b506104c56104c03660046137cb565b610cde565b005b3480156104d357600080fd5b506104dc610d22565b6040516104489190613884565b3480156104f557600080fd5b506104346105043660046136d3565b610db4565b34801561051557600080fd5b506104c561052436600461362a565b610e49565b34801561053557600080fd5b506104716105443660046136d3565b60226020526000908152604090205460ff1681565b34801561056557600080fd5b50600854610497565b34801561057a57600080fd5b50601d5461047190610100900460ff1681565b34801561059957600080fd5b506104c5610f5f565b3480156105ae57600080fd5b506104c56105bd36600461353c565b610fbd565b3480156105ce57600080fd5b5061049760185481565b3480156105e457600080fd5b506104976105f336600461362a565b610fee565b34801561060457600080fd5b50601d546104719060ff1681565b34801561061e57600080fd5b506104c561062d3660046136d3565b611084565b34801561063e57600080fd5b5061049760135481565b34801561065457600080fd5b506104c561124c565b34801561066957600080fd5b506104c56106783660046137cb565b6112c5565b34801561068957600080fd5b506104c561069836600461353c565b61162b565b3480156106a957600080fd5b50610497601b5481565b3480156106bf57600080fd5b50600c54610434906001600160a01b031681565b3480156106df57600080fd5b506104c5611646565b3480156106f457600080fd5b506104c56116a9565b34801561070957600080fd5b506104c5610718366004613781565b61170b565b34801561072957600080fd5b506104976107383660046136d3565b6118d5565b34801561074957600080fd5b506104c5611976565b34801561075e57600080fd5b506104c561076d36600461368d565b6119ce565b34801561077e57600080fd5b5061043461078d3660046136d3565b611a0b565b34801561079e57600080fd5b50601154610434906001600160a01b031681565b3480156107be57600080fd5b506104716107cd366004613703565b602160209081526000928352604080842090915290825290205460ff1681565b3480156107f957600080fd5b50610497601c5481565b34801561080f57600080fd5b5061047161081e3660046134cc565b601f6020526000908152604090205460ff1681565b34801561083f57600080fd5b5061049761084e3660046134cc565b611a82565b34801561085f57600080fd5b506104c5611b09565b34801561087457600080fd5b5061049760195481565b34801561088a57600080fd5b50600f54610434906001600160a01b031681565b3480156108aa57600080fd5b50600d54610434906001600160a01b031681565b3480156108ca57600080fd5b50601d546104719062010000900460ff1681565b3480156108ea57600080fd5b506104c5611b3f565b3480156108ff57600080fd5b50600a546001600160a01b0316610434565b34801561091d57600080fd5b506104c5611eee565b34801561093257600080fd5b506104c56109413660046136d3565b611f4e565b34801561095257600080fd5b506104976109613660046134cc565b6001600160a01b031660009081526023602052604090205490565b34801561098857600080fd5b506104dc611f7d565b34801561099d57600080fd5b50601054610434906001600160a01b031681565b6104c56109bf3660046136d3565b611f8c565b3480156109d057600080fd5b506104c56109df3660046135f9565b612083565b3480156109f057600080fd5b506104c56109ff3660046134cc565b612148565b348015610a1057600080fd5b5061049760175481565b348015610a2657600080fd5b5061049760155481565b348015610a3c57600080fd5b50610471610a4b3660046134cc565b60246020526000908152604090205460ff1681565b348015610a6c57600080fd5b506104c5610a7b36600461362a565b6121ea565b348015610a8c57600080fd5b506104c5610a9b36600461357c565b6122e7565b348015610aac57600080fd5b50610497601a5481565b348015610ac257600080fd5b506104c5610ad136600461362a565b61231f565b348015610ae257600080fd5b506104c5612418565b348015610af757600080fd5b50610497610b063660046136d3565b602080526000908152604090205481565b348015610b2357600080fd5b506104dc610b323660046136d3565b612474565b348015610b4357600080fd5b50610471610b52366004613727565b61254f565b348015610b6357600080fd5b506104c5610b7236600461362a565b6125c8565b348015610b8357600080fd5b50601d54610471906301000000900460ff1681565b348015610ba457600080fd5b506104dc6125fc565b348015610bb957600080fd5b506104c561268a565b348015610bce57600080fd5b50610471610bdd3660046136d3565b601e6020526000908152604090205460ff1681565b348015610bfe57600080fd5b506104c56126f3565b348015610c1357600080fd5b5061049760145481565b348015610c2957600080fd5b50610471610c38366004613504565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610c7257600080fd5b50610497610c813660046134cc565b60236020526000908152604090205481565b348015610c9f57600080fd5b506104c5610cae3660046134cc565b612759565b60006001600160e01b0319821663780e9d6360e01b1480610cd85750610cd8826127f4565b92915050565b600a546001600160a01b03163314610d115760405162461bcd60e51b8152600401610d0890613913565b60405180910390fd5b600091825260208052604090912055565b606060008054610d3190613ab4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5d90613ab4565b8015610daa5780601f10610d7f57610100808354040283529160200191610daa565b820191906000526020600020905b815481529060010190602001808311610d8d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610e2d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d08565b506000908152600460205260409020546001600160a01b031690565b6000610e5482611a0b565b9050806001600160a01b0316836001600160a01b03161415610ec25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d08565b336001600160a01b0382161480610ede5750610ede8133610c38565b610f505760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d08565b610f5a8383612844565b505050565b600a546001600160a01b03163314610f895760405162461bcd60e51b8152600401610d0890613913565b601d54610100900460ff16610fb05760405162461bcd60e51b8152600401610d08906139c7565b601d805461ff0019169055565b610fc733826128b2565b610fe35760405162461bcd60e51b8152600401610d0890613976565b610f5a8383836129a5565b6000610ff983611a82565b821061105b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d08565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5414156110a75760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b156110cb5760405162461bcd60e51b8152600401610d0890613948565b601d54610100900460ff166111115760405162461bcd60e51b815260206004820152600c60248201526b6e6f74206f6e20636c61696d60a01b6044820152606401610d08565b600c546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561115557600080fd5b505afa158015611169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118d91906134e8565b6001600160a01b0316146111cf5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610d08565b6000818152601e602052604090205460ff16156112205760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610d08565b61122b600133612b50565b6000908152601e60205260409020805460ff19166001908117909155600b55565b600a546001600160a01b031633146112765760405162461bcd60e51b8152600401610d0890613913565b47611289600a546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156112c1573d6000803e3d6000fd5b5050565b6002600b5414156112e85760405162461bcd60e51b8152600401610d08906139ef565b6002600b55601454821061132d5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b6044820152606401610d08565b601d546301000000900460ff166113775760405162461bcd60e51b815260206004820152600e60248201526d6e6f74206f6e206d69677261746560901b6044820152606401610d08565b333b156113965760405162461bcd60e51b8152600401610d0890613948565b600d546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b1580156113da57600080fd5b505afa1580156113ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141291906134e8565b6001600160a01b03161480156114aa5750600c546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561146757600080fd5b505afa15801561147b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149f91906134e8565b6001600160a01b0316145b6114e25760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610d08565b60008281526022602052604090205460ff1615801561151057506000818152601e602052604090205460ff16155b61155c5760405162461bcd60e51b815260206004820152601b60248201527f616c7265616479206d69677261746564206f7220636c61696d656400000000006044820152606401610d08565b611567600133612b50565b60008281526022602090815260408083208054600160ff199182168117909255858552601e909352818420805490931617909155601c5490513391908381818185875af1925050503d80600081146115db576040519150601f19603f3d011682016040523d82523d6000602084013e6115e0565b606091505b50509050806116215760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610d08565b50506001600b5550565b610f5a838383604051806020016040528060008152506122e7565b600a546001600160a01b031633146116705760405162461bcd60e51b8152600401610d0890613913565b601d54610100900460ff16156116985760405162461bcd60e51b8152600401610d08906138e9565b601d805461ff001916610100179055565b600a546001600160a01b031633146116d35760405162461bcd60e51b8152600401610d0890613913565b601d546301000000900460ff166116fc5760405162461bcd60e51b8152600401610d08906139c7565b601d805463ff00000019169055565b6002600b54141561172e5760405162461bcd60e51b8152600401610d08906139ef565b6002600b55600083815260216020908152604080832033845290915290205460ff161561178e5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b6044820152606401610d08565b6000601654116117d05760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620737570706c7960981b6044820152606401610d08565b6118578282808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602080805260409182902054915191945061183c93503392500160609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612bd9565b6118935760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610d08565b6016546118a1906001612c96565b6016556000838152602160209081526040808320338085529252909120805460ff1916600190811790915561162191612b50565b60006118e060085490565b82106119435760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d08565b6008828154811061196457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b031633146119a05760405162461bcd60e51b8152600401610d0890613913565b601d5460ff166119c25760405162461bcd60e51b8152600401610d08906139c7565b601d805460ff19169055565b600a546001600160a01b031633146119f85760405162461bcd60e51b8152600401610d0890613913565b80516112c1906012906020840190613373565b6000818152600260205260408120546001600160a01b031680610cd85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d08565b60006001600160a01b038216611aed5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d08565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611b335760405162461bcd60e51b8152600401610d0890613913565b611b3d6000612ca2565b565b6002600b541415611b625760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b15611b865760405162461bcd60e51b8152600401610d0890613948565b601d5462010000900460ff16611bcd5760405162461bcd60e51b815260206004820152600c60248201526b6e6f74206f6e20636c61696d60a01b6044820152606401610d08565b601954600e546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611c1357600080fd5b505afa158015611c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4b91906136eb565b101580611cd45750601854600f546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611c9957600080fd5b505afa158015611cad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd191906136eb565b10155b80611d5b5750601a546010546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611d2057600080fd5b505afa158015611d34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5891906136eb565b10155b80611de25750601b546011546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611da757600080fd5b505afa158015611dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddf91906136eb565b10155b611e1c5760405162461bcd60e51b815260206004820152600b60248201526a6c6f772062616c616e636560a81b6044820152606401610d08565b336000908152601f602052604090205460ff1615611e6e5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610d08565b600060155411611eb05760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620737570706c7960981b6044820152606401610d08565b601554611ebe906001612c96565b601555336000818152601f60205260409020805460ff19166001908117909155611ee791612b50565b6001600b55565b600a546001600160a01b03163314611f185760405162461bcd60e51b8152600401610d0890613913565b601d5462010000900460ff16611f405760405162461bcd60e51b8152600401610d08906139c7565b601d805462ff000019169055565b600a546001600160a01b03163314611f785760405162461bcd60e51b8152600401610d0890613913565b601355565b606060018054610d3190613ab4565b6002600b541415611faf5760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b15611fd35760405162461bcd60e51b8152600401610d0890613948565b601d5460ff166120135760405162461bcd60e51b815260206004820152600b60248201526a6e6f74206f6e2073616c6560a81b6044820152606401610d08565b600061202a60135483612cf490919063ffffffff16565b9050803410156120705760405162461bcd60e51b815260206004820152601160248201527077726f6e672065746865722076616c756560781b6044820152606401610d08565b61207a8233612b50565b50506001600b55565b6001600160a01b0382163314156120dc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d08565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146121725760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b03811660009081526024602052604090205460ff166121c95760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610d08565b6001600160a01b03166000908152602460205260409020805460ff19169055565b600a546001600160a01b031633146122145760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b0382163b61225a5760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd0818dbdb9d1c9858dd60a21b6044820152606401610d08565b6001600160a01b03821660009081526024602052604090205460ff16156122b65760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e48185c1c1c9bdd995960821b6044820152606401610d08565b6001600160a01b039091166000908152602460209081526040808320805460ff191660011790556023909152902055565b6122f133836128b2565b61230d5760405162461bcd60e51b8152600401610d0890613976565b61231984848484612d00565b50505050565b6002600b5414156123425760405162461bcd60e51b8152600401610d08906139ef565b6002600b553360009081526024602052604090205460ff166123955760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610d08565b336000908152602360205260409020548111156123e45760405162461bcd60e51b815260206004820152600d60248201526c1bdd5d081bd988185b5bdd5b9d609a1b6044820152606401610d08565b336000908152602360205260409020546123fe9082612c96565b3360009081526023602052604090205561207a8183612b50565b600a546001600160a01b031633146124425760405162461bcd60e51b8152600401610d0890613913565b601d5460ff16156124655760405162461bcd60e51b8152600401610d08906138e9565b601d805460ff19166001179055565b6000818152600260205260409020546060906001600160a01b03166124f35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d08565b60006124fd612d33565b9050600081511161251d5760405180602001604052806000815250612548565b8061252784612d42565b604051602001612538929190613818565b6040516020818303038152906040525b9392505050565b60006125bd83838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152602080805260409182902054915191945061183c93508a92500160609190911b6bffffffffffffffffffffffff1916815260140190565b90505b949350505050565b600a546001600160a01b031633146125f25760405162461bcd60e51b8152600401610d0890613913565b6112c18183612b50565b6012805461260990613ab4565b80601f016020809104026020016040519081016040528092919081815260200182805461263590613ab4565b80156126825780601f1061265757610100808354040283529160200191612682565b820191906000526020600020905b81548152906001019060200180831161266557829003601f168201915b505050505081565b600a546001600160a01b031633146126b45760405162461bcd60e51b8152600401610d0890613913565b601d546301000000900460ff16156126de5760405162461bcd60e51b8152600401610d08906138e9565b601d805463ff00000019166301000000179055565b600a546001600160a01b0316331461271d5760405162461bcd60e51b8152600401610d0890613913565b601d5462010000900460ff16156127465760405162461bcd60e51b8152600401610d08906138e9565b601d805462ff0000191662010000179055565b600a546001600160a01b031633146127835760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b0381166127e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d08565b6127f181612ca2565b50565b60006001600160e01b031982166380ac58cd60e01b148061282557506001600160e01b03198216635b5e139f60e01b145b80610cd857506301ffc9a760e01b6001600160e01b0319831614610cd8565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061287982611a0b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661292b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d08565b600061293683611a0b565b9050806001600160a01b0316846001600160a01b031614806129715750836001600160a01b031661296684610db4565b6001600160a01b0316145b806125c057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166125c0565b826001600160a01b03166129b882611a0b565b6001600160a01b031614612a205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d08565b6001600160a01b038216612a825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d08565b612a8d838383612e5c565b612a98600082612844565b6001600160a01b0383166000908152600360205260408120805460019290612ac1908490613a71565b90915550506001600160a01b0382166000908152600360205260408120805460019290612aef908490613a26565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60175482612b5d60085490565b612b679190613a26565b1115612ba45760405162461bcd60e51b815260206004820152600c60248201526b195e18d95959081b1a5b5a5d60a21b6044820152606401610d08565b60005b82811015610f5a576000612bba60085490565b9050612bc68382612f14565b5080612bd181613aef565b915050612ba7565b600081815b8551811015612c8b576000868281518110612c0957634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612c4b576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612c78565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612c8381613aef565b915050612bde565b509092149392505050565b60006125488284613a71565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006125488284613a52565b612d0b8484846129a5565b612d1784848484612f2e565b6123195760405162461bcd60e51b8152600401610d0890613897565b606060128054610d3190613ab4565b606081612d665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d905780612d7a81613aef565b9150612d899050600a83613a3e565b9150612d6a565b60008167ffffffffffffffff811115612db957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612de3576020820181803683370190505b5090505b84156125c057612df8600183613a71565b9150612e05600a86613b0a565b612e10906030613a26565b60f81b818381518110612e3357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612e55600a86613a3e565b9450612de7565b6001600160a01b038316612eb757612eb281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612eda565b816001600160a01b0316836001600160a01b031614612eda57612eda8382613038565b6001600160a01b038216612ef157610f5a816130d5565b826001600160a01b0316826001600160a01b031614610f5a57610f5a82826131ae565b6112c18282604051806020016040528060008152506131f2565b60006001600160a01b0384163b1561303057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f72903390899088908890600401613847565b602060405180830381600087803b158015612f8c57600080fd5b505af1925050508015612fbc575060408051601f3d908101601f19168201909252612fb991810190613671565b60015b613016573d808015612fea576040519150601f19603f3d011682016040523d82523d6000602084013e612fef565b606091505b50805161300e5760405162461bcd60e51b8152600401610d0890613897565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506125c0565b5060016125c0565b6000600161304584611a82565b61304f9190613a71565b6000838152600760205260409020549091508082146130a2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906130e790600190613a71565b6000838152600960205260408120546008805493945090928490811061311d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061314c57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061319257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006131b983611a82565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6131fc8383613225565b6132096000848484612f2e565b610f5a5760405162461bcd60e51b8152600401610d0890613897565b6001600160a01b03821661327b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d08565b6000818152600260205260409020546001600160a01b0316156132e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d08565b6132ec60008383612e5c565b6001600160a01b0382166000908152600360205260408120805460019290613315908490613a26565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461337f90613ab4565b90600052602060002090601f0160209004810192826133a157600085556133e7565b82601f106133ba57805160ff19168380011785556133e7565b828001600101855582156133e7579182015b828111156133e75782518255916020019190600101906133cc565b506133f39291506133f7565b5090565b5b808211156133f357600081556001016133f8565b600067ffffffffffffffff8084111561342757613427613b4a565b604051601f8501601f19908116603f0116810190828211818310171561344f5761344f613b4a565b8160405280935085815286868601111561346857600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112613493578182fd5b50813567ffffffffffffffff8111156134aa578182fd5b6020830191508360208260051b85010111156134c557600080fd5b9250929050565b6000602082840312156134dd578081fd5b813561254881613b60565b6000602082840312156134f9578081fd5b815161254881613b60565b60008060408385031215613516578081fd5b823561352181613b60565b9150602083013561353181613b60565b809150509250929050565b600080600060608486031215613550578081fd5b833561355b81613b60565b9250602084013561356b81613b60565b929592945050506040919091013590565b60008060008060808587031215613591578081fd5b843561359c81613b60565b935060208501356135ac81613b60565b925060408501359150606085013567ffffffffffffffff8111156135ce578182fd5b8501601f810187136135de578182fd5b6135ed8782356020840161340c565b91505092959194509250565b6000806040838503121561360b578182fd5b823561361681613b60565b915060208301358015158114613531578182fd5b6000806040838503121561363c578182fd5b823561364781613b60565b946020939093013593505050565b600060208284031215613666578081fd5b813561254881613b75565b600060208284031215613682578081fd5b815161254881613b75565b60006020828403121561369e578081fd5b813567ffffffffffffffff8111156136b4578182fd5b8201601f810184136136c4578182fd5b6125c08482356020840161340c565b6000602082840312156136e4578081fd5b5035919050565b6000602082840312156136fc578081fd5b5051919050565b60008060408385031215613715578081fd5b82359150602083013561353181613b60565b6000806000806060858703121561373c578182fd5b84359350602085013561374e81613b60565b9250604085013567ffffffffffffffff811115613769578283fd5b61377587828801613482565b95989497509550505050565b600080600060408486031215613795578081fd5b83359250602084013567ffffffffffffffff8111156137b2578182fd5b6137be86828701613482565b9497909650939450505050565b600080604083850312156137dd578182fd5b50508035926020909101359150565b60008151808452613804816020860160208601613a88565b601f01601f19169290920160200192915050565b6000835161382a818460208801613a88565b83519083019061383e818360208801613a88565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061387a908301846137ec565b9695505050505050565b60208152600061254860208301846137ec565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526010908201526f185b1c9958591e481d5b9c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252600e908201526d185b1c9958591e481c185d5cd95960921b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115613a3957613a39613b1e565b500190565b600082613a4d57613a4d613b34565b500490565b6000816000190483118215151615613a6c57613a6c613b1e565b500290565b600082821015613a8357613a83613b1e565b500390565b60005b83811015613aa3578181015183820152602001613a8b565b838111156123195750506000910152565b600181811c90821680613ac857607f821691505b60208210811415613ae957634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613b0357613b03613b1e565b5060010190565b600082613b1957613b19613b34565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146127f157600080fd5b6001600160e01b0319811681146127f157600080fdfea2646970667358221220c293dfc2b91c369b45626e9bb3756e16b658161fbb63e1ed7049a178b5b484d964736f6c634300080400330000000000000000000000008d418e28614cc43df0cb46c01533faad2db08ce40000000000000000000000009bb18711aca7b2ef9297cec514a383065dda4bcb000000000000000000000000f1f955016ecbcd7321c7266bccfb96c68ea5e49b0000000000000000000000002d94aa3e47d9d5024503ca8491fce9a2fb4da19800000000000000000000000035bd01fc9d6d5d81ca9e055db88dc49aa2c699a80000000000000000000000007e9d8f07a64e363e97a648904a89fb4cd5fb94cd
Deployed Bytecode
0x6080604052600436106104085760003560e01c8063742a728011610213578063b5522e8911610123578063cd169e1f116100ab578063de065caa1161007a578063de065caa14610bf2578063e7ac92c414610c07578063e985e9c514610c1d578063ee0446b214610c66578063f2fde38b14610c9357600080fd5b8063cd169e1f14610b77578063d547cfb714610b98578063da9e60ae14610bad578063dbe7e3bd14610bc257600080fd5b8063bb33d729116100f2578063bb33d72914610ad6578063c2b40ae414610aeb578063c87b56dd14610b17578063c9b3d66714610b37578063ca80014414610b5757600080fd5b8063b5522e8914610a60578063b88d4fde14610a80578063b8b35ce214610aa0578063ba03d08014610ab657600080fd5b8063934f81f4116101a6578063a22cb46511610175578063a22cb465146109c4578063a356d21e146109e4578063a36298c714610a04578063a4d66daf14610a1a578063b1a6505f14610a3057600080fd5b8063934f81f41461094657806395d89b411461097c5780639fcb863814610991578063a0712d68146109b157600080fd5b80637c7b4e5d116101e25780637c7b4e5d146108de5780638da5cb5b146108f35780638ff095f91461091157806391b7f5ed1461092657600080fd5b8063742a72801461086857806376cdb03b1461087e578063776c23fb1461089e5780637be5254e146108be57600080fd5b80633ccfd60b1161031957806355367ba9116102a15780636887a0e5116102705780636887a0e5146107b25780636e5975a2146107ed5780636ea876f61461080357806370a0823114610833578063715018a61461085357600080fd5b806355367ba91461073d57806355f804b3146107525780636352211e14610772578063667d31681461079257600080fd5b80634761f9d8116102e85780634761f9d8146106b3578063486d7367146106d35780634b35a0ef146106e85780634d10b546146106fd5780634f6ccce71461071d57600080fd5b80633ccfd60b146106485780633e54bacb1461065d57806342842e0e1461067d5780634320bf021461069d57600080fd5b806318160ddd1161039c57806328657aa51161036b57806328657aa5146105c25780632f745c59146105d8578063326687b9146105f8578063379607f5146106125780633aa22a161461063257600080fd5b806318160ddd146105595780631a2bea851461056e578063237849de1461058d57806323b872dd146105a257600080fd5b806306fdde03116103d857806306fdde03146104c7578063081812fc146104e9578063095ea7b3146105095780630e359f161461052957600080fd5b806230bffe1461041457806301ffc9a714610451578063047fc9aa14610481578063048f06f2146104a557600080fd5b3661040f57005b600080fd5b34801561042057600080fd5b50600e54610434906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561045d57600080fd5b5061047161046c366004613655565b610cb3565b6040519015158152602001610448565b34801561048d57600080fd5b5061049760165481565b604051908152602001610448565b3480156104b157600080fd5b506104c56104c03660046137cb565b610cde565b005b3480156104d357600080fd5b506104dc610d22565b6040516104489190613884565b3480156104f557600080fd5b506104346105043660046136d3565b610db4565b34801561051557600080fd5b506104c561052436600461362a565b610e49565b34801561053557600080fd5b506104716105443660046136d3565b60226020526000908152604090205460ff1681565b34801561056557600080fd5b50600854610497565b34801561057a57600080fd5b50601d5461047190610100900460ff1681565b34801561059957600080fd5b506104c5610f5f565b3480156105ae57600080fd5b506104c56105bd36600461353c565b610fbd565b3480156105ce57600080fd5b5061049760185481565b3480156105e457600080fd5b506104976105f336600461362a565b610fee565b34801561060457600080fd5b50601d546104719060ff1681565b34801561061e57600080fd5b506104c561062d3660046136d3565b611084565b34801561063e57600080fd5b5061049760135481565b34801561065457600080fd5b506104c561124c565b34801561066957600080fd5b506104c56106783660046137cb565b6112c5565b34801561068957600080fd5b506104c561069836600461353c565b61162b565b3480156106a957600080fd5b50610497601b5481565b3480156106bf57600080fd5b50600c54610434906001600160a01b031681565b3480156106df57600080fd5b506104c5611646565b3480156106f457600080fd5b506104c56116a9565b34801561070957600080fd5b506104c5610718366004613781565b61170b565b34801561072957600080fd5b506104976107383660046136d3565b6118d5565b34801561074957600080fd5b506104c5611976565b34801561075e57600080fd5b506104c561076d36600461368d565b6119ce565b34801561077e57600080fd5b5061043461078d3660046136d3565b611a0b565b34801561079e57600080fd5b50601154610434906001600160a01b031681565b3480156107be57600080fd5b506104716107cd366004613703565b602160209081526000928352604080842090915290825290205460ff1681565b3480156107f957600080fd5b50610497601c5481565b34801561080f57600080fd5b5061047161081e3660046134cc565b601f6020526000908152604090205460ff1681565b34801561083f57600080fd5b5061049761084e3660046134cc565b611a82565b34801561085f57600080fd5b506104c5611b09565b34801561087457600080fd5b5061049760195481565b34801561088a57600080fd5b50600f54610434906001600160a01b031681565b3480156108aa57600080fd5b50600d54610434906001600160a01b031681565b3480156108ca57600080fd5b50601d546104719062010000900460ff1681565b3480156108ea57600080fd5b506104c5611b3f565b3480156108ff57600080fd5b50600a546001600160a01b0316610434565b34801561091d57600080fd5b506104c5611eee565b34801561093257600080fd5b506104c56109413660046136d3565b611f4e565b34801561095257600080fd5b506104976109613660046134cc565b6001600160a01b031660009081526023602052604090205490565b34801561098857600080fd5b506104dc611f7d565b34801561099d57600080fd5b50601054610434906001600160a01b031681565b6104c56109bf3660046136d3565b611f8c565b3480156109d057600080fd5b506104c56109df3660046135f9565b612083565b3480156109f057600080fd5b506104c56109ff3660046134cc565b612148565b348015610a1057600080fd5b5061049760175481565b348015610a2657600080fd5b5061049760155481565b348015610a3c57600080fd5b50610471610a4b3660046134cc565b60246020526000908152604090205460ff1681565b348015610a6c57600080fd5b506104c5610a7b36600461362a565b6121ea565b348015610a8c57600080fd5b506104c5610a9b36600461357c565b6122e7565b348015610aac57600080fd5b50610497601a5481565b348015610ac257600080fd5b506104c5610ad136600461362a565b61231f565b348015610ae257600080fd5b506104c5612418565b348015610af757600080fd5b50610497610b063660046136d3565b602080526000908152604090205481565b348015610b2357600080fd5b506104dc610b323660046136d3565b612474565b348015610b4357600080fd5b50610471610b52366004613727565b61254f565b348015610b6357600080fd5b506104c5610b7236600461362a565b6125c8565b348015610b8357600080fd5b50601d54610471906301000000900460ff1681565b348015610ba457600080fd5b506104dc6125fc565b348015610bb957600080fd5b506104c561268a565b348015610bce57600080fd5b50610471610bdd3660046136d3565b601e6020526000908152604090205460ff1681565b348015610bfe57600080fd5b506104c56126f3565b348015610c1357600080fd5b5061049760145481565b348015610c2957600080fd5b50610471610c38366004613504565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610c7257600080fd5b50610497610c813660046134cc565b60236020526000908152604090205481565b348015610c9f57600080fd5b506104c5610cae3660046134cc565b612759565b60006001600160e01b0319821663780e9d6360e01b1480610cd85750610cd8826127f4565b92915050565b600a546001600160a01b03163314610d115760405162461bcd60e51b8152600401610d0890613913565b60405180910390fd5b600091825260208052604090912055565b606060008054610d3190613ab4565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5d90613ab4565b8015610daa5780601f10610d7f57610100808354040283529160200191610daa565b820191906000526020600020905b815481529060010190602001808311610d8d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610e2d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d08565b506000908152600460205260409020546001600160a01b031690565b6000610e5482611a0b565b9050806001600160a01b0316836001600160a01b03161415610ec25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d08565b336001600160a01b0382161480610ede5750610ede8133610c38565b610f505760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610d08565b610f5a8383612844565b505050565b600a546001600160a01b03163314610f895760405162461bcd60e51b8152600401610d0890613913565b601d54610100900460ff16610fb05760405162461bcd60e51b8152600401610d08906139c7565b601d805461ff0019169055565b610fc733826128b2565b610fe35760405162461bcd60e51b8152600401610d0890613976565b610f5a8383836129a5565b6000610ff983611a82565b821061105b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d08565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5414156110a75760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b156110cb5760405162461bcd60e51b8152600401610d0890613948565b601d54610100900460ff166111115760405162461bcd60e51b815260206004820152600c60248201526b6e6f74206f6e20636c61696d60a01b6044820152606401610d08565b600c546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561115557600080fd5b505afa158015611169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118d91906134e8565b6001600160a01b0316146111cf5760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610d08565b6000818152601e602052604090205460ff16156112205760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610d08565b61122b600133612b50565b6000908152601e60205260409020805460ff19166001908117909155600b55565b600a546001600160a01b031633146112765760405162461bcd60e51b8152600401610d0890613913565b47611289600a546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f193505050501580156112c1573d6000803e3d6000fd5b5050565b6002600b5414156112e85760405162461bcd60e51b8152600401610d08906139ef565b6002600b55601454821061132d5760405162461bcd60e51b815260206004820152600c60248201526b6f7574206f662072616e676560a01b6044820152606401610d08565b601d546301000000900460ff166113775760405162461bcd60e51b815260206004820152600e60248201526d6e6f74206f6e206d69677261746560901b6044820152606401610d08565b333b156113965760405162461bcd60e51b8152600401610d0890613948565b600d546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b1580156113da57600080fd5b505afa1580156113ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141291906134e8565b6001600160a01b03161480156114aa5750600c546040516331a9108f60e11b81526004810183905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561146757600080fd5b505afa15801561147b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149f91906134e8565b6001600160a01b0316145b6114e25760405162461bcd60e51b81526020600482015260096024820152683737ba1037bbb732b960b91b6044820152606401610d08565b60008281526022602052604090205460ff1615801561151057506000818152601e602052604090205460ff16155b61155c5760405162461bcd60e51b815260206004820152601b60248201527f616c7265616479206d69677261746564206f7220636c61696d656400000000006044820152606401610d08565b611567600133612b50565b60008281526022602090815260408083208054600160ff199182168117909255858552601e909352818420805490931617909155601c5490513391908381818185875af1925050503d80600081146115db576040519150601f19603f3d011682016040523d82523d6000602084013e6115e0565b606091505b50509050806116215760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b6044820152606401610d08565b50506001600b5550565b610f5a838383604051806020016040528060008152506122e7565b600a546001600160a01b031633146116705760405162461bcd60e51b8152600401610d0890613913565b601d54610100900460ff16156116985760405162461bcd60e51b8152600401610d08906138e9565b601d805461ff001916610100179055565b600a546001600160a01b031633146116d35760405162461bcd60e51b8152600401610d0890613913565b601d546301000000900460ff166116fc5760405162461bcd60e51b8152600401610d08906139c7565b601d805463ff00000019169055565b6002600b54141561172e5760405162461bcd60e51b8152600401610d08906139ef565b6002600b55600083815260216020908152604080832033845290915290205460ff161561178e5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b6044820152606401610d08565b6000601654116117d05760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620737570706c7960981b6044820152606401610d08565b6118578282808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250888152602080805260409182902054915191945061183c93503392500160609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612bd9565b6118935760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610d08565b6016546118a1906001612c96565b6016556000838152602160209081526040808320338085529252909120805460ff1916600190811790915561162191612b50565b60006118e060085490565b82106119435760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d08565b6008828154811061196457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b031633146119a05760405162461bcd60e51b8152600401610d0890613913565b601d5460ff166119c25760405162461bcd60e51b8152600401610d08906139c7565b601d805460ff19169055565b600a546001600160a01b031633146119f85760405162461bcd60e51b8152600401610d0890613913565b80516112c1906012906020840190613373565b6000818152600260205260408120546001600160a01b031680610cd85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610d08565b60006001600160a01b038216611aed5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610d08565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611b335760405162461bcd60e51b8152600401610d0890613913565b611b3d6000612ca2565b565b6002600b541415611b625760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b15611b865760405162461bcd60e51b8152600401610d0890613948565b601d5462010000900460ff16611bcd5760405162461bcd60e51b815260206004820152600c60248201526b6e6f74206f6e20636c61696d60a01b6044820152606401610d08565b601954600e546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611c1357600080fd5b505afa158015611c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4b91906136eb565b101580611cd45750601854600f546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611c9957600080fd5b505afa158015611cad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd191906136eb565b10155b80611d5b5750601a546010546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611d2057600080fd5b505afa158015611d34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5891906136eb565b10155b80611de25750601b546011546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015611da757600080fd5b505afa158015611dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ddf91906136eb565b10155b611e1c5760405162461bcd60e51b815260206004820152600b60248201526a6c6f772062616c616e636560a81b6044820152606401610d08565b336000908152601f602052604090205460ff1615611e6e5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610d08565b600060155411611eb05760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620737570706c7960981b6044820152606401610d08565b601554611ebe906001612c96565b601555336000818152601f60205260409020805460ff19166001908117909155611ee791612b50565b6001600b55565b600a546001600160a01b03163314611f185760405162461bcd60e51b8152600401610d0890613913565b601d5462010000900460ff16611f405760405162461bcd60e51b8152600401610d08906139c7565b601d805462ff000019169055565b600a546001600160a01b03163314611f785760405162461bcd60e51b8152600401610d0890613913565b601355565b606060018054610d3190613ab4565b6002600b541415611faf5760405162461bcd60e51b8152600401610d08906139ef565b6002600b55333b15611fd35760405162461bcd60e51b8152600401610d0890613948565b601d5460ff166120135760405162461bcd60e51b815260206004820152600b60248201526a6e6f74206f6e2073616c6560a81b6044820152606401610d08565b600061202a60135483612cf490919063ffffffff16565b9050803410156120705760405162461bcd60e51b815260206004820152601160248201527077726f6e672065746865722076616c756560781b6044820152606401610d08565b61207a8233612b50565b50506001600b55565b6001600160a01b0382163314156120dc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d08565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146121725760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b03811660009081526024602052604090205460ff166121c95760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610d08565b6001600160a01b03166000908152602460205260409020805460ff19169055565b600a546001600160a01b031633146122145760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b0382163b61225a5760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd0818dbdb9d1c9858dd60a21b6044820152606401610d08565b6001600160a01b03821660009081526024602052604090205460ff16156122b65760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e48185c1c1c9bdd995960821b6044820152606401610d08565b6001600160a01b039091166000908152602460209081526040808320805460ff191660011790556023909152902055565b6122f133836128b2565b61230d5760405162461bcd60e51b8152600401610d0890613976565b61231984848484612d00565b50505050565b6002600b5414156123425760405162461bcd60e51b8152600401610d08906139ef565b6002600b553360009081526024602052604090205460ff166123955760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610d08565b336000908152602360205260409020548111156123e45760405162461bcd60e51b815260206004820152600d60248201526c1bdd5d081bd988185b5bdd5b9d609a1b6044820152606401610d08565b336000908152602360205260409020546123fe9082612c96565b3360009081526023602052604090205561207a8183612b50565b600a546001600160a01b031633146124425760405162461bcd60e51b8152600401610d0890613913565b601d5460ff16156124655760405162461bcd60e51b8152600401610d08906138e9565b601d805460ff19166001179055565b6000818152600260205260409020546060906001600160a01b03166124f35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610d08565b60006124fd612d33565b9050600081511161251d5760405180602001604052806000815250612548565b8061252784612d42565b604051602001612538929190613818565b6040516020818303038152906040525b9392505050565b60006125bd83838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152602080805260409182902054915191945061183c93508a92500160609190911b6bffffffffffffffffffffffff1916815260140190565b90505b949350505050565b600a546001600160a01b031633146125f25760405162461bcd60e51b8152600401610d0890613913565b6112c18183612b50565b6012805461260990613ab4565b80601f016020809104026020016040519081016040528092919081815260200182805461263590613ab4565b80156126825780601f1061265757610100808354040283529160200191612682565b820191906000526020600020905b81548152906001019060200180831161266557829003601f168201915b505050505081565b600a546001600160a01b031633146126b45760405162461bcd60e51b8152600401610d0890613913565b601d546301000000900460ff16156126de5760405162461bcd60e51b8152600401610d08906138e9565b601d805463ff00000019166301000000179055565b600a546001600160a01b0316331461271d5760405162461bcd60e51b8152600401610d0890613913565b601d5462010000900460ff16156127465760405162461bcd60e51b8152600401610d08906138e9565b601d805462ff0000191662010000179055565b600a546001600160a01b031633146127835760405162461bcd60e51b8152600401610d0890613913565b6001600160a01b0381166127e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d08565b6127f181612ca2565b50565b60006001600160e01b031982166380ac58cd60e01b148061282557506001600160e01b03198216635b5e139f60e01b145b80610cd857506301ffc9a760e01b6001600160e01b0319831614610cd8565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061287982611a0b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661292b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610d08565b600061293683611a0b565b9050806001600160a01b0316846001600160a01b031614806129715750836001600160a01b031661296684610db4565b6001600160a01b0316145b806125c057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166125c0565b826001600160a01b03166129b882611a0b565b6001600160a01b031614612a205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610d08565b6001600160a01b038216612a825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d08565b612a8d838383612e5c565b612a98600082612844565b6001600160a01b0383166000908152600360205260408120805460019290612ac1908490613a71565b90915550506001600160a01b0382166000908152600360205260408120805460019290612aef908490613a26565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60175482612b5d60085490565b612b679190613a26565b1115612ba45760405162461bcd60e51b815260206004820152600c60248201526b195e18d95959081b1a5b5a5d60a21b6044820152606401610d08565b60005b82811015610f5a576000612bba60085490565b9050612bc68382612f14565b5080612bd181613aef565b915050612ba7565b600081815b8551811015612c8b576000868281518110612c0957634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612c4b576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612c78565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612c8381613aef565b915050612bde565b509092149392505050565b60006125488284613a71565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006125488284613a52565b612d0b8484846129a5565b612d1784848484612f2e565b6123195760405162461bcd60e51b8152600401610d0890613897565b606060128054610d3190613ab4565b606081612d665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d905780612d7a81613aef565b9150612d899050600a83613a3e565b9150612d6a565b60008167ffffffffffffffff811115612db957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612de3576020820181803683370190505b5090505b84156125c057612df8600183613a71565b9150612e05600a86613b0a565b612e10906030613a26565b60f81b818381518110612e3357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612e55600a86613a3e565b9450612de7565b6001600160a01b038316612eb757612eb281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612eda565b816001600160a01b0316836001600160a01b031614612eda57612eda8382613038565b6001600160a01b038216612ef157610f5a816130d5565b826001600160a01b0316826001600160a01b031614610f5a57610f5a82826131ae565b6112c18282604051806020016040528060008152506131f2565b60006001600160a01b0384163b1561303057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f72903390899088908890600401613847565b602060405180830381600087803b158015612f8c57600080fd5b505af1925050508015612fbc575060408051601f3d908101601f19168201909252612fb991810190613671565b60015b613016573d808015612fea576040519150601f19603f3d011682016040523d82523d6000602084013e612fef565b606091505b50805161300e5760405162461bcd60e51b8152600401610d0890613897565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506125c0565b5060016125c0565b6000600161304584611a82565b61304f9190613a71565b6000838152600760205260409020549091508082146130a2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906130e790600190613a71565b6000838152600960205260408120546008805493945090928490811061311d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061314c57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061319257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006131b983611a82565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6131fc8383613225565b6132096000848484612f2e565b610f5a5760405162461bcd60e51b8152600401610d0890613897565b6001600160a01b03821661327b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d08565b6000818152600260205260409020546001600160a01b0316156132e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d08565b6132ec60008383612e5c565b6001600160a01b0382166000908152600360205260408120805460019290613315908490613a26565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461337f90613ab4565b90600052602060002090601f0160209004810192826133a157600085556133e7565b82601f106133ba57805160ff19168380011785556133e7565b828001600101855582156133e7579182015b828111156133e75782518255916020019190600101906133cc565b506133f39291506133f7565b5090565b5b808211156133f357600081556001016133f8565b600067ffffffffffffffff8084111561342757613427613b4a565b604051601f8501601f19908116603f0116810190828211818310171561344f5761344f613b4a565b8160405280935085815286868601111561346857600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112613493578182fd5b50813567ffffffffffffffff8111156134aa578182fd5b6020830191508360208260051b85010111156134c557600080fd5b9250929050565b6000602082840312156134dd578081fd5b813561254881613b60565b6000602082840312156134f9578081fd5b815161254881613b60565b60008060408385031215613516578081fd5b823561352181613b60565b9150602083013561353181613b60565b809150509250929050565b600080600060608486031215613550578081fd5b833561355b81613b60565b9250602084013561356b81613b60565b929592945050506040919091013590565b60008060008060808587031215613591578081fd5b843561359c81613b60565b935060208501356135ac81613b60565b925060408501359150606085013567ffffffffffffffff8111156135ce578182fd5b8501601f810187136135de578182fd5b6135ed8782356020840161340c565b91505092959194509250565b6000806040838503121561360b578182fd5b823561361681613b60565b915060208301358015158114613531578182fd5b6000806040838503121561363c578182fd5b823561364781613b60565b946020939093013593505050565b600060208284031215613666578081fd5b813561254881613b75565b600060208284031215613682578081fd5b815161254881613b75565b60006020828403121561369e578081fd5b813567ffffffffffffffff8111156136b4578182fd5b8201601f810184136136c4578182fd5b6125c08482356020840161340c565b6000602082840312156136e4578081fd5b5035919050565b6000602082840312156136fc578081fd5b5051919050565b60008060408385031215613715578081fd5b82359150602083013561353181613b60565b6000806000806060858703121561373c578182fd5b84359350602085013561374e81613b60565b9250604085013567ffffffffffffffff811115613769578283fd5b61377587828801613482565b95989497509550505050565b600080600060408486031215613795578081fd5b83359250602084013567ffffffffffffffff8111156137b2578182fd5b6137be86828701613482565b9497909650939450505050565b600080604083850312156137dd578182fd5b50508035926020909101359150565b60008151808452613804816020860160208601613a88565b601f01601f19169290920160200192915050565b6000835161382a818460208801613a88565b83519083019061383e818360208801613a88565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061387a908301846137ec565b9695505050505050565b60208152600061254860208301846137ec565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526010908201526f185b1c9958591e481d5b9c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527318dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252600e908201526d185b1c9958591e481c185d5cd95960921b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115613a3957613a39613b1e565b500190565b600082613a4d57613a4d613b34565b500490565b6000816000190483118215151615613a6c57613a6c613b1e565b500290565b600082821015613a8357613a83613b1e565b500390565b60005b83811015613aa3578181015183820152602001613a8b565b838111156123195750506000910152565b600181811c90821680613ac857607f821691505b60208210811415613ae957634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613b0357613b03613b1e565b5060010190565b600082613b1957613b19613b34565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146127f157600080fd5b6001600160e01b0319811681146127f157600080fdfea2646970667358221220c293dfc2b91c369b45626e9bb3756e16b658161fbb63e1ed7049a178b5b484d964736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008d418e28614cc43df0cb46c01533faad2db08ce40000000000000000000000009bb18711aca7b2ef9297cec514a383065dda4bcb000000000000000000000000f1f955016ecbcd7321c7266bccfb96c68ea5e49b0000000000000000000000002d94aa3e47d9d5024503ca8491fce9a2fb4da19800000000000000000000000035bd01fc9d6d5d81ca9e055db88dc49aa2c699a80000000000000000000000007e9d8f07a64e363e97a648904a89fb4cd5fb94cd
-----Decoded View---------------
Arg [0] : token (address): 0x8D418E28614cC43Df0cb46c01533fAaD2dB08CE4
Arg [1] : sdAddr (address): 0x9bb18711aca7b2ef9297ceC514a383065dDa4BCB
Arg [2] : rallyAddr (address): 0xf1f955016EcbCd7321c7266BccFB96c68ea5E49b
Arg [3] : bankAddr (address): 0x2d94AA3e47d9D5024503Ca8491fcE9A2fB4DA198
Arg [4] : fwbAddr (address): 0x35bD01FC9d6D5D81CA9E055Db88Dc49aa2c699A8
Arg [5] : ffAddr (address): 0x7E9D8f07A64e363e97A648904a89fb4cd5fB94CD
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000008d418e28614cc43df0cb46c01533faad2db08ce4
Arg [1] : 0000000000000000000000009bb18711aca7b2ef9297cec514a383065dda4bcb
Arg [2] : 000000000000000000000000f1f955016ecbcd7321c7266bccfb96c68ea5e49b
Arg [3] : 0000000000000000000000002d94aa3e47d9d5024503ca8491fce9a2fb4da198
Arg [4] : 00000000000000000000000035bd01fc9d6d5d81ca9e055db88dc49aa2c699a8
Arg [5] : 0000000000000000000000007e9d8f07a64e363e97a648904a89fb4cd5fb94cd
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.