More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 7,063 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Winner Raffl... | 19149966 | 342 days ago | IN | 0 ETH | 0.00232078 | ||||
Buy Entry | 19149911 | 342 days ago | IN | 0.023 ETH | 0.00195446 | ||||
Buy Entry | 19149908 | 342 days ago | IN | 0.0115 ETH | 0.00188403 | ||||
Buy Entry | 19149882 | 342 days ago | IN | 0.0115 ETH | 0.00214057 | ||||
Buy Entry | 19149881 | 342 days ago | IN | 0.0115 ETH | 0.00190283 | ||||
Buy Entry | 19149858 | 342 days ago | IN | 0.0115 ETH | 0.00187748 | ||||
Buy Entry | 19149738 | 342 days ago | IN | 0.0115 ETH | 0.00206972 | ||||
Buy Entry | 19149705 | 342 days ago | IN | 0.0115 ETH | 0.00220925 | ||||
Buy Entry | 19149676 | 342 days ago | IN | 0.0115 ETH | 0.00229891 | ||||
Buy Entry | 19149613 | 342 days ago | IN | 0.0115 ETH | 0.00254533 | ||||
Buy Entry | 19149585 | 342 days ago | IN | 0.023 ETH | 0.00304805 | ||||
Buy Entry | 19149518 | 342 days ago | IN | 0.0115 ETH | 0.00305313 | ||||
Buy Entry | 19149429 | 342 days ago | IN | 0.0115 ETH | 0.00287895 | ||||
Buy Entry | 19149427 | 342 days ago | IN | 0.0115 ETH | 0.00322846 | ||||
Buy Entry | 19149420 | 342 days ago | IN | 0.0115 ETH | 0.00278602 | ||||
Buy Entry | 19149040 | 343 days ago | IN | 0.0115 ETH | 0.00377064 | ||||
Buy Entry | 19148903 | 343 days ago | IN | 0.0115 ETH | 0.00285488 | ||||
Buy Entry | 19148882 | 343 days ago | IN | 0.0115 ETH | 0.00303157 | ||||
Buy Entry | 19148880 | 343 days ago | IN | 0.0115 ETH | 0.0026037 | ||||
Buy Entry | 19148837 | 343 days ago | IN | 0.0115 ETH | 0.00258514 | ||||
Buy Entry | 19148161 | 343 days ago | IN | 0.0115 ETH | 0.00240012 | ||||
Buy Entry | 19147336 | 343 days ago | IN | 0.0115 ETH | 0.00209802 | ||||
Buy Entry | 19146033 | 343 days ago | IN | 0.0115 ETH | 0.00186286 | ||||
Buy Entry | 19144047 | 343 days ago | IN | 0.115 ETH | 0.00225543 | ||||
Buy Entry | 19143809 | 343 days ago | IN | 0.0115 ETH | 0.00210706 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19149970 | 342 days ago | 0.667 ETH | ||||
18870417 | 382 days ago | 0.015 ETH | ||||
18730173 | 401 days ago | 0.25 ETH | ||||
18683145 | 408 days ago | 0.01 ETH | ||||
18683145 | 408 days ago | 0.01 ETH | ||||
18683145 | 408 days ago | 0.01 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.007 ETH | ||||
18683145 | 408 days ago | 0.006 ETH | ||||
18683145 | 408 days ago | 0.005 ETH | ||||
18683145 | 408 days ago | 0.006 ETH | ||||
18683145 | 408 days ago | 0.002 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.001 ETH | ||||
18683145 | 408 days ago | 0.01 ETH | ||||
18681128 | 408 days ago | 0.015 ETH | ||||
18658060 | 411 days ago | 0.015 ETH | ||||
18626959 | 416 days ago | 1 ETH | ||||
18617307 | 417 days ago | 0.015 ETH | ||||
18617305 | 417 days ago | 0.015 ETH | ||||
18605722 | 419 days ago | 0.012 ETH |
Loading...
Loading
Contract Name:
RafldexCryptoCoins_V1_2
Compiler Version
v0.8.22+commit.4fc1097e
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.8.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/[email protected]/utils/cryptography/MerkleProof.sol"; contract RafldexCryptoCoins_V1_2 is Ownable, ReentrancyGuard, VRFConsumerBaseV2 { VRFCoordinatorV2Interface COORDINATOR; LinkTokenInterface LINKTOKEN; address constant vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; address constant link_token_contract = 0x514910771AF9Ca656af840dff83E8264EcF986CA; bytes32 private keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint16 private requestConfirmations = 3; uint32 private callbackGasLimit = 2500000; uint32 private numWords = 1; uint64 private subscriptionId = 810; struct RandomResult { uint256 randomNumber; uint256 nomalizedRandomNumber; } struct RaffleInfo { uint256 id; uint256 size; } mapping(uint256 => RandomResult) public requests; mapping(uint256 => RaffleInfo) public chainlinkRaffleInfo; event TokenAdded(address _address); event CollectionWhitelisted(address _collection, uint256 _rafflesnumber); event UserBlacklisted(address _address); event AddedTokenPayment(address _address); event RequestFulfilled( uint256 requestId, uint256 randomNumber, uint256 indexed raffleId ); event RequestSent(uint256 requestId, uint32 numWords); event RaffleCreated( uint256 indexed raffleId // address[] coinAddress, // uint256[] amount ); event RaffleDrawn( uint256 indexed raffleId, address indexed winner, uint256 amountRaised, uint256 randomNumber ); event EntryBought( uint256 indexed raffleId, address indexed buyer, uint256 currentSize, uint256 numberEntries ); event EntryGifted( uint256 indexed raffleId, address indexed gifter, address indexed buyer, uint256 currentSize, uint256 numberEntries ); event RaffleSetNotToCancel(uint256 indexed raffleId, address creator); event RaffleCancelled(uint256 indexed raffleId, uint256 amountRaised); event SetWinnerTriggered(uint256 indexed raffleId, uint256 amountRaised); event RaffleRootChanged(uint256 indexed raffleId, bytes32 root); struct EntriesBought { address player; uint256 currentEntriesLength; uint256 entries; } mapping(uint256 => EntriesBought[]) public entriesList; enum STATUS { CREATED, PENDING_DRAW, DRAWING, DRAWN, CANCELLED } struct RaffleStruct { STATUS status; uint256 endTime; address[] collateralAddress; uint256[] collateralAmount; uint256 entriesSupply; uint256 pricePerEntry; uint256 maxEntriesUser; address winner; uint256 randomNumber; address creator; uint256 platformPercentage; address tokenPayment; uint256 entriesSold; bool canCancel; bytes32 root; } RaffleStruct[] public raffles; struct RaffleCreationHolder { uint256 startTime; uint256 endTime; uint256 countRaffles; } mapping(bytes32 => RaffleCreationHolder) public raffleCreationData; mapping(address => uint256) public numberRafflesMonthCollection; mapping(bytes32 => uint256) public entriesInfo; bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR"); bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; address payable private platformWallet = payable(0x2300Ae69d7D1Ea0457aD79e822422888e3Ee3e87); uint256 public CHAINLINK_RAFFLE_FEE = 0.015 ether; uint256 public HOLDER_CREATE_RAFFLE_FEE = 0.02 ether; uint256 public HOLDER_CREATE_RAFFLE_FEE_DISCOUNT = 0.01 ether; uint256 public CANCELATION_RAFFLE_FEE_BASE = 0 ether; uint256 public SUBSCRIPTION_PRICE = 0.5 ether; uint256 public COMMISSION_HOLDERS = 500; //5 % uint256 public COMMISSION_HOLDERS_DISCOUNT = 350; //3.5% uint256 public COMMISSION_SUBSCRIBERS = 300; //3% uint256 public COMMISSION_SUBSCRIBERS_DISCOUNT = 150; //1.5% mapping(address => bool) public TokenAddresses; mapping(address => bool) public TokenPaymentAddresses; mapping(address => bool) public DiscountTokenPayments; bool public createEnabledHolders = true; bool public createEnabledSubscribers = true; struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; constructor() VRFConsumerBaseV2(vrfCoordinator) { COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); LINKTOKEN = LinkTokenInterface(link_token_contract); _setupRole(OPERATOR_ROLE, msg.sender); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } modifier onlyRole(bytes32 role, address account) { _checkRole(role, account); _; } function createRaffleOperator( uint256 _endTime, address[] memory _collateralAddress, uint256[] memory _collateralAmount, address _tokenPayment, uint256 _pricePerEntry, uint256 _maxEntriesRaffle, uint256 _maxEntriesUser, bytes32 _root ) external payable onlyRole(OPERATOR_ROLE, msg.sender) returns (uint256) { require( _endTime > getCurrentTime(), "End time can't be < as current time." ); require(_maxEntriesRaffle > 0, "No entries"); require( _maxEntriesUser > 0 && _maxEntriesUser <= _maxEntriesRaffle, "Min entries user > 0 and <= max entries raffle" ); require( _collateralAddress.length == _collateralAmount.length, "Require same length" ); if (_tokenPayment != address(0)) { require( TokenPaymentAddresses[_tokenPayment], "Token Address not added " ); } uint256 totalEth; for (uint256 i = 0; i < _collateralAddress.length; i++) { require(_collateralAmount[i] > 0, "Amount can't be null"); if (_collateralAddress[i] == address(0)) { totalEth += _collateralAmount[i]; } else { require( TokenAddresses[_collateralAddress[i]], "Token Address not added " ); /* require( IERC20(_collateralAddress[i]).balanceOf(msg.sender) >= _collateralAmount[i], "Need to have in wallet equal or more than ERC20 Token price" );*/ safeTransferFrom( msg.sender, address(this), _collateralAddress[i], _collateralAmount[i] ); } } require(msg.value == totalEth, "Total mismatched"); uint256 _commissionInBasicPoints = 0; RaffleStruct memory raffle = RaffleStruct({ status: STATUS.CREATED, endTime: _endTime, collateralAddress: _collateralAddress, collateralAmount: _collateralAmount, pricePerEntry: _pricePerEntry, entriesSupply: _maxEntriesRaffle, maxEntriesUser: _maxEntriesUser, winner: address(0), randomNumber: 0, creator: msg.sender, platformPercentage: _commissionInBasicPoints, tokenPayment: _tokenPayment, entriesSold: 0, canCancel: true, root: _root }); raffles.push(raffle); uint256 idRaffle = raffles.length - 1; EntriesBought memory entryBought = EntriesBought({ player: address(0), currentEntriesLength: 0, entries: 0 }); entriesList[idRaffle].push(entryBought); delete entriesList[idRaffle][0]; emit RaffleCreated(idRaffle); return idRaffle; } function createRaffleSubscriber( uint256 _endTime, address[] memory _collateralAddress, uint256[] memory _collateralAmount, address _tokenPayment, uint256 _pricePerEntry, uint256 _maxEntriesRaffle, uint256 _maxEntriesUser, bytes32 _root ) external payable nonReentrant returns (uint256) { require( _endTime > getCurrentTime(), "End time can't be < as current time." ); require( createEnabledSubscribers, "Create raffle noot set for subscribers." ); require(msg.value >= CHAINLINK_RAFFLE_FEE, "Invalid funds provided"); require(_maxEntriesRaffle > 0, "No entries"); require( _maxEntriesUser > 0 && _maxEntriesUser <= _maxEntriesRaffle, "Min entries user > 0 and <= max entries raffle" ); require( _collateralAddress.length == _collateralAmount.length, "Require same length" ); if (_tokenPayment != address(0)) { require( TokenPaymentAddresses[_tokenPayment], "Token Address not added " ); } uint256 totalEth; for (uint256 i = 0; i < _collateralAddress.length; i++) { require(_collateralAmount[i] > 0, "Amount can't be null"); if (_collateralAddress[i] == address(0)) { totalEth += _collateralAmount[i]; } else { require( TokenAddresses[_collateralAddress[i]], "Token Address not added " ); safeTransferFrom( msg.sender, address(this), _collateralAddress[i], _collateralAmount[i] ); } } require(msg.value >= totalEth + CHAINLINK_RAFFLE_FEE , "Total mismatched"); uint256 _commissionInBasicPoints = 0; if (DiscountTokenPayments[_tokenPayment]) { _commissionInBasicPoints = COMMISSION_SUBSCRIBERS_DISCOUNT; } else { _commissionInBasicPoints = COMMISSION_SUBSCRIBERS; } platformWallet.transfer(CHAINLINK_RAFFLE_FEE); RaffleStruct memory raffle = RaffleStruct({ status: STATUS.CREATED, endTime: _endTime, collateralAddress: _collateralAddress, collateralAmount: _collateralAmount, pricePerEntry: _pricePerEntry, entriesSupply: _maxEntriesRaffle, maxEntriesUser: _maxEntriesUser, winner: address(0), randomNumber: 0, creator: msg.sender, platformPercentage: _commissionInBasicPoints, tokenPayment: _tokenPayment, entriesSold: 0, canCancel: true, root: _root }); raffles.push(raffle); uint256 idRaffle = raffles.length - 1; EntriesBought memory entryBought = EntriesBought({ player: address(0), currentEntriesLength: 0, entries: 0 }); entriesList[idRaffle].push(entryBought); delete entriesList[idRaffle][0]; emit RaffleCreated(idRaffle); return idRaffle; } function createRaffleHolder( address createRaffleCollection, uint256 createRaffleTokenId, uint256 _endTime, address[] memory _collateralAddress, uint256[] memory _collateralAmount, address _tokenPayment, uint256 _pricePerEntry, uint256 _maxEntriesRaffle, uint256 _maxEntriesUser ) external payable nonReentrant returns (uint256) { require( _endTime > getCurrentTime(), "End time can't be < as current time." ); require(createEnabledHolders, "Create raffle not set for holders."); require(_maxEntriesRaffle > 0, "No entries"); require( _maxEntriesUser > 0 && _maxEntriesUser <= _maxEntriesRaffle, "Min entries user > 0 and <= max entries raffle" ); require( _collateralAddress.length == _collateralAmount.length, "Require same length" ); if (_tokenPayment != address(0)) { require( TokenPaymentAddresses[_tokenPayment], "Token Address not added " ); } IERC721 createraffleNFT = IERC721(createRaffleCollection); require( createraffleNFT.ownerOf(createRaffleTokenId) == msg.sender, "Not the owner of tokenId" ); bytes32 hash = keccak256( abi.encode(createRaffleCollection, createRaffleTokenId) ); if (raffleCreationData[hash].endTime > getCurrentTime()) { require( numberRafflesRemainingPerNFT( createRaffleCollection, createRaffleTokenId ) > 0, "Created too many raffles with your NFT you hold." ); raffleCreationData[hash].countRaffles++; } else { raffleCreationData[hash].startTime = getCurrentTime(); raffleCreationData[hash].endTime = getCurrentTime() + 30 days; raffleCreationData[hash].countRaffles = 1; } uint256 totalEth; for (uint256 i = 0; i < _collateralAddress.length; i++) { require(_collateralAmount[i] > 0, "Amount can't be null"); if (_collateralAddress[i] == address(0)) { totalEth += _collateralAmount[i]; } else { require( TokenAddresses[_collateralAddress[i]], "Token Address not added " ); safeTransferFrom( msg.sender, address(this), _collateralAddress[i], _collateralAmount[i] ); } } uint256 _commissionInBasicPoints = 0; if (DiscountTokenPayments[_tokenPayment]) { require( msg.value >= HOLDER_CREATE_RAFFLE_FEE_DISCOUNT + CHAINLINK_RAFFLE_FEE + totalEth, "Invalid funds provided" ); platformWallet.transfer(HOLDER_CREATE_RAFFLE_FEE_DISCOUNT + CHAINLINK_RAFFLE_FEE); _commissionInBasicPoints = COMMISSION_HOLDERS_DISCOUNT; } else { require( msg.value >= HOLDER_CREATE_RAFFLE_FEE + CHAINLINK_RAFFLE_FEE + totalEth, "Invalid funds provided" ); platformWallet.transfer(HOLDER_CREATE_RAFFLE_FEE + CHAINLINK_RAFFLE_FEE); _commissionInBasicPoints = COMMISSION_HOLDERS; } RaffleStruct memory raffle = RaffleStruct({ status: STATUS.CREATED, endTime: _endTime, collateralAddress: _collateralAddress, collateralAmount: _collateralAmount, pricePerEntry: _pricePerEntry, entriesSupply: _maxEntriesRaffle, maxEntriesUser: _maxEntriesUser, winner: address(0), randomNumber: 0, creator: msg.sender, platformPercentage: _commissionInBasicPoints, tokenPayment: _tokenPayment, entriesSold: 0, canCancel: true, root: bytes32(0) }); raffles.push(raffle); uint256 idRaffle = raffles.length - 1; EntriesBought memory entryBought = EntriesBought({ player: address(0), currentEntriesLength: 0, entries: 0 }); entriesList[idRaffle].push(entryBought); delete entriesList[idRaffle][0]; emit RaffleCreated(idRaffle); return idRaffle; } function giftEntry( uint256 _raffleId, uint256 _numberEntries, address _user, bytes32[] memory proof ) external payable { RaffleStruct storage raffle = raffles[_raffleId]; require(raffle.endTime > getCurrentTime(), "Raffle Closed on time"); require(raffle.status == STATUS.CREATED, "Raffle is not in CREATED"); if (raffle.root != bytes32(0)) { require( isValid( proof, raffle.root, keccak256(abi.encodePacked(msg.sender)) ), "Not part of Whitelist" ); } require( _numberEntries > 0 && _numberEntries <= raffle.maxEntriesUser, "Number entries can't be 0 or more than max entries per user." ); require( _user != address(0) && _user != msg.sender, "Address cant't be null address / msg sender" ); require( raffle.entriesSold + _numberEntries <= raffles[_raffleId].entriesSupply, "Raffle has reached max entries" ); if (raffle.tokenPayment == address(0)) { require( msg.value == raffle.pricePerEntry * _numberEntries, "msg.value must be equal to the price" ); } else { IERC20(raffle.tokenPayment).transferFrom( msg.sender, address(this), raffle.pricePerEntry * _numberEntries ); } bytes32 hash = keccak256(abi.encode(msg.sender, _raffleId)); require( entriesInfo[hash] + _numberEntries <= raffle.maxEntriesUser, "Max entries user reached." ); entriesInfo[hash] += _numberEntries; EntriesBought memory entryBought = EntriesBought({ player: _user, currentEntriesLength: uint256(raffle.entriesSold + _numberEntries), entries: _numberEntries }); entriesList[_raffleId].push(entryBought); raffle.entriesSold += _numberEntries; emit EntryGifted( _raffleId, msg.sender, _user, raffle.entriesSold, _numberEntries ); } function buyEntry( uint256 _raffleId, uint256 _numberEntries, bytes32[] memory proof ) external payable { RaffleStruct storage raffle = raffles[_raffleId]; require(raffle.endTime > getCurrentTime(), "Raffle Closed on time"); require(raffle.status == STATUS.CREATED, "Raffle is not in CREATED"); require( _numberEntries > 0 && _numberEntries <= raffle.maxEntriesUser, "Number entries can't be 0 or more than max entries per user." ); require(msg.sender != address(0), "Address cant't be null address"); require( raffle.entriesSold + _numberEntries <= raffles[_raffleId].entriesSupply, "Raffle has reached max entries" ); if (raffle.root != bytes32(0)) { require( isValid( proof, raffle.root, keccak256(abi.encodePacked(msg.sender)) ), "Not part of the Whitelist" ); } if (raffle.tokenPayment == address(0)) { require( msg.value == raffle.pricePerEntry * _numberEntries, "msg.value must be equal to the price" ); } else { IERC20(raffle.tokenPayment).transferFrom( msg.sender, address(this), raffle.pricePerEntry * _numberEntries ); } bytes32 hash = keccak256(abi.encode(msg.sender, _raffleId)); require( entriesInfo[hash] + _numberEntries <= raffle.maxEntriesUser, "Max entries user reached." ); entriesInfo[hash] += _numberEntries; EntriesBought memory entryBought = EntriesBought({ player: msg.sender, currentEntriesLength: uint256(raffle.entriesSold + _numberEntries), entries: _numberEntries }); entriesList[_raffleId].push(entryBought); raffle.entriesSold += _numberEntries; emit EntryBought(_raffleId, msg.sender, raffle.entriesSold, _numberEntries); } function getCurrentTime() public view returns (uint256) { return block.timestamp; } function addorRemoveTokens(address[] memory _addresses, bool _isAdded) external onlyRole(OPERATOR_ROLE, msg.sender) { for (uint256 i = 0; i < _addresses.length; i++) { TokenAddresses[_addresses[i]] = _isAdded; if (_isAdded == true) { emit TokenAdded(_addresses[i]); } } } function ChangeCancellationFeeBase(uint256 _fee) external onlyRole(OPERATOR_ROLE, msg.sender) { CANCELATION_RAFFLE_FEE_BASE = _fee; } function ChangeSubscriptionId(uint64 _id) external onlyRole(OPERATOR_ROLE, msg.sender) { subscriptionId = _id; } function ChangecallbackGasLimit(uint32 _number) external onlyRole(OPERATOR_ROLE, msg.sender) { callbackGasLimit = _number; } function ChangeKeyHash(bytes32 _hash) external onlyRole(OPERATOR_ROLE, msg.sender) { keyHash = _hash; } function setNumberRafflesCollectionWhitelistedPerMonth( address[] memory _collection, uint256[] memory _rafflesnumber ) external onlyRole(OPERATOR_ROLE, msg.sender) { require( _collection.length == _rafflesnumber.length, "Require same length" ); for (uint256 i = 0; i < _collection.length; i++) { numberRafflesMonthCollection[_collection[i]] = _rafflesnumber[i]; emit CollectionWhitelisted(_collection[i], _rafflesnumber[i]); } } function numberRafflesRemainingPerNFT( address _collectionaddress, uint256 _tokenid ) public view returns (uint256) { uint256 numberRafflesNFT = 0; if (numberRafflesMonthCollection[_collectionaddress] > 0) { bytes32 hashNFT = keccak256( abi.encode(_collectionaddress, _tokenid) ); numberRafflesNFT = numberRafflesMonthCollection[_collectionaddress] - raffleCreationData[hashNFT].countRaffles; } return numberRafflesNFT; } function changePlatformWalletAddress(address payable _address) external onlyOwner { platformWallet = _address; } function getEntriesBought(uint256 _raffleId) public view returns (EntriesBought[] memory) { return entriesList[_raffleId]; } function addTokenPayments(address[] memory _address, bool _isAdded) external onlyRole(OPERATOR_ROLE, msg.sender) { for (uint256 i = 0; i < _address.length; i++) { TokenPaymentAddresses[_address[i]] = _isAdded; if (_isAdded == true) { emit AddedTokenPayment(_address[i]); } } } function addDiscountTokenPayment(address _address, bool _isAdded) external onlyRole(OPERATOR_ROLE, msg.sender) { DiscountTokenPayments[_address] = _isAdded; } function toggleCreateHoldersEnabled() external onlyRole(OPERATOR_ROLE, msg.sender) { createEnabledHolders = !createEnabledHolders; } function toggleCreateSubscribersEnabled() external onlyRole(OPERATOR_ROLE, msg.sender) { createEnabledSubscribers = !createEnabledSubscribers; } function getWinnerAddressFromRandom( uint256 _raffleId, uint256 _normalizedRandomNumber ) public view returns (address) { address winner; EntriesBought[] storage entries = entriesList[_raffleId]; for (uint256 i = 0; i < entries.length; i++) { uint256 entriesIndex = entries[i].currentEntriesLength; if (entriesIndex >= _normalizedRandomNumber) { winner = entries[i].player; break; } } require(winner != address(0), "Winner not found"); return winner; } function requestRandomWords(uint256 _id, uint256 _entriesSold) internal returns (uint256 requestId) { requestId = COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, numWords ); chainlinkRaffleInfo[requestId] = RaffleInfo({ id: _id, size: _entriesSold }); RaffleStruct storage raffle = raffles[_id]; raffle.status = STATUS.DRAWING; emit RequestSent(requestId, numWords); return requestId; } function requestRandomWordsRetry(uint256 _id) external onlyRole(OPERATOR_ROLE, msg.sender) returns (uint256 requestId) { RaffleStruct storage raffle = raffles[_id]; requestId = COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, numWords ); chainlinkRaffleInfo[requestId] = RaffleInfo({ id: _id, size: raffle.entriesSold }); raffle.status = STATUS.DRAWING; emit RequestSent(requestId, numWords); return requestId; } function transferNFTsAndFunds( uint256 _raffleId, uint256 _normalizedRandomNumber ) internal nonReentrant { RaffleStruct storage raffle = raffles[_raffleId]; raffle.randomNumber = _normalizedRandomNumber; raffle.winner = (raffle.entriesSold == 0) ? raffle.creator : getWinnerAddressFromRandom(_raffleId, _normalizedRandomNumber); safeMultipleTransfersFrom( address(this), raffle.winner, raffle.collateralAddress, raffle.collateralAmount ); uint256 amountRaised = raffle.entriesSold * raffle.pricePerEntry; uint256 amountForPlatform = (amountRaised * raffle.platformPercentage) / 10000; uint256 amountForSeller = amountRaised - amountForPlatform; if (raffle.tokenPayment == address(0)) { (bool sent, ) = raffle.creator.call{value: amountForSeller}(""); require(sent, "Failed to send Eth"); (bool sent2, ) = platformWallet.call{value: amountForPlatform}(""); require(sent2, "Failed send Eth to Platform"); } else { IERC20(raffle.tokenPayment).approve(address(this), amountRaised); bool sent = IERC20(raffle.tokenPayment).transferFrom( address(this), raffle.creator, amountForSeller ); require(sent, "Failed to send ERC20 Token"); bool sent2 = IERC20(raffle.tokenPayment).transferFrom( address(this), platformWallet, amountForPlatform ); require(sent2, "Failed to send ERC20 Token to platform"); } raffle.status = STATUS.DRAWN; emit RaffleDrawn( _raffleId, raffle.winner, amountRaised, raffle.randomNumber ); } function fulfillRandomWords( uint256 _requestId, uint256[] memory _randomWords ) internal override { uint256 normalizedRandomNumber = (_randomWords[0] % chainlinkRaffleInfo[_requestId].size) + 1; RaffleStruct storage raffle = raffles[ chainlinkRaffleInfo[_requestId].id ]; raffle.randomNumber = normalizedRandomNumber; RandomResult memory result = RandomResult({ randomNumber: _randomWords[0], nomalizedRandomNumber: normalizedRandomNumber }); requests[chainlinkRaffleInfo[_requestId].id] = result; emit RequestFulfilled( _requestId, normalizedRandomNumber, chainlinkRaffleInfo[_requestId].id ); transferNFTsAndFunds( chainlinkRaffleInfo[_requestId].id, normalizedRandomNumber ); } function setWinnerRaffle(uint256 _raffleId) external nonReentrant { RaffleStruct storage raffle = raffles[_raffleId]; require( raffle.creator == msg.sender || hasRole(OPERATOR_ROLE, msg.sender), "Not raffle creator or operator." ); if ( hasRole(OPERATOR_ROLE, msg.sender) && raffle.creator != msg.sender ) { require( raffle.entriesSold == raffle.entriesSupply || raffle.endTime <= getCurrentTime(), "Raffle still opened or not sold out" ); } require(raffle.status == STATUS.CREATED, "Raffle in wrong status"); raffle.status = STATUS.PENDING_DRAW; uint256 entriesSold = raffle.entriesSold; uint256 amountRaised = entriesSold * raffle.pricePerEntry; if (entriesSold == 0) { raffle.status = STATUS.DRAWING; transferNFTsAndFunds(_raffleId, raffle.randomNumber); } else { requestRandomWords(_raffleId, entriesSold); } emit SetWinnerTriggered(_raffleId, amountRaised); } function setWinnerRaffleEmergency(uint256 _raffleId) external onlyRole(OPERATOR_ROLE, msg.sender) { //function in case that chainlink vrf2 doesnt work RaffleStruct storage raffle = raffles[_raffleId]; if ( raffle.creator != msg.sender ) { require( raffle.entriesSold == raffle.entriesSupply || raffle.endTime <= getCurrentTime(), "Raffle still opened or not sold out" ); } uint256 entriesSold = raffle.entriesSold; bytes32 baseHash = keccak256( abi.encodePacked( block.number, block.timestamp, block.gaslimit, block.coinbase ) ); uint256 normalizedRandomNumber = (uint256(baseHash) % entriesSold) + 1; raffle.randomNumber = normalizedRandomNumber; transferNFTsAndFunds(_raffleId, normalizedRandomNumber); } function cancelRaffle(uint256 _raffleId) external payable nonReentrant { RaffleStruct storage raffle = raffles[_raffleId]; require( raffle.creator == msg.sender || hasRole(OPERATOR_ROLE, msg.sender), "Not raffle creator or Operator." ); require( raffle.endTime > getCurrentTime(), "End time can't be < as current time." ); require(raffle.status == STATUS.CREATED, "Wrong status"); if (!hasRole(OPERATOR_ROLE, msg.sender)) { require(raffle.canCancel, "User Can't cancel"); if (raffle.entriesSold == 0) { require(msg.value == 0, "Not cancelation fee value."); } else { require( msg.value >= CANCELATION_RAFFLE_FEE_BASE, "Not cancelation fee value." ); platformWallet.transfer(CANCELATION_RAFFLE_FEE_BASE); } } uint256 txLength = entriesList[_raffleId].length; require( txLength <= 200, "Not cancelation available when it's more than 200 txs." ); uint256 amountRaised = raffle.entriesSold * raffle.pricePerEntry; if (raffle.tokenPayment == address(0)) { for (uint256 i = 0; i < txLength; i++) { address user = entriesList[_raffleId][i].player; if (user != address(0)) { uint256 amountToSend = raffle.pricePerEntry * entriesList[_raffleId][i].entries; payable(user).transfer(amountToSend); } } } else { IERC20(raffle.tokenPayment).approve(address(this), amountRaised); for (uint256 i = 0; i < txLength; i++) { address user = entriesList[_raffleId][i].player; if (user != address(0)) { uint256 amountToSend = raffle.pricePerEntry * entriesList[_raffleId][i].entries; IERC20(raffle.tokenPayment).transferFrom( address(this), user, amountToSend ); } } } safeMultipleTransfersFrom( address(this), raffle.creator, raffle.collateralAddress, raffle.collateralAmount ); raffle.status = STATUS.CANCELLED; emit RaffleCancelled(_raffleId, amountRaised); } function safeMultipleTransfersFrom( address from, address to, address[] memory tokenAddresses, uint256[] memory tokenAmounts ) internal virtual { for (uint256 i = 0; i < tokenAddresses.length; i++) { safeTransferFrom(from, to, tokenAddresses[i], tokenAmounts[i]); } } function safeTransferFrom( address from, address to, address tokenAddress, uint256 tokenAmount ) internal virtual { if (tokenAddress == address(0)) { payable(to).transfer(tokenAmount); } else { if (from == address(this)) { IERC20(tokenAddress).approve(address(this), tokenAmount); } IERC20(tokenAddress).transferFrom(from, to, tokenAmount); } } function setRaffleToNotCancel(uint256 _raffleId) external nonReentrant { RaffleStruct storage raffle = raffles[_raffleId]; require(raffle.creator == msg.sender, "Not raffle creator."); if (raffle.canCancel == true) { raffle.canCancel = false; emit RaffleSetNotToCancel(_raffleId, msg.sender); } } function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].members[account]; } function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } function grantRole(bytes32 role, address account) public virtual onlyRole(OPERATOR_ROLE, msg.sender) { _grantRole(role, account); } function revokeRole(bytes32 role, address account) public virtual onlyRole(OPERATOR_ROLE, msg.sender) { _revokeRole(role, account); } function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; } } function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; } } function isValid( bytes32[] memory proof, bytes32 root, bytes32 leaf ) public view virtual returns (bool) { return MerkleProof.verify(proof, root, leaf); } function changeRootRaffle(uint256 _raffleId, bytes32 _root) external nonReentrant { RaffleStruct storage raffle = raffles[_raffleId]; require(raffle.creator == msg.sender, "Not raffle creator."); raffle.root = _root; emit RaffleRootChanged(_raffleId, _root); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; /* * @notice Check to see if there exists a request commitment consumers * for all consumers and keyhashes for a given sub. * @param subId - ID of the subscription * @return true if there exists at least one unfulfilled request for the subscription, false * otherwise. */ function pendingRequestExists(uint64 subId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(address owner) external view returns (uint256 balance); function decimals() external view returns (uint8 decimalPlaces); function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); function increaseApproval(address spender, uint256 subtractedValue) external; function name() external view returns (string memory tokenName); function symbol() external view returns (string memory tokenSymbol); function totalSupply() external view returns (uint256 totalTokensIssued); function transfer(address to, uint256 value) external returns (bool success); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function transferFrom( address from, address to, uint256 value ) external returns (bool success); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"AddedTokenPayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"_rafflesnumber","type":"uint256"}],"name":"CollectionWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"currentSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberEntries","type":"uint256"}],"name":"EntryBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"gifter","type":"address"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"currentSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberEntries","type":"uint256"}],"name":"EntryGifted","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":"uint256","name":"raffleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountRaised","type":"uint256"}],"name":"RaffleCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"}],"name":"RaffleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountRaised","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"RaffleDrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"RaffleRootChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":false,"internalType":"address","name":"creator","type":"address"}],"name":"RaffleSetNotToCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"}],"name":"RequestFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"numWords","type":"uint32"}],"name":"RequestSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"raffleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountRaised","type":"uint256"}],"name":"SetWinnerTriggered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"UserBlacklisted","type":"event"},{"inputs":[],"name":"CANCELATION_RAFFLE_FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CHAINLINK_RAFFLE_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMISSION_HOLDERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMISSION_HOLDERS_DISCOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMISSION_SUBSCRIBERS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMISSION_SUBSCRIBERS_DISCOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"ChangeCancellationFeeBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"ChangeKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_id","type":"uint64"}],"name":"ChangeSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_number","type":"uint32"}],"name":"ChangecallbackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DiscountTokenPayments","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HOLDER_CREATE_RAFFLE_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HOLDER_CREATE_RAFFLE_FEE_DISCOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUBSCRIPTION_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TokenAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TokenPaymentAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_isAdded","type":"bool"}],"name":"addDiscountTokenPayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_address","type":"address[]"},{"internalType":"bool","name":"_isAdded","type":"bool"}],"name":"addTokenPayments","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool","name":"_isAdded","type":"bool"}],"name":"addorRemoveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"},{"internalType":"uint256","name":"_numberEntries","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"buyEntry","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"cancelRaffle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainlinkRaffleInfo","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"changePlatformWalletAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"changeRootRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createEnabledHolders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"createEnabledSubscribers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"createRaffleCollection","type":"address"},{"internalType":"uint256","name":"createRaffleTokenId","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"address[]","name":"_collateralAddress","type":"address[]"},{"internalType":"uint256[]","name":"_collateralAmount","type":"uint256[]"},{"internalType":"address","name":"_tokenPayment","type":"address"},{"internalType":"uint256","name":"_pricePerEntry","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesRaffle","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesUser","type":"uint256"}],"name":"createRaffleHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"address[]","name":"_collateralAddress","type":"address[]"},{"internalType":"uint256[]","name":"_collateralAmount","type":"uint256[]"},{"internalType":"address","name":"_tokenPayment","type":"address"},{"internalType":"uint256","name":"_pricePerEntry","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesRaffle","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesUser","type":"uint256"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"createRaffleOperator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"address[]","name":"_collateralAddress","type":"address[]"},{"internalType":"uint256[]","name":"_collateralAmount","type":"uint256[]"},{"internalType":"address","name":"_tokenPayment","type":"address"},{"internalType":"uint256","name":"_pricePerEntry","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesRaffle","type":"uint256"},{"internalType":"uint256","name":"_maxEntriesUser","type":"uint256"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"createRaffleSubscriber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"entriesInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"entriesList","outputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint256","name":"currentEntriesLength","type":"uint256"},{"internalType":"uint256","name":"entries","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"getEntriesBought","outputs":[{"components":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint256","name":"currentEntriesLength","type":"uint256"},{"internalType":"uint256","name":"entries","type":"uint256"}],"internalType":"struct RafldexCryptoCoins_V1_2.EntriesBought[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"},{"internalType":"uint256","name":"_normalizedRandomNumber","type":"uint256"}],"name":"getWinnerAddressFromRandom","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"},{"internalType":"uint256","name":"_numberEntries","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"giftEntry","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"isValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numberRafflesMonthCollection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collectionaddress","type":"address"},{"internalType":"uint256","name":"_tokenid","type":"uint256"}],"name":"numberRafflesRemainingPerNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"raffleCreationData","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"countRaffles","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"raffles","outputs":[{"internalType":"enum RafldexCryptoCoins_V1_2.STATUS","name":"status","type":"uint8"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"entriesSupply","type":"uint256"},{"internalType":"uint256","name":"pricePerEntry","type":"uint256"},{"internalType":"uint256","name":"maxEntriesUser","type":"uint256"},{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint256","name":"randomNumber","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"platformPercentage","type":"uint256"},{"internalType":"address","name":"tokenPayment","type":"address"},{"internalType":"uint256","name":"entriesSold","type":"uint256"},{"internalType":"bool","name":"canCancel","type":"bool"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"requestRandomWordsRetry","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"uint256","name":"randomNumber","type":"uint256"},{"internalType":"uint256","name":"nomalizedRandomNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_collection","type":"address[]"},{"internalType":"uint256[]","name":"_rafflesnumber","type":"uint256[]"}],"name":"setNumberRafflesCollectionWhitelistedPerMonth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"setRaffleToNotCancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"setWinnerRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"setWinnerRaffleEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleCreateHoldersEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleCreateSubscribersEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040527f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef600455600580546001600160901b0319166b032a00000001002625a00003179055600d8054732300ae69d7d1ea0457ad79e822422888e3ee3e876001600160a01b031990911617905566354a6ba7a18000600e5566470de4df820000600f55662386f26fc100006010555f6011556706f05b59d3b200006012556101f460135561015e60145561012c6015556096601655601a805461ffff1916610101179055348015620000d1575f80fd5b5073271682deb8c4e0901d1a1550ad2e64d568e69909620000f23362000188565b600180556001600160a01b0316608052600280546001600160a01b031990811673271682deb8c4e0901d1a1550ad2e64d568e69909179091556003805490911673514910771af9ca656af840dff83e8264ecf986ca179055620001767f523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0c33620001d7565b620001825f33620001d7565b62000241565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001e38282620001e7565b5050565b5f828152601b602090815260408083206001600160a01b038516845290915290205460ff16620001e3575f828152601b602090815260408083206001600160a01b03851684529091529020805460ff191660011790555050565b608051615761620002615f395f8181610bdb0152610c1d01526157615ff3fe608060405260043610610366575f3560e01c80638354a49c116101c8578063bb54c33b116100fd578063d703ece81161009d578063f2fde38b1161006d578063f2fde38b14610a30578063f369145514610a4f578063f5b541a614610a6e578063f860cec514610a8e575f80fd5b8063d703ece8146109e0578063da274b30146109f5578063e096839b14610a08578063ebb4c01014610a1d575f80fd5b8063cf7874a3116100d8578063cf7874a314610961578063d0038ff414610993578063d3c4d664146109ac578063d547741f146109c1575f80fd5b8063bb54c33b14610925578063bc0618c314610938578063cb77c1471461094d575f80fd5b806391d1485411610168578063a217fddf11610143578063a217fddf146108b3578063a79bdca4146108c6578063aaced470146108db578063b2957ac114610906575f80fd5b806391d14854146108565780639bab070b146108755780639dde45da14610894575f80fd5b806388ec392c116101a357806388ec392c146107c95780638da5cb5b146107e85780638dfc13b614610818578063903c6db614610837575f80fd5b80638354a49c1461076d578063888a56371461078c57806388aaf2a9146107ab575f80fd5b80634c86bca11161029e5780636bf3f8f61161023e578063715018a611610219578063715018a6146106e0578063719c0a13146106f457806375e4d3fd1461071357806381d12c5814610726575f80fd5b80636bf3f8f61461068a5780636fd96903146106b8578063701aa1d2146106cd575f80fd5b80635d4bc0ce116102795780635d4bc0ce1461060b5780635fba31711461064357806369f26fb0146106565780636a890cb214610675575f80fd5b80634c86bca1146105ac57806353e53a87146105c1578063581343c4146105ec575f80fd5b80632bb022b7116103095780633cb7ed3b116102e45780633cb7ed3b146104eb5780634169933f1461051957806346988a401461056e5780634944a4801461058d575f80fd5b80632bb022b71461048b5780632f2ff15d146104a0578063365e3658146104bf575f80fd5b806320c741b31161034457806320c741b3146103f357806321f4bd611461041257806329cb924d1461045057806329dd67f91461046c575f80fd5b8063013805c51461036a5780630f5e812e146103b35780631fe543e3146103d4575b5f80fd5b348015610375575f80fd5b50610389610384366004614bea565b610aa2565b604080516001600160a01b0390941684526020840192909252908201526060015b60405180910390f35b3480156103be575f80fd5b506103d26103cd366004614c0a565b610aea565b005b3480156103df575f80fd5b506103d26103ee366004614cf3565b610bd0565b3480156103fe575f80fd5b506103d261040d366004614d57565b610c58565b34801561041d575f80fd5b5061044061042c366004614d8e565b60186020525f908152604090205460ff1681565b60405190151581526020016103aa565b34801561045b575f80fd5b50425b6040519081526020016103aa565b348015610477575f80fd5b506103d2610486366004614c0a565b610c9d565b348015610496575f80fd5b5061045e60115481565b3480156104ab575f80fd5b506103d26104ba366004614da9565b610cbd565b3480156104ca575f80fd5b506104de6104d9366004614c0a565b610ce6565b6040516103aa9190614dcc565b3480156104f6575f80fd5b50610440610505366004614d8e565b60176020525f908152604090205460ff1681565b348015610524575f80fd5b50610553610533366004614c0a565b600a6020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103aa565b348015610579575f80fd5b5061045e610588366004614e2d565b610d77565b348015610598575f80fd5b506103d26105a7366004614ebc565b610dfe565b3480156105b7575f80fd5b5061045e600f5481565b3480156105cc575f80fd5b5061045e6105db366004614c0a565b600c6020525f908152604090205481565b3480156105f7575f80fd5b506103d2610606366004614c0a565b610f2b565b348015610616575f80fd5b5061062a610625366004614c0a565b611032565b6040516103aa9d9c9b9a99989796959493929190614f25565b6103d2610651366004614c0a565b6110c0565b348015610661575f80fd5b506103d2610670366004614d8e565b61173f565b348015610680575f80fd5b5061045e60125481565b348015610695575f80fd5b506104406106a4366004614d8e565b60196020525f908152604090205460ff1681565b3480156106c3575f80fd5b5061045e60155481565b61045e6106db366004614fdd565b611769565b3480156106eb575f80fd5b506103d2611cb2565b3480156106ff575f80fd5b5061045e61070e366004614c0a565b611cc5565b6103d2610721366004615079565b611e4a565b348015610731575f80fd5b50610758610740366004614c0a565b60066020525f90815260409020805460019091015482565b604080519283526020830191909152016103aa565b348015610778575f80fd5b506103d2610787366004614c0a565b61232e565b348015610797575f80fd5b506103d26107a6366004614bea565b61234e565b3480156107b6575f80fd5b50601a5461044090610100900460ff1681565b3480156107d4575f80fd5b506103d26107e3366004614c0a565b612415565b3480156107f3575f80fd5b505f546001600160a01b03165b6040516001600160a01b0390911681526020016103aa565b348015610823575f80fd5b506103d26108323660046150c4565b61260d565b348015610842575f80fd5b506104406108513660046150e7565b61264c565b348015610861575f80fd5b50610440610870366004614da9565b612660565b348015610880575f80fd5b506103d261088f366004615130565b61268a565b34801561089f575f80fd5b506103d26108ae366004615173565b612767565b3480156108be575f80fd5b5061045e5f81565b3480156108d1575f80fd5b5061045e600e5481565b3480156108e6575f80fd5b5061045e6108f5366004614d8e565b600b6020525f908152604090205481565b348015610911575f80fd5b506103d2610920366004615130565b6127af565b61045e610933366004615199565b61288c565b348015610943575f80fd5b5061045e60145481565b348015610958575f80fd5b506103d26130e8565b34801561096c575f80fd5b5061075861097b366004614c0a565b60076020525f90815260409020805460019091015482565b34801561099e575f80fd5b50601a546104409060ff1681565b3480156109b7575f80fd5b5061045e60135481565b3480156109cc575f80fd5b506103d26109db366004614da9565b613120565b3480156109eb575f80fd5b5061045e60165481565b61045e610a03366004614fdd565b613143565b348015610a13575f80fd5b5061045e60105481565b6103d2610a2b36600461524c565b613769565b348015610a3b575f80fd5b506103d2610a4a366004614d8e565b613c6e565b348015610a5a575f80fd5b50610800610a69366004614bea565b613ce4565b348015610a79575f80fd5b5061045e5f8051602061570c83398151915281565b348015610a99575f80fd5b506103d2613db9565b6008602052815f5260405f208181548110610abb575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610af2613de8565b5f60098281548110610b0657610b066152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b03163314610b705760405162461bcd60e51b81526020600482015260136024820152722737ba103930b33336329031b932b0ba37b91760691b60448201526064015b60405180910390fd5b600d81015460ff161515600103610bc357600d8101805460ff1916905560405133815282907f7e3a30fb23600876c42b4241548a287a8ab696f0c2193e5898e5e45476de29d59060200160405180910390a25b50610bcd60018055565b50565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c4a5760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610b67565b610c548282613e41565b5050565b5f8051602061570c83398151915233610c718282613f70565b50506001600160a01b03919091165f908152601960205260409020805460ff1916911515919091179055565b5f8051602061570c83398151915233610cb68282613f70565b5050600455565b5f8051602061570c83398151915233610cd68282613f70565b610ce08484613fc9565b50505050565b606060085f8381526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610d6c575f848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018082015484860152600290910154918301919091529083529092019101610d18565b505050509050919050565b6001600160a01b0382165f908152600b6020526040812054819015610df557604080516001600160a01b0386166020808301829052828401879052835180840385018152606090930184528251928101929092205f818152600a845284812060020154928152600b9093529290912054610df191906152d2565b9150505b90505b92915050565b5f8051602061570c83398151915233610e178282613f70565b8251845114610e385760405162461bcd60e51b8152600401610b67906152e5565b5f5b8451811015610f2457838181518110610e5557610e556152aa565b6020026020010151600b5f878481518110610e7257610e726152aa565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20819055507fc54af0d8ebbaa95f738d0c156db9a3bea905f4942ed99ed5fc1bbc4e250b434d858281518110610ed057610ed06152aa565b6020026020010151858381518110610eea57610eea6152aa565b6020026020010151604051610f149291906001600160a01b03929092168252602082015260400190565b60405180910390a1600101610e3a565b5050505050565b5f8051602061570c83398151915233610f448282613f70565b5f60098481548110610f5857610f586152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b03163314610fb557806004015481600c01541480610f99575042816001015411155b610fb55760405162461bcd60e51b8152600401610b6790615312565b600c810154604080514360208083019190915242828401524560608084019190915241901b6001600160601b031916608083015282518083036074018152609490920190925280519101205f61100b8383615369565b61101690600161537c565b6008850181905590506110298782614007565b50505050505050565b60098181548110611041575f80fd5b5f9182526020909120600f9091020180546001820154600483015460058401546006850154600786015460088701546009880154600a890154600b8a0154600c8b0154600d8c0154600e909c015460ff9b8c169d50999b989a979996986001600160a01b0396871698959794871696939592909316939092909116908d565b6110c8613de8565b5f600982815481106110dc576110dc6152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633148061111c575061111c5f8051602061570c83398151915233612660565b6111685760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420726166666c652063726561746f72206f72204f70657261746f722e006044820152606401610b67565b4281600101541161118b5760405162461bcd60e51b8152600401610b679061538f565b5f815460ff1660048111156111a2576111a2614f11565b146111de5760405162461bcd60e51b815260206004820152600c60248201526b57726f6e672073746174757360a01b6044820152606401610b67565b6111f55f8051602061570c83398151915233612660565b61132c57600d81015460ff166112415760405162461bcd60e51b8152602060048201526011602482015270155cd95c8810d85b89dd0818d85b98d95b607a1b6044820152606401610b67565b80600c01545f0361129f57341561129a5760405162461bcd60e51b815260206004820152601a60248201527f4e6f742063616e63656c6174696f6e206665652076616c75652e0000000000006044820152606401610b67565b61132c565b6011543410156112f15760405162461bcd60e51b815260206004820152601a60248201527f4e6f742063616e63656c6174696f6e206665652076616c75652e0000000000006044820152606401610b67565b600d546011546040516001600160a01b039092169181156108fc0291905f818181858888f1935050505015801561132a573d5f803e3d5ffd5b505b5f8281526008602052604090205460c88111156113aa5760405162461bcd60e51b815260206004820152603660248201527f4e6f742063616e63656c6174696f6e20617661696c61626c65207768656e20696044820152753a13b99036b7b932903a3430b710191818103a3c399760511b6064820152608401610b67565b5f826005015483600c01546113bf91906153d3565b600b8401549091506001600160a01b03166114a4575f5b8281101561149e575f8581526008602052604081208054839081106113fd576113fd6152aa565b5f9182526020909120600390910201546001600160a01b031690508015611495575f86815260086020526040812080548490811061143d5761143d6152aa565b905f5260205f20906003020160020154866005015461145c91906153d3565b6040519091506001600160a01b0383169082156108fc029083905f818181858888f19350505050158015611492573d5f803e3d5ffd5b50505b506001016113d6565b50611626565b600b83015460405163095ea7b360e01b8152306004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af11580156114f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151891906153ea565b505f5b82811015611624575f858152600860205260408120805483908110611542576115426152aa565b5f9182526020909120600390910201546001600160a01b03169050801561161b575f868152600860205260408120805484908110611582576115826152aa565b905f5260205f2090600302016002015486600501546115a191906153d3565b600b8701546040516323b872dd60e01b81529192506001600160a01b0316906323b872dd906115d890309086908690600401615405565b6020604051808303815f875af11580156115f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161891906153ea565b50505b5060010161151b565b505b6116f230846009015f9054906101000a90046001600160a01b03168560020180548060200260200160405190810160405280929190818152602001828054801561169757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611679575b5050505050866003018054806020026020016040519081016040528092919081815260200182805480156116e857602002820191905f5260205f20905b8154815260200190600101908083116116d4575b5050505050614556565b825460ff1916600417835560405181815284907fd512a34b0f0618078770fcd85d974df1ab46a7882e8b3d45aa91764f4961aed2906020015b60405180910390a2505050610bcd60018055565b61174761459a565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b5f5f8051602061570c833981519152336117838282613f70565b428b116117a25760405162461bcd60e51b8152600401610b679061538f565b5f86116117c15760405162461bcd60e51b8152600401610b6790615429565b5f851180156117d05750858511155b6117ec5760405162461bcd60e51b8152600401610b679061544d565b88518a511461180d5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b03881615611853576001600160a01b0388165f9081526018602052604090205460ff166118535760405162461bcd60e51b8152600401610b679061549b565b5f805b8b51811015611992575f8b8281518110611872576118726152aa565b6020026020010151116118975760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168c82815181106118b3576118b36152aa565b60200260200101516001600160a01b0316036118f5578a81815181106118db576118db6152aa565b6020026020010151826118ee919061537c565b915061198a565b60175f8d838151811061190a5761190a6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff1661194c5760405162461bcd60e51b8152600401610b679061549b565b61198a33308e8481518110611963576119636152aa565b60200260200101518e858151811061197d5761197d6152aa565b60200260200101516145f3565b600101611856565b508034146119d55760405162461bcd60e51b815260206004820152601060248201526f151bdd185b081b5a5cdb585d18da195960821b6044820152606401610b67565b5f80604051806101e001604052805f60048111156119f5576119f5614f11565b81526020018f81526020018e81526020018d81526020018a81526020018b81526020018981526020015f6001600160a01b031681526020015f8152602001336001600160a01b031681526020018381526020018c6001600160a01b031681526020015f8152602001600115158152602001888152509050600981908060018154018082558091505060019003905f5260205f2090600f02015f909190919091505f820151815f015f6101000a81548160ff02191690836004811115611abc57611abc614f11565b0217905550602082810151600183015560408301518051611ae39260028501920190614b3a565b5060608201518051611aff916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90611bca906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b03909216919091178155915192820192909255935160029094019390935583815282549394509092611c4e57611c4e6152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a2509e9d5050505050505050505050505050565b611cba61459a565b611cc35f61472a565b565b5f5f8051602061570c83398151915233611cdf8282613f70565b5f60098581548110611cf357611cf36152aa565b5f9182526020909120600254600480546005546040516305d3b1d360e41b8152928301919091526001600160401b03600160501b820416602483015261ffff8116604483015263ffffffff62010000820481166064840152600160301b909104166084820152600f90930290910192506001600160a01b031690635d3b1d309060a4016020604051808303815f875af1158015611d92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611db69190615500565b604080518082018252878152600c84015460208083019182525f85815260078252849020925183559051600190920191909155835460ff19166002178455600554825184815263ffffffff600160301b90920491909116918101919091529195507fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a1505050919050565b5f60098481548110611e5e57611e5e6152aa565b905f5260205f2090600f02019050611e734290565b816001015411611ebd5760405162461bcd60e51b8152602060048201526015602482015274526166666c6520436c6f736564206f6e2074696d6560581b6044820152606401610b67565b5f815460ff166004811115611ed457611ed4614f11565b14611f1c5760405162461bcd60e51b8152602060048201526018602482015277149859999b19481a5cc81b9bdd081a5b8810d4915055115160421b6044820152606401610b67565b5f83118015611f2f575080600601548311155b611f4b5760405162461bcd60e51b8152600401610b6790615517565b33611f985760405162461bcd60e51b815260206004820152601e60248201527f416464726573732063616e742774206265206e756c6c206164647265737300006044820152606401610b67565b60098481548110611fab57611fab6152aa565b905f5260205f2090600f0201600401548382600c0154611fcb919061537c565b11156120195760405162461bcd60e51b815260206004820152601e60248201527f526166666c65206861732072656163686564206d617820656e747269657300006044820152606401610b67565b600e810154156120af57600e8101546040516001600160601b03193360601b1660208201526120639184916034015b6040516020818303038152906040528051906020012061264c565b6120af5760405162461bcd60e51b815260206004820152601960248201527f4e6f742070617274206f66207468652057686974656c697374000000000000006044820152606401610b67565b600b8101546001600160a01b03166120f4578281600501546120d191906153d3565b34146120ef5760405162461bcd60e51b8152600401610b6790615574565b61217f565b600b81015460058201546001600160a01b03909116906323b872dd903390309061211f9088906153d3565b6040518463ffffffff1660e01b815260040161213d93929190615405565b6020604051808303815f875af1158015612159573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061217d91906153ea565b505b604080513360208201529081018590525f90606001604051602081830303815290604052805190602001209050816006015484600c5f8481526020019081526020015f20546121ce919061537c565b11156122185760405162461bcd60e51b815260206004820152601960248201527826b0bc1032b73a3934b2b9903ab9b2b9103932b0b1b432b21760391b6044820152606401610b67565b5f818152600c60205260408120805486929061223590849061537c565b925050819055505f6040518060600160405280336001600160a01b031681526020018685600c0154612267919061537c565b815260209081018790525f888152600882526040808220805460018082018355918452848420865160039092020180546001600160a01b0319166001600160a01b039092169190911781559385015190840155830151600290920191909155600c8501805492935087929091906122df90849061537c565b9091555050600c8301546040805191825260208201879052339188917f1d96340db85bb8f4232fc9c231f41da059f9a110d9099bd213b67115aa0b5654910160405180910390a3505050505050565b5f8051602061570c833981519152336123478282613f70565b5050601155565b612356613de8565b5f6009838154811061236a5761236a6152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633146123cf5760405162461bcd60e51b81526020600482015260136024820152722737ba103930b33336329031b932b0ba37b91760691b6044820152606401610b67565b600e810182905560405182815283907fbeffc53bea2d95fb8c844351c36ee8730739ced3171008941faeb629f9beb0599060200160405180910390a250610c5460018055565b61241d613de8565b5f60098281548110612431576124316152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633148061247157506124715f8051602061570c83398151915233612660565b6124bd5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420726166666c652063726561746f72206f72206f70657261746f722e006044820152606401610b67565b6124d45f8051602061570c83398151915233612660565b80156124ed575060098101546001600160a01b03163314155b1561252857806004015481600c0154148061250c575042816001015411155b6125285760405162461bcd60e51b8152600401610b6790615312565b5f815460ff16600481111561253f5761253f614f11565b146125855760405162461bcd60e51b8152602060048201526016602482015275526166666c6520696e2077726f6e672073746174757360501b6044820152606401610b67565b805460ff19166001178155600c81015460058201545f906125a690836153d3565b9050815f036125cf57825460ff1916600217835560088301546125ca908590614007565b6125db565b6125d98483614779565b505b837ff2be214756d2fbc1e781d10809ddef33000009d805be55356bb348134ce21c688260405161172b91815260200190565b5f8051602061570c833981519152336126268282613f70565b50506005805463ffffffff909216620100000265ffffffff000019909216919091179055565b5f6126588484846148e4565b949350505050565b5f918252601b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8051602061570c833981519152336126a38282613f70565b5f5b8451811015610f24578360185f8784815181106126c4576126c46152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff191691151591909117905583151560010361275f577f7f2c42a00d513609b2f0aaa86f3b78575f99fa1b7d37446cddc7843f2854c733858281518110612732576127326152aa565b602002602001015160405161275691906001600160a01b0391909116815260200190565b60405180910390a15b6001016126a5565b5f8051602061570c833981519152336127808282613f70565b5050600580546001600160401b03909216600160501b0267ffffffffffffffff60501b19909216919091179055565b5f8051602061570c833981519152336127c88282613f70565b5f5b8451811015610f24578360175f8784815181106127e9576127e96152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff1916911515919091179055831515600103612884577f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a4858281518110612857576128576152aa565b602002602001015160405161287b91906001600160a01b0391909116815260200190565b60405180910390a15b6001016127ca565b5f612895613de8565b4288116128b45760405162461bcd60e51b8152600401610b679061538f565b601a5460ff166129115760405162461bcd60e51b815260206004820152602260248201527f43726561746520726166666c65206e6f742073657420666f7220686f6c646572604482015261399760f11b6064820152608401610b67565b5f83116129305760405162461bcd60e51b8152600401610b6790615429565b5f8211801561293f5750828211155b61295b5760405162461bcd60e51b8152600401610b679061544d565b855187511461297c5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b038516156129c2576001600160a01b0385165f9081526018602052604090205460ff166129c25760405162461bcd60e51b8152600401610b679061549b565b6040516331a9108f60e11b8152600481018a90528a9033906001600160a01b03831690636352211e90602401602060405180830381865afa158015612a09573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a2d91906155b8565b6001600160a01b031614612a835760405162461bcd60e51b815260206004820152601860248201527f4e6f7420746865206f776e6572206f6620746f6b656e496400000000000000006044820152606401610b67565b604080516001600160a01b038d1660208201529081018b90525f90606001604051602081830303815290604052805190602001209050612ac04290565b5f828152600a60205260409020600101541115612b6e575f612ae28d8d610d77565b11612b485760405162461bcd60e51b815260206004820152603060248201527f4372656174656420746f6f206d616e7920726166666c6573207769746820796f60448201526f3ab91027232a103cb7ba903437b6321760811b6064820152608401610b67565b5f818152600a60205260408120600201805491612b64836155d3565b9190505550612ba6565b425f828152600a602052604090205542612b8b9062278d0061537c565b5f828152600a60205260409020600180820192909255600201555b5f805b8a51811015612cd8575f8a8281518110612bc557612bc56152aa565b602002602001015111612bea5760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168b8281518110612c0657612c066152aa565b60200260200101516001600160a01b031603612c4857898181518110612c2e57612c2e6152aa565b602002602001015182612c41919061537c565b9150612cd0565b60175f8c8381518110612c5d57612c5d6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff16612c9f5760405162461bcd60e51b8152600401610b679061549b565b612cd033308d8481518110612cb657612cb66152aa565b60200260200101518d858151811061197d5761197d6152aa565b600101612ba9565b506001600160a01b0388165f9081526019602052604081205460ff1615612d845781600e54601054612d0a919061537c565b612d14919061537c565b341015612d335760405162461bcd60e51b8152600401610b67906155eb565b600d54600e546010546001600160a01b03909216916108fc91612d559161537c565b6040518115909202915f818181858888f19350505050158015612d7a573d5f803e3d5ffd5b5050601454612e0b565b81600e54600f54612d95919061537c565b612d9f919061537c565b341015612dbe5760405162461bcd60e51b8152600401610b67906155eb565b600d54600e54600f546001600160a01b03909216916108fc91612de09161537c565b6040518115909202915f818181858888f19350505050158015612e05573d5f803e3d5ffd5b50506013545b604080516101e081019091525f9080828152602081018f9052604081018e9052606081018d9052608081018a905260a081018b905260c081018990525f60e0820181905261010082018190523361012083015261014082018590526001600160a01b038d16610160830152610180820181905260016101a083018190526101c090920181905260098054808401825591528251600f9091027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805493945084939092839160ff191690836004811115612ee757612ee7614f11565b0217905550602082810151600183015560408301518051612f0e9260028501920190614b3a565b5060608201518051612f2a916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90612ff5906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b03909216919091178155915192820192909255935160029094019390935583815282549394509092613079576130796152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a250955050505050506130db60018055565b9998505050505050505050565b5f8051602061570c833981519152336131018282613f70565b5050601a805461ff001981166101009182900460ff1615909102179055565b5f8051602061570c833981519152336131398282613f70565b610ce084846148f9565b5f61314c613de8565b42891161316b5760405162461bcd60e51b8152600401610b679061538f565b601a54610100900460ff166131d25760405162461bcd60e51b815260206004820152602760248201527f43726561746520726166666c65206e6f6f742073657420666f722073756273636044820152663934b132b9399760c91b6064820152608401610b67565b600e543410156131f45760405162461bcd60e51b8152600401610b67906155eb565b5f84116132135760405162461bcd60e51b8152600401610b6790615429565b5f831180156132225750838311155b61323e5760405162461bcd60e51b8152600401610b679061544d565b865188511461325f5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b038616156132a5576001600160a01b0386165f9081526018602052604090205460ff166132a55760405162461bcd60e51b8152600401610b679061549b565b5f805b89518110156133d7575f8982815181106132c4576132c46152aa565b6020026020010151116132e95760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168a8281518110613305576133056152aa565b60200260200101516001600160a01b0316036133475788818151811061332d5761332d6152aa565b602002602001015182613340919061537c565b91506133cf565b60175f8b838151811061335c5761335c6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff1661339e5760405162461bcd60e51b8152600401610b679061549b565b6133cf33308c84815181106133b5576133b56152aa565b60200260200101518c858151811061197d5761197d6152aa565b6001016132a8565b50600e546133e5908261537c565b3410156134275760405162461bcd60e51b815260206004820152601060248201526f151bdd185b081b5a5cdb585d18da195960821b6044820152606401610b67565b6001600160a01b0387165f9081526019602052604081205460ff16156134505750601654613455565b506015545b600d54600e546040516001600160a01b039092169181156108fc0291905f818181858888f1935050505015801561348e573d5f803e3d5ffd5b50604080516101e081019091525f9080828152602081018e9052604081018d9052606081018c90526080810189905260a081018a905260c081018890525f60e0820181905261010082018190523361012083015261014082018590526001600160a01b038c16610160830152610180820181905260016101a083018190526101c090920188905260098054808401825591528251600f9091027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805493945084939092839160ff19169083600481111561356b5761356b614f11565b02179055506020828101516001830155604083015180516135929260028501920190614b3a565b50606082015180516135ae916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90613679906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b039092169190911781559151928201929092559351600290940193909355838152825493945090926136fd576136fd6152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a250935050505061375d60018055565b98975050505050505050565b5f6009858154811061377d5761377d6152aa565b905f5260205f2090600f020190506137924290565b8160010154116137dc5760405162461bcd60e51b8152602060048201526015602482015274526166666c6520436c6f736564206f6e2074696d6560581b6044820152606401610b67565b5f815460ff1660048111156137f3576137f3614f11565b1461383b5760405162461bcd60e51b8152602060048201526018602482015277149859999b19481a5cc81b9bdd081a5b8810d4915055115160421b6044820152606401610b67565b600e810154156138b257600e8101546040516001600160601b03193360601b16602082015261386e918491603401612048565b6138b25760405162461bcd60e51b8152602060048201526015602482015274139bdd081c185c9d081bd98815da1a5d195b1a5cdd605a1b6044820152606401610b67565b5f841180156138c5575080600601548411155b6138e15760405162461bcd60e51b8152600401610b6790615517565b6001600160a01b0383161580159061390257506001600160a01b0383163314155b6139625760405162461bcd60e51b815260206004820152602b60248201527f416464726573732063616e742774206265206e756c6c2061646472657373202f60448201526a1036b9b39039b2b73232b960a91b6064820152608401610b67565b60098581548110613975576139756152aa565b905f5260205f2090600f0201600401548482600c0154613995919061537c565b11156139e35760405162461bcd60e51b815260206004820152601e60248201527f526166666c65206861732072656163686564206d617820656e747269657300006044820152606401610b67565b600b8101546001600160a01b0316613a2857838160050154613a0591906153d3565b3414613a235760405162461bcd60e51b8152600401610b6790615574565b613ab3565b600b81015460058201546001600160a01b03909116906323b872dd9033903090613a539089906153d3565b6040518463ffffffff1660e01b8152600401613a7193929190615405565b6020604051808303815f875af1158015613a8d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ab191906153ea565b505b604080513360208201529081018690525f90606001604051602081830303815290604052805190602001209050816006015485600c5f8481526020019081526020015f2054613b02919061537c565b1115613b4c5760405162461bcd60e51b815260206004820152601960248201527826b0bc1032b73a3934b2b9903ab9b2b9103932b0b1b432b21760391b6044820152606401610b67565b5f818152600c602052604081208054879290613b6990849061537c565b925050819055505f6040518060600160405280866001600160a01b031681526020018785600c0154613b9b919061537c565b815260209081018890525f898152600882526040808220805460018082018355918452848420865160039092020180546001600160a01b0319166001600160a01b039092169190911781559385015190840155830151600290920191909155600c850180549293508892909190613c1390849061537c565b9091555050600c83015460408051918252602082018890526001600160a01b0387169133918a917f15bbd06a4440dc4bed7451cfd8c6d87d7dd0b32856c137538574d4dc5581aa7b910160405180910390a450505050505050565b613c7661459a565b6001600160a01b038116613cdb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b67565b610bcd8161472a565b5f8281526008602052604081208190815b8154811015613d67575f828281548110613d1157613d116152aa565b905f5260205f209060030201600101549050858110613d5e57828281548110613d3c57613d3c6152aa565b5f9182526020909120600390910201546001600160a01b03169350613d679050565b50600101613cf5565b506001600160a01b038216613db15760405162461bcd60e51b815260206004820152601060248201526f15da5b9b995c881b9bdd08199bdd5b9960821b6044820152606401610b67565b509392505050565b5f8051602061570c83398151915233613dd28282613f70565b5050601a805460ff19811660ff90911615179055565b600260015403613e3a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b67565b6002600155565b5f82815260076020526040812060010154825183908390613e6457613e646152aa565b6020026020010151613e769190615369565b613e8190600161537c565b5f848152600760205260408120546009805493945091928110613ea657613ea66152aa565b905f5260205f2090600f020190508181600801819055505f6040518060400160405280855f81518110613edb57613edb6152aa565b60209081029190910181015182529081018590525f8781526007808352604080832080548452600685528184208651815586860151600190910155928a9052908352905481518981529283018790529293507f8a06e59f8bcf6fd7f3d4f78e40f7271ef279eaf8e0fc07df107169ccdc05ab65910160405180910390a25f85815260076020526040902054610f249084614007565b613f7a8282612660565b610c5457613f8781614935565b613f92836020614947565b604051602001613fa392919061563d565b60408051601f198184030181529082905262461bcd60e51b8252610b67916004016156b1565b613fd38282612660565b610c54575f828152601b602090815260408083206001600160a01b03851684529091529020805460ff191660011790555050565b61400f613de8565b5f60098381548110614023576140236152aa565b905f5260205f2090600f0201905081816008018190555080600c01545f146140545761404f8383613ce4565b614063565b60098101546001600160a01b03165b6007820180546001600160a01b0319166001600160a01b039290921691821790556002820180546040805160208084028201810190925282815261413a943094909391929091908301828280156140e157602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116140c3575b5050505050846003018054806020026020016040519081016040528092919081815260200182805480156116e857602002820191905f5260205f20908154815260200190600101908083116116d4575050505050614556565b5f816005015482600c015461414f91906153d3565b90505f61271083600a01548361416591906153d3565b61416f91906156e3565b90505f61417c82846152d2565b600b8501549091506001600160a01b03166142cf5760098401546040515f916001600160a01b03169083908381818185875af1925050503d805f81146141dd576040519150601f19603f3d011682016040523d82523d5f602084013e6141e2565b606091505b50509050806142285760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408ae8d60731b6044820152606401610b67565b600d546040515f916001600160a01b03169085908381818185875af1925050503d805f8114614272576040519150601f19603f3d011682016040523d82523d5f602084013e614277565b606091505b50509050806142c85760405162461bcd60e51b815260206004820152601b60248201527f4661696c65642073656e642045746820746f20506c6174666f726d00000000006044820152606401610b67565b50506144ec565b600b84015460405163095ea7b360e01b8152306004820152602481018590526001600160a01b039091169063095ea7b3906044016020604051808303815f875af115801561431f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061434391906153ea565b50600b84015460098501546040516323b872dd60e01b81525f926001600160a01b03908116926323b872dd9261438192309216908790600401615405565b6020604051808303815f875af115801561439d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143c191906153ea565b9050806144105760405162461bcd60e51b815260206004820152601a60248201527f4661696c656420746f2073656e6420455243323020546f6b656e0000000000006044820152606401610b67565b600b850154600d546040516323b872dd60e01b81525f926001600160a01b03908116926323b872dd9261444b92309216908990600401615405565b6020604051808303815f875af1158015614467573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061448b91906153ea565b9050806144e95760405162461bcd60e51b815260206004820152602660248201527f4661696c656420746f2073656e6420455243323020546f6b656e20746f20706c6044820152656174666f726d60d01b6064820152608401610b67565b50505b835460ff19166003178455600784015460088501546040805186815260208101929092526001600160a01b039092169188917f7e9ab850b8ae5bd2e5fba4accceb80d63e90bcb89852d7cae476cd917f25b25d910160405180910390a350505050610c5460018055565b5f5b8251811015610f24576145928585858481518110614578576145786152aa565b602002602001015185858151811061197d5761197d6152aa565b600101614558565b5f546001600160a01b03163314611cc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b67565b6001600160a01b03821661463a576040516001600160a01b0384169082156108fc029083905f818181858888f19350505050158015614634573d5f803e3d5ffd5b50610ce0565b306001600160a01b038516036146ba5760405163095ea7b360e01b8152306004820152602481018290526001600160a01b0383169063095ea7b3906044016020604051808303815f875af1158015614694573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906146b891906153ea565b505b6040516323b872dd60e01b81526001600160a01b038316906323b872dd906146ea90879087908690600401615405565b6020604051808303815f875af1158015614706573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2491906153ea565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600254600480546005546040516305d3b1d360e41b8152928301919091526001600160401b03600160501b820416602483015261ffff8116604483015263ffffffff62010000820481166064840152600160301b9091041660848201525f916001600160a01b031690635d3b1d309060a4016020604051808303815f875af1158015614807573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061482b9190615500565b60408051808201825285815260208082018681525f858152600790925292812091518255915160019091015560098054929350909185908110614870576148706152aa565b5f9182526020909120600f909102018054909150600290829060ff1916600183021790555060055460408051848152600160301b90920463ffffffff1660208301527fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a15092915050565b5f826148f08584614adc565b14949350505050565b6149038282612660565b15610c54575f828152601b602090815260408083206001600160a01b03851684529091529020805460ff191690555050565b6060610df86001600160a01b03831660145b60605f6149558360026153d3565b61496090600261537c565b6001600160401b0381111561497757614977614c21565b6040519080825280601f01601f1916602001820160405280156149a1576020820181803683370190505b509050600360fc1b815f815181106149bb576149bb6152aa565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106149e9576149e96152aa565b60200101906001600160f81b03191690815f1a9053505f614a0b8460026153d3565b614a1690600161537c565b90505b6001811115614a8d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a4a57614a4a6152aa565b1a60f81b828281518110614a6057614a606152aa565b60200101906001600160f81b03191690815f1a90535060049490941c93614a86816156f6565b9050614a19565b508315610df55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b67565b5f81815b8451811015613db1575f858281518110614afc57614afc6152aa565b60200260200101519050808311614b21575f8381526020829052604090209250614b31565b5f81815260208490526040902092505b50600101614ae0565b828054828255905f5260205f20908101928215614b8d579160200282015b82811115614b8d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614b58565b50614b99929150614bd6565b5090565b828054828255905f5260205f20908101928215614b8d579160200282015b82811115614b8d578251825591602001919060010190614bbb565b5b80821115614b99575f8155600101614bd7565b5f8060408385031215614bfb575f80fd5b50508035926020909101359150565b5f60208284031215614c1a575f80fd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715614c5d57614c5d614c21565b604052919050565b5f6001600160401b03821115614c7d57614c7d614c21565b5060051b60200190565b5f82601f830112614c96575f80fd5b81356020614cab614ca683614c65565b614c35565b8083825260208201915060208460051b870101935086841115614ccc575f80fd5b602086015b84811015614ce85780358352918301918301614cd1565b509695505050505050565b5f8060408385031215614d04575f80fd5b8235915060208301356001600160401b03811115614d20575f80fd5b614d2c85828601614c87565b9150509250929050565b6001600160a01b0381168114610bcd575f80fd5b8015158114610bcd575f80fd5b5f8060408385031215614d68575f80fd5b8235614d7381614d36565b91506020830135614d8381614d4a565b809150509250929050565b5f60208284031215614d9e575f80fd5b8135610df581614d36565b5f8060408385031215614dba575f80fd5b823591506020830135614d8381614d36565b602080825282518282018190525f919060409081850190868401855b82811015614e2057815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101614de8565b5091979650505050505050565b5f8060408385031215614e3e575f80fd5b8235614e4981614d36565b946020939093013593505050565b5f82601f830112614e66575f80fd5b81356020614e76614ca683614c65565b8083825260208201915060208460051b870101935086841115614e97575f80fd5b602086015b84811015614ce8578035614eaf81614d36565b8352918301918301614e9c565b5f8060408385031215614ecd575f80fd5b82356001600160401b0380821115614ee3575f80fd5b614eef86838701614e57565b93506020850135915080821115614f04575f80fd5b50614d2c85828601614c87565b634e487b7160e01b5f52602160045260245ffd5b6101a0810160058f10614f4657634e487b7160e01b5f52602160045260245ffd5b8e82528d60208301528c60408301528b60608301528a6080830152614f7660a083018b6001600160a01b03169052565b8860c0830152614f9160e08301896001600160a01b03169052565b86610100830152614fae6101208301876001600160a01b03169052565b84610140830152614fc461016083018515159052565b826101808301529e9d5050505050505050505050505050565b5f805f805f805f80610100898b031215614ff5575f80fd5b8835975060208901356001600160401b0380821115615012575f80fd5b61501e8c838d01614e57565b985060408b0135915080821115615033575f80fd5b506150408b828c01614c87565b965050606089013561505181614d36565b979a969950949760808101359660a0820135965060c0820135955060e0909101359350915050565b5f805f6060848603121561508b575f80fd5b833592506020840135915060408401356001600160401b038111156150ae575f80fd5b6150ba86828701614c87565b9150509250925092565b5f602082840312156150d4575f80fd5b813563ffffffff81168114610df5575f80fd5b5f805f606084860312156150f9575f80fd5b83356001600160401b0381111561510e575f80fd5b61511a86828701614c87565b9660208601359650604090950135949350505050565b5f8060408385031215615141575f80fd5b82356001600160401b03811115615156575f80fd5b61516285828601614e57565b9250506020830135614d8381614d4a565b5f60208284031215615183575f80fd5b81356001600160401b0381168114610df5575f80fd5b5f805f805f805f805f6101208a8c0312156151b2575f80fd5b89356151bd81614d36565b985060208a0135975060408a0135965060608a01356001600160401b03808211156151e6575f80fd5b6151f28d838e01614e57565b975060808c0135915080821115615207575f80fd5b506152148c828d01614c87565b95505060a08a013561522581614d36565b8094505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b5f805f806080858703121561525f575f80fd5b8435935060208501359250604085013561527881614d36565b915060608501356001600160401b03811115615292575f80fd5b61529e87828801614c87565b91505092959194509250565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610df857610df86152be565b6020808252601390820152720a4cae2ead2e4ca40e6c2daca40d8cadccee8d606b1b604082015260600190565b60208082526023908201527f526166666c65207374696c6c206f70656e6564206f72206e6f7420736f6c64206040820152621bdd5d60ea1b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f8261537757615377615355565b500690565b80820180821115610df857610df86152be565b60208082526024908201527f456e642074696d652063616e2774206265203c2061732063757272656e74207460408201526334b6b29760e11b606082015260800190565b8082028115828204841417610df857610df86152be565b5f602082840312156153fa575f80fd5b8151610df581614d4a565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252600a90820152694e6f20656e747269657360b01b604082015260600190565b6020808252602e908201527f4d696e20656e74726965732075736572203e203020616e64203c3d206d61782060408201526d656e747269657320726166666c6560901b606082015260800190565b60208082526018908201527f546f6b656e2041646472657373206e6f74206164646564200000000000000000604082015260600190565b602080825260149082015273105b5bdd5b9d0818d85b89dd081899481b9d5b1b60621b604082015260600190565b5f60208284031215615510575f80fd5b5051919050565b6020808252603c908201527f4e756d62657220656e74726965732063616e27742062652030206f72206d6f7260408201527f65207468616e206d617820656e74726965732070657220757365722e00000000606082015260800190565b60208082526024908201527f6d73672e76616c7565206d75737420626520657175616c20746f2074686520706040820152637269636560e01b606082015260800190565b5f602082840312156155c8575f80fd5b8151610df581614d36565b5f600182016155e4576155e46152be565b5060010190565b602080825260169082015275125b9d985b1a5908199d5b991cc81c1c9bdd9a59195960521b604082015260600190565b5f5b8381101561563557818101518382015260200161561d565b50505f910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f835161567481601785016020880161561b565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516156a581602884016020880161561b565b01602801949350505050565b602081525f82518060208401526156cf81604085016020870161561b565b601f01601f19169190910160400192915050565b5f826156f1576156f1615355565b500490565b5f81615704576157046152be565b505f19019056fe523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0ca26469706673582212208c0e0f38fbd453eab98428b60101d1ecc9a71c551c30bb3ca8f209b4f10d4f1864736f6c63430008160033
Deployed Bytecode
0x608060405260043610610366575f3560e01c80638354a49c116101c8578063bb54c33b116100fd578063d703ece81161009d578063f2fde38b1161006d578063f2fde38b14610a30578063f369145514610a4f578063f5b541a614610a6e578063f860cec514610a8e575f80fd5b8063d703ece8146109e0578063da274b30146109f5578063e096839b14610a08578063ebb4c01014610a1d575f80fd5b8063cf7874a3116100d8578063cf7874a314610961578063d0038ff414610993578063d3c4d664146109ac578063d547741f146109c1575f80fd5b8063bb54c33b14610925578063bc0618c314610938578063cb77c1471461094d575f80fd5b806391d1485411610168578063a217fddf11610143578063a217fddf146108b3578063a79bdca4146108c6578063aaced470146108db578063b2957ac114610906575f80fd5b806391d14854146108565780639bab070b146108755780639dde45da14610894575f80fd5b806388ec392c116101a357806388ec392c146107c95780638da5cb5b146107e85780638dfc13b614610818578063903c6db614610837575f80fd5b80638354a49c1461076d578063888a56371461078c57806388aaf2a9146107ab575f80fd5b80634c86bca11161029e5780636bf3f8f61161023e578063715018a611610219578063715018a6146106e0578063719c0a13146106f457806375e4d3fd1461071357806381d12c5814610726575f80fd5b80636bf3f8f61461068a5780636fd96903146106b8578063701aa1d2146106cd575f80fd5b80635d4bc0ce116102795780635d4bc0ce1461060b5780635fba31711461064357806369f26fb0146106565780636a890cb214610675575f80fd5b80634c86bca1146105ac57806353e53a87146105c1578063581343c4146105ec575f80fd5b80632bb022b7116103095780633cb7ed3b116102e45780633cb7ed3b146104eb5780634169933f1461051957806346988a401461056e5780634944a4801461058d575f80fd5b80632bb022b71461048b5780632f2ff15d146104a0578063365e3658146104bf575f80fd5b806320c741b31161034457806320c741b3146103f357806321f4bd611461041257806329cb924d1461045057806329dd67f91461046c575f80fd5b8063013805c51461036a5780630f5e812e146103b35780631fe543e3146103d4575b5f80fd5b348015610375575f80fd5b50610389610384366004614bea565b610aa2565b604080516001600160a01b0390941684526020840192909252908201526060015b60405180910390f35b3480156103be575f80fd5b506103d26103cd366004614c0a565b610aea565b005b3480156103df575f80fd5b506103d26103ee366004614cf3565b610bd0565b3480156103fe575f80fd5b506103d261040d366004614d57565b610c58565b34801561041d575f80fd5b5061044061042c366004614d8e565b60186020525f908152604090205460ff1681565b60405190151581526020016103aa565b34801561045b575f80fd5b50425b6040519081526020016103aa565b348015610477575f80fd5b506103d2610486366004614c0a565b610c9d565b348015610496575f80fd5b5061045e60115481565b3480156104ab575f80fd5b506103d26104ba366004614da9565b610cbd565b3480156104ca575f80fd5b506104de6104d9366004614c0a565b610ce6565b6040516103aa9190614dcc565b3480156104f6575f80fd5b50610440610505366004614d8e565b60176020525f908152604090205460ff1681565b348015610524575f80fd5b50610553610533366004614c0a565b600a6020525f908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103aa565b348015610579575f80fd5b5061045e610588366004614e2d565b610d77565b348015610598575f80fd5b506103d26105a7366004614ebc565b610dfe565b3480156105b7575f80fd5b5061045e600f5481565b3480156105cc575f80fd5b5061045e6105db366004614c0a565b600c6020525f908152604090205481565b3480156105f7575f80fd5b506103d2610606366004614c0a565b610f2b565b348015610616575f80fd5b5061062a610625366004614c0a565b611032565b6040516103aa9d9c9b9a99989796959493929190614f25565b6103d2610651366004614c0a565b6110c0565b348015610661575f80fd5b506103d2610670366004614d8e565b61173f565b348015610680575f80fd5b5061045e60125481565b348015610695575f80fd5b506104406106a4366004614d8e565b60196020525f908152604090205460ff1681565b3480156106c3575f80fd5b5061045e60155481565b61045e6106db366004614fdd565b611769565b3480156106eb575f80fd5b506103d2611cb2565b3480156106ff575f80fd5b5061045e61070e366004614c0a565b611cc5565b6103d2610721366004615079565b611e4a565b348015610731575f80fd5b50610758610740366004614c0a565b60066020525f90815260409020805460019091015482565b604080519283526020830191909152016103aa565b348015610778575f80fd5b506103d2610787366004614c0a565b61232e565b348015610797575f80fd5b506103d26107a6366004614bea565b61234e565b3480156107b6575f80fd5b50601a5461044090610100900460ff1681565b3480156107d4575f80fd5b506103d26107e3366004614c0a565b612415565b3480156107f3575f80fd5b505f546001600160a01b03165b6040516001600160a01b0390911681526020016103aa565b348015610823575f80fd5b506103d26108323660046150c4565b61260d565b348015610842575f80fd5b506104406108513660046150e7565b61264c565b348015610861575f80fd5b50610440610870366004614da9565b612660565b348015610880575f80fd5b506103d261088f366004615130565b61268a565b34801561089f575f80fd5b506103d26108ae366004615173565b612767565b3480156108be575f80fd5b5061045e5f81565b3480156108d1575f80fd5b5061045e600e5481565b3480156108e6575f80fd5b5061045e6108f5366004614d8e565b600b6020525f908152604090205481565b348015610911575f80fd5b506103d2610920366004615130565b6127af565b61045e610933366004615199565b61288c565b348015610943575f80fd5b5061045e60145481565b348015610958575f80fd5b506103d26130e8565b34801561096c575f80fd5b5061075861097b366004614c0a565b60076020525f90815260409020805460019091015482565b34801561099e575f80fd5b50601a546104409060ff1681565b3480156109b7575f80fd5b5061045e60135481565b3480156109cc575f80fd5b506103d26109db366004614da9565b613120565b3480156109eb575f80fd5b5061045e60165481565b61045e610a03366004614fdd565b613143565b348015610a13575f80fd5b5061045e60105481565b6103d2610a2b36600461524c565b613769565b348015610a3b575f80fd5b506103d2610a4a366004614d8e565b613c6e565b348015610a5a575f80fd5b50610800610a69366004614bea565b613ce4565b348015610a79575f80fd5b5061045e5f8051602061570c83398151915281565b348015610a99575f80fd5b506103d2613db9565b6008602052815f5260405f208181548110610abb575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610af2613de8565b5f60098281548110610b0657610b066152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b03163314610b705760405162461bcd60e51b81526020600482015260136024820152722737ba103930b33336329031b932b0ba37b91760691b60448201526064015b60405180910390fd5b600d81015460ff161515600103610bc357600d8101805460ff1916905560405133815282907f7e3a30fb23600876c42b4241548a287a8ab696f0c2193e5898e5e45476de29d59060200160405180910390a25b50610bcd60018055565b50565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610c4a5760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610b67565b610c548282613e41565b5050565b5f8051602061570c83398151915233610c718282613f70565b50506001600160a01b03919091165f908152601960205260409020805460ff1916911515919091179055565b5f8051602061570c83398151915233610cb68282613f70565b5050600455565b5f8051602061570c83398151915233610cd68282613f70565b610ce08484613fc9565b50505050565b606060085f8381526020019081526020015f20805480602002602001604051908101604052809291908181526020015f905b82821015610d6c575f848152602090819020604080516060810182526003860290920180546001600160a01b0316835260018082015484860152600290910154918301919091529083529092019101610d18565b505050509050919050565b6001600160a01b0382165f908152600b6020526040812054819015610df557604080516001600160a01b0386166020808301829052828401879052835180840385018152606090930184528251928101929092205f818152600a845284812060020154928152600b9093529290912054610df191906152d2565b9150505b90505b92915050565b5f8051602061570c83398151915233610e178282613f70565b8251845114610e385760405162461bcd60e51b8152600401610b67906152e5565b5f5b8451811015610f2457838181518110610e5557610e556152aa565b6020026020010151600b5f878481518110610e7257610e726152aa565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f20819055507fc54af0d8ebbaa95f738d0c156db9a3bea905f4942ed99ed5fc1bbc4e250b434d858281518110610ed057610ed06152aa565b6020026020010151858381518110610eea57610eea6152aa565b6020026020010151604051610f149291906001600160a01b03929092168252602082015260400190565b60405180910390a1600101610e3a565b5050505050565b5f8051602061570c83398151915233610f448282613f70565b5f60098481548110610f5857610f586152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b03163314610fb557806004015481600c01541480610f99575042816001015411155b610fb55760405162461bcd60e51b8152600401610b6790615312565b600c810154604080514360208083019190915242828401524560608084019190915241901b6001600160601b031916608083015282518083036074018152609490920190925280519101205f61100b8383615369565b61101690600161537c565b6008850181905590506110298782614007565b50505050505050565b60098181548110611041575f80fd5b5f9182526020909120600f9091020180546001820154600483015460058401546006850154600786015460088701546009880154600a890154600b8a0154600c8b0154600d8c0154600e909c015460ff9b8c169d50999b989a979996986001600160a01b0396871698959794871696939592909316939092909116908d565b6110c8613de8565b5f600982815481106110dc576110dc6152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633148061111c575061111c5f8051602061570c83398151915233612660565b6111685760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420726166666c652063726561746f72206f72204f70657261746f722e006044820152606401610b67565b4281600101541161118b5760405162461bcd60e51b8152600401610b679061538f565b5f815460ff1660048111156111a2576111a2614f11565b146111de5760405162461bcd60e51b815260206004820152600c60248201526b57726f6e672073746174757360a01b6044820152606401610b67565b6111f55f8051602061570c83398151915233612660565b61132c57600d81015460ff166112415760405162461bcd60e51b8152602060048201526011602482015270155cd95c8810d85b89dd0818d85b98d95b607a1b6044820152606401610b67565b80600c01545f0361129f57341561129a5760405162461bcd60e51b815260206004820152601a60248201527f4e6f742063616e63656c6174696f6e206665652076616c75652e0000000000006044820152606401610b67565b61132c565b6011543410156112f15760405162461bcd60e51b815260206004820152601a60248201527f4e6f742063616e63656c6174696f6e206665652076616c75652e0000000000006044820152606401610b67565b600d546011546040516001600160a01b039092169181156108fc0291905f818181858888f1935050505015801561132a573d5f803e3d5ffd5b505b5f8281526008602052604090205460c88111156113aa5760405162461bcd60e51b815260206004820152603660248201527f4e6f742063616e63656c6174696f6e20617661696c61626c65207768656e20696044820152753a13b99036b7b932903a3430b710191818103a3c399760511b6064820152608401610b67565b5f826005015483600c01546113bf91906153d3565b600b8401549091506001600160a01b03166114a4575f5b8281101561149e575f8581526008602052604081208054839081106113fd576113fd6152aa565b5f9182526020909120600390910201546001600160a01b031690508015611495575f86815260086020526040812080548490811061143d5761143d6152aa565b905f5260205f20906003020160020154866005015461145c91906153d3565b6040519091506001600160a01b0383169082156108fc029083905f818181858888f19350505050158015611492573d5f803e3d5ffd5b50505b506001016113d6565b50611626565b600b83015460405163095ea7b360e01b8152306004820152602481018390526001600160a01b039091169063095ea7b3906044016020604051808303815f875af11580156114f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061151891906153ea565b505f5b82811015611624575f858152600860205260408120805483908110611542576115426152aa565b5f9182526020909120600390910201546001600160a01b03169050801561161b575f868152600860205260408120805484908110611582576115826152aa565b905f5260205f2090600302016002015486600501546115a191906153d3565b600b8701546040516323b872dd60e01b81529192506001600160a01b0316906323b872dd906115d890309086908690600401615405565b6020604051808303815f875af11580156115f4573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161891906153ea565b50505b5060010161151b565b505b6116f230846009015f9054906101000a90046001600160a01b03168560020180548060200260200160405190810160405280929190818152602001828054801561169757602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611679575b5050505050866003018054806020026020016040519081016040528092919081815260200182805480156116e857602002820191905f5260205f20905b8154815260200190600101908083116116d4575b5050505050614556565b825460ff1916600417835560405181815284907fd512a34b0f0618078770fcd85d974df1ab46a7882e8b3d45aa91764f4961aed2906020015b60405180910390a2505050610bcd60018055565b61174761459a565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b5f5f8051602061570c833981519152336117838282613f70565b428b116117a25760405162461bcd60e51b8152600401610b679061538f565b5f86116117c15760405162461bcd60e51b8152600401610b6790615429565b5f851180156117d05750858511155b6117ec5760405162461bcd60e51b8152600401610b679061544d565b88518a511461180d5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b03881615611853576001600160a01b0388165f9081526018602052604090205460ff166118535760405162461bcd60e51b8152600401610b679061549b565b5f805b8b51811015611992575f8b8281518110611872576118726152aa565b6020026020010151116118975760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168c82815181106118b3576118b36152aa565b60200260200101516001600160a01b0316036118f5578a81815181106118db576118db6152aa565b6020026020010151826118ee919061537c565b915061198a565b60175f8d838151811061190a5761190a6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff1661194c5760405162461bcd60e51b8152600401610b679061549b565b61198a33308e8481518110611963576119636152aa565b60200260200101518e858151811061197d5761197d6152aa565b60200260200101516145f3565b600101611856565b508034146119d55760405162461bcd60e51b815260206004820152601060248201526f151bdd185b081b5a5cdb585d18da195960821b6044820152606401610b67565b5f80604051806101e001604052805f60048111156119f5576119f5614f11565b81526020018f81526020018e81526020018d81526020018a81526020018b81526020018981526020015f6001600160a01b031681526020015f8152602001336001600160a01b031681526020018381526020018c6001600160a01b031681526020015f8152602001600115158152602001888152509050600981908060018154018082558091505060019003905f5260205f2090600f02015f909190919091505f820151815f015f6101000a81548160ff02191690836004811115611abc57611abc614f11565b0217905550602082810151600183015560408301518051611ae39260028501920190614b3a565b5060608201518051611aff916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90611bca906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b03909216919091178155915192820192909255935160029094019390935583815282549394509092611c4e57611c4e6152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a2509e9d5050505050505050505050505050565b611cba61459a565b611cc35f61472a565b565b5f5f8051602061570c83398151915233611cdf8282613f70565b5f60098581548110611cf357611cf36152aa565b5f9182526020909120600254600480546005546040516305d3b1d360e41b8152928301919091526001600160401b03600160501b820416602483015261ffff8116604483015263ffffffff62010000820481166064840152600160301b909104166084820152600f90930290910192506001600160a01b031690635d3b1d309060a4016020604051808303815f875af1158015611d92573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611db69190615500565b604080518082018252878152600c84015460208083019182525f85815260078252849020925183559051600190920191909155835460ff19166002178455600554825184815263ffffffff600160301b90920491909116918101919091529195507fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a1505050919050565b5f60098481548110611e5e57611e5e6152aa565b905f5260205f2090600f02019050611e734290565b816001015411611ebd5760405162461bcd60e51b8152602060048201526015602482015274526166666c6520436c6f736564206f6e2074696d6560581b6044820152606401610b67565b5f815460ff166004811115611ed457611ed4614f11565b14611f1c5760405162461bcd60e51b8152602060048201526018602482015277149859999b19481a5cc81b9bdd081a5b8810d4915055115160421b6044820152606401610b67565b5f83118015611f2f575080600601548311155b611f4b5760405162461bcd60e51b8152600401610b6790615517565b33611f985760405162461bcd60e51b815260206004820152601e60248201527f416464726573732063616e742774206265206e756c6c206164647265737300006044820152606401610b67565b60098481548110611fab57611fab6152aa565b905f5260205f2090600f0201600401548382600c0154611fcb919061537c565b11156120195760405162461bcd60e51b815260206004820152601e60248201527f526166666c65206861732072656163686564206d617820656e747269657300006044820152606401610b67565b600e810154156120af57600e8101546040516001600160601b03193360601b1660208201526120639184916034015b6040516020818303038152906040528051906020012061264c565b6120af5760405162461bcd60e51b815260206004820152601960248201527f4e6f742070617274206f66207468652057686974656c697374000000000000006044820152606401610b67565b600b8101546001600160a01b03166120f4578281600501546120d191906153d3565b34146120ef5760405162461bcd60e51b8152600401610b6790615574565b61217f565b600b81015460058201546001600160a01b03909116906323b872dd903390309061211f9088906153d3565b6040518463ffffffff1660e01b815260040161213d93929190615405565b6020604051808303815f875af1158015612159573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061217d91906153ea565b505b604080513360208201529081018590525f90606001604051602081830303815290604052805190602001209050816006015484600c5f8481526020019081526020015f20546121ce919061537c565b11156122185760405162461bcd60e51b815260206004820152601960248201527826b0bc1032b73a3934b2b9903ab9b2b9103932b0b1b432b21760391b6044820152606401610b67565b5f818152600c60205260408120805486929061223590849061537c565b925050819055505f6040518060600160405280336001600160a01b031681526020018685600c0154612267919061537c565b815260209081018790525f888152600882526040808220805460018082018355918452848420865160039092020180546001600160a01b0319166001600160a01b039092169190911781559385015190840155830151600290920191909155600c8501805492935087929091906122df90849061537c565b9091555050600c8301546040805191825260208201879052339188917f1d96340db85bb8f4232fc9c231f41da059f9a110d9099bd213b67115aa0b5654910160405180910390a3505050505050565b5f8051602061570c833981519152336123478282613f70565b5050601155565b612356613de8565b5f6009838154811061236a5761236a6152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633146123cf5760405162461bcd60e51b81526020600482015260136024820152722737ba103930b33336329031b932b0ba37b91760691b6044820152606401610b67565b600e810182905560405182815283907fbeffc53bea2d95fb8c844351c36ee8730739ced3171008941faeb629f9beb0599060200160405180910390a250610c5460018055565b61241d613de8565b5f60098281548110612431576124316152aa565b5f91825260209091206009600f90920201908101549091506001600160a01b031633148061247157506124715f8051602061570c83398151915233612660565b6124bd5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420726166666c652063726561746f72206f72206f70657261746f722e006044820152606401610b67565b6124d45f8051602061570c83398151915233612660565b80156124ed575060098101546001600160a01b03163314155b1561252857806004015481600c0154148061250c575042816001015411155b6125285760405162461bcd60e51b8152600401610b6790615312565b5f815460ff16600481111561253f5761253f614f11565b146125855760405162461bcd60e51b8152602060048201526016602482015275526166666c6520696e2077726f6e672073746174757360501b6044820152606401610b67565b805460ff19166001178155600c81015460058201545f906125a690836153d3565b9050815f036125cf57825460ff1916600217835560088301546125ca908590614007565b6125db565b6125d98483614779565b505b837ff2be214756d2fbc1e781d10809ddef33000009d805be55356bb348134ce21c688260405161172b91815260200190565b5f8051602061570c833981519152336126268282613f70565b50506005805463ffffffff909216620100000265ffffffff000019909216919091179055565b5f6126588484846148e4565b949350505050565b5f918252601b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8051602061570c833981519152336126a38282613f70565b5f5b8451811015610f24578360185f8784815181106126c4576126c46152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff191691151591909117905583151560010361275f577f7f2c42a00d513609b2f0aaa86f3b78575f99fa1b7d37446cddc7843f2854c733858281518110612732576127326152aa565b602002602001015160405161275691906001600160a01b0391909116815260200190565b60405180910390a15b6001016126a5565b5f8051602061570c833981519152336127808282613f70565b5050600580546001600160401b03909216600160501b0267ffffffffffffffff60501b19909216919091179055565b5f8051602061570c833981519152336127c88282613f70565b5f5b8451811015610f24578360175f8784815181106127e9576127e96152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff1916911515919091179055831515600103612884577f784c8f4dbf0ffedd6e72c76501c545a70f8b203b30a26ce542bf92ba87c248a4858281518110612857576128576152aa565b602002602001015160405161287b91906001600160a01b0391909116815260200190565b60405180910390a15b6001016127ca565b5f612895613de8565b4288116128b45760405162461bcd60e51b8152600401610b679061538f565b601a5460ff166129115760405162461bcd60e51b815260206004820152602260248201527f43726561746520726166666c65206e6f742073657420666f7220686f6c646572604482015261399760f11b6064820152608401610b67565b5f83116129305760405162461bcd60e51b8152600401610b6790615429565b5f8211801561293f5750828211155b61295b5760405162461bcd60e51b8152600401610b679061544d565b855187511461297c5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b038516156129c2576001600160a01b0385165f9081526018602052604090205460ff166129c25760405162461bcd60e51b8152600401610b679061549b565b6040516331a9108f60e11b8152600481018a90528a9033906001600160a01b03831690636352211e90602401602060405180830381865afa158015612a09573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a2d91906155b8565b6001600160a01b031614612a835760405162461bcd60e51b815260206004820152601860248201527f4e6f7420746865206f776e6572206f6620746f6b656e496400000000000000006044820152606401610b67565b604080516001600160a01b038d1660208201529081018b90525f90606001604051602081830303815290604052805190602001209050612ac04290565b5f828152600a60205260409020600101541115612b6e575f612ae28d8d610d77565b11612b485760405162461bcd60e51b815260206004820152603060248201527f4372656174656420746f6f206d616e7920726166666c6573207769746820796f60448201526f3ab91027232a103cb7ba903437b6321760811b6064820152608401610b67565b5f818152600a60205260408120600201805491612b64836155d3565b9190505550612ba6565b425f828152600a602052604090205542612b8b9062278d0061537c565b5f828152600a60205260409020600180820192909255600201555b5f805b8a51811015612cd8575f8a8281518110612bc557612bc56152aa565b602002602001015111612bea5760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168b8281518110612c0657612c066152aa565b60200260200101516001600160a01b031603612c4857898181518110612c2e57612c2e6152aa565b602002602001015182612c41919061537c565b9150612cd0565b60175f8c8381518110612c5d57612c5d6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff16612c9f5760405162461bcd60e51b8152600401610b679061549b565b612cd033308d8481518110612cb657612cb66152aa565b60200260200101518d858151811061197d5761197d6152aa565b600101612ba9565b506001600160a01b0388165f9081526019602052604081205460ff1615612d845781600e54601054612d0a919061537c565b612d14919061537c565b341015612d335760405162461bcd60e51b8152600401610b67906155eb565b600d54600e546010546001600160a01b03909216916108fc91612d559161537c565b6040518115909202915f818181858888f19350505050158015612d7a573d5f803e3d5ffd5b5050601454612e0b565b81600e54600f54612d95919061537c565b612d9f919061537c565b341015612dbe5760405162461bcd60e51b8152600401610b67906155eb565b600d54600e54600f546001600160a01b03909216916108fc91612de09161537c565b6040518115909202915f818181858888f19350505050158015612e05573d5f803e3d5ffd5b50506013545b604080516101e081019091525f9080828152602081018f9052604081018e9052606081018d9052608081018a905260a081018b905260c081018990525f60e0820181905261010082018190523361012083015261014082018590526001600160a01b038d16610160830152610180820181905260016101a083018190526101c090920181905260098054808401825591528251600f9091027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805493945084939092839160ff191690836004811115612ee757612ee7614f11565b0217905550602082810151600183015560408301518051612f0e9260028501920190614b3a565b5060608201518051612f2a916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90612ff5906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b03909216919091178155915192820192909255935160029094019390935583815282549394509092613079576130796152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a250955050505050506130db60018055565b9998505050505050505050565b5f8051602061570c833981519152336131018282613f70565b5050601a805461ff001981166101009182900460ff1615909102179055565b5f8051602061570c833981519152336131398282613f70565b610ce084846148f9565b5f61314c613de8565b42891161316b5760405162461bcd60e51b8152600401610b679061538f565b601a54610100900460ff166131d25760405162461bcd60e51b815260206004820152602760248201527f43726561746520726166666c65206e6f6f742073657420666f722073756273636044820152663934b132b9399760c91b6064820152608401610b67565b600e543410156131f45760405162461bcd60e51b8152600401610b67906155eb565b5f84116132135760405162461bcd60e51b8152600401610b6790615429565b5f831180156132225750838311155b61323e5760405162461bcd60e51b8152600401610b679061544d565b865188511461325f5760405162461bcd60e51b8152600401610b67906152e5565b6001600160a01b038616156132a5576001600160a01b0386165f9081526018602052604090205460ff166132a55760405162461bcd60e51b8152600401610b679061549b565b5f805b89518110156133d7575f8982815181106132c4576132c46152aa565b6020026020010151116132e95760405162461bcd60e51b8152600401610b67906154d2565b5f6001600160a01b03168a8281518110613305576133056152aa565b60200260200101516001600160a01b0316036133475788818151811061332d5761332d6152aa565b602002602001015182613340919061537c565b91506133cf565b60175f8b838151811061335c5761335c6152aa565b6020908102919091018101516001600160a01b031682528101919091526040015f205460ff1661339e5760405162461bcd60e51b8152600401610b679061549b565b6133cf33308c84815181106133b5576133b56152aa565b60200260200101518c858151811061197d5761197d6152aa565b6001016132a8565b50600e546133e5908261537c565b3410156134275760405162461bcd60e51b815260206004820152601060248201526f151bdd185b081b5a5cdb585d18da195960821b6044820152606401610b67565b6001600160a01b0387165f9081526019602052604081205460ff16156134505750601654613455565b506015545b600d54600e546040516001600160a01b039092169181156108fc0291905f818181858888f1935050505015801561348e573d5f803e3d5ffd5b50604080516101e081019091525f9080828152602081018e9052604081018d9052606081018c90526080810189905260a081018a905260c081018890525f60e0820181905261010082018190523361012083015261014082018590526001600160a01b038c16610160830152610180820181905260016101a083018190526101c090920188905260098054808401825591528251600f9091027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805493945084939092839160ff19169083600481111561356b5761356b614f11565b02179055506020828101516001830155604083015180516135929260028501920190614b3a565b50606082015180516135ae916003840191602090910190614b9d565b506080820151600482015560a0820151600582015560c0820151600682015560e08201516007820180546001600160a01b03199081166001600160a01b0393841617909155610100840151600884015561012084015160098085018054841692851692909217909155610140850151600a850155610160850151600b850180549093169316929092179055610180830151600c8301556101a0830151600d8301805460ff19169115159190911790556101c090920151600e90910155545f90613679906001906152d2565b604080516060810182525f808252602080830182815283850183815286845260088352948320805460018082018355828652938520865160039092020180546001600160a01b0319166001600160a01b039092169190911781559151928201929092559351600290940193909355838152825493945090926136fd576136fd6152aa565b5f9182526020822060039091020180546001600160a01b03191681556001810182905560020181905560405183917f0b5745354685a046e72f24602bcf00fa0ee07f0bf511afb5f2d3ab636241e41b91a250935050505061375d60018055565b98975050505050505050565b5f6009858154811061377d5761377d6152aa565b905f5260205f2090600f020190506137924290565b8160010154116137dc5760405162461bcd60e51b8152602060048201526015602482015274526166666c6520436c6f736564206f6e2074696d6560581b6044820152606401610b67565b5f815460ff1660048111156137f3576137f3614f11565b1461383b5760405162461bcd60e51b8152602060048201526018602482015277149859999b19481a5cc81b9bdd081a5b8810d4915055115160421b6044820152606401610b67565b600e810154156138b257600e8101546040516001600160601b03193360601b16602082015261386e918491603401612048565b6138b25760405162461bcd60e51b8152602060048201526015602482015274139bdd081c185c9d081bd98815da1a5d195b1a5cdd605a1b6044820152606401610b67565b5f841180156138c5575080600601548411155b6138e15760405162461bcd60e51b8152600401610b6790615517565b6001600160a01b0383161580159061390257506001600160a01b0383163314155b6139625760405162461bcd60e51b815260206004820152602b60248201527f416464726573732063616e742774206265206e756c6c2061646472657373202f60448201526a1036b9b39039b2b73232b960a91b6064820152608401610b67565b60098581548110613975576139756152aa565b905f5260205f2090600f0201600401548482600c0154613995919061537c565b11156139e35760405162461bcd60e51b815260206004820152601e60248201527f526166666c65206861732072656163686564206d617820656e747269657300006044820152606401610b67565b600b8101546001600160a01b0316613a2857838160050154613a0591906153d3565b3414613a235760405162461bcd60e51b8152600401610b6790615574565b613ab3565b600b81015460058201546001600160a01b03909116906323b872dd9033903090613a539089906153d3565b6040518463ffffffff1660e01b8152600401613a7193929190615405565b6020604051808303815f875af1158015613a8d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ab191906153ea565b505b604080513360208201529081018690525f90606001604051602081830303815290604052805190602001209050816006015485600c5f8481526020019081526020015f2054613b02919061537c565b1115613b4c5760405162461bcd60e51b815260206004820152601960248201527826b0bc1032b73a3934b2b9903ab9b2b9103932b0b1b432b21760391b6044820152606401610b67565b5f818152600c602052604081208054879290613b6990849061537c565b925050819055505f6040518060600160405280866001600160a01b031681526020018785600c0154613b9b919061537c565b815260209081018890525f898152600882526040808220805460018082018355918452848420865160039092020180546001600160a01b0319166001600160a01b039092169190911781559385015190840155830151600290920191909155600c850180549293508892909190613c1390849061537c565b9091555050600c83015460408051918252602082018890526001600160a01b0387169133918a917f15bbd06a4440dc4bed7451cfd8c6d87d7dd0b32856c137538574d4dc5581aa7b910160405180910390a450505050505050565b613c7661459a565b6001600160a01b038116613cdb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b67565b610bcd8161472a565b5f8281526008602052604081208190815b8154811015613d67575f828281548110613d1157613d116152aa565b905f5260205f209060030201600101549050858110613d5e57828281548110613d3c57613d3c6152aa565b5f9182526020909120600390910201546001600160a01b03169350613d679050565b50600101613cf5565b506001600160a01b038216613db15760405162461bcd60e51b815260206004820152601060248201526f15da5b9b995c881b9bdd08199bdd5b9960821b6044820152606401610b67565b509392505050565b5f8051602061570c83398151915233613dd28282613f70565b5050601a805460ff19811660ff90911615179055565b600260015403613e3a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b67565b6002600155565b5f82815260076020526040812060010154825183908390613e6457613e646152aa565b6020026020010151613e769190615369565b613e8190600161537c565b5f848152600760205260408120546009805493945091928110613ea657613ea66152aa565b905f5260205f2090600f020190508181600801819055505f6040518060400160405280855f81518110613edb57613edb6152aa565b60209081029190910181015182529081018590525f8781526007808352604080832080548452600685528184208651815586860151600190910155928a9052908352905481518981529283018790529293507f8a06e59f8bcf6fd7f3d4f78e40f7271ef279eaf8e0fc07df107169ccdc05ab65910160405180910390a25f85815260076020526040902054610f249084614007565b613f7a8282612660565b610c5457613f8781614935565b613f92836020614947565b604051602001613fa392919061563d565b60408051601f198184030181529082905262461bcd60e51b8252610b67916004016156b1565b613fd38282612660565b610c54575f828152601b602090815260408083206001600160a01b03851684529091529020805460ff191660011790555050565b61400f613de8565b5f60098381548110614023576140236152aa565b905f5260205f2090600f0201905081816008018190555080600c01545f146140545761404f8383613ce4565b614063565b60098101546001600160a01b03165b6007820180546001600160a01b0319166001600160a01b039290921691821790556002820180546040805160208084028201810190925282815261413a943094909391929091908301828280156140e157602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116140c3575b5050505050846003018054806020026020016040519081016040528092919081815260200182805480156116e857602002820191905f5260205f20908154815260200190600101908083116116d4575050505050614556565b5f816005015482600c015461414f91906153d3565b90505f61271083600a01548361416591906153d3565b61416f91906156e3565b90505f61417c82846152d2565b600b8501549091506001600160a01b03166142cf5760098401546040515f916001600160a01b03169083908381818185875af1925050503d805f81146141dd576040519150601f19603f3d011682016040523d82523d5f602084013e6141e2565b606091505b50509050806142285760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408ae8d60731b6044820152606401610b67565b600d546040515f916001600160a01b03169085908381818185875af1925050503d805f8114614272576040519150601f19603f3d011682016040523d82523d5f602084013e614277565b606091505b50509050806142c85760405162461bcd60e51b815260206004820152601b60248201527f4661696c65642073656e642045746820746f20506c6174666f726d00000000006044820152606401610b67565b50506144ec565b600b84015460405163095ea7b360e01b8152306004820152602481018590526001600160a01b039091169063095ea7b3906044016020604051808303815f875af115801561431f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061434391906153ea565b50600b84015460098501546040516323b872dd60e01b81525f926001600160a01b03908116926323b872dd9261438192309216908790600401615405565b6020604051808303815f875af115801561439d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143c191906153ea565b9050806144105760405162461bcd60e51b815260206004820152601a60248201527f4661696c656420746f2073656e6420455243323020546f6b656e0000000000006044820152606401610b67565b600b850154600d546040516323b872dd60e01b81525f926001600160a01b03908116926323b872dd9261444b92309216908990600401615405565b6020604051808303815f875af1158015614467573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061448b91906153ea565b9050806144e95760405162461bcd60e51b815260206004820152602660248201527f4661696c656420746f2073656e6420455243323020546f6b656e20746f20706c6044820152656174666f726d60d01b6064820152608401610b67565b50505b835460ff19166003178455600784015460088501546040805186815260208101929092526001600160a01b039092169188917f7e9ab850b8ae5bd2e5fba4accceb80d63e90bcb89852d7cae476cd917f25b25d910160405180910390a350505050610c5460018055565b5f5b8251811015610f24576145928585858481518110614578576145786152aa565b602002602001015185858151811061197d5761197d6152aa565b600101614558565b5f546001600160a01b03163314611cc35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b67565b6001600160a01b03821661463a576040516001600160a01b0384169082156108fc029083905f818181858888f19350505050158015614634573d5f803e3d5ffd5b50610ce0565b306001600160a01b038516036146ba5760405163095ea7b360e01b8152306004820152602481018290526001600160a01b0383169063095ea7b3906044016020604051808303815f875af1158015614694573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906146b891906153ea565b505b6040516323b872dd60e01b81526001600160a01b038316906323b872dd906146ea90879087908690600401615405565b6020604051808303815f875af1158015614706573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2491906153ea565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600254600480546005546040516305d3b1d360e41b8152928301919091526001600160401b03600160501b820416602483015261ffff8116604483015263ffffffff62010000820481166064840152600160301b9091041660848201525f916001600160a01b031690635d3b1d309060a4016020604051808303815f875af1158015614807573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061482b9190615500565b60408051808201825285815260208082018681525f858152600790925292812091518255915160019091015560098054929350909185908110614870576148706152aa565b5f9182526020909120600f909102018054909150600290829060ff1916600183021790555060055460408051848152600160301b90920463ffffffff1660208301527fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee910160405180910390a15092915050565b5f826148f08584614adc565b14949350505050565b6149038282612660565b15610c54575f828152601b602090815260408083206001600160a01b03851684529091529020805460ff191690555050565b6060610df86001600160a01b03831660145b60605f6149558360026153d3565b61496090600261537c565b6001600160401b0381111561497757614977614c21565b6040519080825280601f01601f1916602001820160405280156149a1576020820181803683370190505b509050600360fc1b815f815181106149bb576149bb6152aa565b60200101906001600160f81b03191690815f1a905350600f60fb1b816001815181106149e9576149e96152aa565b60200101906001600160f81b03191690815f1a9053505f614a0b8460026153d3565b614a1690600161537c565b90505b6001811115614a8d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110614a4a57614a4a6152aa565b1a60f81b828281518110614a6057614a606152aa565b60200101906001600160f81b03191690815f1a90535060049490941c93614a86816156f6565b9050614a19565b508315610df55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b67565b5f81815b8451811015613db1575f858281518110614afc57614afc6152aa565b60200260200101519050808311614b21575f8381526020829052604090209250614b31565b5f81815260208490526040902092505b50600101614ae0565b828054828255905f5260205f20908101928215614b8d579160200282015b82811115614b8d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614b58565b50614b99929150614bd6565b5090565b828054828255905f5260205f20908101928215614b8d579160200282015b82811115614b8d578251825591602001919060010190614bbb565b5b80821115614b99575f8155600101614bd7565b5f8060408385031215614bfb575f80fd5b50508035926020909101359150565b5f60208284031215614c1a575f80fd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715614c5d57614c5d614c21565b604052919050565b5f6001600160401b03821115614c7d57614c7d614c21565b5060051b60200190565b5f82601f830112614c96575f80fd5b81356020614cab614ca683614c65565b614c35565b8083825260208201915060208460051b870101935086841115614ccc575f80fd5b602086015b84811015614ce85780358352918301918301614cd1565b509695505050505050565b5f8060408385031215614d04575f80fd5b8235915060208301356001600160401b03811115614d20575f80fd5b614d2c85828601614c87565b9150509250929050565b6001600160a01b0381168114610bcd575f80fd5b8015158114610bcd575f80fd5b5f8060408385031215614d68575f80fd5b8235614d7381614d36565b91506020830135614d8381614d4a565b809150509250929050565b5f60208284031215614d9e575f80fd5b8135610df581614d36565b5f8060408385031215614dba575f80fd5b823591506020830135614d8381614d36565b602080825282518282018190525f919060409081850190868401855b82811015614e2057815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101614de8565b5091979650505050505050565b5f8060408385031215614e3e575f80fd5b8235614e4981614d36565b946020939093013593505050565b5f82601f830112614e66575f80fd5b81356020614e76614ca683614c65565b8083825260208201915060208460051b870101935086841115614e97575f80fd5b602086015b84811015614ce8578035614eaf81614d36565b8352918301918301614e9c565b5f8060408385031215614ecd575f80fd5b82356001600160401b0380821115614ee3575f80fd5b614eef86838701614e57565b93506020850135915080821115614f04575f80fd5b50614d2c85828601614c87565b634e487b7160e01b5f52602160045260245ffd5b6101a0810160058f10614f4657634e487b7160e01b5f52602160045260245ffd5b8e82528d60208301528c60408301528b60608301528a6080830152614f7660a083018b6001600160a01b03169052565b8860c0830152614f9160e08301896001600160a01b03169052565b86610100830152614fae6101208301876001600160a01b03169052565b84610140830152614fc461016083018515159052565b826101808301529e9d5050505050505050505050505050565b5f805f805f805f80610100898b031215614ff5575f80fd5b8835975060208901356001600160401b0380821115615012575f80fd5b61501e8c838d01614e57565b985060408b0135915080821115615033575f80fd5b506150408b828c01614c87565b965050606089013561505181614d36565b979a969950949760808101359660a0820135965060c0820135955060e0909101359350915050565b5f805f6060848603121561508b575f80fd5b833592506020840135915060408401356001600160401b038111156150ae575f80fd5b6150ba86828701614c87565b9150509250925092565b5f602082840312156150d4575f80fd5b813563ffffffff81168114610df5575f80fd5b5f805f606084860312156150f9575f80fd5b83356001600160401b0381111561510e575f80fd5b61511a86828701614c87565b9660208601359650604090950135949350505050565b5f8060408385031215615141575f80fd5b82356001600160401b03811115615156575f80fd5b61516285828601614e57565b9250506020830135614d8381614d4a565b5f60208284031215615183575f80fd5b81356001600160401b0381168114610df5575f80fd5b5f805f805f805f805f6101208a8c0312156151b2575f80fd5b89356151bd81614d36565b985060208a0135975060408a0135965060608a01356001600160401b03808211156151e6575f80fd5b6151f28d838e01614e57565b975060808c0135915080821115615207575f80fd5b506152148c828d01614c87565b95505060a08a013561522581614d36565b8094505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b5f805f806080858703121561525f575f80fd5b8435935060208501359250604085013561527881614d36565b915060608501356001600160401b03811115615292575f80fd5b61529e87828801614c87565b91505092959194509250565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b81810381811115610df857610df86152be565b6020808252601390820152720a4cae2ead2e4ca40e6c2daca40d8cadccee8d606b1b604082015260600190565b60208082526023908201527f526166666c65207374696c6c206f70656e6564206f72206e6f7420736f6c64206040820152621bdd5d60ea1b606082015260800190565b634e487b7160e01b5f52601260045260245ffd5b5f8261537757615377615355565b500690565b80820180821115610df857610df86152be565b60208082526024908201527f456e642074696d652063616e2774206265203c2061732063757272656e74207460408201526334b6b29760e11b606082015260800190565b8082028115828204841417610df857610df86152be565b5f602082840312156153fa575f80fd5b8151610df581614d4a565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252600a90820152694e6f20656e747269657360b01b604082015260600190565b6020808252602e908201527f4d696e20656e74726965732075736572203e203020616e64203c3d206d61782060408201526d656e747269657320726166666c6560901b606082015260800190565b60208082526018908201527f546f6b656e2041646472657373206e6f74206164646564200000000000000000604082015260600190565b602080825260149082015273105b5bdd5b9d0818d85b89dd081899481b9d5b1b60621b604082015260600190565b5f60208284031215615510575f80fd5b5051919050565b6020808252603c908201527f4e756d62657220656e74726965732063616e27742062652030206f72206d6f7260408201527f65207468616e206d617820656e74726965732070657220757365722e00000000606082015260800190565b60208082526024908201527f6d73672e76616c7565206d75737420626520657175616c20746f2074686520706040820152637269636560e01b606082015260800190565b5f602082840312156155c8575f80fd5b8151610df581614d36565b5f600182016155e4576155e46152be565b5060010190565b602080825260169082015275125b9d985b1a5908199d5b991cc81c1c9bdd9a59195960521b604082015260600190565b5f5b8381101561563557818101518382015260200161561d565b50505f910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f835161567481601785016020880161561b565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516156a581602884016020880161561b565b01602801949350505050565b602081525f82518060208401526156cf81604085016020870161561b565b601f01601f19169190910160400192915050565b5f826156f1576156f1615355565b500490565b5f81615704576157046152be565b505f19019056fe523a704056dcd17bcf83bed8b68c59416dac1119be77755efe3bde0a64e46e0ca26469706673582212208c0e0f38fbd453eab98428b60101d1ecc9a71c551c30bb3ca8f209b4f10d4f1864736f6c63430008160033
Loading...
Loading
Loading...
Loading
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.