Overview
ETH Balance
0.0134762 ETH
Eth Value
$41.29 (@ $3,063.66/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 5,019 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 19680672 | 77 days ago | IN | 0 ETH | 0.00124428 | ||||
Redeem | 18731881 | 210 days ago | IN | 0 ETH | 0.00423814 | ||||
Redeem | 18368620 | 261 days ago | IN | 0 ETH | 0.00094976 | ||||
Redeem | 18368617 | 261 days ago | IN | 0 ETH | 0.00114462 | ||||
On Reborn | 17976395 | 316 days ago | IN | 0 ETH | 0.00128971 | ||||
Reborn | 17976390 | 316 days ago | IN | 0.0035996 ETH | 0.00526768 | ||||
Redeem | 17077492 | 442 days ago | IN | 0 ETH | 0.00621336 | ||||
Redeem | 17058066 | 445 days ago | IN | 0 ETH | 0.00309939 | ||||
Redeem | 17051345 | 446 days ago | IN | 0 ETH | 0.00260836 | ||||
Redeem | 17048152 | 447 days ago | IN | 0 ETH | 0.00283546 | ||||
On Buy | 17007237 | 452 days ago | IN | 0 ETH | 0.00203918 | ||||
Buy | 17007231 | 452 days ago | IN | 0.0035996 ETH | 0.00479338 | ||||
On Buy | 17007201 | 452 days ago | IN | 0 ETH | 0.00239726 | ||||
Buy | 17007195 | 452 days ago | IN | 0.0035996 ETH | 0.0047685 | ||||
Redeem | 17001263 | 453 days ago | IN | 0 ETH | 0.0025889 | ||||
Redeem | 16961197 | 459 days ago | IN | 0 ETH | 0.00205836 | ||||
Redeem | 16961191 | 459 days ago | IN | 0 ETH | 0.00211137 | ||||
Redeem | 16911874 | 466 days ago | IN | 0 ETH | 0.00225066 | ||||
Redeem | 16876489 | 471 days ago | IN | 0 ETH | 0.00456139 | ||||
Redeem | 16831525 | 477 days ago | IN | 0 ETH | 0.00232201 | ||||
Redeem | 16830992 | 477 days ago | IN | 0 ETH | 0.00277591 | ||||
Redeem | 16784278 | 484 days ago | IN | 0 ETH | 0.00326628 | ||||
Redeem | 16784275 | 484 days ago | IN | 0 ETH | 0.00367699 | ||||
Redeem | 16711425 | 494 days ago | IN | 0 ETH | 0.00239466 | ||||
Redeem | 16705336 | 495 days ago | IN | 0 ETH | 0.00284756 |
Loading...
Loading
Contract Name:
PandaVRFProducer
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* ** ** dddddddd ** PPPPPPPPPPPPPPPPP d::::::d DDDDDDDDDDDDD AAA OOOOOOOOO ** P::::::::::::::::P d::::::d D::::::::::::DDD A:::A OO:::::::::OO ** P::::::PPPPPP:::::P d::::::d D:::::::::::::::DD A:::::A OO:::::::::::::OO ** PP:::::P P:::::P d:::::d DDD:::::DDDDD:::::D A:::::::A O:::::::OOO:::::::O ** P::::P P:::::Paaaaaaaaaaaaa nnnn nnnnnnnn ddddddddd:::::d aaaaaaaaaaaaa D:::::D D:::::D A:::::::::A O::::::O O::::::O ** P::::P P:::::Pa::::::::::::a n:::nn::::::::nn dd::::::::::::::d a::::::::::::a D:::::D D:::::D A:::::A:::::A O:::::O O:::::O ** P::::PPPPPP:::::P aaaaaaaaa:::::an::::::::::::::nn d::::::::::::::::d aaaaaaaaa:::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P:::::::::::::PP a::::ann:::::::::::::::nd:::::::ddddd:::::d a::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P::::PPPPPPPPP aaaaaaa:::::a n:::::nnnn:::::nd::::::d d:::::d aaaaaaa:::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P::::P aa::::::::::::a n::::n n::::nd:::::d d:::::d aa::::::::::::a D:::::D D:::::D A:::::AAAAAAAAA:::::A O:::::O O:::::O ** P::::P a::::aaaa::::::a n::::n n::::nd:::::d d:::::d a::::aaaa::::::a D:::::D D:::::DA:::::::::::::::::::::A O:::::O O:::::O ** P::::P a::::a a:::::a n::::n n::::nd:::::d d:::::d a::::a a:::::a D:::::D D:::::DA:::::AAAAAAAAAAAAA:::::A O::::::O O::::::O ** PP::::::PP a::::a a:::::a n::::n n::::nd::::::ddddd::::::dda::::a a:::::a DDD:::::DDDDD:::::DA:::::A A:::::AO:::::::OOO:::::::O ** P::::::::P a:::::aaaa::::::a n::::n n::::n d:::::::::::::::::da:::::aaaa::::::a D:::::::::::::::DDA:::::A A:::::AOO:::::::::::::OO ** P::::::::P a::::::::::aa:::a n::::n n::::n d:::::::::ddd::::d a::::::::::aa:::aD::::::::::::DDD A:::::A A:::::A OO:::::::::OO ** PPPPPPPPPP aaaaaaaaaa aaaa nnnnnn nnnnnn ddddddddd ddddd aaaaaaaaaa aaaaDDDDDDDDDDDDD AAAAAAA AAAAAAA OOOOOOOOO ** */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.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 "../interfaces/IPoolKit.sol"; /** */ contract PandaVRFProducer is Ownable, ReentrancyGuard, VRFConsumerBaseV2 { using SafeERC20 for IERC20; struct RequestInfo { uint256 reqFunc; address sender; uint256 ownerTokenId; uint256 targetTokenId; uint256 amountFeeMax; uint256 deadline; uint256 reqState; } address immutable public pandaToken; address immutable public pandaNFT; IPoolKit public poolKit; bool public isVrfOpen = false; mapping(uint256 => RequestInfo) public reqInfos; mapping(address => uint256) public rebornMap; mapping(address => uint256) public buyMap; VRFCoordinatorV2Interface COORDINATOR; LinkTokenInterface LINKTOKEN; // Storage parameters // uint256 public requestId; uint64 public subscriptionId; // A reasonable default is 100000, but this value could be different // on other networks. uint32 callbackGasLimit = 250_000; uint256 public fixedGasPrice = 10 gwei; uint256 constant buyGas = 179_980; uint256 constant rebornGas = 179_980; uint256 public constant REBRON_FUNC_TYPE = 1; uint256 public constant BUY_FUNC_TYPE = 2; uint8 public constant GAS_LEVEL_CONTRACT = 1; uint8 public constant GAS_LEVEL_200 = 2; uint8 public constant GAS_LEVEL_500 = 3; uint8 public constant GAS_LEVEL_1000 = 4; uint8 public constant REQ_NOT_SEND = 0; uint8 public constant REQ_START = 1; uint8 public constant REQ_PENDING = 2; uint8 public constant REQ_FINISH = 3; address public constant ZERO_ADDRESS = address(0); uint256 public constant NFT_TOTAL_SUPPLY = 10000; uint256 public constant FEE_BASE = 10000; uint256 public poolFeeValue = 375; uint256 public treasuryFeeValue = 0; // The default is 3, but you can set this higher. uint16 constant requestConfirmations = 3; uint32 constant numWords = 1; // address constant vrfCoordinator = 0x6168499c0cFfCaCD319c818142124B7A15E857ab; //main net address constant vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; // address constant link_token_contract = 0x01BE23585060835E02B77ef475b0Cc51aA1e0709; //main net 0x514910771AF9Ca656af840dff83E8264EcF986CA address constant link_token_contract = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // bytes32 constant keyHash200 = 0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc; // bytes32 constant keyHash500 = 0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc; // bytes32 constant keyHash1000 = 0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc; //main net bytes32 constant keyHash200 = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; bytes32 constant keyHash500 = 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92; bytes32 constant keyHash1000 = 0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805; event PreReborn(uint256 indexed requestId, address indexed recipient,uint256 ownerTokenId, uint256 fee); event PreBuy(uint256 indexed requestId, address indexed recipient, uint256 payAmount); event Reborn(address indexed recipient,uint256 ownerTokenId, uint256 targetTokenId); event Buy(address indexed recipient, uint256 targetTokenId); event WithdrawERC20(address recipient, address tokenAddress, uint256 tokenAmount); event WithdrawEther(address recipient, uint256 amount); event RandomOpened(address indexed sender, uint256 index, uint256 targetIndex, uint256 requestId, uint256 random); event NewSubscription(address consumer, uint256 subscriptionId); event TopUpSubscription(uint256 amount); event AddConsumer(address consumerAddress); event RemoveConsumer(address consumerAddress); event CancelSubscription(address receivingWallet, uint256 subscriptionId); event SwitchEvent(bool _vrfOpen); event FixedGasPrice(uint256 _gasPrice); event CallbackGasLimet(uint256 _limit); event SetPoolFeeValue(uint256 feeValue); event SetTreasuryFeeValue(uint256 feeValue); event Redeem(address indexed recipient, uint256 ownerTokenId, uint256 receiveAmount); error TimeOutError(uint256 deadline, uint256 timestamp); error ZeroAddrError(); error NoEnoughCallbackGas(uint256 value, uint256 needGas); error PoolCloseError(); error NFTOwnerNotMatch(uint tokenId, address expectOwner, address realOwner); error MaxFeeNotMatch(uint256 maxUserFee, uint256 poolNeedFee); error PandaNotEnough(address sender, uint256 balance, uint256 needBalance); error MaxBuyNotMatch(uint256 maxUserPayFor, uint256 poolNeedPayFor); error PoolNotEnoughNFT(uint256 poolBalance, uint256 downLimit); error TransferEhterFail(address sender, address receiver, uint256 amount); error ConcurrentRebornError(address sender, uint256 requistId); error RequestInvalid(address sender, uint256 requestId, uint256 targetTokenId); error MinReceiveNotMatch(uint256 exceptMinReceive, uint256 poolPayFor); modifier ensure(uint deadline) { if(deadline < block.timestamp) { revert TimeOutError(deadline, block.timestamp); } _; } modifier notZeroAddr(address addr_) { if(addr_ == ZERO_ADDRESS) { revert ZeroAddrError(); } _; } modifier vrfOpen() { if(!isVrfOpen) { revert PoolCloseError(); } _; } /** * @dev Constructor. */ constructor( address _pandaCore, address _pandaToken, address _pandaNft ) VRFConsumerBaseV2(vrfCoordinator) { poolKit = IPoolKit(_pandaCore); pandaToken = _pandaToken; pandaNFT = _pandaNft; COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); LINKTOKEN = LinkTokenInterface(link_token_contract); //Create a new subscription when you deploy the contract. createNewSubscription(); } //########################### Vrf Buy&Reborn Functions Start #################### /** * @dev reborn NFT. * @param _ownerTokenId The NFT Id you want to reborn * @param _amountFeeMax max fee you want to pay for swapping * @param _deadline deadline * @param _gasLevel gas level you want pay for */ function reborn(uint256 _ownerTokenId, uint256 _amountFeeMax, uint256 _deadline, uint8 _gasLevel) payable external ensure(_deadline) nonReentrant vrfOpen { if (rebornMap[msg.sender] != 0) { revert ConcurrentRebornError(msg.sender, rebornMap[msg.sender]); } bytes32 keyHash = keyHash200; uint256 gasPrice = fixedGasPrice; if (_gasLevel == GAS_LEVEL_200) { gasPrice = 200 gwei; } else if (_gasLevel == GAS_LEVEL_500) { keyHash = keyHash500; gasPrice = 500 gwei; } else if (_gasLevel == GAS_LEVEL_1000) { keyHash = keyHash1000; gasPrice = 1000 gwei; } if(msg.value < gasPrice * rebornGas) { revert NoEnoughCallbackGas(msg.value, gasPrice * rebornGas); } if (msg.value > gasPrice * rebornGas) { payable(msg.sender).transfer(msg.value - gasPrice * rebornGas); } uint256 requestId = COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, numWords ); RequestInfo storage reqInfo = reqInfos[requestId]; reqInfo.reqFunc = REBRON_FUNC_TYPE; reqInfo.sender = msg.sender; reqInfo.ownerTokenId = _ownerTokenId; reqInfo.amountFeeMax = _amountFeeMax; reqInfo.deadline = _deadline; reqInfo.reqState = REQ_START; rebornMap[msg.sender] = requestId; uint256 _price = poolKit._currentPrice(); uint256 feeValue = poolFeeValue + treasuryFeeValue; if (_amountFeeMax < _price * feeValue / FEE_BASE) { revert MaxFeeNotMatch(_amountFeeMax, _price * (FEE_BASE - feeValue) / FEE_BASE); } IERC20 _pandaToken = IERC20(pandaToken); if (_pandaToken.balanceOf(msg.sender) < _price *feeValue / FEE_BASE) { revert PandaNotEnough(msg.sender, _pandaToken.balanceOf(msg.sender), _price * feeValue / FEE_BASE); } if (poolFeeValue != 0) { poolKit._safeTransferFromPanda(msg.sender, address(poolKit), _price * poolFeeValue / FEE_BASE); } if(treasuryFeeValue != 0) { poolKit._safeTransferFromPanda(msg.sender, owner(), _price * treasuryFeeValue / FEE_BASE); } poolKit._safeTransferFromNFT(msg.sender, address(poolKit), _ownerTokenId, ""); poolKit._poolPushNft(_ownerTokenId); emit PreReborn(requestId, msg.sender, _ownerTokenId, _price * feeValue / FEE_BASE); } /** * @dev buy NFT, you should pay $PANDA. * @param _amountBuyMax Above this value you will not make a purchase * @param _deadline deadline * @param _gasLevel gas level you want pay for */ function buy(uint256 _amountBuyMax, uint256 _deadline, uint8 _gasLevel) payable external ensure(_deadline) nonReentrant vrfOpen { bytes32 keyHash = keyHash200; uint256 gasPrice = fixedGasPrice; if (_gasLevel == GAS_LEVEL_200) { gasPrice = 200 gwei; } else if (_gasLevel == GAS_LEVEL_500) { keyHash = keyHash500; gasPrice = 500 gwei; } else if (_gasLevel == GAS_LEVEL_1000) { keyHash = keyHash1000; gasPrice = 1000 gwei; } if(msg.value < gasPrice * buyGas) { revert NoEnoughCallbackGas(msg.value, gasPrice * buyGas); } if (msg.value > gasPrice * buyGas) { payable(msg.sender).transfer(msg.value - gasPrice * buyGas); } uint256 requestId = COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, numWords ); RequestInfo storage reqInfo = reqInfos[requestId]; reqInfo.reqFunc = BUY_FUNC_TYPE; reqInfo.sender = msg.sender; reqInfo.amountFeeMax = _amountBuyMax; reqInfo.deadline = _deadline; reqInfo.reqState = REQ_START; buyMap[msg.sender] = requestId; uint256 feeValue = poolFeeValue + treasuryFeeValue; uint256 _price = poolKit._currentPrice(); if (_amountBuyMax < _price * (FEE_BASE + feeValue) / FEE_BASE) { revert MaxBuyNotMatch(_amountBuyMax, _price * (FEE_BASE + feeValue) / FEE_BASE); } IERC20 _pandaToken = IERC20(pandaToken); if (_pandaToken.balanceOf(msg.sender) < _price * (FEE_BASE + feeValue) / FEE_BASE) { revert PandaNotEnough(msg.sender, _pandaToken.balanceOf(msg.sender), _price * (FEE_BASE + feeValue) / FEE_BASE); } if (poolFeeValue != 0) { poolKit._safeTransferFromPanda(msg.sender, address(poolKit), _price * (FEE_BASE + poolFeeValue) / FEE_BASE); } if (treasuryFeeValue != 0) { poolKit._safeTransferFromPanda(msg.sender, owner(), _price * treasuryFeeValue/ FEE_BASE); } IERC721 _pandaNFT = IERC721(pandaNFT); if(_pandaNFT.balanceOf(address(poolKit)) <= poolKit._minPoolNFTCount()) { revert PoolNotEnoughNFT(_pandaNFT.balanceOf(address(poolKit)), poolKit._minPoolNFTCount()); } emit PreBuy(requestId, msg.sender, _price * (FEE_BASE + feeValue) / FEE_BASE); } function fulfillRandomWords( uint256 _requestId, /* requestId */ uint256[] memory randomWords ) internal override { uint256 index = randomWords[0] % poolKit._poolSize(); uint256 targetIndex = poolKit._getIdByIndex(index); poolKit._poolRemoveNft(index); RequestInfo storage reqInfo = reqInfos[_requestId]; reqInfo.targetTokenId = targetIndex; reqInfo.reqState = REQ_PENDING; emit RandomOpened(reqInfo.sender, index, targetIndex, _requestId, randomWords[0]); // uint256 funcType = reqInfo.reqFunc; // if (funcType == REBRON_FUNC_TYPE) { // _reborn(reqInfo.sender,reqInfo.ownerTokenId, targetIndex, reqInfo.amountFeeMax, reqInfo.deadline); // } else { // _buy(reqInfo.sender, targetIndex, reqInfo.amountFeeMax, reqInfo.deadline); // } } /** * @dev external reborn NFT. */ function onReborn() external { uint256 _requestId = rebornMap[msg.sender]; uint256 targetId = reqInfos[_requestId].targetTokenId; uint256 reqState = reqInfos[_requestId].reqState; if (_requestId == 0 || targetId == 0 || reqState != REQ_PENDING) { revert RequestInvalid(msg.sender, _requestId, targetId); } IERC721 _pandaNFT = IERC721(pandaNFT); if (_pandaNFT.ownerOf(targetId) != address(poolKit)) { revert NFTOwnerNotMatch(targetId, address(poolKit), _pandaNFT.ownerOf(targetId)); } poolKit._safeTransferFromNFT(address(poolKit), msg.sender, targetId, ""); rebornMap[msg.sender] = 0; reqInfos[_requestId].reqState = REQ_FINISH; emit Reborn(msg.sender, reqInfos[_requestId].ownerTokenId, targetId); } /** * @dev external buy NFT, you will receive $PANDA. */ function onBuy() external { uint256 _requestId = buyMap[msg.sender]; uint256 _targetId = reqInfos[_requestId].targetTokenId; uint256 _reqState = reqInfos[_requestId].reqState; if (_requestId == 0 || _targetId == 0 || _reqState != REQ_PENDING) { revert RequestInvalid(msg.sender, _requestId, _targetId); } IERC721 _pandaNFT = IERC721(pandaNFT); if (_pandaNFT.ownerOf(_targetId) != address(poolKit)) { revert NFTOwnerNotMatch(_targetId, address(poolKit), _pandaNFT.ownerOf(_targetId)); } poolKit._safeTransferFromNFT(address(poolKit), msg.sender, _targetId, ""); buyMap[msg.sender] = 0; reqInfos[_requestId].reqState = REQ_FINISH; emit Buy(msg.sender, _targetId); } /** * @dev redeem NFT, you will receive $PANDA. * @param _ownerTokenId The NFT Id you want to redeem * @param _amountRedeemMin Less than this value you will not redeem * @param _deadline deadline */ function redeem(uint256 _ownerTokenId, uint256 _amountRedeemMin, uint256 _deadline) external ensure(_deadline) nonReentrant vrfOpen { IERC721 _pandaNFT = IERC721(pandaNFT); if (_pandaNFT.ownerOf(_ownerTokenId) != msg.sender) { revert NFTOwnerNotMatch(_ownerTokenId, msg.sender, _pandaNFT.ownerOf(_ownerTokenId)); } uint256 _price = poolKit._currentPrice(); uint256 feeValue = poolFeeValue + treasuryFeeValue; if (_amountRedeemMin > _price * (FEE_BASE - feeValue) / FEE_BASE) { revert MinReceiveNotMatch(_amountRedeemMin, _price * (FEE_BASE - feeValue) / FEE_BASE); } poolKit._safeTransferFromNFT(msg.sender, address(poolKit), _ownerTokenId, ""); poolKit._poolPushNft(_ownerTokenId); poolKit._safeTransferToPanda(msg.sender, _price * (FEE_BASE - feeValue) / FEE_BASE); emit Redeem(msg.sender, _ownerTokenId, _price * (FEE_BASE - feeValue) / FEE_BASE); } //########################### Vrf Buy&Reborn Functions End #################### //########################### VRF Base Functions Start #################### function createNewSubscription() public onlyOwner { address[] memory consumers = new address[](1); consumers[0] = address(this); subscriptionId = COORDINATOR.createSubscription(); COORDINATOR.addConsumer(subscriptionId, consumers[0]); emit NewSubscription(consumers[0], subscriptionId); } function topUpSubscription(uint256 amount) external onlyOwner { LINKTOKEN.transferAndCall(address(COORDINATOR), amount, abi.encode(subscriptionId)); emit TopUpSubscription(amount); } function addConsumer(address consumerAddress) external onlyOwner { COORDINATOR.addConsumer(subscriptionId, consumerAddress); emit AddConsumer(consumerAddress); } function removeConsumer(address consumerAddress) external onlyOwner { COORDINATOR.removeConsumer(subscriptionId, consumerAddress); emit RemoveConsumer(consumerAddress); } function cancelSubscription(address receivingWallet) external onlyOwner { COORDINATOR.cancelSubscription(subscriptionId, receivingWallet); subscriptionId = 0; emit CancelSubscription(receivingWallet, subscriptionId); } //########################### VRF Base Functions End #################### /** * @dev withdrawERC20 tokens. * @param _recipient recipient * @param _tokenAddress token * @param _tokenAmount amount */ function withdrawERC20(address _recipient, address _tokenAddress, uint256 _tokenAmount) external onlyOwner notZeroAddr(_tokenAddress) { IERC20(_tokenAddress).safeTransfer(_recipient, _tokenAmount); emit WithdrawERC20(_recipient, _tokenAddress, _tokenAmount); } /** * @dev withdraw Ether. * @param recipient recipient * @param amount amount */ function withdrawEther(address payable recipient, uint256 amount) external onlyOwner { (bool success,) = recipient.call{value:amount}(""); if(!success) { revert TransferEhterFail(msg.sender, recipient, amount); } emit WithdrawEther(recipient, amount); } /** * @dev setLiquidityClose close or open swap、redeem、buy. * @param _vrfOpen true or false */ function setSwitchs(bool _vrfOpen) external onlyOwner { isVrfOpen = _vrfOpen; emit SwitchEvent(_vrfOpen); } function seteFixedGasPrice(uint256 _gasPrice) external onlyOwner { fixedGasPrice = _gasPrice; emit FixedGasPrice(_gasPrice); } function setCallbackGasLimet(uint32 _limit) external onlyOwner { callbackGasLimit = _limit; emit CallbackGasLimet(_limit); } function setPoolFeeValue(uint256 _feeValue) external onlyOwner { poolFeeValue = _feeValue; emit SetPoolFeeValue(_feeValue); } function setTreasuryFeeValue(uint256 _feeValue) external onlyOwner { treasuryFeeValue = _feeValue; emit SetTreasuryFeeValue(_feeValue); } fallback () external payable {} receive () external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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 v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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 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; }
// 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); } }
/* ** ** dddddddd ** PPPPPPPPPPPPPPPPP d::::::d DDDDDDDDDDDDD AAA OOOOOOOOO ** P::::::::::::::::P d::::::d D::::::::::::DDD A:::A OO:::::::::OO ** P::::::PPPPPP:::::P d::::::d D:::::::::::::::DD A:::::A OO:::::::::::::OO ** PP:::::P P:::::P d:::::d DDD:::::DDDDD:::::D A:::::::A O:::::::OOO:::::::O ** P::::P P:::::Paaaaaaaaaaaaa nnnn nnnnnnnn ddddddddd:::::d aaaaaaaaaaaaa D:::::D D:::::D A:::::::::A O::::::O O::::::O ** P::::P P:::::Pa::::::::::::a n:::nn::::::::nn dd::::::::::::::d a::::::::::::a D:::::D D:::::D A:::::A:::::A O:::::O O:::::O ** P::::PPPPPP:::::P aaaaaaaaa:::::an::::::::::::::nn d::::::::::::::::d aaaaaaaaa:::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P:::::::::::::PP a::::ann:::::::::::::::nd:::::::ddddd:::::d a::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P::::PPPPPPPPP aaaaaaa:::::a n:::::nnnn:::::nd::::::d d:::::d aaaaaaa:::::a D:::::D D:::::D A:::::A A:::::A O:::::O O:::::O ** P::::P aa::::::::::::a n::::n n::::nd:::::d d:::::d aa::::::::::::a D:::::D D:::::D A:::::AAAAAAAAA:::::A O:::::O O:::::O ** P::::P a::::aaaa::::::a n::::n n::::nd:::::d d:::::d a::::aaaa::::::a D:::::D D:::::DA:::::::::::::::::::::A O:::::O O:::::O ** P::::P a::::a a:::::a n::::n n::::nd:::::d d:::::d a::::a a:::::a D:::::D D:::::DA:::::AAAAAAAAAAAAA:::::A O::::::O O::::::O ** PP::::::PP a::::a a:::::a n::::n n::::nd::::::ddddd::::::dda::::a a:::::a DDD:::::DDDDD:::::DA:::::A A:::::AO:::::::OOO:::::::O ** P::::::::P a:::::aaaa::::::a n::::n n::::n d:::::::::::::::::da:::::aaaa::::::a D:::::::::::::::DDA:::::A A:::::AOO:::::::::::::OO ** P::::::::P a::::::::::aa:::a n::::n n::::n d:::::::::ddd::::d a::::::::::aa:::aD::::::::::::DDD A:::::A A:::::A OO:::::::::OO ** PPPPPPPPPP aaaaaaaaaa aaaa nnnnnn nnnnnn ddddddddd ddddd aaaaaaaaaa aaaaDDDDDDDDDDDDD AAAAAAA AAAAAAA OOOOOOOOO ** */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.6; interface IPoolKit { function _safeTransferPanda(address to, uint256 value) external; function _safeTransferFromPanda(address from, address to, uint256 value) external; function _safeTransferFromNFT(address from, address to, uint256 tokenId, bytes calldata data) external; function _poolSize() external view returns(uint256); function _poolRemoveNft(uint256 _index) external; function _poolPushNft(uint256 _value) external ; function _getIdByIndex(uint256 _index) external returns(uint256); function _currentPrice() external view returns(uint256 _price); function _minPoolNFTCount() external view returns(uint256); function _safeTransferToPanda(address to,uint256 value) external ; }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// 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 (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pandaCore","type":"address"},{"internalType":"address","name":"_pandaToken","type":"address"},{"internalType":"address","name":"_pandaNft","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"requistId","type":"uint256"}],"name":"ConcurrentRebornError","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxUserPayFor","type":"uint256"},{"internalType":"uint256","name":"poolNeedPayFor","type":"uint256"}],"name":"MaxBuyNotMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxUserFee","type":"uint256"},{"internalType":"uint256","name":"poolNeedFee","type":"uint256"}],"name":"MaxFeeNotMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"exceptMinReceive","type":"uint256"},{"internalType":"uint256","name":"poolPayFor","type":"uint256"}],"name":"MinReceiveNotMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"expectOwner","type":"address"},{"internalType":"address","name":"realOwner","type":"address"}],"name":"NFTOwnerNotMatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"needGas","type":"uint256"}],"name":"NoEnoughCallbackGas","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needBalance","type":"uint256"}],"name":"PandaNotEnough","type":"error"},{"inputs":[],"name":"PoolCloseError","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolBalance","type":"uint256"},{"internalType":"uint256","name":"downLimit","type":"uint256"}],"name":"PoolNotEnoughNFT","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256","name":"targetTokenId","type":"uint256"}],"name":"RequestInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TimeOutError","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferEhterFail","type":"error"},{"inputs":[],"name":"ZeroAddrError","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"consumerAddress","type":"address"}],"name":"AddConsumer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"targetTokenId","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"CallbackGasLimet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receivingWallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"subscriptionId","type":"uint256"}],"name":"CancelSubscription","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_gasPrice","type":"uint256"}],"name":"FixedGasPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"consumer","type":"address"},{"indexed":false,"internalType":"uint256","name":"subscriptionId","type":"uint256"}],"name":"NewSubscription","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":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"payAmount","type":"uint256"}],"name":"PreBuy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"ownerTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"PreReborn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"random","type":"uint256"}],"name":"RandomOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"ownerTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetTokenId","type":"uint256"}],"name":"Reborn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"ownerTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"receiveAmount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"consumerAddress","type":"address"}],"name":"RemoveConsumer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeValue","type":"uint256"}],"name":"SetPoolFeeValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeValue","type":"uint256"}],"name":"SetTreasuryFeeValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_vrfOpen","type":"bool"}],"name":"SwitchEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TopUpSubscription","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"WithdrawERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawEther","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BUY_FUNC_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_LEVEL_1000","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_LEVEL_200","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_LEVEL_500","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_LEVEL_CONTRACT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REBRON_FUNC_TYPE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQ_FINISH","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQ_NOT_SEND","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQ_PENDING","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQ_START","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"consumerAddress","type":"address"}],"name":"addConsumer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountBuyMax","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_gasLevel","type":"uint8"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"buyMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receivingWallet","type":"address"}],"name":"cancelSubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createNewSubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fixedGasPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isVrfOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"onReborn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pandaNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pandaToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolFeeValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolKit","outputs":[{"internalType":"contract IPoolKit","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"_ownerTokenId","type":"uint256"},{"internalType":"uint256","name":"_amountFeeMax","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_gasLevel","type":"uint8"}],"name":"reborn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rebornMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ownerTokenId","type":"uint256"},{"internalType":"uint256","name":"_amountRedeemMin","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"consumerAddress","type":"address"}],"name":"removeConsumer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reqInfos","outputs":[{"internalType":"uint256","name":"reqFunc","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"ownerTokenId","type":"uint256"},{"internalType":"uint256","name":"targetTokenId","type":"uint256"},{"internalType":"uint256","name":"amountFeeMax","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"reqState","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_limit","type":"uint32"}],"name":"setCallbackGasLimet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeValue","type":"uint256"}],"name":"setPoolFeeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_vrfOpen","type":"bool"}],"name":"setSwitchs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeValue","type":"uint256"}],"name":"setTreasuryFeeValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasPrice","type":"uint256"}],"name":"seteFixedGasPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"subscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"topUpSubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFeeValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e06040526002805460ff60a01b19169055600780546001600160e01b0316613d0960e41b1790556402540be4006008556101776009556000600a553480156200004857600080fd5b506040516200423f3803806200423f8339810160408190526200006b9162000418565b73271682deb8c4e0901d1a1550ad2e64d568e699096200008b3362000120565b600180556001600160601b0319606091821b8116608052600280546001600160a01b0387166001600160a01b03199182161790915584831b821660a0529183901b1660c05260068054821673271682deb8c4e0901d1a1550ad2e64d568e699091790556007805490911673514910771af9ca656af840dff83e8264ecf986ca1790556200011762000170565b505050620004aa565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620001cf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b60408051600180825281830190925260009160208083019080368337019050509050308160008151811062000208576200020862000494565b6001600160a01b039283166020918202929092018101919091526006546040805163288688f960e21b81529051919093169263a21a23e49260048083019391928290030181600087803b1580156200025f57600080fd5b505af115801562000274573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029a919062000462565b60078054600160a01b600160e01b031916600160a01b6001600160401b039384168102919091179182905560065484516001600160a01b0390911693637341c10c9392909204909116908490600090620002f857620002f862000494565b60200260200101516040518363ffffffff1660e01b81526004016200033b9291906001600160401b039290921682526001600160a01b0316602082015260400190565b600060405180830381600087803b1580156200035657600080fd5b505af11580156200036b573d6000803e3d6000fd5b505050507f1e05df24f73db39faa0c2d5d26727d08632debce09833123a69214ba943e07c281600081518110620003a657620003a662000494565b6020026020010151600760149054906101000a90046001600160401b0316604051620003f09291906001600160a01b039290921682526001600160401b0316602082015260400190565b60405180910390a150565b80516001600160a01b03811681146200041357600080fd5b919050565b6000806000606084860312156200042e57600080fd5b6200043984620003fb565b92506200044960208501620003fb565b91506200045960408501620003fb565b90509250925092565b6000602082840312156200047557600080fd5b81516001600160401b03811681146200048d57600080fd5b9392505050565b634e487b7160e01b600052603260045260246000fd5b60805160601c60a05160601c60c05160601c613d2b6200051460003960008181610410015281816121d50152818161273501528181612dc901526130d40152600081816107d4015281816110130152611efc015260008181610a970152610af20152613d2b6000f3fe6080604052600436106102c65760003560e01c80638ce13f8911610177578063c35fdf7b116100d5578063e7caf3ae11610084578063fa3f217211610061578063fa3f217214610816578063fc73abc314610723578063fe1ca5d51461084357005b8063e7caf3ae146107c2578063ecefc705146103e8578063f2fde38b146107f657005b8063d683ec0c116100b2578063d683ec0c14610778578063de9d432214610798578063e472b077146107ad57005b8063c35fdf7b14610738578063cc74fd0e14610758578063ccaef3f51461035557005b806395977ace11610131578063b81922051161010e578063b8192205146106e3578063b91f1de514610703578063bb4154901461072357005b806395977ace146106ad5780639970bcc9146106cd578063ab5f0bef146104fa57005b806390c824491161015f57806390c82449146105d857806393d81d5814610678578063948a6e721461069857005b80638ce13f89146105a75780638da5cb5b146105ba57005b80634b62c12f116102245780636ecabaf9116101de57806377e17713116101bb57806377e17713146105445780637bb166631461055a57806386850e931461058757005b80636ecabaf9146104fa578063715018a61461050f57806377b93a5f1461052457005b8063538ba4f91161020c578063538ba4f9146104bb57806362401693146104d05780636d0c4e29146104e557005b80634b62c12f1461046a578063522f68151461049b57005b80631bd0b2c811610280578063323b223e1161025d578063323b223e146103e857806336c6f0ff146103fe57806344004cc11461044a57005b80631bd0b2c8146103a05780631fe543e3146103b55780632bef424b146103d557005b8063112940f9116102ae578063112940f914610335578063119892cf146103555780631229a4621461037c57005b806309c1ba2e146102cf5780630e27e3df1461031557005b366102cd57005b005b3480156102db57600080fd5b506007546102f790600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561032157600080fd5b506102cd610330366004613854565b610858565b34801561034157600080fd5b506102cd610350366004613854565b610978565b34801561036157600080fd5b5061036a600281565b60405160ff909116815260200161030c565b34801561038857600080fd5b5061039260095481565b60405190815260200161030c565b3480156103ac57600080fd5b50610392600181565b3480156103c157600080fd5b506102cd6103d0366004613967565b610a8c565b6102cd6103e3366004613a64565b610b2d565b3480156103f457600080fd5b5061039261271081565b34801561040a57600080fd5b506104327f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161030c565b34801561045657600080fd5b506102cd6104653660046138ba565b61143d565b34801561047657600080fd5b5060025461048b90600160a01b900460ff1681565b604051901515815260200161030c565b3480156104a757600080fd5b506102cd6104b636600461388e565b61152b565b3480156104c757600080fd5b50610432600081565b3480156104dc57600080fd5b5061036a600481565b3480156104f157600080fd5b506102cd61165f565b34801561050657600080fd5b5061036a600181565b34801561051b57600080fd5b506102cd6118e9565b34801561053057600080fd5b506102cd61053f366004613935565b61193d565b34801561055057600080fd5b50610392600a5481565b34801561056657600080fd5b50610392610575366004613854565b60046020526000908152604090205481565b34801561059357600080fd5b506102cd6105a2366004613935565b6119ba565b6102cd6105b5366004613aa3565b611ae9565b3480156105c657600080fd5b506000546001600160a01b0316610432565b3480156105e457600080fd5b5061063b6105f3366004613935565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460069095015493956001600160a01b039093169492939192909187565b604080519788526001600160a01b039096166020880152948601939093526060850191909152608084015260a083015260c082015260e00161030c565b34801561068457600080fd5b506102cd610693366004613854565b61246e565b3480156106a457600080fd5b5061036a600081565b3480156106b957600080fd5b506102cd6106c83660046138fb565b6125c2565b3480156106d957600080fd5b5061039260085481565b3480156106ef57600080fd5b506102cd6106fe366004613a38565b612672565b34801561070f57600080fd5b50600254610432906001600160a01b031681565b34801561072f57600080fd5b5061036a600381565b34801561074457600080fd5b506102cd610753366004613ad8565b612b99565b34801561076457600080fd5b506102cd610773366004613935565b612c49565b34801561078457600080fd5b506102cd610793366004613935565b612cc6565b3480156107a457600080fd5b506102cd612d43565b3480156107b957600080fd5b50610392600281565b3480156107ce57600080fd5b506104327f000000000000000000000000000000000000000000000000000000000000000081565b34801561080257600080fd5b506102cd610811366004613854565b612f7e565b34801561082257600080fd5b50610392610831366004613854565b60056020526000908152604090205481565b34801561084f57600080fd5b506102cd61304e565b6000546001600160a01b031633146108a55760405162461bcd60e51b81526020600482018190526024820152600080516020613cd683398151915260448201526064015b60405180910390fd5b6006546007546040517f9f87fad7000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b03838116602483015290911690639f87fad790604401600060405180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b50506040516001600160a01b03841681527f2c55008f00ad7d0c7db8d7f33fa28cd13e6f748aacae0b28a1c4c47fbaa59839925060200190505b60405180910390a150565b6000546001600160a01b031633146109c05760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6006546007546040517f7341c10c000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b03838116602483015290911690637341c10c90604401600060405180830381600087803b158015610a3a57600080fd5b505af1158015610a4e573d6000803e3d6000fd5b50506040516001600160a01b03841681527f59190d313c4ed1bd8d5c2780c1f439fc79c648ce7e5f6f2457ba3c10e8a456759250602001905061096d565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b1f576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602482015260440161089c565b610b298282613273565b5050565b8142811015610b58576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b60026001541415610bab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff16610bda57604051634fdb962760e01b815260040160405180910390fd5b3360009081526004602052604090205415610c3c57336000818152600460208190526040918290205491517fff7595d600000000000000000000000000000000000000000000000000000000815290810192909252602482015260440161089c565b6008547f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef9060ff841660021415610c795750642e90edd000610ceb565b60ff841660031415610cb457507fff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92905064746a528800610ceb565b60ff841660041415610ceb57507f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805905064e8d4a510005b610cf86202bf0c82613be0565b341015610d485734610d0d6202bf0c83613be0565b6040517f0fc3ab630000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b610d556202bf0c82613be0565b341115610da157336108fc610d6d6202bf0c84613be0565b610d779034613bff565b6040518115909202916000818181858888f19350505050158015610d9f573d6000803e3d6000fd5b505b6006546007546040516305d3b1d360e41b815260048101859052600160a01b820467ffffffffffffffff16602482015260036044820152600160e01b90910463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015610e2257600080fd5b505af1158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a919061394e565b9050600060036000838152602001908152602001600020905060018160000181905550338160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550888160020181905550878160040181905550868160050181905550600160ff1681600601819055508160046000336001600160a01b03166001600160a01b03168152602001908152602001600020819055506000600260009054906101000a90046001600160a01b03166001600160a01b0316633bdd280e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f80919061394e565b90506000600a54600954610f949190613bb4565b9050612710610fa38284613be0565b610fad9190613bcc565b8a10156110115789612710610fc28382613bff565b610fcc9085613be0565b610fd69190613bcc565b6040517f029bc8990000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b7f000000000000000000000000000000000000000000000000000000000000000061271061103f8385613be0565b6110499190613bcc565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a082319060240160206040518083038186803b15801561108857600080fd5b505afa15801561109c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c0919061394e565b10156111a2576040516370a0823160e01b81523360048201819052906001600160a01b038316906370a082319060240160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611140919061394e565b61271061114d8587613be0565b6111579190613bcc565b6040517f3b627e280000000000000000000000000000000000000000000000000000000081526001600160a01b0390931660048401526024830191909152604482015260640161089c565b60095415611246576002546009546001600160a01b0390911690635d815c5f9033908390612710906111d49089613be0565b6111de9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b505050505b600a54156112f5576002546001600160a01b0316635d815c5f336112726000546001600160a01b031690565b612710600a54886112839190613be0565b61128d9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156112dc57600080fd5b505af11580156112f0573d6000803e3d6000fd5b505050505b600254604051633cf4f10160e01b81523360048201526001600160a01b0390911660248201819052604482018e9052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b15801561135657600080fd5b505af115801561136a573d6000803e3d6000fd5b505060025460405163d4f5e80b60e01b81526001600160a01b03909116925063d4f5e80b91506113a2908f9060040190815260200190565b600060405180830381600087803b1580156113bc57600080fd5b505af11580156113d0573d6000803e3d6000fd5b503392508791507f5c0a907e7d78783900a697ab300617cf16849595b2cd82362ca303bd12597e6f90508e6127106114088789613be0565b6114129190613bcc565b604080519283526020830191909152015b60405180910390a350506001805550505050505050505050565b6000546001600160a01b031633146114855760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b816001600160a01b0381166114c6576040517faab3bb7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114da6001600160a01b03841685846134dd565b604080516001600160a01b038087168252851660208201529081018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb299060600160405180910390a150505050565b6000546001600160a01b031633146115735760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146115c0576040519150601f19603f3d011682016040523d82523d6000602084013e6115c5565b606091505b5050905080611618576040517f624d02c60000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03841660248201526044810183905260640161089c565b604080516001600160a01b0385168152602081018490527fdb35132c111efe920cede025e819975671cfd1b8fcc1174762c8670c4e94c211910160405180910390a1505050565b6000546001600160a01b031633146116a75760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6040805160018082528183019092526000916020808301908036833701905050905030816000815181106116dd576116dd613c86565b6001600160a01b03928316602091820292909201810191909152600654604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b15801561174c57600080fd5b505af1158015611760573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117849190613afe565b600780547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff9384168102919091179182905560065484516001600160a01b0390911693637341c10c93929092049091169084906000906117f5576117f5613c86565b60200260200101516040518363ffffffff1660e01b815260040161183892919067ffffffffffffffff9290921682526001600160a01b0316602082015260400190565b600060405180830381600087803b15801561185257600080fd5b505af1158015611866573d6000803e3d6000fd5b505050507f1e05df24f73db39faa0c2d5d26727d08632debce09833123a69214ba943e07c28160008151811061189e5761189e613c86565b6020026020010151600760149054906101000a900467ffffffffffffffff1660405161096d9291906001600160a01b0392909216825267ffffffffffffffff16602082015260400190565b6000546001600160a01b031633146119315760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b61193b6000613562565b565b6000546001600160a01b031633146119855760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60098190556040518181527f9b4ac4be6bf9a1eba5e53eed6e25b52488e7d418e57189bb57b101c3d8b247e59060200161096d565b6000546001600160a01b03163314611a025760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60075460065460408051600160a01b840467ffffffffffffffff1660208201526001600160a01b0393841693634000aea09316918591016040516020818303038152906040526040518463ffffffff1660e01b8152600401611a6693929190613b70565b602060405180830381600087803b158015611a8057600080fd5b505af1158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab89190613918565b506040518181527f1b13972ef62974ae9cb0afa971e6e0bee3f7d5f9ce6ae559ac090d0e85cd07099060200161096d565b8142811015611b14576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b60026001541415611b675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff16611b9657604051634fdb962760e01b815260040160405180910390fd5b6008547f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef9060ff841660021415611bd35750642e90edd000611c45565b60ff841660031415611c0e57507fff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92905064746a528800611c45565b60ff841660041415611c4557507f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805905064e8d4a510005b611c526202bf0c82613be0565b341015611c675734610d0d6202bf0c83613be0565b611c746202bf0c82613be0565b341115611cc057336108fc611c8c6202bf0c84613be0565b611c969034613bff565b6040518115909202916000818181858888f19350505050158015611cbe573d6000803e3d6000fd5b505b6006546007546040516305d3b1d360e41b815260048101859052600160a01b820467ffffffffffffffff16602482015260036044820152600160e01b90910463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d79919061394e565b6000818152600360209081526040808320600281556001808201805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600483018e905560058084018e9055600684019290925585529092528220839055600a546009549394509092611de99190613bb4565b90506000600260009054906101000a90046001600160a01b03166001600160a01b0316633bdd280e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3b57600080fd5b505afa158015611e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e73919061394e565b9050612710611e828382613bb4565b611e8c9083613be0565b611e969190613bcc565b8a1015611efa5789612710611eab8482613bb4565b611eb59084613be0565b611ebf9190613bcc565b6040517f056f5c8c0000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b7f0000000000000000000000000000000000000000000000000000000000000000612710611f288482613bb4565b611f329084613be0565b611f3c9190613bcc565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611f7b57600080fd5b505afa158015611f8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb3919061394e565b101561204a576040516370a0823160e01b81523360048201819052906001600160a01b038316906370a082319060240160206040518083038186803b158015611ffb57600080fd5b505afa15801561200f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612033919061394e565b6127106120408682613bb4565b61114d9086613be0565b600954156120f8576002546009546001600160a01b0390911690635d815c5f90339083906127109061207c9082613bb4565b6120869088613be0565b6120909190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156120df57600080fd5b505af11580156120f3573d6000803e3d6000fd5b505050505b600a54156121a7576002546001600160a01b0316635d815c5f336121246000546001600160a01b031690565b612710600a54876121359190613be0565b61213f9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b505050505b600254604080517f450b579300000000000000000000000000000000000000000000000000000000815290517f0000000000000000000000000000000000000000000000000000000000000000926001600160a01b03169163450b5793916004808301926020929190829003018186803b15801561222457600080fd5b505afa158015612238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225c919061394e565b6002546040516370a0823160e01b81526001600160a01b039182166004820152908316906370a082319060240160206040518083038186803b1580156122a157600080fd5b505afa1580156122b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d9919061394e565b1161241c576002546040516370a0823160e01b81526001600160a01b039182166004820152908216906370a082319060240160206040518083038186803b15801561232357600080fd5b505afa158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b919061394e565b600260009054906101000a90046001600160a01b03166001600160a01b031663450b57936040518163ffffffff1660e01b815260040160206040518083038186803b1580156123a957600080fd5b505afa1580156123bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e1919061394e565b6040517f540084ac0000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b33867f2c695e2be7c92a3119c652a66d955e77f871b17aae828de5e1713de7ddc413ec61271061244c8882613bb4565b6124569088613be0565b6124609190613bcc565b604051908152602001611423565b6000546001600160a01b031633146124b65760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6006546007546040517fd7ae1d30000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b0383811660248301529091169063d7ae1d3090604401600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b5050600780547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff1690819055604080516001600160a01b0386168152600160a01b90920467ffffffffffffffff1660208301527f6304f63f371bc518c6bc9e57165a4881eb87e6fea7b5b5efd45cb42254c129c4935001905061096d565b6000546001600160a01b0316331461260a5760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60028054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f49032d9bc7f26e96a90e3dc9e1a3863cbd101a1ecf2cd856bb82c45066f97d029061096d90831515815260200190565b804281101561269d576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b600260015414156126f05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff1661271f57604051634fdb962760e01b815260040160405180910390fd5b6040516331a9108f60e11b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000009033906001600160a01b03831690636352211e9060240160206040518083038186803b15801561278357600080fd5b505afa158015612797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bb9190613871565b6001600160a01b031614612892576040516331a9108f60e11b815260048101869052859033906001600160a01b03841690636352211e906024015b60206040518083038186803b15801561280e57600080fd5b505afa158015612822573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128469190613871565b6040517fa97690ae00000000000000000000000000000000000000000000000000000000815260048101939093526001600160a01b03918216602484015216604482015260640161089c565b600254604080517f3bdd280e00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691633bdd280e916004808301926020929190829003018186803b1580156128f057600080fd5b505afa158015612904573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612928919061394e565b90506000600a5460095461293c9190613bb4565b905061271061294b8282613bff565b6129559084613be0565b61295f9190613bcc565b8611156129c357856127106129748382613bff565b61297e9085613be0565b6129889190613bcc565b6040517ff5b6f3350000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b600254604051633cf4f10160e01b81523360048201526001600160a01b039091166024820181905260448201899052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b158015612a2457600080fd5b505af1158015612a38573d6000803e3d6000fd5b505060025460405163d4f5e80b60e01b8152600481018b90526001600160a01b03909116925063d4f5e80b9150602401600060405180830381600087803b158015612a8257600080fd5b505af1158015612a96573d6000803e3d6000fd5b50506002546001600160a01b031691506381e682cf905033612710612abb8582613bff565b612ac59087613be0565b612acf9190613bcc565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b503392507fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299150899050612710612b608582613bff565b612b6a9087613be0565b612b749190613bcc565b6040805192835260208301919091520160405180910390a25050600180555050505050565b6000546001600160a01b03163314612be15760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b600780547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e01b63ffffffff8416908102919091179091556040519081527f58cf2938ebd8b1085108e5d2bc607cd90c2dc04dcf5793bd6c54567570d4f76e9060200161096d565b6000546001600160a01b03163314612c915760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60088190556040518181527fd18346965d8e3adb51f7fcadd9b506c2cc1d228ae7c8791d2488212514c727a39060200161096d565b6000546001600160a01b03163314612d0e5760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b600a8190556040518181527fa078c9ac4c860c22efd1668cea357be2963c779028b883afe94712fe7a4992909060200161096d565b33600090815260046020908152604080832054808452600392839052922090810154600690910154821580612d76575081155b80612d82575060028114155b15612db0576040516357b3294b60e11b8152336004820152602481018490526044810183905260640161089c565b6002546040516331a9108f60e11b8152600481018490527f0000000000000000000000000000000000000000000000000000000000000000916001600160a01b039081169190831690636352211e9060240160206040518083038186803b158015612e1a57600080fd5b505afa158015612e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e529190613871565b6001600160a01b031614612e97576002546040516331a9108f60e11b81526004810185905284916001600160a01b039081169190841690636352211e906024016127f6565b600254604051633cf4f10160e01b81526001600160a01b039091166004820181905233602483015260448201859052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b158015612ef857600080fd5b505af1158015612f0c573d6000803e3d6000fd5b5050336000818152600460209081526040808320839055898352600380835292819020600681019390935560029092015482519081529081018890529193507f193cafd3778000c096c1290fbaffd7e5118cbac4cd5f564bfd2f7fff03da66979250015b60405180910390a250505050565b6000546001600160a01b03163314612fc65760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6001600160a01b0381166130425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161089c565b61304b81613562565b50565b33600090815260056020908152604080832054808452600392839052922090810154600690910154821580613081575081155b8061308d575060028114155b156130bb576040516357b3294b60e11b8152336004820152602481018490526044810183905260640161089c565b6002546040516331a9108f60e11b8152600481018490527f0000000000000000000000000000000000000000000000000000000000000000916001600160a01b039081169190831690636352211e9060240160206040518083038186803b15801561312557600080fd5b505afa158015613139573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315d9190613871565b6001600160a01b0316146131a2576002546040516331a9108f60e11b81526004810185905284916001600160a01b039081169190841690636352211e906024016127f6565b600254604051633cf4f10160e01b81526001600160a01b039091166004820181905233602483015260448201859052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b15801561320357600080fd5b505af1158015613217573d6000803e3d6000fd5b50503360008181526005602090815260408083208390558983526003918290529182902060060155519092507fe3d4187f6ca4248660cc0ac8b8056515bac4a8132be2eca31d6d0cc170722a7e9150612f709086815260200190565b600254604080517fade70abc00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163ade70abc916004808301926020929190829003018186803b1580156132d157600080fd5b505afa1580156132e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613309919061394e565b8260008151811061331c5761331c613c86565b602002602001015161332e9190613c46565b6002546040517f080462c8000000000000000000000000000000000000000000000000000000008152600481018390529192506000916001600160a01b039091169063080462c890602401602060405180830381600087803b15801561339357600080fd5b505af11580156133a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133cb919061394e565b6002546040517f8e32414a000000000000000000000000000000000000000000000000000000008152600481018590529192506001600160a01b031690638e32414a90602401600060405180830381600087803b15801561342b57600080fd5b505af115801561343f573d6000803e3d6000fd5b5050506000858152600360208190526040822090810184905560026006820155600181015486519193506001600160a01b0316917ff41d24583347542765efd5037a71b81acf7bb1e847680b126a009340b7603d8891869186918a918a916134a9576134a9613c86565b6020908102919091018101516040805195865291850193909352830152606082015260800160405180910390a25050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261355d9084906135bf565b505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000613614826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136a49092919063ffffffff16565b80519091501561355d57808060200190518101906136329190613918565b61355d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161089c565b60606136b384846000856136bd565b90505b9392505050565b6060824710156137355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161089c565b6001600160a01b0385163b61378c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161089c565b600080866001600160a01b031685876040516137a89190613b54565b60006040518083038185875af1925050503d80600081146137e5576040519150601f19603f3d011682016040523d82523d6000602084013e6137ea565b606091505b50915091506137fa828286613805565b979650505050505050565b606083156138145750816136b6565b8251156138245782518084602001fd5b8160405162461bcd60e51b815260040161089c9190613ba1565b803560ff8116811461384f57600080fd5b919050565b60006020828403121561386657600080fd5b81356136b681613cb2565b60006020828403121561388357600080fd5b81516136b681613cb2565b600080604083850312156138a157600080fd5b82356138ac81613cb2565b946020939093013593505050565b6000806000606084860312156138cf57600080fd5b83356138da81613cb2565b925060208401356138ea81613cb2565b929592945050506040919091013590565b60006020828403121561390d57600080fd5b81356136b681613cc7565b60006020828403121561392a57600080fd5b81516136b681613cc7565b60006020828403121561394757600080fd5b5035919050565b60006020828403121561396057600080fd5b5051919050565b6000806040838503121561397a57600080fd5b8235915060208084013567ffffffffffffffff8082111561399a57600080fd5b818601915086601f8301126139ae57600080fd5b8135818111156139c0576139c0613c9c565b8060051b604051601f19603f830116810181811085821117156139e5576139e5613c9c565b604052828152858101935084860182860187018b1015613a0457600080fd5b600095505b83861015613a27578035855260019590950194938601938601613a09565b508096505050505050509250929050565b600080600060608486031215613a4d57600080fd5b505081359360208301359350604090920135919050565b60008060008060808587031215613a7a57600080fd5b843593506020850135925060408501359150613a986060860161383e565b905092959194509250565b600080600060608486031215613ab857600080fd5b8335925060208401359150613acf6040850161383e565b90509250925092565b600060208284031215613aea57600080fd5b813563ffffffff811681146136b657600080fd5b600060208284031215613b1057600080fd5b815167ffffffffffffffff811681146136b657600080fd5b60008151808452613b40816020860160208601613c16565b601f01601f19169290920160200192915050565b60008251613b66818460208701613c16565b9190910192915050565b6001600160a01b0384168152826020820152606060408201526000613b986060830184613b28565b95945050505050565b6020815260006136b66020830184613b28565b60008219821115613bc757613bc7613c5a565b500190565b600082613bdb57613bdb613c70565b500490565b6000816000190483118215151615613bfa57613bfa613c5a565b500290565b600082821015613c1157613c11613c5a565b500390565b60005b83811015613c31578181015183820152602001613c19565b83811115613c40576000848401525b50505050565b600082613c5557613c55613c70565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461304b57600080fd5b801515811461304b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212209a68ccf9980e4cc55b2dc5cc0e118a0830839ac9701e5918db42c3a8ba6469fd64736f6c63430008060033000000000000000000000000335a46e5de67986e2f0f251e00acd605b3c9a6910000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6
Deployed Bytecode
0x6080604052600436106102c65760003560e01c80638ce13f8911610177578063c35fdf7b116100d5578063e7caf3ae11610084578063fa3f217211610061578063fa3f217214610816578063fc73abc314610723578063fe1ca5d51461084357005b8063e7caf3ae146107c2578063ecefc705146103e8578063f2fde38b146107f657005b8063d683ec0c116100b2578063d683ec0c14610778578063de9d432214610798578063e472b077146107ad57005b8063c35fdf7b14610738578063cc74fd0e14610758578063ccaef3f51461035557005b806395977ace11610131578063b81922051161010e578063b8192205146106e3578063b91f1de514610703578063bb4154901461072357005b806395977ace146106ad5780639970bcc9146106cd578063ab5f0bef146104fa57005b806390c824491161015f57806390c82449146105d857806393d81d5814610678578063948a6e721461069857005b80638ce13f89146105a75780638da5cb5b146105ba57005b80634b62c12f116102245780636ecabaf9116101de57806377e17713116101bb57806377e17713146105445780637bb166631461055a57806386850e931461058757005b80636ecabaf9146104fa578063715018a61461050f57806377b93a5f1461052457005b8063538ba4f91161020c578063538ba4f9146104bb57806362401693146104d05780636d0c4e29146104e557005b80634b62c12f1461046a578063522f68151461049b57005b80631bd0b2c811610280578063323b223e1161025d578063323b223e146103e857806336c6f0ff146103fe57806344004cc11461044a57005b80631bd0b2c8146103a05780631fe543e3146103b55780632bef424b146103d557005b8063112940f9116102ae578063112940f914610335578063119892cf146103555780631229a4621461037c57005b806309c1ba2e146102cf5780630e27e3df1461031557005b366102cd57005b005b3480156102db57600080fd5b506007546102f790600160a01b900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561032157600080fd5b506102cd610330366004613854565b610858565b34801561034157600080fd5b506102cd610350366004613854565b610978565b34801561036157600080fd5b5061036a600281565b60405160ff909116815260200161030c565b34801561038857600080fd5b5061039260095481565b60405190815260200161030c565b3480156103ac57600080fd5b50610392600181565b3480156103c157600080fd5b506102cd6103d0366004613967565b610a8c565b6102cd6103e3366004613a64565b610b2d565b3480156103f457600080fd5b5061039261271081565b34801561040a57600080fd5b506104327f0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f681565b6040516001600160a01b03909116815260200161030c565b34801561045657600080fd5b506102cd6104653660046138ba565b61143d565b34801561047657600080fd5b5060025461048b90600160a01b900460ff1681565b604051901515815260200161030c565b3480156104a757600080fd5b506102cd6104b636600461388e565b61152b565b3480156104c757600080fd5b50610432600081565b3480156104dc57600080fd5b5061036a600481565b3480156104f157600080fd5b506102cd61165f565b34801561050657600080fd5b5061036a600181565b34801561051b57600080fd5b506102cd6118e9565b34801561053057600080fd5b506102cd61053f366004613935565b61193d565b34801561055057600080fd5b50610392600a5481565b34801561056657600080fd5b50610392610575366004613854565b60046020526000908152604090205481565b34801561059357600080fd5b506102cd6105a2366004613935565b6119ba565b6102cd6105b5366004613aa3565b611ae9565b3480156105c657600080fd5b506000546001600160a01b0316610432565b3480156105e457600080fd5b5061063b6105f3366004613935565b6003602081905260009182526040909120805460018201546002830154938301546004840154600585015460069095015493956001600160a01b039093169492939192909187565b604080519788526001600160a01b039096166020880152948601939093526060850191909152608084015260a083015260c082015260e00161030c565b34801561068457600080fd5b506102cd610693366004613854565b61246e565b3480156106a457600080fd5b5061036a600081565b3480156106b957600080fd5b506102cd6106c83660046138fb565b6125c2565b3480156106d957600080fd5b5061039260085481565b3480156106ef57600080fd5b506102cd6106fe366004613a38565b612672565b34801561070f57600080fd5b50600254610432906001600160a01b031681565b34801561072f57600080fd5b5061036a600381565b34801561074457600080fd5b506102cd610753366004613ad8565b612b99565b34801561076457600080fd5b506102cd610773366004613935565b612c49565b34801561078457600080fd5b506102cd610793366004613935565b612cc6565b3480156107a457600080fd5b506102cd612d43565b3480156107b957600080fd5b50610392600281565b3480156107ce57600080fd5b506104327f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc81565b34801561080257600080fd5b506102cd610811366004613854565b612f7e565b34801561082257600080fd5b50610392610831366004613854565b60056020526000908152604090205481565b34801561084f57600080fd5b506102cd61304e565b6000546001600160a01b031633146108a55760405162461bcd60e51b81526020600482018190526024820152600080516020613cd683398151915260448201526064015b60405180910390fd5b6006546007546040517f9f87fad7000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b03838116602483015290911690639f87fad790604401600060405180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b50506040516001600160a01b03841681527f2c55008f00ad7d0c7db8d7f33fa28cd13e6f748aacae0b28a1c4c47fbaa59839925060200190505b60405180910390a150565b6000546001600160a01b031633146109c05760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6006546007546040517f7341c10c000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b03838116602483015290911690637341c10c90604401600060405180830381600087803b158015610a3a57600080fd5b505af1158015610a4e573d6000803e3d6000fd5b50506040516001600160a01b03841681527f59190d313c4ed1bd8d5c2780c1f439fc79c648ce7e5f6f2457ba3c10e8a456759250602001905061096d565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610b1f576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916602482015260440161089c565b610b298282613273565b5050565b8142811015610b58576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b60026001541415610bab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff16610bda57604051634fdb962760e01b815260040160405180910390fd5b3360009081526004602052604090205415610c3c57336000818152600460208190526040918290205491517fff7595d600000000000000000000000000000000000000000000000000000000815290810192909252602482015260440161089c565b6008547f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef9060ff841660021415610c795750642e90edd000610ceb565b60ff841660031415610cb457507fff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92905064746a528800610ceb565b60ff841660041415610ceb57507f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805905064e8d4a510005b610cf86202bf0c82613be0565b341015610d485734610d0d6202bf0c83613be0565b6040517f0fc3ab630000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b610d556202bf0c82613be0565b341115610da157336108fc610d6d6202bf0c84613be0565b610d779034613bff565b6040518115909202916000818181858888f19350505050158015610d9f573d6000803e3d6000fd5b505b6006546007546040516305d3b1d360e41b815260048101859052600160a01b820467ffffffffffffffff16602482015260036044820152600160e01b90910463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015610e2257600080fd5b505af1158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a919061394e565b9050600060036000838152602001908152602001600020905060018160000181905550338160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550888160020181905550878160040181905550868160050181905550600160ff1681600601819055508160046000336001600160a01b03166001600160a01b03168152602001908152602001600020819055506000600260009054906101000a90046001600160a01b03166001600160a01b0316633bdd280e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f80919061394e565b90506000600a54600954610f949190613bb4565b9050612710610fa38284613be0565b610fad9190613bcc565b8a10156110115789612710610fc28382613bff565b610fcc9085613be0565b610fd69190613bcc565b6040517f029bc8990000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b7f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc61271061103f8385613be0565b6110499190613bcc565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a082319060240160206040518083038186803b15801561108857600080fd5b505afa15801561109c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c0919061394e565b10156111a2576040516370a0823160e01b81523360048201819052906001600160a01b038316906370a082319060240160206040518083038186803b15801561110857600080fd5b505afa15801561111c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611140919061394e565b61271061114d8587613be0565b6111579190613bcc565b6040517f3b627e280000000000000000000000000000000000000000000000000000000081526001600160a01b0390931660048401526024830191909152604482015260640161089c565b60095415611246576002546009546001600160a01b0390911690635d815c5f9033908390612710906111d49089613be0565b6111de9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561122d57600080fd5b505af1158015611241573d6000803e3d6000fd5b505050505b600a54156112f5576002546001600160a01b0316635d815c5f336112726000546001600160a01b031690565b612710600a54886112839190613be0565b61128d9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156112dc57600080fd5b505af11580156112f0573d6000803e3d6000fd5b505050505b600254604051633cf4f10160e01b81523360048201526001600160a01b0390911660248201819052604482018e9052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b15801561135657600080fd5b505af115801561136a573d6000803e3d6000fd5b505060025460405163d4f5e80b60e01b81526001600160a01b03909116925063d4f5e80b91506113a2908f9060040190815260200190565b600060405180830381600087803b1580156113bc57600080fd5b505af11580156113d0573d6000803e3d6000fd5b503392508791507f5c0a907e7d78783900a697ab300617cf16849595b2cd82362ca303bd12597e6f90508e6127106114088789613be0565b6114129190613bcc565b604080519283526020830191909152015b60405180910390a350506001805550505050505050505050565b6000546001600160a01b031633146114855760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b816001600160a01b0381166114c6576040517faab3bb7600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114da6001600160a01b03841685846134dd565b604080516001600160a01b038087168252851660208201529081018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb299060600160405180910390a150505050565b6000546001600160a01b031633146115735760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146115c0576040519150601f19603f3d011682016040523d82523d6000602084013e6115c5565b606091505b5050905080611618576040517f624d02c60000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03841660248201526044810183905260640161089c565b604080516001600160a01b0385168152602081018490527fdb35132c111efe920cede025e819975671cfd1b8fcc1174762c8670c4e94c211910160405180910390a1505050565b6000546001600160a01b031633146116a75760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6040805160018082528183019092526000916020808301908036833701905050905030816000815181106116dd576116dd613c86565b6001600160a01b03928316602091820292909201810191909152600654604080517fa21a23e40000000000000000000000000000000000000000000000000000000081529051919093169263a21a23e49260048083019391928290030181600087803b15801561174c57600080fd5b505af1158015611760573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117849190613afe565b600780547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff9384168102919091179182905560065484516001600160a01b0390911693637341c10c93929092049091169084906000906117f5576117f5613c86565b60200260200101516040518363ffffffff1660e01b815260040161183892919067ffffffffffffffff9290921682526001600160a01b0316602082015260400190565b600060405180830381600087803b15801561185257600080fd5b505af1158015611866573d6000803e3d6000fd5b505050507f1e05df24f73db39faa0c2d5d26727d08632debce09833123a69214ba943e07c28160008151811061189e5761189e613c86565b6020026020010151600760149054906101000a900467ffffffffffffffff1660405161096d9291906001600160a01b0392909216825267ffffffffffffffff16602082015260400190565b6000546001600160a01b031633146119315760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b61193b6000613562565b565b6000546001600160a01b031633146119855760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60098190556040518181527f9b4ac4be6bf9a1eba5e53eed6e25b52488e7d418e57189bb57b101c3d8b247e59060200161096d565b6000546001600160a01b03163314611a025760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60075460065460408051600160a01b840467ffffffffffffffff1660208201526001600160a01b0393841693634000aea09316918591016040516020818303038152906040526040518463ffffffff1660e01b8152600401611a6693929190613b70565b602060405180830381600087803b158015611a8057600080fd5b505af1158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab89190613918565b506040518181527f1b13972ef62974ae9cb0afa971e6e0bee3f7d5f9ce6ae559ac090d0e85cd07099060200161096d565b8142811015611b14576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b60026001541415611b675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff16611b9657604051634fdb962760e01b815260040160405180910390fd5b6008547f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef9060ff841660021415611bd35750642e90edd000611c45565b60ff841660031415611c0e57507fff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92905064746a528800611c45565b60ff841660041415611c4557507f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805905064e8d4a510005b611c526202bf0c82613be0565b341015611c675734610d0d6202bf0c83613be0565b611c746202bf0c82613be0565b341115611cc057336108fc611c8c6202bf0c84613be0565b611c969034613bff565b6040518115909202916000818181858888f19350505050158015611cbe573d6000803e3d6000fd5b505b6006546007546040516305d3b1d360e41b815260048101859052600160a01b820467ffffffffffffffff16602482015260036044820152600160e01b90910463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d79919061394e565b6000818152600360209081526040808320600281556001808201805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600483018e905560058084018e9055600684019290925585529092528220839055600a546009549394509092611de99190613bb4565b90506000600260009054906101000a90046001600160a01b03166001600160a01b0316633bdd280e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e3b57600080fd5b505afa158015611e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e73919061394e565b9050612710611e828382613bb4565b611e8c9083613be0565b611e969190613bcc565b8a1015611efa5789612710611eab8482613bb4565b611eb59084613be0565b611ebf9190613bcc565b6040517f056f5c8c0000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b7f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc612710611f288482613bb4565b611f329084613be0565b611f3c9190613bcc565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611f7b57600080fd5b505afa158015611f8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb3919061394e565b101561204a576040516370a0823160e01b81523360048201819052906001600160a01b038316906370a082319060240160206040518083038186803b158015611ffb57600080fd5b505afa15801561200f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612033919061394e565b6127106120408682613bb4565b61114d9086613be0565b600954156120f8576002546009546001600160a01b0390911690635d815c5f90339083906127109061207c9082613bb4565b6120869088613be0565b6120909190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156120df57600080fd5b505af11580156120f3573d6000803e3d6000fd5b505050505b600a54156121a7576002546001600160a01b0316635d815c5f336121246000546001600160a01b031690565b612710600a54876121359190613be0565b61213f9190613bcc565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561218e57600080fd5b505af11580156121a2573d6000803e3d6000fd5b505050505b600254604080517f450b579300000000000000000000000000000000000000000000000000000000815290517f0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6926001600160a01b03169163450b5793916004808301926020929190829003018186803b15801561222457600080fd5b505afa158015612238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225c919061394e565b6002546040516370a0823160e01b81526001600160a01b039182166004820152908316906370a082319060240160206040518083038186803b1580156122a157600080fd5b505afa1580156122b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d9919061394e565b1161241c576002546040516370a0823160e01b81526001600160a01b039182166004820152908216906370a082319060240160206040518083038186803b15801561232357600080fd5b505afa158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b919061394e565b600260009054906101000a90046001600160a01b03166001600160a01b031663450b57936040518163ffffffff1660e01b815260040160206040518083038186803b1580156123a957600080fd5b505afa1580156123bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e1919061394e565b6040517f540084ac0000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b33867f2c695e2be7c92a3119c652a66d955e77f871b17aae828de5e1713de7ddc413ec61271061244c8882613bb4565b6124569088613be0565b6124609190613bcc565b604051908152602001611423565b6000546001600160a01b031633146124b65760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6006546007546040517fd7ae1d30000000000000000000000000000000000000000000000000000000008152600160a01b90910467ffffffffffffffff1660048201526001600160a01b0383811660248301529091169063d7ae1d3090604401600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b5050600780547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff1690819055604080516001600160a01b0386168152600160a01b90920467ffffffffffffffff1660208301527f6304f63f371bc518c6bc9e57165a4881eb87e6fea7b5b5efd45cb42254c129c4935001905061096d565b6000546001600160a01b0316331461260a5760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60028054821515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517f49032d9bc7f26e96a90e3dc9e1a3863cbd101a1ecf2cd856bb82c45066f97d029061096d90831515815260200190565b804281101561269d576040516314c4a2ef60e31b81526004810182905242602482015260440161089c565b600260015414156126f05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161089c565b6002600181905554600160a01b900460ff1661271f57604051634fdb962760e01b815260040160405180910390fd5b6040516331a9108f60e11b8152600481018590527f0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f69033906001600160a01b03831690636352211e9060240160206040518083038186803b15801561278357600080fd5b505afa158015612797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bb9190613871565b6001600160a01b031614612892576040516331a9108f60e11b815260048101869052859033906001600160a01b03841690636352211e906024015b60206040518083038186803b15801561280e57600080fd5b505afa158015612822573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128469190613871565b6040517fa97690ae00000000000000000000000000000000000000000000000000000000815260048101939093526001600160a01b03918216602484015216604482015260640161089c565b600254604080517f3bdd280e00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691633bdd280e916004808301926020929190829003018186803b1580156128f057600080fd5b505afa158015612904573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612928919061394e565b90506000600a5460095461293c9190613bb4565b905061271061294b8282613bff565b6129559084613be0565b61295f9190613bcc565b8611156129c357856127106129748382613bff565b61297e9085613be0565b6129889190613bcc565b6040517ff5b6f3350000000000000000000000000000000000000000000000000000000081526004810192909252602482015260440161089c565b600254604051633cf4f10160e01b81523360048201526001600160a01b039091166024820181905260448201899052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b158015612a2457600080fd5b505af1158015612a38573d6000803e3d6000fd5b505060025460405163d4f5e80b60e01b8152600481018b90526001600160a01b03909116925063d4f5e80b9150602401600060405180830381600087803b158015612a8257600080fd5b505af1158015612a96573d6000803e3d6000fd5b50506002546001600160a01b031691506381e682cf905033612710612abb8582613bff565b612ac59087613be0565b612acf9190613bcc565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015612b1557600080fd5b505af1158015612b29573d6000803e3d6000fd5b503392507fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299150899050612710612b608582613bff565b612b6a9087613be0565b612b749190613bcc565b6040805192835260208301919091520160405180910390a25050600180555050505050565b6000546001600160a01b03163314612be15760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b600780547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e01b63ffffffff8416908102919091179091556040519081527f58cf2938ebd8b1085108e5d2bc607cd90c2dc04dcf5793bd6c54567570d4f76e9060200161096d565b6000546001600160a01b03163314612c915760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b60088190556040518181527fd18346965d8e3adb51f7fcadd9b506c2cc1d228ae7c8791d2488212514c727a39060200161096d565b6000546001600160a01b03163314612d0e5760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b600a8190556040518181527fa078c9ac4c860c22efd1668cea357be2963c779028b883afe94712fe7a4992909060200161096d565b33600090815260046020908152604080832054808452600392839052922090810154600690910154821580612d76575081155b80612d82575060028114155b15612db0576040516357b3294b60e11b8152336004820152602481018490526044810183905260640161089c565b6002546040516331a9108f60e11b8152600481018490527f0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6916001600160a01b039081169190831690636352211e9060240160206040518083038186803b158015612e1a57600080fd5b505afa158015612e2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e529190613871565b6001600160a01b031614612e97576002546040516331a9108f60e11b81526004810185905284916001600160a01b039081169190841690636352211e906024016127f6565b600254604051633cf4f10160e01b81526001600160a01b039091166004820181905233602483015260448201859052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b158015612ef857600080fd5b505af1158015612f0c573d6000803e3d6000fd5b5050336000818152600460209081526040808320839055898352600380835292819020600681019390935560029092015482519081529081018890529193507f193cafd3778000c096c1290fbaffd7e5118cbac4cd5f564bfd2f7fff03da66979250015b60405180910390a250505050565b6000546001600160a01b03163314612fc65760405162461bcd60e51b81526020600482018190526024820152600080516020613cd6833981519152604482015260640161089c565b6001600160a01b0381166130425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161089c565b61304b81613562565b50565b33600090815260056020908152604080832054808452600392839052922090810154600690910154821580613081575081155b8061308d575060028114155b156130bb576040516357b3294b60e11b8152336004820152602481018490526044810183905260640161089c565b6002546040516331a9108f60e11b8152600481018490527f0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6916001600160a01b039081169190831690636352211e9060240160206040518083038186803b15801561312557600080fd5b505afa158015613139573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061315d9190613871565b6001600160a01b0316146131a2576002546040516331a9108f60e11b81526004810185905284916001600160a01b039081169190841690636352211e906024016127f6565b600254604051633cf4f10160e01b81526001600160a01b039091166004820181905233602483015260448201859052608060648301526000608483015290633cf4f1019060a401600060405180830381600087803b15801561320357600080fd5b505af1158015613217573d6000803e3d6000fd5b50503360008181526005602090815260408083208390558983526003918290529182902060060155519092507fe3d4187f6ca4248660cc0ac8b8056515bac4a8132be2eca31d6d0cc170722a7e9150612f709086815260200190565b600254604080517fade70abc00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163ade70abc916004808301926020929190829003018186803b1580156132d157600080fd5b505afa1580156132e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613309919061394e565b8260008151811061331c5761331c613c86565b602002602001015161332e9190613c46565b6002546040517f080462c8000000000000000000000000000000000000000000000000000000008152600481018390529192506000916001600160a01b039091169063080462c890602401602060405180830381600087803b15801561339357600080fd5b505af11580156133a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133cb919061394e565b6002546040517f8e32414a000000000000000000000000000000000000000000000000000000008152600481018590529192506001600160a01b031690638e32414a90602401600060405180830381600087803b15801561342b57600080fd5b505af115801561343f573d6000803e3d6000fd5b5050506000858152600360208190526040822090810184905560026006820155600181015486519193506001600160a01b0316917ff41d24583347542765efd5037a71b81acf7bb1e847680b126a009340b7603d8891869186918a918a916134a9576134a9613c86565b6020908102919091018101516040805195865291850193909352830152606082015260800160405180910390a25050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261355d9084906135bf565b505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000613614826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136a49092919063ffffffff16565b80519091501561355d57808060200190518101906136329190613918565b61355d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161089c565b60606136b384846000856136bd565b90505b9392505050565b6060824710156137355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161089c565b6001600160a01b0385163b61378c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161089c565b600080866001600160a01b031685876040516137a89190613b54565b60006040518083038185875af1925050503d80600081146137e5576040519150601f19603f3d011682016040523d82523d6000602084013e6137ea565b606091505b50915091506137fa828286613805565b979650505050505050565b606083156138145750816136b6565b8251156138245782518084602001fd5b8160405162461bcd60e51b815260040161089c9190613ba1565b803560ff8116811461384f57600080fd5b919050565b60006020828403121561386657600080fd5b81356136b681613cb2565b60006020828403121561388357600080fd5b81516136b681613cb2565b600080604083850312156138a157600080fd5b82356138ac81613cb2565b946020939093013593505050565b6000806000606084860312156138cf57600080fd5b83356138da81613cb2565b925060208401356138ea81613cb2565b929592945050506040919091013590565b60006020828403121561390d57600080fd5b81356136b681613cc7565b60006020828403121561392a57600080fd5b81516136b681613cc7565b60006020828403121561394757600080fd5b5035919050565b60006020828403121561396057600080fd5b5051919050565b6000806040838503121561397a57600080fd5b8235915060208084013567ffffffffffffffff8082111561399a57600080fd5b818601915086601f8301126139ae57600080fd5b8135818111156139c0576139c0613c9c565b8060051b604051601f19603f830116810181811085821117156139e5576139e5613c9c565b604052828152858101935084860182860187018b1015613a0457600080fd5b600095505b83861015613a27578035855260019590950194938601938601613a09565b508096505050505050509250929050565b600080600060608486031215613a4d57600080fd5b505081359360208301359350604090920135919050565b60008060008060808587031215613a7a57600080fd5b843593506020850135925060408501359150613a986060860161383e565b905092959194509250565b600080600060608486031215613ab857600080fd5b8335925060208401359150613acf6040850161383e565b90509250925092565b600060208284031215613aea57600080fd5b813563ffffffff811681146136b657600080fd5b600060208284031215613b1057600080fd5b815167ffffffffffffffff811681146136b657600080fd5b60008151808452613b40816020860160208601613c16565b601f01601f19169290920160200192915050565b60008251613b66818460208701613c16565b9190910192915050565b6001600160a01b0384168152826020820152606060408201526000613b986060830184613b28565b95945050505050565b6020815260006136b66020830184613b28565b60008219821115613bc757613bc7613c5a565b500190565b600082613bdb57613bdb613c70565b500490565b6000816000190483118215151615613bfa57613bfa613c5a565b500290565b600082821015613c1157613c11613c5a565b500390565b60005b83811015613c31578181015183820152602001613c19565b83811115613c40576000848401525b50505050565b600082613c5557613c55613c70565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461304b57600080fd5b801515811461304b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212209a68ccf9980e4cc55b2dc5cc0e118a0830839ac9701e5918db42c3a8ba6469fd64736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000335a46e5de67986e2f0f251e00acd605b3c9a6910000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6
-----Decoded View---------------
Arg [0] : _pandaCore (address): 0x335A46e5De67986E2F0f251E00AcD605B3c9A691
Arg [1] : _pandaToken (address): 0x3cBb7f5d7499Af626026E96a2f05df806F2200DC
Arg [2] : _pandaNft (address): 0x9ac70D7D63701E230446885776818D7734eB33f6
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000335a46e5de67986e2f0f251e00acd605b3c9a691
Arg [1] : 0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc
Arg [2] : 0000000000000000000000009ac70d7d63701e230446885776818d7734eb33f6
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,063.66 | 0.0135 | $41.29 |
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.