Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 139 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stop Sale | 13330367 | 1149 days ago | IN | 0 ETH | 0.00236236 | ||||
Purchase NFT | 13330332 | 1149 days ago | IN | 0.4 ETH | 0.01247542 | ||||
Purchase NFT | 13329879 | 1150 days ago | IN | 0.2 ETH | 0.00771442 | ||||
Purchase NFT | 13329856 | 1150 days ago | IN | 0.267 ETH | 0.01182301 | ||||
Purchase NFT | 13329741 | 1150 days ago | IN | 1 ETH | 0.02214816 | ||||
Purchase NFT | 13329737 | 1150 days ago | IN | 1.335 ETH | 0.01591338 | ||||
Purchase NFT | 13329669 | 1150 days ago | IN | 0.2 ETH | 0.01445441 | ||||
Purchase NFT | 13329658 | 1150 days ago | IN | 0.267 ETH | 0.01442107 | ||||
Purchase NFT | 13329550 | 1150 days ago | IN | 0.2 ETH | 0.0270526 | ||||
Purchase NFT | 13329533 | 1150 days ago | IN | 0.267 ETH | 0.02303665 | ||||
Purchase NFT | 13329148 | 1150 days ago | IN | 0.2 ETH | 0.01685232 | ||||
Purchase NFT | 13329141 | 1150 days ago | IN | 0.267 ETH | 0.01693618 | ||||
Purchase NFT | 13329137 | 1150 days ago | IN | 0.267 ETH | 0.01320829 | ||||
Purchase NFT | 13329128 | 1150 days ago | IN | 0.2 ETH | 0.0097864 | ||||
Purchase NFT | 13329124 | 1150 days ago | IN | 0.267 ETH | 0.01107598 | ||||
Purchase NFT | 13329116 | 1150 days ago | IN | 0.2 ETH | 0.0139585 | ||||
Purchase NFT | 13329112 | 1150 days ago | IN | 0.267 ETH | 0.01904148 | ||||
Purchase NFT | 13329110 | 1150 days ago | IN | 0.267 ETH | 0.0137405 | ||||
Purchase NFT | 13329089 | 1150 days ago | IN | 0.267 ETH | 0.01469151 | ||||
Purchase NFT | 13329081 | 1150 days ago | IN | 0.2 ETH | 0.01743586 | ||||
Purchase NFT | 13329081 | 1150 days ago | IN | 0.2 ETH | 0.01751012 | ||||
Purchase NFT | 13329076 | 1150 days ago | IN | 0.267 ETH | 0.02114993 | ||||
Purchase NFT | 13328661 | 1150 days ago | IN | 0.2 ETH | 0.01014491 | ||||
Purchase NFT | 13328658 | 1150 days ago | IN | 0.267 ETH | 0.00953838 | ||||
Purchase NFT | 13328545 | 1150 days ago | IN | 0.2 ETH | 0.02745918 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
13330332 | 1149 days ago | 0.4 ETH | ||||
13329879 | 1150 days ago | 0.2 ETH | ||||
13329856 | 1150 days ago | 0.267 ETH | ||||
13329741 | 1150 days ago | 1 ETH | ||||
13329737 | 1150 days ago | 1.335 ETH | ||||
13329669 | 1150 days ago | 0.2 ETH | ||||
13329658 | 1150 days ago | 0.267 ETH | ||||
13329550 | 1150 days ago | 0.2 ETH | ||||
13329533 | 1150 days ago | 0.267 ETH | ||||
13329148 | 1150 days ago | 0.2 ETH | ||||
13329141 | 1150 days ago | 0.267 ETH | ||||
13329137 | 1150 days ago | 0.267 ETH | ||||
13329128 | 1150 days ago | 0.2 ETH | ||||
13329124 | 1150 days ago | 0.267 ETH | ||||
13329116 | 1150 days ago | 0.2 ETH | ||||
13329112 | 1150 days ago | 0.267 ETH | ||||
13329110 | 1150 days ago | 0.267 ETH | ||||
13329089 | 1150 days ago | 0.267 ETH | ||||
13329081 | 1150 days ago | 0.2 ETH | ||||
13329081 | 1150 days ago | 0.2 ETH | ||||
13329076 | 1150 days ago | 0.267 ETH | ||||
13328661 | 1150 days ago | 0.2 ETH | ||||
13328658 | 1150 days ago | 0.267 ETH | ||||
13328545 | 1150 days ago | 0.2 ETH | ||||
13328534 | 1150 days ago | 0.2 ETH |
Loading...
Loading
Contract Name:
BondlyLaunchPad
Compiler Version
v0.7.3+commit.9bfce1f6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.3; ///////////////////////////////////////////////// // ____ _ _ // // | __ ) ___ _ __ __| | | | _ _ // // | _ \ / _ \ | '_ \ / _` | | | | | | | // // | |_) | | (_) | | | | | | (_| | | | | |_| | // // |____/ \___/ |_| |_| \__,_| |_| \__, | // // |___/ // ///////////////////////////////////////////////// import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol"; contract BondlyLaunchPad is Ownable { using Strings for string; using SafeMath for uint256; using Address for address; using SafeERC20 for ERC20; uint256 public _currentCardId = 0; address payable public _salesperson; bool public _saleStarted = false; address public bccg1Address; address public bccg2Address; uint256[] public bccg1Ids; uint256[] public bccg2Ids; uint256[] times; uint256[] limitsPerWallet; uint8[] tiers; struct Card { uint256 cardId; uint256 tokenId; uint256 totalAmount; uint256 currentAmount; uint256 basePrice; address contractAddress; address paymentToken; bool isFinished; } struct History { mapping(uint256 => mapping(address => uint8)) purchasedHistories; // tokenId -> wallet -> amount } // Events event CreateCard( address indexed _from, uint256 _cardId, address indexed _contractAddress, uint256 _tokenId, uint256 _totalAmount, uint256 _basePrice ); event PurchaseCard(address indexed _from, uint256 _cardId, uint256 _amount); event CardChanged(uint256 _cardId); mapping(uint256 => Card) public _cards; mapping(address => bool) public _blacklist; mapping(address => uint8) public _whitelist; // wallet -> whitelistLevel // whitelist level | Priority // 0: public sale | /\ // 1: selected winners | || // 2: bronze | || // 3: silver | || // 4: gold | || // 5: platinum | || mapping(address => History) private _history; constructor() { _salesperson = msg.sender; bccg1Address = 0x8280D56Ac92b5bFF058d60c99932FDEcDCc9441a; bccg2Address = 0xe3782B8688ad2b0D5ba42842d400F7AdF310F88d; bccg1Ids = [1, 2, 5, 6, 7, 8, 9, 11, 13, 14, 15, 16, 17, 18, 19]; bccg2Ids = [1, 2, 3, 4, 5, 10, 12, 13, 15, 19, 20, 21, 24, 25, 27, 28, 29, 33, 34]; } function setSalesPerson(address payable newSalesPerson) external onlyOwner { _salesperson = newSalesPerson; } function setBCCG1Address(address addr) external onlyOwner { bccg1Address = addr; } function setBCCG2Address(address addr) external onlyOwner { bccg2Address = addr; } function setBCCG1Ids(uint256[] calldata ids) external onlyOwner { bccg1Ids = ids; } function setBCCG2Ids(uint256[] calldata ids) external onlyOwner{ bccg2Ids = ids; } function startSale() external onlyOwner { _saleStarted = true; } function stopSale() external onlyOwner { _saleStarted = false; } function createCard( address _contractAddress, uint256 _tokenId, uint256 _totalAmount, address _paymentTokenAddress, uint256 _basePrice ) external onlyOwner { IERC1155 _contract = IERC1155(_contractAddress); require( _contract.balanceOf(_salesperson, _tokenId) >= _totalAmount, "Initial supply cannot be more than available supply" ); require( _contract.isApprovedForAll(_salesperson, address(this)) == true, "Contract must be whitelisted by owner" ); uint256 _id = _getNextCardID(); _incrementCardId(); Card memory _newCard; _newCard.cardId = _id; _newCard.contractAddress = _contractAddress; _newCard.tokenId = _tokenId; _newCard.totalAmount = _totalAmount; _newCard.currentAmount = _totalAmount; _newCard.basePrice = _basePrice; _newCard.paymentToken = _paymentTokenAddress; _newCard.isFinished = false; _cards[_id] = _newCard; emit CreateCard( msg.sender, _id, _contractAddress, _tokenId, _totalAmount, _basePrice ); } function isEligbleToBuy(uint256 _cardId) public view returns (uint256) { if (_blacklist[msg.sender] == true) return 0; if (_saleStarted == false) return 0; Card memory _currentCard = _cards[_cardId]; if (times.length == 0) return 0; uint8 tier = getWhitelistTier(msg.sender); for (uint256 i = 0; i < times.length; i++) { if ( block.timestamp >= times[i] && tier == tiers[i] ) { if(tier == 1){ if(! meetsBCCGRequirement(msg.sender)){ return 0; } } History storage _currentHistory = _history[_currentCard.contractAddress]; uint256 _currentBoughtAmount = _currentHistory.purchasedHistories[_currentCard.tokenId][ msg.sender ]; uint256 _limitPerWallet = getLimitPerWallet(_cardId); if (_currentBoughtAmount >= _limitPerWallet) return 0; if ( _currentCard.currentAmount <= _limitPerWallet.sub(_currentBoughtAmount) ) return _currentCard.currentAmount; return _limitPerWallet.sub(_currentBoughtAmount); } } return 0; } function purchaseNFT(uint256 _cardId, uint256 _amount) external payable { require(_blacklist[msg.sender] == false, "you are blocked"); require(_saleStarted == true, "Sale stopped"); Card memory _currentCard = _cards[_cardId]; require(_currentCard.isFinished == false, "Card is finished"); uint8 currentTier = getWhitelistTier(msg.sender); uint256 startTime; for (uint256 i = 0; i < tiers.length; i++) { if (tiers[i] == currentTier) { startTime = times[i]; } } require( startTime != 0 && startTime <= block.timestamp, "wait for sale start" ); if(currentTier == 1){ require(meetsBCCGRequirement(msg.sender),"Must own a qualifying BCCG card"); } IERC1155 _nftContract = IERC1155(_currentCard.contractAddress); require( _currentCard.currentAmount >= _amount, "Order exceeds the max number of available NFTs" ); History storage _currentHistory = _history[_currentCard.contractAddress]; uint256 _currentBoughtAmount = _currentHistory.purchasedHistories[_currentCard.tokenId][ msg.sender ]; uint256 _limitPerWallet = getLimitPerWallet(_cardId); require( _currentBoughtAmount < _limitPerWallet, "Order exceeds the max limit of NFTs per wallet" ); uint256 availableAmount = _limitPerWallet.sub(_currentBoughtAmount); if (availableAmount > _amount) { availableAmount = _amount; } uint256 _price = _currentCard.basePrice.mul(availableAmount); require( _currentCard.paymentToken == address(0) || ERC20(_currentCard.paymentToken).allowance( msg.sender, address(this) ) >= _price, "Need to Approve payment" ); if (_currentCard.paymentToken == address(0)) { require(msg.value >= _price, "Not enough funds to purchase"); uint256 overPrice = msg.value - _price; _salesperson.transfer(_price); if (overPrice > 0) msg.sender.transfer(overPrice); } else { ERC20(_currentCard.paymentToken).transferFrom( msg.sender, _salesperson, _price ); } _nftContract.safeTransferFrom( _salesperson, msg.sender, _currentCard.tokenId, availableAmount, "" ); _cards[_cardId].currentAmount = _cards[_cardId].currentAmount.sub( availableAmount ); _currentHistory.purchasedHistories[_currentCard.tokenId][ msg.sender ] = uint8(_currentBoughtAmount.add(availableAmount)); emit PurchaseCard(msg.sender, _cardId, availableAmount); } function meetsBCCGRequirement(address addr) public view returns (bool){ address[] memory bccg1Addrs = new address[](bccg1Ids.length); for(uint256 i = 0; i < bccg1Addrs.length; i++){ bccg1Addrs[i] = addr; } IERC1155 bccg1 = IERC1155(bccg1Address); uint256[] memory bccg1Quantities = bccg1.balanceOfBatch(bccg1Addrs, bccg1Ids); for(uint256 i = 0; i < bccg1Quantities.length; i++){ if(bccg1Quantities[i] > 0){ return true; } } address[] memory bccg2Addrs = new address[](bccg2Ids.length); for(uint256 i = 0; i < bccg2Addrs.length; i++){ bccg2Addrs[i] = addr; } IERC1155 bccg2 = IERC1155(bccg2Address); uint256[] memory bccg2Quantities = bccg2.balanceOfBatch(bccg2Addrs, bccg2Ids); for(uint256 i = 0; i < bccg2Quantities.length; i++){ if(bccg2Quantities[i] > 0){ return true; } } return false; } function _getNextCardID() private view returns (uint256) { return _currentCardId.add(1); } function _incrementCardId() private { _currentCardId++; } function cancelCard(uint256 _cardId) external onlyOwner { _cards[_cardId].isFinished = true; emit CardChanged(_cardId); } function _setTier( uint8 _tier, uint256 _startTime, uint256 _limitPerWallet ) private { for (uint256 i = 0; i < tiers.length; i++) { if (tiers[i] == _tier) { times[i] = _startTime; limitsPerWallet[i] = _limitPerWallet; return; } } tiers.push(_tier); times.push(_startTime); limitsPerWallet.push(_limitPerWallet); } function setTier( uint8 _tier, uint256 _startTime, uint256 _limitPerWallet ) external onlyOwner { _setTier(_tier, _startTime, _limitPerWallet); } function setTiers( uint8[] calldata _tiers, uint256[] calldata _startTimes, uint256[] calldata _limitsPerWallet ) external onlyOwner{ require(_tiers.length == _startTimes.length && _tiers.length == _limitsPerWallet.length, "Input array lengths mismatch"); for(uint256 i = 0; i < _tiers.length; i++){ _setTier(_tiers[i], _startTimes[i], _limitsPerWallet[i]); } } function resumeCard(uint256 _cardId) external onlyOwner { _cards[_cardId].isFinished = false; emit CardChanged(_cardId); } function setCardPrice(uint256 _cardId, uint256 _newPrice) external onlyOwner returns (bool) { _cards[_cardId].basePrice = _newPrice; emit CardChanged(_cardId); } function setCardPaymentToken(uint256 _cardId, address _newAddr) external onlyOwner returns (bool) { _cards[_cardId].paymentToken = _newAddr; emit CardChanged(_cardId); } function addBlackListAddress(address addr) external onlyOwner { _blacklist[addr] = true; } function batchAddBlackListAddress(address[] calldata addr) external onlyOwner { for (uint256 i = 0; i < addr.length; i++) { _blacklist[addr[i]] = true; } } function removeBlackListAddress(address addr) external onlyOwner { _blacklist[addr] = false; } function batchRemoveBlackListAddress(address[] calldata addr) external onlyOwner { for (uint256 i = 0; i < addr.length; i++) { _blacklist[addr[i]] = false; } } function addWhiteListAddress( address _addr, uint8 _tier ) external onlyOwner { _whitelist[_addr] = _tier; } function batchAddWhiteListAddress( address[] calldata _addr, uint8 _tier ) external onlyOwner { for (uint256 i = 0; i < _addr.length; i++) { _whitelist[_addr[i]] = _tier; } } function getLimitPerWallet(uint256 _cardId) public view returns(uint256){ uint256 limit = 0; uint256 latestStartTime = 0; for(uint256 i = 0; i < tiers.length; i++){ if(times[i] <= block.timestamp && times[i] > latestStartTime){ limit = limitsPerWallet[i]; latestStartTime = times[i]; } } return limit; } function getWhitelistTier(address addr) public view returns(uint8){ uint8 tier = _whitelist[addr]; if(tier != 0){ return tier; } for (uint256 i = 0; i < tiers.length; i++) { if (tiers[i] == 0) { if(block.timestamp >= times[i]){ return 0; } } } return 1; } function isCardCompleted(uint256 _cardId) public view returns (bool) { return _cards[_cardId].isFinished; } function isCardFree(uint256 _cardId) public view returns (bool) { return _cards[_cardId].basePrice == 0; } function getCardContract(uint256 _cardId) public view returns (address) { return _cards[_cardId].contractAddress; } function getCardPaymentContract(uint256 _cardId) public view returns (address) { return _cards[_cardId].paymentToken; } function getCardTokenId(uint256 _cardId) public view returns (uint256) { return _cards[_cardId].tokenId; } function getCardTimes(uint256 _cardId) public view returns (uint8[] memory, uint256[] memory) { return (tiers, times); } function getCardTime(uint256 _cardId, uint8 _tier) public view returns (uint256) { for(uint256 i = 0; i < tiers.length; i++){ if(tiers[i] == _tier){ return times[i]; } } return 0; } function getCardLimitPerWallet(uint256 _cardId, uint8 _tier) public view returns (uint256) { for(uint256 i = 0; i < tiers.length; i++){ if(tiers[i] == _tier){ return limitsPerWallet[i]; } } return 0; } function getCardTotalAmount(uint256 _cardId) public view returns (uint256) { return _cards[_cardId].totalAmount; } function getCardCurrentAmount(uint256 _cardId) public view returns (uint256) { return _cards[_cardId].currentAmount; } function getAllCardsPerContract(address _contractAddr) public view returns (uint256[] memory, uint256[] memory) { uint256 count; for (uint256 i = 1; i <= _currentCardId; i++) { if (_cards[i].contractAddress == _contractAddr) { count++; } } uint256[] memory cardIds = new uint256[](count); uint256[] memory tokenIds = new uint256[](count); count = 0; for (uint256 i = 1; i <= _currentCardId; i++) { if (_cards[i].contractAddress == _contractAddr) { cardIds[count] = i; tokenIds[count] = _cards[i].tokenId; count++; } } return (cardIds, tokenIds); } function getActiveCardsPerContract(address _contractAddr) public view returns (uint256[] memory, uint256[] memory) { uint256 count; for (uint256 i = 1; i <= _currentCardId; i++) { if ( _cards[i].contractAddress == _contractAddr && _cards[i].isFinished == false ) { count++; } } uint256[] memory cardIds = new uint256[](count); uint256[] memory tokenIds = new uint256[](count); count = 0; for (uint256 i = 1; i <= _currentCardId; i++) { if ( _cards[i].contractAddress == _contractAddr && _cards[i].isFinished == false ) { cardIds[count] = i; tokenIds[count] = _cards[i].tokenId; count++; } } return (cardIds, tokenIds); } function getClosedCardsPerContract(address _contractAddr) public view returns (uint256[] memory, uint256[] memory) { uint256 count; for (uint256 i = 1; i <= _currentCardId; i++) { if ( _cards[i].contractAddress == _contractAddr && _cards[i].isFinished ) { count++; } } uint256[] memory cardIds = new uint256[](count); uint256[] memory tokenIds = new uint256[](count); count = 0; for (uint256 i = 1; i <= _currentCardId; i++) { if ( _cards[i].contractAddress == _contractAddr && _cards[i].isFinished ) { cardIds[count] = i; tokenIds[count] = _cards[i].tokenId; count++; } } return (cardIds, tokenIds); } function getCardBasePrice(uint256 _cardId) public view returns (uint256) { return _cards[_cardId].basePrice; } function getCardURL(uint256 _cardId) public view returns (string memory) { return IERC1155MetadataURI(_cards[_cardId].contractAddress).uri( _cards[_cardId].tokenId ); } function collect(address _token) external onlyOwner { if (_token == address(0)) { msg.sender.transfer(address(this).balance); } else { uint256 amount = ERC20(_token).balanceOf(address(this)); ERC20(_token).transfer(msg.sender, amount); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.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 guidelines: functions revert instead * of 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 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 {_setupDecimals} is * called. * * 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 returns (uint8) { return _decimals; } /** * @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: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, 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}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), 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}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); 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) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(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) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is 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: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, 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: * * - `to` 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 = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(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); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(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 Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @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 to 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 { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "./IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"CardChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_cardId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_basePrice","type":"uint256"}],"name":"CreateCard","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_cardId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"PurchaseCard","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_blacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_cards","outputs":[{"internalType":"uint256","name":"cardId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"currentAmount","type":"uint256"},{"internalType":"uint256","name":"basePrice","type":"uint256"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"bool","name":"isFinished","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_currentCardId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_salesperson","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_whitelist","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addBlackListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"addWhiteListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addr","type":"address[]"}],"name":"batchAddBlackListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addr","type":"address[]"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"batchAddWhiteListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addr","type":"address[]"}],"name":"batchRemoveBlackListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bccg1Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bccg1Ids","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bccg2Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bccg2Ids","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"cancelCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_totalAmount","type":"uint256"},{"internalType":"address","name":"_paymentTokenAddress","type":"address"},{"internalType":"uint256","name":"_basePrice","type":"uint256"}],"name":"createCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddr","type":"address"}],"name":"getActiveCardsPerContract","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddr","type":"address"}],"name":"getAllCardsPerContract","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardBasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardCurrentAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"getCardLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardPaymentContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"uint8","name":"_tier","type":"uint8"}],"name":"getCardTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardTimes","outputs":[{"internalType":"uint8[]","name":"","type":"uint8[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardTotalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getCardURL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddr","type":"address"}],"name":"getClosedCardsPerContract","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"getLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getWhitelistTier","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"isCardCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"isCardFree","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"isEligbleToBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"meetsBCCGRequirement","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"purchaseNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeBlackListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"resumeCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBCCG1Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"setBCCG1Ids","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBCCG2Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"setBCCG2Ids","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"address","name":"_newAddr","type":"address"}],"name":"setCardPaymentToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cardId","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setCardPrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newSalesPerson","type":"address"}],"name":"setSalesPerson","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_limitPerWallet","type":"uint256"}],"name":"setTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"_tiers","type":"uint8[]"},{"internalType":"uint256[]","name":"_startTimes","type":"uint256[]"},{"internalType":"uint256[]","name":"_limitsPerWallet","type":"uint256[]"}],"name":"setTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006001556002805460ff60a01b191690553480156200002357600080fd5b5060006200003062000205565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b031990811633178255600380548216738280d56ac92b5bff058d60c99932fdecdcc9441a1790556004805490911673e3782b8688ad2b0d5ba42842d400f7adf310f88d179055604080516101e08101825260018152602081019290925260059082018190526006606083015260076080830152600860a0830152600960c0830152600b60e0830152600d610100830152600e610120830152600f61014083018190526010610160840152601161018084015260126101a084015260136101c084015262000153929062000209565b50604080516102608101825260018152600260208201526003918101919091526004606082015260056080820152600a60a0820152600c60c0820152600d60e0820152600f6101008201526013610120820181905260146101408301526015610160830152601861018083015260196101a0830152601b6101c0830152601c6101e0830152601d61020083015260216102208301526022610240830152620001fe9160069162000209565b5062000275565b3390565b8280548282559060005260206000209081019282156200024c579160200282015b828111156200024c578251829060ff169055916020019190600101906200022a565b506200025a9291506200025e565b5090565b5b808211156200025a57600081556001016200025f565b613f9580620002856000396000f3fe6080604052600436106103345760003560e01c806395e00e20116101ab578063ba873286116100f7578063e36b0b3711610095578063f3e74dff1161006f578063f3e74dff14610f68578063f5214e0a14610f9b578063f7eaff4914610fce578063f89fd4081461100157610334565b8063e36b0b3714610ea5578063f2fde38b14610eba578063f338228e14610eed57610334565b8063cac16334116100d1578063cac1633414610d78578063cfdb63ac14610dab578063d96e83d614610df4578063e1c3685914610e2757610334565b8063ba87328614610cf1578063c0a6011d14610d1b578063c6e374db14610d4557610334565b8063a6b3c1d011610164578063b18fc1671161013e578063b18fc16714610c19578063b66a0e5d14610c4c578063b7335fa814610c61578063b8e31b0314610c7657610334565b8063a6b3c1d014610ba2578063ad4451a314610bcc578063aff9988014610bef57610334565b806395e00e2014610a8b57806397071cda14610ab55780639d40432d14610adf578063a0baeec314610b12578063a1d33a1114610b45578063a20623ce14610b6f57610334565b806336ac9a151161028557806364958678116102235780637eb83699116101fd5780637eb836991461096b57806387c348bf146109955780638da5cb5b146109aa57806393315791146109bf57610334565b806364958678146107c0578063715018a61461083b5780637197ac651461085057610334565b80634a3f6ecd1161025f5780634a3f6ecd146107035780634b88ac0b1461073357806354cba6071461075d5780635a05ae501461078757610334565b806336ac9a15146106485780633ad603161461069757806345b71315146106d057610334565b80631e1fd2a4116102f25780632ed2a185116102cc5780632ed2a185146105a15780632f8a82cb146105df5780633387ab1d1461060957806335903d851461063357610334565b80631e1fd2a4146104e05780632812920d146104f55780632cbf61961461052857610334565b806205db131461033957806304f0e69c1461037757806306ec16f8146103a85780630ba6b6fd146103db57806312e013631461041757806316ad033314610441575b600080fd5b34801561034557600080fd5b506103756004803603604081101561035c57600080fd5b5080356001600160a01b0316906020013560ff1661107c565b005b34801561038357600080fd5b5061038c61110b565b604080516001600160a01b039092168252519081900360200190f35b3480156103b457600080fd5b50610375600480360360208110156103cb57600080fd5b50356001600160a01b031661111a565b3480156103e757600080fd5b50610405600480360360208110156103fe57600080fd5b50356112bb565b60408051918252519081900360200190f35b34801561042357600080fd5b5061038c6004803603602081101561043a57600080fd5b50356112d3565b34801561044d57600080fd5b5061046b6004803603602081101561046457600080fd5b50356112f1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104a557818101518382015260200161048d565b50505050905090810190601f1680156104d25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ec57600080fd5b50610405611444565b34801561050157600080fd5b506103756004803603602081101561051857600080fd5b50356001600160a01b031661144a565b34801561053457600080fd5b506105526004803603602081101561054b57600080fd5b50356114d0565b60408051988952602089019790975287870195909552606087019390935260808601919091526001600160a01b0390811660a08601521660c0840152151560e083015251908190036101000190f35b3480156105ad57600080fd5b506105cb600480360360208110156105c457600080fd5b5035611526565b604080519115158252519081900360200190f35b3480156105eb57600080fd5b506104056004803603602081101561060257600080fd5b5035611545565b34801561061557600080fd5b506105cb6004803603602081101561062c57600080fd5b503561155a565b34801561063f57600080fd5b5061038c611570565b34801561065457600080fd5b50610375600480360360a081101561066b57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135909116906080013561157f565b3480156106a357600080fd5b50610375600480360360608110156106ba57600080fd5b5060ff8135169060208101359060400135611888565b3480156106dc57600080fd5b506105cb600480360360208110156106f357600080fd5b50356001600160a01b03166118fa565b34801561070f57600080fd5b506105cb6004803603604081101561072657600080fd5b5080359060200135611dc9565b34801561073f57600080fd5b506103756004803603602081101561075657600080fd5b5035611e6a565b34801561076957600080fd5b506104056004803603602081101561078057600080fd5b5035611f14565b34801561079357600080fd5b506105cb600480360360408110156107aa57600080fd5b50803590602001356001600160a01b0316611f32565b3480156107cc57600080fd5b50610375600480360360208110156107e357600080fd5b810190602081018135600160201b8111156107fd57600080fd5b82018360208201111561080f57600080fd5b803590602001918460208302840111600160201b8311171561083057600080fd5b509092509050611fe9565b34801561084757600080fd5b506103756120a1565b34801561085c57600080fd5b506103756004803603606081101561087357600080fd5b810190602081018135600160201b81111561088d57600080fd5b82018360208201111561089f57600080fd5b803590602001918460208302840111600160201b831117156108c057600080fd5b919390929091602081019035600160201b8111156108dd57600080fd5b8201836020820111156108ef57600080fd5b803590602001918460208302840111600160201b8311171561091057600080fd5b919390929091602081019035600160201b81111561092d57600080fd5b82018360208201111561093f57600080fd5b803590602001918460208302840111600160201b8311171561096057600080fd5b50909250905061214d565b34801561097757600080fd5b5061038c6004803603602081101561098e57600080fd5b503561226e565b3480156109a157600080fd5b506105cb61228c565b3480156109b657600080fd5b5061038c61229c565b3480156109cb57600080fd5b506109f2600480360360208110156109e257600080fd5b50356001600160a01b03166122ab565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610a36578181015183820152602001610a1e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610a75578181015183820152602001610a5d565b5050505090500194505050505060405180910390f35b348015610a9757600080fd5b5061040560048036036020811015610aae57600080fd5b503561245e565b348015610ac157600080fd5b5061040560048036036020811015610ad857600080fd5b503561267f565b348015610aeb57600080fd5b5061040560048036036040811015610b0257600080fd5b508035906020013560ff1661268c565b348015610b1e57600080fd5b5061037560048036036020811015610b3557600080fd5b50356001600160a01b0316612705565b348015610b5157600080fd5b5061037560048036036020811015610b6857600080fd5b5035612789565b348015610b7b57600080fd5b506105cb60048036036020811015610b9257600080fd5b50356001600160a01b031661282d565b348015610bae57600080fd5b5061040560048036036020811015610bc557600080fd5b5035612842565b61037560048036036040811015610be257600080fd5b50803590602001356128da565b348015610bfb57600080fd5b506109f260048036036020811015610c1257600080fd5b503561300c565b348015610c2557600080fd5b5061037560048036036020811015610c3c57600080fd5b50356001600160a01b03166130de565b348015610c5857600080fd5b50610375613162565b348015610c6d57600080fd5b5061038c6131d9565b348015610c8257600080fd5b5061037560048036036020811015610c9957600080fd5b810190602081018135600160201b811115610cb357600080fd5b820183602082011115610cc557600080fd5b803590602001918460208302840111600160201b83111715610ce657600080fd5b5090925090506131e8565b348015610cfd57600080fd5b5061040560048036036020811015610d1457600080fd5b5035613256565b348015610d2757600080fd5b5061040560048036036020811015610d3e57600080fd5b503561326b565b348015610d5157600080fd5b5061037560048036036020811015610d6857600080fd5b50356001600160a01b0316613280565b348015610d8457600080fd5b5061040560048036036040811015610d9b57600080fd5b508035906020013560ff16613304565b348015610db757600080fd5b50610dde60048036036020811015610dce57600080fd5b50356001600160a01b031661335e565b6040805160ff9092168252519081900360200190f35b348015610e0057600080fd5b5061037560048036036020811015610e1757600080fd5b50356001600160a01b0316613373565b348015610e3357600080fd5b5061037560048036036040811015610e4a57600080fd5b810190602081018135600160201b811115610e6457600080fd5b820183602082011115610e7657600080fd5b803590602001918460208302840111600160201b83111715610e9757600080fd5b91935091503560ff166133f6565b348015610eb157600080fd5b506103756134b0565b348015610ec657600080fd5b5061037560048036036020811015610edd57600080fd5b50356001600160a01b0316613521565b348015610ef957600080fd5b5061037560048036036020811015610f1057600080fd5b810190602081018135600160201b811115610f2a57600080fd5b820183602082011115610f3c57600080fd5b803590602001918460208302840111600160201b83111715610f5d57600080fd5b509092509050613623565b348015610f7457600080fd5b506109f260048036036020811015610f8b57600080fd5b50356001600160a01b03166136db565b348015610fa757600080fd5b506109f260048036036020811015610fbe57600080fd5b50356001600160a01b0316613838565b348015610fda57600080fd5b50610dde60048036036020811015610ff157600080fd5b50356001600160a01b03166139dd565b34801561100d57600080fd5b506103756004803603602081101561102457600080fd5b810190602081018135600160201b81111561103e57600080fd5b82018360208201111561105057600080fd5b803590602001918460208302840111600160201b8311171561107157600080fd5b509092509050613a7f565b611084613aed565b6001600160a01b031661109561229c565b6001600160a01b0316146110de576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600c60205260409020805460ff191660ff909216919091179055565b6004546001600160a01b031681565b611122613aed565b6001600160a01b031661113361229c565b6001600160a01b03161461117c576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b0381166111bc5760405133904780156108fc02916000818181858888f193505050501580156111b6573d6000803e3d6000fd5b506112b8565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561120b57600080fd5b505afa15801561121f573d6000803e3d6000fd5b505050506040513d602081101561123557600080fd5b50516040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b0384169163a9059cbb916044808201926020929091908290030181600087803b15801561128a57600080fd5b505af115801561129e573d6000803e3d6000fd5b505050506040513d60208110156112b457600080fd5b5050505b50565b6000818152600a60205260409020600401545b919050565b6000908152600a60205260409020600501546001600160a01b031690565b6000818152600a6020526040808220600581015460019091015482516303a24d0760e21b8152600481019190915291516060936001600160a01b0390921692630e89341c926024808301939192829003018186803b15801561135257600080fd5b505afa158015611366573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561138f57600080fd5b8101908080516040519392919084600160201b8211156113ae57600080fd5b9083019060208201858111156113c357600080fd5b8251600160201b8111828201881017156113dc57600080fd5b82525081516020918201929091019080838360005b838110156114095781810151838201526020016113f1565b50505050905090810190601f1680156114365780820380516001836020036101000a031916815260200191505b506040525050509050919050565b60015481565b611452613aed565b6001600160a01b031661146361229c565b6001600160a01b0316146114ac576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b600a602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290916001600160a01b039081169190811690600160a01b900460ff1688565b6000908152600a6020526040902060060154600160a01b900460ff1690565b6000908152600a602052604090206001015490565b6000908152600a60205260409020600401541590565b6003546001600160a01b031681565b611587613aed565b6001600160a01b031661159861229c565b6001600160a01b0316146115e1576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60025460408051627eeac760e11b81526001600160a01b039283166004820152602481018790529051879286929084169162fdd58e91604480820192602092909190829003018186803b15801561163757600080fd5b505afa15801561164b573d6000803e3d6000fd5b505050506040513d602081101561166157600080fd5b505110156116a05760405162461bcd60e51b8152600401808060200182810382526033815260200180613f2d6033913960400191505060405180910390fd5b6002546040805163e985e9c560e01b81526001600160a01b03928316600482015230602482015290519183169163e985e9c591604480820192602092909190829003018186803b1580156116f357600080fd5b505afa158015611707573d6000803e3d6000fd5b505050506040513d602081101561171d57600080fd5b5051151560011461175f5760405162461bcd60e51b8152600401808060200182810382526025815260200180613e6b6025913960400191505060405180910390fd5b6000611769613af1565b9050611773613b0d565b61177b613d6b565b8181526001600160a01b0380891660a0830181815260208085018b815260408087018c815260608089018e81526080808b018e81528f8b1660c08d01908152600060e08e018181528f8252600a8b52908890208e518155985160018a015595516002890155925160038801555160048701559651600586018054918b166001600160a01b031992831617905590516006909501805493511515600160a01b0260ff60a01b1996909a169390911692909217939093169690961790955584518781529182018c90528185018b905281018890529251919233927f1f3cf74526b4974a81a4330e64a325723bd20938f2c6a83538873acdd6eeca23929181900390910190a35050505050505050565b611890613aed565b6001600160a01b03166118a161229c565b6001600160a01b0316146118ea576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f5838383613b17565b505050565b60055460009060609067ffffffffffffffff8111801561191957600080fd5b50604051908082528060200260200182016040528015611943578160200160208202803683370190505b50905060005b815181101561197f578382828151811061195f57fe5b6001600160a01b0390921660209283029190910190910152600101611949565b50600354604080516313849cfd60e21b8152600481019182528351604482015283516001600160a01b03909316926060928492634e1273f49287926005929091829160248101916064909101906020808801910280838360005b838110156119f15781810151838201526020016119d9565b505050509050018381038252848181548152602001915080548015611a3557602002820191906000526020600020905b815481526020019060010190808311611a21575b505094505050505060006040518083038186803b158015611a5557600080fd5b505afa158015611a69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611a9257600080fd5b8101908080516040519392919084600160201b821115611ab157600080fd5b908301906020820185811115611ac657600080fd5b82518660208202830111600160201b82111715611ae257600080fd5b82525081516020918201928201910280838360005b83811015611b0f578181015183820152602001611af7565b50505050905001604052505050905060005b8151811015611b5b576000828281518110611b3857fe5b60200260200101511115611b535760019450505050506112ce565b600101611b21565b5060065460609067ffffffffffffffff81118015611b7857600080fd5b50604051908082528060200260200182016040528015611ba2578160200160208202803683370190505b50905060005b8151811015611bde5786828281518110611bbe57fe5b6001600160a01b0390921660209283029190910190910152600101611ba8565b5060048054604080516313849cfd60e21b81529283019081528351604484015283516001600160a01b03909216926060928492634e1273f49287926006929182916024820191606401906020808801910280838360005b83811015611c4d578181015183820152602001611c35565b505050509050018381038252848181548152602001915080548015611c9157602002820191906000526020600020905b815481526020019060010190808311611c7d575b505094505050505060006040518083038186803b158015611cb157600080fd5b505afa158015611cc5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611cee57600080fd5b8101908080516040519392919084600160201b821115611d0d57600080fd5b908301906020820185811115611d2257600080fd5b82518660208202830111600160201b82111715611d3e57600080fd5b82525081516020918201928201910280838360005b83811015611d6b578181015183820152602001611d53565b50505050905001604052505050905060005b8151811015611dba576000828281518110611d9457fe5b60200260200101511115611db25760019750505050505050506112ce565b600101611d7d565b50600098975050505050505050565b6000611dd3613aed565b6001600160a01b0316611de461229c565b6001600160a01b031614611e2d576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000838152600a602090815260409182902060040184905581518581529151600080516020613e258339815191529281900390910190a192915050565b611e72613aed565b6001600160a01b0316611e8361229c565b6001600160a01b031614611ecc576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000818152600a6020908152604091829020600601805460ff60a01b1916600160a01b17905581518381529151600080516020613e258339815191529281900390910190a150565b60068181548110611f2157fe5b600091825260209091200154905081565b6000611f3c613aed565b6001600160a01b0316611f4d61229c565b6001600160a01b031614611f96576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000838152600a602090815260409182902060060180546001600160a01b0319166001600160a01b03861617905581518581529151600080516020613e258339815191529281900390910190a192915050565b611ff1613aed565b6001600160a01b031661200261229c565b6001600160a01b03161461204b576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b818110156118f5576000600b600085858581811061206857fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191691151591909117905560010161204e565b6120a9613aed565b6001600160a01b03166120ba61229c565b6001600160a01b031614612103576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b612155613aed565b6001600160a01b031661216661229c565b6001600160a01b0316146121af576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b84831480156121bd57508481145b61220e576040805162461bcd60e51b815260206004820152601c60248201527f496e707574206172726179206c656e67746873206d69736d6174636800000000604482015290519081900360640190fd5b60005b858110156122655761225d87878381811061222857fe5b9050602002013560ff1686868481811061223e57fe5b9050602002013585858581811061225157fe5b90506020020135613b17565b600101612211565b50505050505050565b6000908152600a60205260409020600601546001600160a01b031690565b600254600160a01b900460ff1681565b6000546001600160a01b031690565b606080600060015b6001548111612315576000818152600a60205260409020600501546001600160a01b03868116911614801561230157506000818152600a6020526040902060060154600160a01b900460ff16155b1561230d576001909101905b6001016122b3565b5060608167ffffffffffffffff8111801561232f57600080fd5b50604051908082528060200260200182016040528015612359578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561237557600080fd5b5060405190808252806020026020018201604052801561239f578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b0388811691161480156123f757506000818152600a6020526040902060060154600160a01b900460ff16155b1561244a578083858151811061240957fe5b602002602001018181525050600a60008281526020019081526020016000206001015482858151811061243857fe5b60209081029190910101526001909301925b6001016123a9565b50909350915050915091565b336000908152600b602052604081205460ff16151560011415612483575060006112ce565b600254600160a01b900460ff1661249c575060006112ce565b6124a4613d6b565b506000828152600a602090815260409182902082516101008101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260058201546001600160a01b0390811660a083015260069092015491821660c0820152600160a01b90910460ff16151560e08201526007546125365760009150506112ce565b6000612541336139dd565b905060005b600754811015612674576007818154811061255d57fe5b906000526020600020015442101580156125a857506009818154811061257f57fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168260ff16145b1561266c578160ff16600114156125d2576125c2336118fa565b6125d257600093505050506112ce565b60a08301516001600160a01b03166000908152600d60209081526040808320828701518452808352818420338552909252822054909160ff9091169061261788612842565b905080821061262f57600096505050505050506112ce565b6126398183613c54565b86606001511161265557856060015196505050505050506112ce565b61265f8183613c54565b96505050505050506112ce565b600101612546565b506000949350505050565b60058181548110611f2157fe5b6000805b6009548110156126f9578260ff16600982815481106126ab57fe5b60009182526020918290209181049091015460ff601f9092166101000a90041614156126f157600881815481106126de57fe5b90600052602060002001549150506126ff565b600101612690565b50600090505b92915050565b61270d613aed565b6001600160a01b031661271e61229c565b6001600160a01b031614612767576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b612791613aed565b6001600160a01b03166127a261229c565b6001600160a01b0316146127eb576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000818152600a6020908152604091829020600601805460ff60a01b1916905581518381529151600080516020613e258339815191529281900390910190a150565b600b6020526000908152604090205460ff1681565b60008080805b6009548110156128d157426007828154811061286057fe5b90600052602060002001541115801561288f5750816007828154811061288257fe5b9060005260206000200154115b156128c957600881815481106128a157fe5b90600052602060002001549250600781815481106128bb57fe5b906000526020600020015491505b600101612848565b50909392505050565b336000908152600b602052604090205460ff1615612931576040805162461bcd60e51b815260206004820152600f60248201526e1e5bdd48185c9948189b1bd8dad959608a1b604482015290519081900360640190fd5b600254600160a01b900460ff161515600114612983576040805162461bcd60e51b815260206004820152600c60248201526b14d85b19481cdd1bdc1c195960a21b604482015290519081900360640190fd5b61298b613d6b565b506000828152600a602090815260409182902082516101008101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260058201546001600160a01b0390811660a083015260069092015491821660c0820152600160a01b90910460ff1615801560e0830152612a51576040805162461bcd60e51b815260206004820152601060248201526f10d85c99081a5cc8199a5b9a5cda195960821b604482015290519081900360640190fd5b6000612a5c336139dd565b90506000805b600954811015612ac6578260ff1660098281548110612a7d57fe5b60009182526020918290209181049091015460ff601f9092166101000a9004161415612abe5760078181548110612ab057fe5b906000526020600020015491505b600101612a62565b508015801590612ad65750428111155b612b1d576040805162461bcd60e51b81526020600482015260136024820152721dd85a5d08199bdc881cd85b19481cdd185c9d606a1b604482015290519081900360640190fd5b8160ff1660011415612b8357612b32336118fa565b612b83576040805162461bcd60e51b815260206004820152601f60248201527f4d757374206f776e2061207175616c696679696e672042434347206361726400604482015290519081900360640190fd5b60a08301516060840151851115612bcb5760405162461bcd60e51b815260040180806020018281038252602e815260200180613edf602e913960400191505060405180910390fd5b60a08401516001600160a01b03166000908152600d60209081526040808320828801518452808352818420338552909252822054909160ff90911690612c1089612842565b9050808210612c505760405162461bcd60e51b815260040180806020018281038252602e815260200180613e90602e913960400191505060405180910390fd5b6000612c5c8284613c54565b905088811115612c695750875b6080880151600090612c7b9083613cb1565b60c08a01519091506001600160a01b03161580612d14575060c089015160408051636eb1769f60e11b8152336004820152306024820152905183926001600160a01b03169163dd62ed3e916044808301926020929190829003018186803b158015612ce557600080fd5b505afa158015612cf9573d6000803e3d6000fd5b505050506040513d6020811015612d0f57600080fd5b505110155b612d65576040805162461bcd60e51b815260206004820152601760248201527f4e65656420746f20417070726f7665207061796d656e74000000000000000000604482015290519081900360640190fd5b60c08901516001600160a01b0316612e455780341015612dcc576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320746f20707572636861736500000000604482015290519081900360640190fd5b60025460405134839003916001600160a01b03169083156108fc029084906000818181858888f19350505050158015612e09573d6000803e3d6000fd5b508015612e3f57604051339082156108fc029083906000818181858888f19350505050158015612e3d573d6000803e3d6000fd5b505b50612ed3565b60c0890151600254604080516323b872dd60e01b81523360048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015612ea657600080fd5b505af1158015612eba573d6000803e3d6000fd5b505050506040513d6020811015612ed057600080fd5b50505b60025460208a015160408051637921219560e11b81526001600160a01b03938416600482015233602482015260448101929092526064820185905260a06084830152600060a4830181905290519289169263f242432a9260e480820193929182900301818387803b158015612f4757600080fd5b505af1158015612f5b573d6000803e3d6000fd5b50505060008c8152600a6020526040902060030154612f7b915083613c54565b60008c8152600a6020526040902060030155612f978483613d11565b60208a810151600090815287825260408082203380845290845291819020805460ff191660ff959095169490941790935582518e8152918201859052825190927fc54aab3546f0a86ae0fc33cdadcda77da8b3d056b1157a0cbc251b625c7bac73928290030190a25050505050505050505050565b606080600960078180548060200260200160405190810160405280929190818152602001828054801561307c57602002820191906000526020600020906000905b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161304d5790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156130ce57602002820191906000526020600020905b8154815260200190600101908083116130ba575b5050505050905091509150915091565b6130e6613aed565b6001600160a01b03166130f761229c565b6001600160a01b031614613140576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61316a613aed565b6001600160a01b031661317b61229c565b6001600160a01b0316146131c4576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6002805460ff60a01b1916600160a01b179055565b6002546001600160a01b031681565b6131f0613aed565b6001600160a01b031661320161229c565b6001600160a01b03161461324a576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f560058383613dc4565b6000908152600a602052604090206002015490565b6000908152600a602052604090206003015490565b613288613aed565b6001600160a01b031661329961229c565b6001600160a01b0316146132e2576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b6009548110156126f9578260ff166009828154811061332357fe5b60009182526020918290209181049091015460ff601f9092166101000a900416141561335657600781815481106126de57fe5b600101613308565b600c6020526000908152604090205460ff1681565b61337b613aed565b6001600160a01b031661338c61229c565b6001600160a01b0316146133d5576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6133fe613aed565b6001600160a01b031661340f61229c565b6001600160a01b031614613458576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b828110156112b45781600c600086868581811061347457fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191660ff9290921691909117905560010161345b565b6134b8613aed565b6001600160a01b03166134c961229c565b6001600160a01b031614613512576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6002805460ff60a01b19169055565b613529613aed565b6001600160a01b031661353a61229c565b6001600160a01b031614613583576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b0381166135c85760405162461bcd60e51b8152600401808060200182810382526026815260200180613e456026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61362b613aed565b6001600160a01b031661363c61229c565b6001600160a01b031614613685576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b818110156118f5576001600b60008585858181106136a257fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101613688565b606080600060015b6001548111613720576000818152600a60205260409020600501546001600160a01b0386811691161415613718576001909101905b6001016136e3565b5060608167ffffffffffffffff8111801561373a57600080fd5b50604051908082528060200260200182016040528015613764578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561378057600080fd5b506040519080825280602002602001820160405280156137aa578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b038881169116141561383057808385815181106137ef57fe5b602002602001018181525050600a60008281526020019081526020016000206001015482858151811061381e57fe5b60209081029190910101526001909301925b6001016137b4565b606080600060015b60015481116138a1576000818152600a60205260409020600501546001600160a01b03868116911614801561388d57506000818152600a6020526040902060060154600160a01b900460ff165b15613899576001909101905b600101613840565b5060608167ffffffffffffffff811180156138bb57600080fd5b506040519080825280602002602001820160405280156138e5578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561390157600080fd5b5060405190808252806020026020018201604052801561392b578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b03888116911614801561398257506000818152600a6020526040902060060154600160a01b900460ff165b156139d5578083858151811061399457fe5b602002602001018181525050600a6000828152602001908152602001600020600101548285815181106139c357fe5b60209081029190910101526001909301925b600101613935565b6001600160a01b0381166000908152600c602052604081205460ff168015613a065790506112ce565b60005b600954811015613a755760098181548110613a2057fe5b60009182526020918290209181049091015460ff601f9092166101000a900416613a6d5760078181548110613a5157fe5b90600052602060002001544210613a6d576000925050506112ce565b600101613a09565b5060019392505050565b613a87613aed565b6001600160a01b0316613a9861229c565b6001600160a01b031614613ae1576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f560068383613dc4565b3390565b6000613b0860018054613d1190919063ffffffff16565b905090565b6001805481019055565b60005b600954811015613b9f578360ff1660098281548110613b3557fe5b60009182526020918290209181049091015460ff601f9092166101000a9004161415613b97578260078281548110613b6957fe5b90600052602060002001819055508160088281548110613b8557fe5b600091825260209091200155506118f5565b600101613b1a565b50600980546001818101909255602081047f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805460ff808816601f9094166101000a93840293021916919091179055600780548083019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390556008805491820181556000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301819055505050565b600082821115613cab576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082613cc0575060006126ff565b82820282848281613ccd57fe5b0414613d0a5760405162461bcd60e51b8152600401808060200182810382526021815260200180613ebe6021913960400191505060405180910390fd5b9392505050565b600082820183811015613d0a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000151581525090565b828054828255906000526020600020908101928215613dff579160200282015b82811115613dff578235825591602001919060010190613de4565b50613e0b929150613e0f565b5090565b5b80821115613e0b5760008155600101613e1056feed6db11026ebcc6aae64d66d0a08276ffed7c75ac478965350fd6ab360b8d2094f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e7472616374206d7573742062652077686974656c6973746564206279206f776e65724f72646572206578636565647320746865206d6178206c696d6974206f66204e465473207065722077616c6c6574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f72646572206578636565647320746865206d6178206e756d626572206f6620617661696c61626c65204e4654734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572496e697469616c20737570706c792063616e6e6f74206265206d6f7265207468616e20617661696c61626c6520737570706c79a264697066735822122010376ced069e60311dd820062154a4d8f21d54ecf358ec43f66f80d26e2d96a464736f6c63430007030033
Deployed Bytecode
0x6080604052600436106103345760003560e01c806395e00e20116101ab578063ba873286116100f7578063e36b0b3711610095578063f3e74dff1161006f578063f3e74dff14610f68578063f5214e0a14610f9b578063f7eaff4914610fce578063f89fd4081461100157610334565b8063e36b0b3714610ea5578063f2fde38b14610eba578063f338228e14610eed57610334565b8063cac16334116100d1578063cac1633414610d78578063cfdb63ac14610dab578063d96e83d614610df4578063e1c3685914610e2757610334565b8063ba87328614610cf1578063c0a6011d14610d1b578063c6e374db14610d4557610334565b8063a6b3c1d011610164578063b18fc1671161013e578063b18fc16714610c19578063b66a0e5d14610c4c578063b7335fa814610c61578063b8e31b0314610c7657610334565b8063a6b3c1d014610ba2578063ad4451a314610bcc578063aff9988014610bef57610334565b806395e00e2014610a8b57806397071cda14610ab55780639d40432d14610adf578063a0baeec314610b12578063a1d33a1114610b45578063a20623ce14610b6f57610334565b806336ac9a151161028557806364958678116102235780637eb83699116101fd5780637eb836991461096b57806387c348bf146109955780638da5cb5b146109aa57806393315791146109bf57610334565b806364958678146107c0578063715018a61461083b5780637197ac651461085057610334565b80634a3f6ecd1161025f5780634a3f6ecd146107035780634b88ac0b1461073357806354cba6071461075d5780635a05ae501461078757610334565b806336ac9a15146106485780633ad603161461069757806345b71315146106d057610334565b80631e1fd2a4116102f25780632ed2a185116102cc5780632ed2a185146105a15780632f8a82cb146105df5780633387ab1d1461060957806335903d851461063357610334565b80631e1fd2a4146104e05780632812920d146104f55780632cbf61961461052857610334565b806205db131461033957806304f0e69c1461037757806306ec16f8146103a85780630ba6b6fd146103db57806312e013631461041757806316ad033314610441575b600080fd5b34801561034557600080fd5b506103756004803603604081101561035c57600080fd5b5080356001600160a01b0316906020013560ff1661107c565b005b34801561038357600080fd5b5061038c61110b565b604080516001600160a01b039092168252519081900360200190f35b3480156103b457600080fd5b50610375600480360360208110156103cb57600080fd5b50356001600160a01b031661111a565b3480156103e757600080fd5b50610405600480360360208110156103fe57600080fd5b50356112bb565b60408051918252519081900360200190f35b34801561042357600080fd5b5061038c6004803603602081101561043a57600080fd5b50356112d3565b34801561044d57600080fd5b5061046b6004803603602081101561046457600080fd5b50356112f1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104a557818101518382015260200161048d565b50505050905090810190601f1680156104d25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104ec57600080fd5b50610405611444565b34801561050157600080fd5b506103756004803603602081101561051857600080fd5b50356001600160a01b031661144a565b34801561053457600080fd5b506105526004803603602081101561054b57600080fd5b50356114d0565b60408051988952602089019790975287870195909552606087019390935260808601919091526001600160a01b0390811660a08601521660c0840152151560e083015251908190036101000190f35b3480156105ad57600080fd5b506105cb600480360360208110156105c457600080fd5b5035611526565b604080519115158252519081900360200190f35b3480156105eb57600080fd5b506104056004803603602081101561060257600080fd5b5035611545565b34801561061557600080fd5b506105cb6004803603602081101561062c57600080fd5b503561155a565b34801561063f57600080fd5b5061038c611570565b34801561065457600080fd5b50610375600480360360a081101561066b57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135909116906080013561157f565b3480156106a357600080fd5b50610375600480360360608110156106ba57600080fd5b5060ff8135169060208101359060400135611888565b3480156106dc57600080fd5b506105cb600480360360208110156106f357600080fd5b50356001600160a01b03166118fa565b34801561070f57600080fd5b506105cb6004803603604081101561072657600080fd5b5080359060200135611dc9565b34801561073f57600080fd5b506103756004803603602081101561075657600080fd5b5035611e6a565b34801561076957600080fd5b506104056004803603602081101561078057600080fd5b5035611f14565b34801561079357600080fd5b506105cb600480360360408110156107aa57600080fd5b50803590602001356001600160a01b0316611f32565b3480156107cc57600080fd5b50610375600480360360208110156107e357600080fd5b810190602081018135600160201b8111156107fd57600080fd5b82018360208201111561080f57600080fd5b803590602001918460208302840111600160201b8311171561083057600080fd5b509092509050611fe9565b34801561084757600080fd5b506103756120a1565b34801561085c57600080fd5b506103756004803603606081101561087357600080fd5b810190602081018135600160201b81111561088d57600080fd5b82018360208201111561089f57600080fd5b803590602001918460208302840111600160201b831117156108c057600080fd5b919390929091602081019035600160201b8111156108dd57600080fd5b8201836020820111156108ef57600080fd5b803590602001918460208302840111600160201b8311171561091057600080fd5b919390929091602081019035600160201b81111561092d57600080fd5b82018360208201111561093f57600080fd5b803590602001918460208302840111600160201b8311171561096057600080fd5b50909250905061214d565b34801561097757600080fd5b5061038c6004803603602081101561098e57600080fd5b503561226e565b3480156109a157600080fd5b506105cb61228c565b3480156109b657600080fd5b5061038c61229c565b3480156109cb57600080fd5b506109f2600480360360208110156109e257600080fd5b50356001600160a01b03166122ab565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610a36578181015183820152602001610a1e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610a75578181015183820152602001610a5d565b5050505090500194505050505060405180910390f35b348015610a9757600080fd5b5061040560048036036020811015610aae57600080fd5b503561245e565b348015610ac157600080fd5b5061040560048036036020811015610ad857600080fd5b503561267f565b348015610aeb57600080fd5b5061040560048036036040811015610b0257600080fd5b508035906020013560ff1661268c565b348015610b1e57600080fd5b5061037560048036036020811015610b3557600080fd5b50356001600160a01b0316612705565b348015610b5157600080fd5b5061037560048036036020811015610b6857600080fd5b5035612789565b348015610b7b57600080fd5b506105cb60048036036020811015610b9257600080fd5b50356001600160a01b031661282d565b348015610bae57600080fd5b5061040560048036036020811015610bc557600080fd5b5035612842565b61037560048036036040811015610be257600080fd5b50803590602001356128da565b348015610bfb57600080fd5b506109f260048036036020811015610c1257600080fd5b503561300c565b348015610c2557600080fd5b5061037560048036036020811015610c3c57600080fd5b50356001600160a01b03166130de565b348015610c5857600080fd5b50610375613162565b348015610c6d57600080fd5b5061038c6131d9565b348015610c8257600080fd5b5061037560048036036020811015610c9957600080fd5b810190602081018135600160201b811115610cb357600080fd5b820183602082011115610cc557600080fd5b803590602001918460208302840111600160201b83111715610ce657600080fd5b5090925090506131e8565b348015610cfd57600080fd5b5061040560048036036020811015610d1457600080fd5b5035613256565b348015610d2757600080fd5b5061040560048036036020811015610d3e57600080fd5b503561326b565b348015610d5157600080fd5b5061037560048036036020811015610d6857600080fd5b50356001600160a01b0316613280565b348015610d8457600080fd5b5061040560048036036040811015610d9b57600080fd5b508035906020013560ff16613304565b348015610db757600080fd5b50610dde60048036036020811015610dce57600080fd5b50356001600160a01b031661335e565b6040805160ff9092168252519081900360200190f35b348015610e0057600080fd5b5061037560048036036020811015610e1757600080fd5b50356001600160a01b0316613373565b348015610e3357600080fd5b5061037560048036036040811015610e4a57600080fd5b810190602081018135600160201b811115610e6457600080fd5b820183602082011115610e7657600080fd5b803590602001918460208302840111600160201b83111715610e9757600080fd5b91935091503560ff166133f6565b348015610eb157600080fd5b506103756134b0565b348015610ec657600080fd5b5061037560048036036020811015610edd57600080fd5b50356001600160a01b0316613521565b348015610ef957600080fd5b5061037560048036036020811015610f1057600080fd5b810190602081018135600160201b811115610f2a57600080fd5b820183602082011115610f3c57600080fd5b803590602001918460208302840111600160201b83111715610f5d57600080fd5b509092509050613623565b348015610f7457600080fd5b506109f260048036036020811015610f8b57600080fd5b50356001600160a01b03166136db565b348015610fa757600080fd5b506109f260048036036020811015610fbe57600080fd5b50356001600160a01b0316613838565b348015610fda57600080fd5b50610dde60048036036020811015610ff157600080fd5b50356001600160a01b03166139dd565b34801561100d57600080fd5b506103756004803603602081101561102457600080fd5b810190602081018135600160201b81111561103e57600080fd5b82018360208201111561105057600080fd5b803590602001918460208302840111600160201b8311171561107157600080fd5b509092509050613a7f565b611084613aed565b6001600160a01b031661109561229c565b6001600160a01b0316146110de576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600c60205260409020805460ff191660ff909216919091179055565b6004546001600160a01b031681565b611122613aed565b6001600160a01b031661113361229c565b6001600160a01b03161461117c576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b0381166111bc5760405133904780156108fc02916000818181858888f193505050501580156111b6573d6000803e3d6000fd5b506112b8565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561120b57600080fd5b505afa15801561121f573d6000803e3d6000fd5b505050506040513d602081101561123557600080fd5b50516040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b0384169163a9059cbb916044808201926020929091908290030181600087803b15801561128a57600080fd5b505af115801561129e573d6000803e3d6000fd5b505050506040513d60208110156112b457600080fd5b5050505b50565b6000818152600a60205260409020600401545b919050565b6000908152600a60205260409020600501546001600160a01b031690565b6000818152600a6020526040808220600581015460019091015482516303a24d0760e21b8152600481019190915291516060936001600160a01b0390921692630e89341c926024808301939192829003018186803b15801561135257600080fd5b505afa158015611366573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561138f57600080fd5b8101908080516040519392919084600160201b8211156113ae57600080fd5b9083019060208201858111156113c357600080fd5b8251600160201b8111828201881017156113dc57600080fd5b82525081516020918201929091019080838360005b838110156114095781810151838201526020016113f1565b50505050905090810190601f1680156114365780820380516001836020036101000a031916815260200191505b506040525050509050919050565b60015481565b611452613aed565b6001600160a01b031661146361229c565b6001600160a01b0316146114ac576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b600a602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290916001600160a01b039081169190811690600160a01b900460ff1688565b6000908152600a6020526040902060060154600160a01b900460ff1690565b6000908152600a602052604090206001015490565b6000908152600a60205260409020600401541590565b6003546001600160a01b031681565b611587613aed565b6001600160a01b031661159861229c565b6001600160a01b0316146115e1576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60025460408051627eeac760e11b81526001600160a01b039283166004820152602481018790529051879286929084169162fdd58e91604480820192602092909190829003018186803b15801561163757600080fd5b505afa15801561164b573d6000803e3d6000fd5b505050506040513d602081101561166157600080fd5b505110156116a05760405162461bcd60e51b8152600401808060200182810382526033815260200180613f2d6033913960400191505060405180910390fd5b6002546040805163e985e9c560e01b81526001600160a01b03928316600482015230602482015290519183169163e985e9c591604480820192602092909190829003018186803b1580156116f357600080fd5b505afa158015611707573d6000803e3d6000fd5b505050506040513d602081101561171d57600080fd5b5051151560011461175f5760405162461bcd60e51b8152600401808060200182810382526025815260200180613e6b6025913960400191505060405180910390fd5b6000611769613af1565b9050611773613b0d565b61177b613d6b565b8181526001600160a01b0380891660a0830181815260208085018b815260408087018c815260608089018e81526080808b018e81528f8b1660c08d01908152600060e08e018181528f8252600a8b52908890208e518155985160018a015595516002890155925160038801555160048701559651600586018054918b166001600160a01b031992831617905590516006909501805493511515600160a01b0260ff60a01b1996909a169390911692909217939093169690961790955584518781529182018c90528185018b905281018890529251919233927f1f3cf74526b4974a81a4330e64a325723bd20938f2c6a83538873acdd6eeca23929181900390910190a35050505050505050565b611890613aed565b6001600160a01b03166118a161229c565b6001600160a01b0316146118ea576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f5838383613b17565b505050565b60055460009060609067ffffffffffffffff8111801561191957600080fd5b50604051908082528060200260200182016040528015611943578160200160208202803683370190505b50905060005b815181101561197f578382828151811061195f57fe5b6001600160a01b0390921660209283029190910190910152600101611949565b50600354604080516313849cfd60e21b8152600481019182528351604482015283516001600160a01b03909316926060928492634e1273f49287926005929091829160248101916064909101906020808801910280838360005b838110156119f15781810151838201526020016119d9565b505050509050018381038252848181548152602001915080548015611a3557602002820191906000526020600020905b815481526020019060010190808311611a21575b505094505050505060006040518083038186803b158015611a5557600080fd5b505afa158015611a69573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611a9257600080fd5b8101908080516040519392919084600160201b821115611ab157600080fd5b908301906020820185811115611ac657600080fd5b82518660208202830111600160201b82111715611ae257600080fd5b82525081516020918201928201910280838360005b83811015611b0f578181015183820152602001611af7565b50505050905001604052505050905060005b8151811015611b5b576000828281518110611b3857fe5b60200260200101511115611b535760019450505050506112ce565b600101611b21565b5060065460609067ffffffffffffffff81118015611b7857600080fd5b50604051908082528060200260200182016040528015611ba2578160200160208202803683370190505b50905060005b8151811015611bde5786828281518110611bbe57fe5b6001600160a01b0390921660209283029190910190910152600101611ba8565b5060048054604080516313849cfd60e21b81529283019081528351604484015283516001600160a01b03909216926060928492634e1273f49287926006929182916024820191606401906020808801910280838360005b83811015611c4d578181015183820152602001611c35565b505050509050018381038252848181548152602001915080548015611c9157602002820191906000526020600020905b815481526020019060010190808311611c7d575b505094505050505060006040518083038186803b158015611cb157600080fd5b505afa158015611cc5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611cee57600080fd5b8101908080516040519392919084600160201b821115611d0d57600080fd5b908301906020820185811115611d2257600080fd5b82518660208202830111600160201b82111715611d3e57600080fd5b82525081516020918201928201910280838360005b83811015611d6b578181015183820152602001611d53565b50505050905001604052505050905060005b8151811015611dba576000828281518110611d9457fe5b60200260200101511115611db25760019750505050505050506112ce565b600101611d7d565b50600098975050505050505050565b6000611dd3613aed565b6001600160a01b0316611de461229c565b6001600160a01b031614611e2d576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000838152600a602090815260409182902060040184905581518581529151600080516020613e258339815191529281900390910190a192915050565b611e72613aed565b6001600160a01b0316611e8361229c565b6001600160a01b031614611ecc576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000818152600a6020908152604091829020600601805460ff60a01b1916600160a01b17905581518381529151600080516020613e258339815191529281900390910190a150565b60068181548110611f2157fe5b600091825260209091200154905081565b6000611f3c613aed565b6001600160a01b0316611f4d61229c565b6001600160a01b031614611f96576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000838152600a602090815260409182902060060180546001600160a01b0319166001600160a01b03861617905581518581529151600080516020613e258339815191529281900390910190a192915050565b611ff1613aed565b6001600160a01b031661200261229c565b6001600160a01b03161461204b576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b818110156118f5576000600b600085858581811061206857fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191691151591909117905560010161204e565b6120a9613aed565b6001600160a01b03166120ba61229c565b6001600160a01b031614612103576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b612155613aed565b6001600160a01b031661216661229c565b6001600160a01b0316146121af576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b84831480156121bd57508481145b61220e576040805162461bcd60e51b815260206004820152601c60248201527f496e707574206172726179206c656e67746873206d69736d6174636800000000604482015290519081900360640190fd5b60005b858110156122655761225d87878381811061222857fe5b9050602002013560ff1686868481811061223e57fe5b9050602002013585858581811061225157fe5b90506020020135613b17565b600101612211565b50505050505050565b6000908152600a60205260409020600601546001600160a01b031690565b600254600160a01b900460ff1681565b6000546001600160a01b031690565b606080600060015b6001548111612315576000818152600a60205260409020600501546001600160a01b03868116911614801561230157506000818152600a6020526040902060060154600160a01b900460ff16155b1561230d576001909101905b6001016122b3565b5060608167ffffffffffffffff8111801561232f57600080fd5b50604051908082528060200260200182016040528015612359578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561237557600080fd5b5060405190808252806020026020018201604052801561239f578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b0388811691161480156123f757506000818152600a6020526040902060060154600160a01b900460ff16155b1561244a578083858151811061240957fe5b602002602001018181525050600a60008281526020019081526020016000206001015482858151811061243857fe5b60209081029190910101526001909301925b6001016123a9565b50909350915050915091565b336000908152600b602052604081205460ff16151560011415612483575060006112ce565b600254600160a01b900460ff1661249c575060006112ce565b6124a4613d6b565b506000828152600a602090815260409182902082516101008101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260058201546001600160a01b0390811660a083015260069092015491821660c0820152600160a01b90910460ff16151560e08201526007546125365760009150506112ce565b6000612541336139dd565b905060005b600754811015612674576007818154811061255d57fe5b906000526020600020015442101580156125a857506009818154811061257f57fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168260ff16145b1561266c578160ff16600114156125d2576125c2336118fa565b6125d257600093505050506112ce565b60a08301516001600160a01b03166000908152600d60209081526040808320828701518452808352818420338552909252822054909160ff9091169061261788612842565b905080821061262f57600096505050505050506112ce565b6126398183613c54565b86606001511161265557856060015196505050505050506112ce565b61265f8183613c54565b96505050505050506112ce565b600101612546565b506000949350505050565b60058181548110611f2157fe5b6000805b6009548110156126f9578260ff16600982815481106126ab57fe5b60009182526020918290209181049091015460ff601f9092166101000a90041614156126f157600881815481106126de57fe5b90600052602060002001549150506126ff565b600101612690565b50600090505b92915050565b61270d613aed565b6001600160a01b031661271e61229c565b6001600160a01b031614612767576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b612791613aed565b6001600160a01b03166127a261229c565b6001600160a01b0316146127eb576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6000818152600a6020908152604091829020600601805460ff60a01b1916905581518381529151600080516020613e258339815191529281900390910190a150565b600b6020526000908152604090205460ff1681565b60008080805b6009548110156128d157426007828154811061286057fe5b90600052602060002001541115801561288f5750816007828154811061288257fe5b9060005260206000200154115b156128c957600881815481106128a157fe5b90600052602060002001549250600781815481106128bb57fe5b906000526020600020015491505b600101612848565b50909392505050565b336000908152600b602052604090205460ff1615612931576040805162461bcd60e51b815260206004820152600f60248201526e1e5bdd48185c9948189b1bd8dad959608a1b604482015290519081900360640190fd5b600254600160a01b900460ff161515600114612983576040805162461bcd60e51b815260206004820152600c60248201526b14d85b19481cdd1bdc1c195960a21b604482015290519081900360640190fd5b61298b613d6b565b506000828152600a602090815260409182902082516101008101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260058201546001600160a01b0390811660a083015260069092015491821660c0820152600160a01b90910460ff1615801560e0830152612a51576040805162461bcd60e51b815260206004820152601060248201526f10d85c99081a5cc8199a5b9a5cda195960821b604482015290519081900360640190fd5b6000612a5c336139dd565b90506000805b600954811015612ac6578260ff1660098281548110612a7d57fe5b60009182526020918290209181049091015460ff601f9092166101000a9004161415612abe5760078181548110612ab057fe5b906000526020600020015491505b600101612a62565b508015801590612ad65750428111155b612b1d576040805162461bcd60e51b81526020600482015260136024820152721dd85a5d08199bdc881cd85b19481cdd185c9d606a1b604482015290519081900360640190fd5b8160ff1660011415612b8357612b32336118fa565b612b83576040805162461bcd60e51b815260206004820152601f60248201527f4d757374206f776e2061207175616c696679696e672042434347206361726400604482015290519081900360640190fd5b60a08301516060840151851115612bcb5760405162461bcd60e51b815260040180806020018281038252602e815260200180613edf602e913960400191505060405180910390fd5b60a08401516001600160a01b03166000908152600d60209081526040808320828801518452808352818420338552909252822054909160ff90911690612c1089612842565b9050808210612c505760405162461bcd60e51b815260040180806020018281038252602e815260200180613e90602e913960400191505060405180910390fd5b6000612c5c8284613c54565b905088811115612c695750875b6080880151600090612c7b9083613cb1565b60c08a01519091506001600160a01b03161580612d14575060c089015160408051636eb1769f60e11b8152336004820152306024820152905183926001600160a01b03169163dd62ed3e916044808301926020929190829003018186803b158015612ce557600080fd5b505afa158015612cf9573d6000803e3d6000fd5b505050506040513d6020811015612d0f57600080fd5b505110155b612d65576040805162461bcd60e51b815260206004820152601760248201527f4e65656420746f20417070726f7665207061796d656e74000000000000000000604482015290519081900360640190fd5b60c08901516001600160a01b0316612e455780341015612dcc576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320746f20707572636861736500000000604482015290519081900360640190fd5b60025460405134839003916001600160a01b03169083156108fc029084906000818181858888f19350505050158015612e09573d6000803e3d6000fd5b508015612e3f57604051339082156108fc029083906000818181858888f19350505050158015612e3d573d6000803e3d6000fd5b505b50612ed3565b60c0890151600254604080516323b872dd60e01b81523360048201526001600160a01b03928316602482015260448101859052905191909216916323b872dd9160648083019260209291908290030181600087803b158015612ea657600080fd5b505af1158015612eba573d6000803e3d6000fd5b505050506040513d6020811015612ed057600080fd5b50505b60025460208a015160408051637921219560e11b81526001600160a01b03938416600482015233602482015260448101929092526064820185905260a06084830152600060a4830181905290519289169263f242432a9260e480820193929182900301818387803b158015612f4757600080fd5b505af1158015612f5b573d6000803e3d6000fd5b50505060008c8152600a6020526040902060030154612f7b915083613c54565b60008c8152600a6020526040902060030155612f978483613d11565b60208a810151600090815287825260408082203380845290845291819020805460ff191660ff959095169490941790935582518e8152918201859052825190927fc54aab3546f0a86ae0fc33cdadcda77da8b3d056b1157a0cbc251b625c7bac73928290030190a25050505050505050505050565b606080600960078180548060200260200160405190810160405280929190818152602001828054801561307c57602002820191906000526020600020906000905b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161304d5790505b50505050509150808054806020026020016040519081016040528092919081815260200182805480156130ce57602002820191906000526020600020905b8154815260200190600101908083116130ba575b5050505050905091509150915091565b6130e6613aed565b6001600160a01b03166130f761229c565b6001600160a01b031614613140576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61316a613aed565b6001600160a01b031661317b61229c565b6001600160a01b0316146131c4576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6002805460ff60a01b1916600160a01b179055565b6002546001600160a01b031681565b6131f0613aed565b6001600160a01b031661320161229c565b6001600160a01b03161461324a576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f560058383613dc4565b6000908152600a602052604090206002015490565b6000908152600a602052604090206003015490565b613288613aed565b6001600160a01b031661329961229c565b6001600160a01b0316146132e2576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b6009548110156126f9578260ff166009828154811061332357fe5b60009182526020918290209181049091015460ff601f9092166101000a900416141561335657600781815481106126de57fe5b600101613308565b600c6020526000908152604090205460ff1681565b61337b613aed565b6001600160a01b031661338c61229c565b6001600160a01b0316146133d5576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6133fe613aed565b6001600160a01b031661340f61229c565b6001600160a01b031614613458576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b828110156112b45781600c600086868581811061347457fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff191660ff9290921691909117905560010161345b565b6134b8613aed565b6001600160a01b03166134c961229c565b6001600160a01b031614613512576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6002805460ff60a01b19169055565b613529613aed565b6001600160a01b031661353a61229c565b6001600160a01b031614613583576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6001600160a01b0381166135c85760405162461bcd60e51b8152600401808060200182810382526026815260200180613e456026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61362b613aed565b6001600160a01b031661363c61229c565b6001600160a01b031614613685576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b60005b818110156118f5576001600b60008585858181106136a257fe5b602090810292909201356001600160a01b0316835250810191909152604001600020805460ff1916911515919091179055600101613688565b606080600060015b6001548111613720576000818152600a60205260409020600501546001600160a01b0386811691161415613718576001909101905b6001016136e3565b5060608167ffffffffffffffff8111801561373a57600080fd5b50604051908082528060200260200182016040528015613764578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561378057600080fd5b506040519080825280602002602001820160405280156137aa578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b038881169116141561383057808385815181106137ef57fe5b602002602001018181525050600a60008281526020019081526020016000206001015482858151811061381e57fe5b60209081029190910101526001909301925b6001016137b4565b606080600060015b60015481116138a1576000818152600a60205260409020600501546001600160a01b03868116911614801561388d57506000818152600a6020526040902060060154600160a01b900460ff165b15613899576001909101905b600101613840565b5060608167ffffffffffffffff811180156138bb57600080fd5b506040519080825280602002602001820160405280156138e5578160200160208202803683370190505b50905060608267ffffffffffffffff8111801561390157600080fd5b5060405190808252806020026020018201604052801561392b578160200160208202803683370190505b5060009350905060015b6001548111612452576000818152600a60205260409020600501546001600160a01b03888116911614801561398257506000818152600a6020526040902060060154600160a01b900460ff165b156139d5578083858151811061399457fe5b602002602001018181525050600a6000828152602001908152602001600020600101548285815181106139c357fe5b60209081029190910101526001909301925b600101613935565b6001600160a01b0381166000908152600c602052604081205460ff168015613a065790506112ce565b60005b600954811015613a755760098181548110613a2057fe5b60009182526020918290209181049091015460ff601f9092166101000a900416613a6d5760078181548110613a5157fe5b90600052602060002001544210613a6d576000925050506112ce565b600101613a09565b5060019392505050565b613a87613aed565b6001600160a01b0316613a9861229c565b6001600160a01b031614613ae1576040805162461bcd60e51b81526020600482018190526024820152600080516020613f0d833981519152604482015290519081900360640190fd5b6118f560068383613dc4565b3390565b6000613b0860018054613d1190919063ffffffff16565b905090565b6001805481019055565b60005b600954811015613b9f578360ff1660098281548110613b3557fe5b60009182526020918290209181049091015460ff601f9092166101000a9004161415613b97578260078281548110613b6957fe5b90600052602060002001819055508160088281548110613b8557fe5b600091825260209091200155506118f5565b600101613b1a565b50600980546001818101909255602081047f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805460ff808816601f9094166101000a93840293021916919091179055600780548083019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688018390556008805491820181556000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301819055505050565b600082821115613cab576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082613cc0575060006126ff565b82820282848281613ccd57fe5b0414613d0a5760405162461bcd60e51b8152600401808060200182810382526021815260200180613ebe6021913960400191505060405180910390fd5b9392505050565b600082820183811015613d0a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604051806101000160405280600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000151581525090565b828054828255906000526020600020908101928215613dff579160200282015b82811115613dff578235825591602001919060010190613de4565b50613e0b929150613e0f565b5090565b5b80821115613e0b5760008155600101613e1056feed6db11026ebcc6aae64d66d0a08276ffed7c75ac478965350fd6ab360b8d2094f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e7472616374206d7573742062652077686974656c6973746564206279206f776e65724f72646572206578636565647320746865206d6178206c696d6974206f66204e465473207065722077616c6c6574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f72646572206578636565647320746865206d6178206e756d626572206f6620617661696c61626c65204e4654734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572496e697469616c20737570706c792063616e6e6f74206265206d6f7265207468616e20617661696c61626c6520737570706c79a264697066735822122010376ced069e60311dd820062154a4d8f21d54ecf358ec43f66f80d26e2d96a464736f6c63430007030033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.