Address Details
contract
token
0xDB9E8D1acc5b422FA3843e9F37643e1b7A595a0c
- Token
- Birden (BRDN)
- Creator
- 0xbbf554–9b3bc8 at 0x4cb8d5–638310
- Balance
- 3.03 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 37 Transactions
- Transfers
- 10 Transfers
- Gas Used
- 3,739,673
- Last Balance Update
- 11966581
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- Birden
- Optimization enabled
- false
- Compiler version
- v0.8.14+commit.80d49f37
- EVM Version
- london
- Verified at
- 2022-05-20T14:44:13.507718Z
project:/contracts/Birden.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract Birden is ERC721 { struct RentalStruct{ uint256 rentedAt; uint256 tokenId; address rentedBy; } struct TokenInfoStruct{ uint256 tokenId; string URI; address creator; uint256 rentedAt; address rentedBy; uint256 balance; } using Counters for Counters.Counter; uint256 public rentPriceCelo = 1 ether; uint256 public _comission = 0.01 ether; uint256 private _lastRun; uint256[] private rentedSeq; Counters.Counter private _tokenIdCounter; Counters.Counter private _seqCounter; mapping (uint256 => string) private _tokenURIs; mapping (uint256 => address) private _tokenCreators; mapping (uint256 => uint256) private _balances; mapping (uint256 => address) private _tokenCurrencies; mapping (uint256 => RentalStruct) private _rentedAt; mapping (uint256 => uint256) private _tokenToSeq; constructor() ERC721("Birden", "BRDN") { _lastRun = block.timestamp; _tokenIdCounter.increment(); _seqCounter.increment(); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual override returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address creator = _tokenCreators[tokenId]; return (spender == creator); } function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set for nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; return _tokenURI; } function tokensInfo() public view returns(TokenInfoStruct[] memory) { TokenInfoStruct[] memory _toReturn; uint256 lastTokenId = _tokenIdCounter.current(); if (lastTokenId > 0) { _toReturn = new TokenInfoStruct[](lastTokenId); for (uint i = 1; i < lastTokenId; i++) { _toReturn[i] = TokenInfoStruct( i, _tokenURIs[i], _tokenCreators[i], _rentedAt[_tokenToSeq[i]].rentedAt, _rentedAt[_tokenToSeq[i]].rentedBy, _balances[i] ); } } return _toReturn; } function rent(uint256 tokenId) public { require(_exists(tokenId), "ERC721: rent query for nonexistent token"); ERC20 token = ERC20(_tokenCurrencies[tokenId]); require(token.balanceOf(msg.sender) >= rentPriceCelo); token.transferFrom(msg.sender, address(this), rentPriceCelo); _balances[tokenId] += rentPriceCelo - _comission; uint256 currentSeq = _seqCounter.current(); _rentedAt[currentSeq] = RentalStruct(block.timestamp, tokenId, msg.sender); _safeTransfer(_tokenCreators[tokenId], msg.sender, tokenId, ""); rentedSeq.push(currentSeq); _tokenToSeq[tokenId] = currentSeq; _seqCounter.increment(); } function _tick() internal virtual { _lastRun = block.timestamp; _checkReturns(); } function _checkReturns() internal virtual { uint256[] memory _toReturn = new uint256[](rentedSeq.length); for (uint i = 0; i < rentedSeq.length ; i++) { RentalStruct memory _rentInfo = _rentedAt[rentedSeq[i]]; if (_lastRun - _rentInfo.rentedAt < 1 minutes) { break; } else { _toReturn[i] = rentedSeq[i]; } } for (uint i = 0; i < _toReturn.length; i++) { if (_toReturn[i] > 0) { RentalStruct memory _rentInfo = _rentedAt[_toReturn[i]]; _returnRented(_rentInfo.tokenId, _rentInfo.rentedBy); delete _rentedAt[_toReturn[i]]; delete rentedSeq[0]; delete _tokenToSeq[_toReturn[i]]; } } } function _returnRented(uint256 tokenId, address rentedBy) internal virtual { ERC20 token = ERC20(_tokenCurrencies[tokenId]); require(token.balanceOf(address(this)) >= _balances[tokenId]); token.transfer(_tokenCreators[tokenId], _balances[tokenId]); _balances[tokenId] -= _balances[tokenId]; _safeTransfer(rentedBy, _tokenCreators[tokenId], tokenId, ""); } function redeem(uint256 tokenId) public { _lastRun = block.timestamp; require(_exists(tokenId), "ERC721: rent query for nonexistent token"); require(msg.sender == _tokenCreators[tokenId], "Redeem: caller is not the creator"); uint256 _toRedeemPart = _balances[tokenId] / 1 minutes; uint256 _toRedeemSeconds = _lastRun - _rentedAt[_tokenToSeq[tokenId]].rentedAt; uint256 _toRedeem = _toRedeemPart * _toRedeemSeconds; ERC20 token = ERC20(_tokenCurrencies[tokenId]); require(token.balanceOf(address(this)) >= _toRedeem); token.transfer(_tokenCreators[tokenId], _toRedeem); _balances[tokenId] -= _toRedeem; } function safeMint(string memory _tokenURI, address rent_token_address) external { _tick(); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(_msgSender(), tokenId); _setTokenURI(tokenId, _tokenURI); _tokenCreators[tokenId] = _msgSender(); _tokenCurrencies[tokenId] = rent_token_address; } }
/_openzeppelin/contracts/token/ERC20/ERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
/_openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
/_openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
/_openzeppelin/contracts/token/ERC721/ERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) 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 overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = 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 { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = 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); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
/_openzeppelin/contracts/token/ERC721/IERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
/_openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
/_openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library 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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev 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); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
/_openzeppelin/contracts/utils/Counters.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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); }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_comission","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"redeem","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rent","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rentPriceCelo","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeMint","inputs":[{"type":"string","name":"_tokenURI","internalType":"string"},{"type":"address","name":"rent_token_address","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct Birden.TokenInfoStruct[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"URI","internalType":"string"},{"type":"address","name":"creator","internalType":"address"},{"type":"uint256","name":"rentedAt","internalType":"uint256"},{"type":"address","name":"rentedBy","internalType":"address"},{"type":"uint256","name":"balance","internalType":"uint256"}]}],"name":"tokensInfo","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
Contract Creation Code
0x6080604052670de0b6b3a7640000600655662386f26fc100006007553480156200002857600080fd5b506040518060400160405280600681526020017f42697264656e00000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f4252444e000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000ad9291906200011a565b508060019080519060200190620000c69291906200011a565b50505042600881905550620000e7600a6200010460201b620014b41760201c565b620000fe600b6200010460201b620014b41760201c565b6200022e565b6001816000016000828254019250508190555050565b8280546200012890620001f9565b90600052602060002090601f0160209004810192826200014c576000855562000198565b82601f106200016757805160ff191683800117855562000198565b8280016001018555821562000198579182015b82811115620001975782518255916020019190600101906200017a565b5b509050620001a79190620001ab565b5090565b5b80821115620001c6576000816000905550600101620001ac565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200021257607f821691505b602082108103620002285762000227620001ca565b5b50919050565b613c63806200023e6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80637456be7d116100ad578063c6f0577111610071578063c6f0577114610306578063c87b56dd14610322578063db006a7514610352578063e79c28fe1461036e578063e985e9c51461038c57610121565b80637456be7d1461027657806395d89b4114610292578063a22cb465146102b0578063a69bd72c146102cc578063b88d4fde146102ea57610121565b8063095ea7b3116100f4578063095ea7b3146101c257806323b872dd146101de57806342842e0e146101fa5780636352211e1461021657806370a082311461024657610121565b806301ffc9a71461012657806306ef93ad1461015657806306fdde0314610174578063081812fc14610192575b600080fd5b610140600480360381019061013b91906126b3565b6103bc565b60405161014d91906126fb565b60405180910390f35b61015e61049e565b60405161016b919061272f565b60405180910390f35b61017c6104a4565b60405161018991906127e3565b60405180910390f35b6101ac60048036038101906101a79190612831565b610536565b6040516101b9919061289f565b60405180910390f35b6101dc60048036038101906101d791906128e6565b6105bb565b005b6101f860048036038101906101f39190612926565b6106d2565b005b610214600480360381019061020f9190612926565b610732565b005b610230600480360381019061022b9190612831565b610752565b60405161023d919061289f565b60405180910390f35b610260600480360381019061025b9190612979565b610803565b60405161026d919061272f565b60405180910390f35b610290600480360381019061028b9190612831565b6108ba565b005b61029a610bcc565b6040516102a791906127e3565b60405180910390f35b6102ca60048036038101906102c591906129d2565b610c5e565b005b6102d4610c74565b6040516102e1919061272f565b60405180910390f35b61030460048036038101906102ff9190612b47565b610c7a565b005b610320600480360381019061031b9190612c6b565b610cdc565b005b61033c60048036038101906103379190612831565b610dc7565b60405161034991906127e3565b60405180910390f35b61036c60048036038101906103679190612831565b610eba565b005b6103766111ba565b6040516103839190612e7a565b60405180910390f35b6103a660048036038101906103a19190612e9c565b611420565b6040516103b391906126fb565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061048757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104975750610496826114ca565b5b9050919050565b60075481565b6060600080546104b390612f0b565b80601f01602080910402602001604051908101604052809291908181526020018280546104df90612f0b565b801561052c5780601f106105015761010080835404028352916020019161052c565b820191906000526020600020905b81548152906001019060200180831161050f57829003601f168201915b5050505050905090565b600061054182611534565b610580576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057790612fae565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006105c682610752565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062d90613040565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166106556115a0565b73ffffffffffffffffffffffffffffffffffffffff16148061068457506106838161067e6115a0565b611420565b5b6106c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ba906130d2565b60405180910390fd5b6106cd83836115a8565b505050565b6106e36106dd6115a0565b82611661565b610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071990613164565b60405180910390fd5b61072d83838361171b565b505050565b61074d83838360405180602001604052806000815250610c7a565b505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f1906131f6565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90613288565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108c381611534565b610902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f99061331a565b60405180910390fd5b6000600f600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506006548173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610976919061289f565b602060405180830381865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061334f565b10156109c257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd33306006546040518463ffffffff1660e01b8152600401610a019392919061337c565b6020604051808303816000875af1158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4491906133c8565b50600754600654610a559190613424565b600e60008481526020019081526020016000206000828254610a779190613458565b925050819055506000610a8a600b611981565b905060405180606001604052804281526020018481526020013373ffffffffffffffffffffffffffffffffffffffff1681525060106000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050610b7c600d600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518060200160405280600081525061198f565b6009819080600181540180825580915050600190039060005260206000200160009091909190915055806011600085815260200190815260200160002081905550610bc7600b6114b4565b505050565b606060018054610bdb90612f0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0790612f0b565b8015610c545780601f10610c2957610100808354040283529160200191610c54565b820191906000526020600020905b815481529060010190602001808311610c3757829003601f168201915b5050505050905090565b610c70610c696115a0565b83836119eb565b5050565b60065481565b610c8b610c856115a0565b83611661565b610cca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc190613164565b60405180910390fd5b610cd68484848461198f565b50505050565b610ce4611b57565b6000610cf0600a611981565b9050610cfc600a6114b4565b610d0d610d076115a0565b82611b68565b610d178184611b86565b610d1f6115a0565b600d600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600f600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6060610dd282611534565b610e11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0890613520565b60405180910390fd5b6000600c60008481526020019081526020016000208054610e3190612f0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5d90612f0b565b8015610eaa5780601f10610e7f57610100808354040283529160200191610eaa565b820191906000526020600020905b815481529060010190602001808311610e8d57829003601f168201915b5050505050905080915050919050565b42600881905550610eca81611534565b610f09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f009061331a565b60405180910390fd5b600d600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610faa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa1906135b2565b60405180910390fd5b6000603c600e600084815260200190815260200160002054610fcc9190613601565b905060006010600060116000868152602001908152602001600020548152602001908152602001600020600001546008546110079190613424565b9050600081836110179190613632565b90506000600f600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050818173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161108b919061289f565b602060405180830381865afa1580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc919061334f565b10156110d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d600088815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b815260040161114592919061368c565b6020604051808303816000875af1158015611164573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118891906133c8565b5081600e600087815260200190815260200160002060008282546111ac9190613424565b925050819055505050505050565b60608060006111c9600a611981565b90506000811115611418578067ffffffffffffffff8111156111ee576111ed612a1c565b5b60405190808252806020026020018201604052801561122757816020015b611214612542565b81526020019060019003908161120c5790505b5091506000600190505b81811015611416576040518060c00160405280828152602001600c6000848152602001908152602001600020805461126890612f0b565b80601f016020809104026020016040519081016040528092919081815260200182805461129490612f0b565b80156112e15780601f106112b6576101008083540402835291602001916112e1565b820191906000526020600020905b8154815290600101906020018083116112c457829003601f168201915b50505050508152602001600d600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016010600060116000868152602001908152602001600020548152602001908152602001600020600001548152602001601060006011600086815260200190815260200160002054815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600e6000848152602001908152602001600020548152508382815181106113f8576113f76136b5565b5b6020026020010181905250808061140e906136e4565b915050611231565b505b819250505090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661161b83610752565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061166c82611534565b6116ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a29061379e565b60405180910390fd5b6000600d600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161491505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661173b82610752565b73ffffffffffffffffffffffffffffffffffffffff1614611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178890613830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f7906138c2565b60405180910390fd5b61180b838383611bfa565b6118166000826115a8565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118669190613424565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118bd9190613458565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461197c838383611bff565b505050565b600081600001549050919050565b61199a84848461171b565b6119a684848484611c04565b6119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc90613954565b60405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a50906139c0565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b4a91906126fb565b60405180910390a3505050565b42600881905550611b66611d8b565b565b611b828282604051806020016040528060008152506120c5565b5050565b611b8f82611534565b611bce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc590613a52565b60405180910390fd5b80600c60008481526020019081526020016000209080519060200190611bf59291906125a4565b505050565b505050565b505050565b6000611c258473ffffffffffffffffffffffffffffffffffffffff16612120565b15611d7e578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611c4e6115a0565b8786866040518563ffffffff1660e01b8152600401611c709493929190613ac7565b6020604051808303816000875af1925050508015611cac57506040513d601f19601f82011682018060405250810190611ca99190613b28565b60015b611d2e573d8060008114611cdc576040519150601f19603f3d011682016040523d82523d6000602084013e611ce1565b606091505b506000815103611d26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1d90613954565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611d83565b600190505b949350505050565b600060098054905067ffffffffffffffff811115611dac57611dab612a1c565b5b604051908082528060200260200182016040528015611dda5781602001602082028036833780820191505090505b50905060005b600980549050811015611f095760006010600060098481548110611e0757611e066136b5565b5b9060005260206000200154815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050603c8160000151600854611eab9190613424565b1015611eb75750611f09565b60098281548110611ecb57611eca6136b5565b5b9060005260206000200154838381518110611ee957611ee86136b5565b5b602002602001018181525050508080611f01906136e4565b915050611de0565b5060005b81518110156120c1576000828281518110611f2b57611f2a6136b5565b5b602002602001015111156120ae57600060106000848481518110611f5257611f516136b5565b5b6020026020010151815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050611ff181602001518260400151612143565b60106000848481518110612008576120076136b5565b5b6020026020010151815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600960008154811061206d5761206c6136b5565b5b906000526020600020016000905560116000848481518110612092576120916136b5565b5b6020026020010151815260200190815260200160002060009055505b80806120b9906136e4565b915050611f0d565b5050565b6120cf8383612369565b6120dc6000848484611c04565b61211b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211290613954565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000600f600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600e6000848152602001908152602001600020548173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016121c8919061289f565b602060405180830381865afa1580156121e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612209919061334f565b101561221457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600e6000878152602001908152602001600020546040518363ffffffff1660e01b815260040161229592919061368c565b6020604051808303816000875af11580156122b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d891906133c8565b50600e600084815260200190815260200160002054600e6000858152602001908152602001600020600082825461230f9190613424565b9250508190555061236482600d600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518060200160405280600081525061198f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cf90613ba1565b60405180910390fd5b6123e181611534565b15612421576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241890613c0d565b60405180910390fd5b61242d60008383611bfa565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461247d9190613458565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461253e60008383611bff565b5050565b6040518060c001604052806000815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b8280546125b090612f0b565b90600052602060002090601f0160209004810192826125d25760008555612619565b82601f106125eb57805160ff1916838001178555612619565b82800160010185558215612619579182015b828111156126185782518255916020019190600101906125fd565b5b509050612626919061262a565b5090565b5b8082111561264357600081600090555060010161262b565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126908161265b565b811461269b57600080fd5b50565b6000813590506126ad81612687565b92915050565b6000602082840312156126c9576126c8612651565b5b60006126d78482850161269e565b91505092915050565b60008115159050919050565b6126f5816126e0565b82525050565b600060208201905061271060008301846126ec565b92915050565b6000819050919050565b61272981612716565b82525050565b60006020820190506127446000830184612720565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612784578082015181840152602081019050612769565b83811115612793576000848401525b50505050565b6000601f19601f8301169050919050565b60006127b58261274a565b6127bf8185612755565b93506127cf818560208601612766565b6127d881612799565b840191505092915050565b600060208201905081810360008301526127fd81846127aa565b905092915050565b61280e81612716565b811461281957600080fd5b50565b60008135905061282b81612805565b92915050565b60006020828403121561284757612846612651565b5b60006128558482850161281c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006128898261285e565b9050919050565b6128998161287e565b82525050565b60006020820190506128b46000830184612890565b92915050565b6128c38161287e565b81146128ce57600080fd5b50565b6000813590506128e0816128ba565b92915050565b600080604083850312156128fd576128fc612651565b5b600061290b858286016128d1565b925050602061291c8582860161281c565b9150509250929050565b60008060006060848603121561293f5761293e612651565b5b600061294d868287016128d1565b935050602061295e868287016128d1565b925050604061296f8682870161281c565b9150509250925092565b60006020828403121561298f5761298e612651565b5b600061299d848285016128d1565b91505092915050565b6129af816126e0565b81146129ba57600080fd5b50565b6000813590506129cc816129a6565b92915050565b600080604083850312156129e9576129e8612651565b5b60006129f7858286016128d1565b9250506020612a08858286016129bd565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a5482612799565b810181811067ffffffffffffffff82111715612a7357612a72612a1c565b5b80604052505050565b6000612a86612647565b9050612a928282612a4b565b919050565b600067ffffffffffffffff821115612ab257612ab1612a1c565b5b612abb82612799565b9050602081019050919050565b82818337600083830152505050565b6000612aea612ae584612a97565b612a7c565b905082815260208101848484011115612b0657612b05612a17565b5b612b11848285612ac8565b509392505050565b600082601f830112612b2e57612b2d612a12565b5b8135612b3e848260208601612ad7565b91505092915050565b60008060008060808587031215612b6157612b60612651565b5b6000612b6f878288016128d1565b9450506020612b80878288016128d1565b9350506040612b918782880161281c565b925050606085013567ffffffffffffffff811115612bb257612bb1612656565b5b612bbe87828801612b19565b91505092959194509250565b600067ffffffffffffffff821115612be557612be4612a1c565b5b612bee82612799565b9050602081019050919050565b6000612c0e612c0984612bca565b612a7c565b905082815260208101848484011115612c2a57612c29612a17565b5b612c35848285612ac8565b509392505050565b600082601f830112612c5257612c51612a12565b5b8135612c62848260208601612bfb565b91505092915050565b60008060408385031215612c8257612c81612651565b5b600083013567ffffffffffffffff811115612ca057612c9f612656565b5b612cac85828601612c3d565b9250506020612cbd858286016128d1565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612cfc81612716565b82525050565b600082825260208201905092915050565b6000612d1e8261274a565b612d288185612d02565b9350612d38818560208601612766565b612d4181612799565b840191505092915050565b612d558161287e565b82525050565b600060c083016000830151612d736000860182612cf3565b5060208301518482036020860152612d8b8282612d13565b9150506040830151612da06040860182612d4c565b506060830151612db36060860182612cf3565b506080830151612dc66080860182612d4c565b5060a0830151612dd960a0860182612cf3565b508091505092915050565b6000612df08383612d5b565b905092915050565b6000602082019050919050565b6000612e1082612cc7565b612e1a8185612cd2565b935083602082028501612e2c85612ce3565b8060005b85811015612e685784840389528151612e498582612de4565b9450612e5483612df8565b925060208a01995050600181019050612e30565b50829750879550505050505092915050565b60006020820190508181036000830152612e948184612e05565b905092915050565b60008060408385031215612eb357612eb2612651565b5b6000612ec1858286016128d1565b9250506020612ed2858286016128d1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612f2357607f821691505b602082108103612f3657612f35612edc565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000612f98602c83612755565b9150612fa382612f3c565b604082019050919050565b60006020820190508181036000830152612fc781612f8b565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b600061302a602183612755565b915061303582612fce565b604082019050919050565b600060208201905081810360008301526130598161301d565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006130bc603883612755565b91506130c782613060565b604082019050919050565b600060208201905081810360008301526130eb816130af565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b600061314e603183612755565b9150613159826130f2565b604082019050919050565b6000602082019050818103600083015261317d81613141565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006131e0602983612755565b91506131eb82613184565b604082019050919050565b6000602082019050818103600083015261320f816131d3565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613272602a83612755565b915061327d82613216565b604082019050919050565b600060208201905081810360008301526132a181613265565b9050919050565b7f4552433732313a2072656e7420717565727920666f72206e6f6e65786973746560008201527f6e7420746f6b656e000000000000000000000000000000000000000000000000602082015250565b6000613304602883612755565b915061330f826132a8565b604082019050919050565b60006020820190508181036000830152613333816132f7565b9050919050565b60008151905061334981612805565b92915050565b60006020828403121561336557613364612651565b5b60006133738482850161333a565b91505092915050565b60006060820190506133916000830186612890565b61339e6020830185612890565b6133ab6040830184612720565b949350505050565b6000815190506133c2816129a6565b92915050565b6000602082840312156133de576133dd612651565b5b60006133ec848285016133b3565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061342f82612716565b915061343a83612716565b92508282101561344d5761344c6133f5565b5b828203905092915050565b600061346382612716565b915061346e83612716565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134a3576134a26133f5565b5b828201905092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b600061350a602f83612755565b9150613515826134ae565b604082019050919050565b60006020820190508181036000830152613539816134fd565b9050919050565b7f52656465656d3a2063616c6c6572206973206e6f74207468652063726561746f60008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b600061359c602183612755565b91506135a782613540565b604082019050919050565b600060208201905081810360008301526135cb8161358f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061360c82612716565b915061361783612716565b925082613627576136266135d2565b5b828204905092915050565b600061363d82612716565b915061364883612716565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613681576136806133f5565b5b828202905092915050565b60006040820190506136a16000830185612890565b6136ae6020830184612720565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006136ef82612716565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613721576137206133f5565b5b600182019050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613788602c83612755565b91506137938261372c565b604082019050919050565b600060208201905081810360008301526137b78161377b565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061381a602583612755565b9150613825826137be565b604082019050919050565b600060208201905081810360008301526138498161380d565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006138ac602483612755565b91506138b782613850565b604082019050919050565b600060208201905081810360008301526138db8161389f565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061393e603283612755565b9150613949826138e2565b604082019050919050565b6000602082019050818103600083015261396d81613931565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006139aa601983612755565b91506139b582613974565b602082019050919050565b600060208201905081810360008301526139d98161399d565b9050919050565b7f4552433732314d657461646174613a205552492073657420666f72206e6f6e6560008201527f78697374656e7420746f6b656e00000000000000000000000000000000000000602082015250565b6000613a3c602d83612755565b9150613a47826139e0565b604082019050919050565b60006020820190508181036000830152613a6b81613a2f565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613a9982613a72565b613aa38185613a7d565b9350613ab3818560208601612766565b613abc81612799565b840191505092915050565b6000608082019050613adc6000830187612890565b613ae96020830186612890565b613af66040830185612720565b8181036060830152613b088184613a8e565b905095945050505050565b600081519050613b2281612687565b92915050565b600060208284031215613b3e57613b3d612651565b5b6000613b4c84828501613b13565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000613b8b602083612755565b9150613b9682613b55565b602082019050919050565b60006020820190508181036000830152613bba81613b7e565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613bf7601c83612755565b9150613c0282613bc1565b602082019050919050565b60006020820190508181036000830152613c2681613bea565b905091905056fea2646970667358221220e9fa784cf89babf88027e9a108a21788a69f426ac838766306430b5fc12d0e2364736f6c634300080e0033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80637456be7d116100ad578063c6f0577111610071578063c6f0577114610306578063c87b56dd14610322578063db006a7514610352578063e79c28fe1461036e578063e985e9c51461038c57610121565b80637456be7d1461027657806395d89b4114610292578063a22cb465146102b0578063a69bd72c146102cc578063b88d4fde146102ea57610121565b8063095ea7b3116100f4578063095ea7b3146101c257806323b872dd146101de57806342842e0e146101fa5780636352211e1461021657806370a082311461024657610121565b806301ffc9a71461012657806306ef93ad1461015657806306fdde0314610174578063081812fc14610192575b600080fd5b610140600480360381019061013b91906126b3565b6103bc565b60405161014d91906126fb565b60405180910390f35b61015e61049e565b60405161016b919061272f565b60405180910390f35b61017c6104a4565b60405161018991906127e3565b60405180910390f35b6101ac60048036038101906101a79190612831565b610536565b6040516101b9919061289f565b60405180910390f35b6101dc60048036038101906101d791906128e6565b6105bb565b005b6101f860048036038101906101f39190612926565b6106d2565b005b610214600480360381019061020f9190612926565b610732565b005b610230600480360381019061022b9190612831565b610752565b60405161023d919061289f565b60405180910390f35b610260600480360381019061025b9190612979565b610803565b60405161026d919061272f565b60405180910390f35b610290600480360381019061028b9190612831565b6108ba565b005b61029a610bcc565b6040516102a791906127e3565b60405180910390f35b6102ca60048036038101906102c591906129d2565b610c5e565b005b6102d4610c74565b6040516102e1919061272f565b60405180910390f35b61030460048036038101906102ff9190612b47565b610c7a565b005b610320600480360381019061031b9190612c6b565b610cdc565b005b61033c60048036038101906103379190612831565b610dc7565b60405161034991906127e3565b60405180910390f35b61036c60048036038101906103679190612831565b610eba565b005b6103766111ba565b6040516103839190612e7a565b60405180910390f35b6103a660048036038101906103a19190612e9c565b611420565b6040516103b391906126fb565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061048757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104975750610496826114ca565b5b9050919050565b60075481565b6060600080546104b390612f0b565b80601f01602080910402602001604051908101604052809291908181526020018280546104df90612f0b565b801561052c5780601f106105015761010080835404028352916020019161052c565b820191906000526020600020905b81548152906001019060200180831161050f57829003601f168201915b5050505050905090565b600061054182611534565b610580576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057790612fae565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006105c682610752565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062d90613040565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166106556115a0565b73ffffffffffffffffffffffffffffffffffffffff16148061068457506106838161067e6115a0565b611420565b5b6106c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ba906130d2565b60405180910390fd5b6106cd83836115a8565b505050565b6106e36106dd6115a0565b82611661565b610722576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071990613164565b60405180910390fd5b61072d83838361171b565b505050565b61074d83838360405180602001604052806000815250610c7a565b505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f1906131f6565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90613288565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108c381611534565b610902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f99061331a565b60405180910390fd5b6000600f600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506006548173ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610976919061289f565b602060405180830381865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061334f565b10156109c257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd33306006546040518463ffffffff1660e01b8152600401610a019392919061337c565b6020604051808303816000875af1158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4491906133c8565b50600754600654610a559190613424565b600e60008481526020019081526020016000206000828254610a779190613458565b925050819055506000610a8a600b611981565b905060405180606001604052804281526020018481526020013373ffffffffffffffffffffffffffffffffffffffff1681525060106000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050610b7c600d600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633856040518060200160405280600081525061198f565b6009819080600181540180825580915050600190039060005260206000200160009091909190915055806011600085815260200190815260200160002081905550610bc7600b6114b4565b505050565b606060018054610bdb90612f0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0790612f0b565b8015610c545780601f10610c2957610100808354040283529160200191610c54565b820191906000526020600020905b815481529060010190602001808311610c3757829003601f168201915b5050505050905090565b610c70610c696115a0565b83836119eb565b5050565b60065481565b610c8b610c856115a0565b83611661565b610cca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc190613164565b60405180910390fd5b610cd68484848461198f565b50505050565b610ce4611b57565b6000610cf0600a611981565b9050610cfc600a6114b4565b610d0d610d076115a0565b82611b68565b610d178184611b86565b610d1f6115a0565b600d600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600f600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6060610dd282611534565b610e11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0890613520565b60405180910390fd5b6000600c60008481526020019081526020016000208054610e3190612f0b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e5d90612f0b565b8015610eaa5780601f10610e7f57610100808354040283529160200191610eaa565b820191906000526020600020905b815481529060010190602001808311610e8d57829003601f168201915b5050505050905080915050919050565b42600881905550610eca81611534565b610f09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f009061331a565b60405180910390fd5b600d600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610faa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa1906135b2565b60405180910390fd5b6000603c600e600084815260200190815260200160002054610fcc9190613601565b905060006010600060116000868152602001908152602001600020548152602001908152602001600020600001546008546110079190613424565b9050600081836110179190613632565b90506000600f600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050818173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161108b919061289f565b602060405180830381865afa1580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc919061334f565b10156110d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d600088815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b815260040161114592919061368c565b6020604051808303816000875af1158015611164573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118891906133c8565b5081600e600087815260200190815260200160002060008282546111ac9190613424565b925050819055505050505050565b60608060006111c9600a611981565b90506000811115611418578067ffffffffffffffff8111156111ee576111ed612a1c565b5b60405190808252806020026020018201604052801561122757816020015b611214612542565b81526020019060019003908161120c5790505b5091506000600190505b81811015611416576040518060c00160405280828152602001600c6000848152602001908152602001600020805461126890612f0b565b80601f016020809104026020016040519081016040528092919081815260200182805461129490612f0b565b80156112e15780601f106112b6576101008083540402835291602001916112e1565b820191906000526020600020905b8154815290600101906020018083116112c457829003601f168201915b50505050508152602001600d600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016010600060116000868152602001908152602001600020548152602001908152602001600020600001548152602001601060006011600086815260200190815260200160002054815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600e6000848152602001908152602001600020548152508382815181106113f8576113f76136b5565b5b6020026020010181905250808061140e906136e4565b915050611231565b505b819250505090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6001816000016000828254019250508190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661161b83610752565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061166c82611534565b6116ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a29061379e565b60405180910390fd5b6000600d600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161491505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661173b82610752565b73ffffffffffffffffffffffffffffffffffffffff1614611791576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178890613830565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f7906138c2565b60405180910390fd5b61180b838383611bfa565b6118166000826115a8565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118669190613424565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546118bd9190613458565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461197c838383611bff565b505050565b600081600001549050919050565b61199a84848461171b565b6119a684848484611c04565b6119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc90613954565b60405180910390fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a50906139c0565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b4a91906126fb565b60405180910390a3505050565b42600881905550611b66611d8b565b565b611b828282604051806020016040528060008152506120c5565b5050565b611b8f82611534565b611bce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc590613a52565b60405180910390fd5b80600c60008481526020019081526020016000209080519060200190611bf59291906125a4565b505050565b505050565b505050565b6000611c258473ffffffffffffffffffffffffffffffffffffffff16612120565b15611d7e578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611c4e6115a0565b8786866040518563ffffffff1660e01b8152600401611c709493929190613ac7565b6020604051808303816000875af1925050508015611cac57506040513d601f19601f82011682018060405250810190611ca99190613b28565b60015b611d2e573d8060008114611cdc576040519150601f19603f3d011682016040523d82523d6000602084013e611ce1565b606091505b506000815103611d26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1d90613954565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611d83565b600190505b949350505050565b600060098054905067ffffffffffffffff811115611dac57611dab612a1c565b5b604051908082528060200260200182016040528015611dda5781602001602082028036833780820191505090505b50905060005b600980549050811015611f095760006010600060098481548110611e0757611e066136b5565b5b9060005260206000200154815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050603c8160000151600854611eab9190613424565b1015611eb75750611f09565b60098281548110611ecb57611eca6136b5565b5b9060005260206000200154838381518110611ee957611ee86136b5565b5b602002602001018181525050508080611f01906136e4565b915050611de0565b5060005b81518110156120c1576000828281518110611f2b57611f2a6136b5565b5b602002602001015111156120ae57600060106000848481518110611f5257611f516136b5565b5b6020026020010151815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050611ff181602001518260400151612143565b60106000848481518110612008576120076136b5565b5b6020026020010151815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600960008154811061206d5761206c6136b5565b5b906000526020600020016000905560116000848481518110612092576120916136b5565b5b6020026020010151815260200190815260200160002060009055505b80806120b9906136e4565b915050611f0d565b5050565b6120cf8383612369565b6120dc6000848484611c04565b61211b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211290613954565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000600f600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600e6000848152602001908152602001600020548173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016121c8919061289f565b602060405180830381865afa1580156121e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612209919061334f565b101561221457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600e6000878152602001908152602001600020546040518363ffffffff1660e01b815260040161229592919061368c565b6020604051808303816000875af11580156122b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d891906133c8565b50600e600084815260200190815260200160002054600e6000858152602001908152602001600020600082825461230f9190613424565b9250508190555061236482600d600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518060200160405280600081525061198f565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cf90613ba1565b60405180910390fd5b6123e181611534565b15612421576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241890613c0d565b60405180910390fd5b61242d60008383611bfa565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461247d9190613458565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461253e60008383611bff565b5050565b6040518060c001604052806000815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b8280546125b090612f0b565b90600052602060002090601f0160209004810192826125d25760008555612619565b82601f106125eb57805160ff1916838001178555612619565b82800160010185558215612619579182015b828111156126185782518255916020019190600101906125fd565b5b509050612626919061262a565b5090565b5b8082111561264357600081600090555060010161262b565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6126908161265b565b811461269b57600080fd5b50565b6000813590506126ad81612687565b92915050565b6000602082840312156126c9576126c8612651565b5b60006126d78482850161269e565b91505092915050565b60008115159050919050565b6126f5816126e0565b82525050565b600060208201905061271060008301846126ec565b92915050565b6000819050919050565b61272981612716565b82525050565b60006020820190506127446000830184612720565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612784578082015181840152602081019050612769565b83811115612793576000848401525b50505050565b6000601f19601f8301169050919050565b60006127b58261274a565b6127bf8185612755565b93506127cf818560208601612766565b6127d881612799565b840191505092915050565b600060208201905081810360008301526127fd81846127aa565b905092915050565b61280e81612716565b811461281957600080fd5b50565b60008135905061282b81612805565b92915050565b60006020828403121561284757612846612651565b5b60006128558482850161281c565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006128898261285e565b9050919050565b6128998161287e565b82525050565b60006020820190506128b46000830184612890565b92915050565b6128c38161287e565b81146128ce57600080fd5b50565b6000813590506128e0816128ba565b92915050565b600080604083850312156128fd576128fc612651565b5b600061290b858286016128d1565b925050602061291c8582860161281c565b9150509250929050565b60008060006060848603121561293f5761293e612651565b5b600061294d868287016128d1565b935050602061295e868287016128d1565b925050604061296f8682870161281c565b9150509250925092565b60006020828403121561298f5761298e612651565b5b600061299d848285016128d1565b91505092915050565b6129af816126e0565b81146129ba57600080fd5b50565b6000813590506129cc816129a6565b92915050565b600080604083850312156129e9576129e8612651565b5b60006129f7858286016128d1565b9250506020612a08858286016129bd565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a5482612799565b810181811067ffffffffffffffff82111715612a7357612a72612a1c565b5b80604052505050565b6000612a86612647565b9050612a928282612a4b565b919050565b600067ffffffffffffffff821115612ab257612ab1612a1c565b5b612abb82612799565b9050602081019050919050565b82818337600083830152505050565b6000612aea612ae584612a97565b612a7c565b905082815260208101848484011115612b0657612b05612a17565b5b612b11848285612ac8565b509392505050565b600082601f830112612b2e57612b2d612a12565b5b8135612b3e848260208601612ad7565b91505092915050565b60008060008060808587031215612b6157612b60612651565b5b6000612b6f878288016128d1565b9450506020612b80878288016128d1565b9350506040612b918782880161281c565b925050606085013567ffffffffffffffff811115612bb257612bb1612656565b5b612bbe87828801612b19565b91505092959194509250565b600067ffffffffffffffff821115612be557612be4612a1c565b5b612bee82612799565b9050602081019050919050565b6000612c0e612c0984612bca565b612a7c565b905082815260208101848484011115612c2a57612c29612a17565b5b612c35848285612ac8565b509392505050565b600082601f830112612c5257612c51612a12565b5b8135612c62848260208601612bfb565b91505092915050565b60008060408385031215612c8257612c81612651565b5b600083013567ffffffffffffffff811115612ca057612c9f612656565b5b612cac85828601612c3d565b9250506020612cbd858286016128d1565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612cfc81612716565b82525050565b600082825260208201905092915050565b6000612d1e8261274a565b612d288185612d02565b9350612d38818560208601612766565b612d4181612799565b840191505092915050565b612d558161287e565b82525050565b600060c083016000830151612d736000860182612cf3565b5060208301518482036020860152612d8b8282612d13565b9150506040830151612da06040860182612d4c565b506060830151612db36060860182612cf3565b506080830151612dc66080860182612d4c565b5060a0830151612dd960a0860182612cf3565b508091505092915050565b6000612df08383612d5b565b905092915050565b6000602082019050919050565b6000612e1082612cc7565b612e1a8185612cd2565b935083602082028501612e2c85612ce3565b8060005b85811015612e685784840389528151612e498582612de4565b9450612e5483612df8565b925060208a01995050600181019050612e30565b50829750879550505050505092915050565b60006020820190508181036000830152612e948184612e05565b905092915050565b60008060408385031215612eb357612eb2612651565b5b6000612ec1858286016128d1565b9250506020612ed2858286016128d1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612f2357607f821691505b602082108103612f3657612f35612edc565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000612f98602c83612755565b9150612fa382612f3c565b604082019050919050565b60006020820190508181036000830152612fc781612f8b565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b600061302a602183612755565b915061303582612fce565b604082019050919050565b600060208201905081810360008301526130598161301d565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006130bc603883612755565b91506130c782613060565b604082019050919050565b600060208201905081810360008301526130eb816130af565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b600061314e603183612755565b9150613159826130f2565b604082019050919050565b6000602082019050818103600083015261317d81613141565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006131e0602983612755565b91506131eb82613184565b604082019050919050565b6000602082019050818103600083015261320f816131d3565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613272602a83612755565b915061327d82613216565b604082019050919050565b600060208201905081810360008301526132a181613265565b9050919050565b7f4552433732313a2072656e7420717565727920666f72206e6f6e65786973746560008201527f6e7420746f6b656e000000000000000000000000000000000000000000000000602082015250565b6000613304602883612755565b915061330f826132a8565b604082019050919050565b60006020820190508181036000830152613333816132f7565b9050919050565b60008151905061334981612805565b92915050565b60006020828403121561336557613364612651565b5b60006133738482850161333a565b91505092915050565b60006060820190506133916000830186612890565b61339e6020830185612890565b6133ab6040830184612720565b949350505050565b6000815190506133c2816129a6565b92915050565b6000602082840312156133de576133dd612651565b5b60006133ec848285016133b3565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061342f82612716565b915061343a83612716565b92508282101561344d5761344c6133f5565b5b828203905092915050565b600061346382612716565b915061346e83612716565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134a3576134a26133f5565b5b828201905092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b600061350a602f83612755565b9150613515826134ae565b604082019050919050565b60006020820190508181036000830152613539816134fd565b9050919050565b7f52656465656d3a2063616c6c6572206973206e6f74207468652063726561746f60008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b600061359c602183612755565b91506135a782613540565b604082019050919050565b600060208201905081810360008301526135cb8161358f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061360c82612716565b915061361783612716565b925082613627576136266135d2565b5b828204905092915050565b600061363d82612716565b915061364883612716565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613681576136806133f5565b5b828202905092915050565b60006040820190506136a16000830185612890565b6136ae6020830184612720565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006136ef82612716565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613721576137206133f5565b5b600182019050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613788602c83612755565b91506137938261372c565b604082019050919050565b600060208201905081810360008301526137b78161377b565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061381a602583612755565b9150613825826137be565b604082019050919050565b600060208201905081810360008301526138498161380d565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006138ac602483612755565b91506138b782613850565b604082019050919050565b600060208201905081810360008301526138db8161389f565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061393e603283612755565b9150613949826138e2565b604082019050919050565b6000602082019050818103600083015261396d81613931565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006139aa601983612755565b91506139b582613974565b602082019050919050565b600060208201905081810360008301526139d98161399d565b9050919050565b7f4552433732314d657461646174613a205552492073657420666f72206e6f6e6560008201527f78697374656e7420746f6b656e00000000000000000000000000000000000000602082015250565b6000613a3c602d83612755565b9150613a47826139e0565b604082019050919050565b60006020820190508181036000830152613a6b81613a2f565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613a9982613a72565b613aa38185613a7d565b9350613ab3818560208601612766565b613abc81612799565b840191505092915050565b6000608082019050613adc6000830187612890565b613ae96020830186612890565b613af66040830185612720565b8181036060830152613b088184613a8e565b905095945050505050565b600081519050613b2281612687565b92915050565b600060208284031215613b3e57613b3d612651565b5b6000613b4c84828501613b13565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000613b8b602083612755565b9150613b9682613b55565b602082019050919050565b60006020820190508181036000830152613bba81613b7e565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613bf7601c83612755565b9150613c0282613bc1565b602082019050919050565b60006020820190508181036000830152613c2681613bea565b905091905056fea2646970667358221220e9fa784cf89babf88027e9a108a21788a69f426ac838766306430b5fc12d0e2364736f6c634300080e0033