Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 340 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Emergency Withdr... | 17332124 | 605 days ago | IN | 0 ETH | 0.00095691 | ||||
Emergency Withdr... | 17332114 | 605 days ago | IN | 0 ETH | 0.00615235 | ||||
Claim | 17310544 | 608 days ago | IN | 0.00052 ETH | 0.00590077 | ||||
Claim | 17310532 | 608 days ago | IN | 0.00052 ETH | 0.00647331 | ||||
Claim | 17310511 | 608 days ago | IN | 0.00052 ETH | 0.00717174 | ||||
Claim | 17310505 | 608 days ago | IN | 0.00052 ETH | 0.00604998 | ||||
Claim | 17310499 | 608 days ago | IN | 0.00052 ETH | 0.00619979 | ||||
Claim | 17310490 | 608 days ago | IN | 0.00052 ETH | 0.00661977 | ||||
Add Distributor | 17295664 | 610 days ago | IN | 0.00052 ETH | 0.02342983 | ||||
Claim | 17275806 | 612 days ago | IN | 0.00052 ETH | 0.00855918 | ||||
Claim | 17272648 | 613 days ago | IN | 0.00052 ETH | 0.01428587 | ||||
Claim | 17255836 | 615 days ago | IN | 0.00052 ETH | 0.00830577 | ||||
Add Distributor | 17242780 | 617 days ago | IN | 0.00052 ETH | 0.02161611 | ||||
Add Distributor | 17240285 | 618 days ago | IN | 0.00052 ETH | 0.04235442 | ||||
Request Random W... | 17197239 | 624 days ago | IN | 0 ETH | 0.02048369 | ||||
Claim | 17155426 | 629 days ago | IN | 0.00052 ETH | 0.00705496 | ||||
Claim | 17152049 | 630 days ago | IN | 0.00052 ETH | 0.00682326 | ||||
Claim | 17149907 | 630 days ago | IN | 0.00052 ETH | 0.00735856 | ||||
Call Airdrop | 17149444 | 630 days ago | IN | 0 ETH | 0.00816013 | ||||
Add Distributor | 17144934 | 631 days ago | IN | 0.00052 ETH | 0.01587385 | ||||
Add Distributor | 17143560 | 631 days ago | IN | 0.00052 ETH | 0.01306475 | ||||
Add Distributor | 17142353 | 631 days ago | IN | 0.00052 ETH | 0.01509726 | ||||
Add Distributor | 17140686 | 632 days ago | IN | 0.00052 ETH | 0.01745791 | ||||
Add Distributor | 17136841 | 632 days ago | IN | 0.00052 ETH | 0.01397612 | ||||
Add Distributor | 17135689 | 632 days ago | IN | 0.00052 ETH | 0.01359493 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
17332124 | 605 days ago | 0.1633252 ETH | ||||
17310544 | 608 days ago | 0.00052 ETH | ||||
17310532 | 608 days ago | 0.00052 ETH | ||||
17310511 | 608 days ago | 0.00052 ETH | ||||
17310505 | 608 days ago | 0.00052 ETH | ||||
17310499 | 608 days ago | 0.00052 ETH | ||||
17310490 | 608 days ago | 0.00052 ETH | ||||
17295664 | 610 days ago | 0.00052 ETH | ||||
17275806 | 612 days ago | 0.00052 ETH | ||||
17272648 | 613 days ago | 0.00052 ETH | ||||
17268774 | 613 days ago | 0.0011307 ETH | ||||
17263290 | 614 days ago | 0.0007802 ETH | ||||
17260145 | 615 days ago | 0.01321754 ETH | ||||
17255836 | 615 days ago | 0.00052 ETH | ||||
17254709 | 615 days ago | 0.01067464 ETH | ||||
17251521 | 616 days ago | 0.00404953 ETH | ||||
17242780 | 617 days ago | 0.00052 ETH | ||||
17240285 | 618 days ago | 0.00052 ETH | ||||
17229613 | 619 days ago | 0.00198195 ETH | ||||
17229575 | 619 days ago | 0.02430124 ETH | ||||
17224238 | 620 days ago | 0.01090739 ETH | ||||
17209602 | 622 days ago | 0.01116787 ETH | ||||
17207708 | 622 days ago | 0.00254527 ETH | ||||
17207476 | 622 days ago | 0.00674019 ETH | ||||
17205118 | 622 days ago | 0.01480956 ETH |
Loading...
Loading
Contract Name:
LuckyRooAirdrop
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; pragma abicoder v2; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.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 "../libs/IPriceOracle.sol"; interface IPegSwap { function swap(uint256 amount, address source, address target) external; function getSwappableAmount(address source, address target) external view returns (uint256); } contract LuckyRooAirdrop is ReentrancyGuard, VRFConsumerBaseV2, Ownable { using SafeERC20 for IERC20; VRFCoordinatorV2Interface COORDINATOR; LinkTokenInterface LINKTOKEN; bool public initialized = false; IERC20 public token; IPriceOracle private oracle; uint64 public s_subscriptionId; bytes32 keyHash; uint32 callbackGasLimit = 150000; uint16 requestConfirmations = 3; uint32 numWords = 3; uint256 public s_requestId; uint256 public r_requestId; uint256[] public s_randomWords; struct AirdropResult { address[3] winner; uint256[3] amount; } uint256 public currentID = 1; uint256 public distributeRate = 9500; uint256 public distributorLimit = 500 ether; uint256[3] public airdropRates = [6000, 2500, 1000]; mapping(uint256 => AirdropResult) private results; uint256 public lastAirdropTime; struct DistributorInfo { uint256 amount; uint256 regAirdropID; } mapping(address => DistributorInfo) public userInfo; address[] public distributors; address public treasury = 0xE2123f0F85953414eb3B4Dfa97790ec8e0102D44; uint256 public performanceFee = 0.00052 ether; uint256 public totalStaked; // BSC Mainnet ERC20_LINK_ADDRESS address public constant ERC20_LINK_ADDRESS = 0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD; address public constant PEGSWAP_ADDRESS = 0x1FCc3B22955e76Ca48bF025f1A6993685975Bb9e; event AddDistributor(address user, uint256 amount); event Claim(address user, uint256 amount); event HolderDistributed(uint256 id, address[3] winners, uint256[3] amounts); event SetDistributorLimit(uint256 limit); event SetDistributorRates(uint256[3] rates); event ServiceInfoUpadted(address addr, uint256 fee); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract */ constructor(address _vrfCoordinator, address _link, bytes32 _keyHash) VRFConsumerBaseV2(_vrfCoordinator) { COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator); s_subscriptionId = COORDINATOR.createSubscription(); keyHash = _keyHash; COORDINATOR.addConsumer(s_subscriptionId, address(this)); LINKTOKEN = LinkTokenInterface(_link); } /** * @notice Initialize the contract * @dev This function must be called by the owner of the contract. */ function initialize(address _token, address _oracle) external onlyOwner { require(!initialized, "Contract already initialized"); initialized = true; token = IERC20(_token); oracle = IPriceOracle(_oracle); } function addDistributor() external payable nonReentrant { require(initialized, "Contract not initialized"); require(!isContract(msg.sender), "contract cannot be distributor"); DistributorInfo storage user = userInfo[msg.sender]; require(user.regAirdropID < currentID, "already added"); require(user.amount == 0, "claim previous stake first"); _transferPerformanceFee(); uint256 tokenPrice = oracle.getTokenPrice(address(token)); uint256 tokenBal = token.balanceOf(msg.sender); uint256 amount = distributorLimit * 1 ether / tokenPrice; require(tokenPrice > 0, "LUCKY ROO price is missing"); require(tokenBal >= amount, "insufficient holder balance"); uint256 beforeAmt = token.balanceOf(address(this)); token.safeTransferFrom(msg.sender, address(this), amount); uint256 realAmt = token.balanceOf(address(this)) - beforeAmt; if (realAmt > amount) realAmt = amount; user.amount = realAmt; user.regAirdropID = currentID; distributors.push(msg.sender); totalStaked += user.amount; emit AddDistributor(msg.sender, realAmt); } function claim() external payable nonReentrant { DistributorInfo storage user = userInfo[msg.sender]; require(user.amount > 0, "not registered"); require(user.regAirdropID < currentID, "can claim after this round is finished"); _transferPerformanceFee(); token.safeTransfer(msg.sender, user.amount); emit Claim(msg.sender, user.amount); totalStaked -= user.amount; user.amount = 0; } function _transferPerformanceFee() internal { require(msg.value >= performanceFee, "should pay small gas to add as a distributor"); payable(treasury).transfer(performanceFee); if (msg.value > performanceFee) { payable(msg.sender).transfer(msg.value - performanceFee); } } function numDistributors() external view returns (uint256) { return distributors.length; } /** * @notice Distribute the prizes to the three winners * @dev This function must be called by the owner of the contract. */ function callAirdrop() external onlyOwner { require(initialized, "Contract not initialized"); require(s_requestId == r_requestId, "Request IDs do not match"); require(s_randomWords.length == numWords, "Number of words does not match"); uint256 numHolders = distributors.length; require(numHolders > 3, "Not enough distributors"); s_requestId = 0; uint256[3] memory idx; uint256[3] memory sortedIdx; for (uint256 i = 0; i < 3; i++) { idx[i] = s_randomWords[i] % (numHolders - i); for (uint256 j = 0; j < i; j++) { if (idx[i] >= sortedIdx[j]) { idx[i] = idx[i] + 1; } else { break; } } idx[i] = idx[i] % numHolders; sortedIdx[i] = idx[i]; if (i > 0 && sortedIdx[i] < sortedIdx[i - 1]) { uint256 t = sortedIdx[i]; sortedIdx[i] = sortedIdx[i - 1]; sortedIdx[i - 1] = t; } } AirdropResult storage airdropResult = results[currentID]; uint256 amount = address(this).balance; amount = amount * distributeRate / 10000; for (uint256 i = 0; i < 3; i++) { address winnerA = distributors[idx[i]]; airdropResult.winner[i] = winnerA; uint256 amountA = amount * airdropRates[i] / 10000; airdropResult.amount[i] = amountA; payable(winnerA).transfer(amountA); } emit HolderDistributed(currentID, airdropResult.winner, airdropResult.amount); currentID = currentID + 1; lastAirdropTime = block.timestamp; distributors = new address[](0); } function getAirdropResult(uint256 _id) external view returns (address[3] memory, uint256[3] memory) { return (results[_id].winner, results[_id].amount); } /** * @notice Set the distribution rates for the three wallets * @dev This function must be called by the owner of the contract. */ function setAirdropRates(uint256 _rateA, uint256 _rateB, uint256 _rateC) external onlyOwner { require(_rateA > 0, "Rate A must be greater than 0"); require(_rateB > 0, "Rate B must be greater than 0"); require(_rateC > 0, "Rate C must be greater than 0"); require(_rateA + _rateB + _rateC < 10000, "Total rate must be less than 10000"); airdropRates = [_rateA, _rateB, _rateC]; emit SetDistributorRates(airdropRates); } /** * @notice Set the minimum holding tokens to add distributor in usd * @dev This function must be called by the owner of the contract. */ function setDistributorBalanceLimit(uint256 _min) external onlyOwner { distributorLimit = _min * 1 ether; emit SetDistributorLimit(_min); } function setServiceInfo(address _treasury, uint256 _fee) external { require(msg.sender == treasury, "setServiceInfo: FORBIDDEN"); require(_treasury != address(0x0), "Invalid address"); treasury = _treasury; performanceFee = _fee; emit ServiceInfoUpadted(_treasury, _fee); } function setCoordiatorConfig(bytes32 _keyHash, uint32 _gasLimit, uint32 _numWords) external onlyOwner { keyHash = _keyHash; callbackGasLimit = _gasLimit; numWords = _numWords; } /** * @notice fetch subscription information from the VRF coordinator */ function getSubscriptionInfo() external view returns (uint96 balance, uint64 reqCount, address owner, address[] memory consumers) { return COORDINATOR.getSubscription(s_subscriptionId); } /** * @notice cancle subscription from the VRF coordinator * @dev This function must be called by the owner of the contract. */ function cancelSubscription() external onlyOwner { COORDINATOR.cancelSubscription(s_subscriptionId, msg.sender); s_subscriptionId = 0; } /** * @notice subscribe to the VRF coordinator * @dev This function must be called by the owner of the contract. */ function startSubscription(address _vrfCoordinator) external onlyOwner { require(s_subscriptionId == 0, "Subscription already started"); COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator); s_subscriptionId = COORDINATOR.createSubscription(); COORDINATOR.addConsumer(s_subscriptionId, address(this)); } /** * @notice Fund link token from the VRF coordinator for subscription * @dev This function must be called by the owner of the contract. */ function fundToCoordiator(uint96 _amount) external onlyOwner { LINKTOKEN.transferFrom(msg.sender, address(this), _amount); LINKTOKEN.transferAndCall(address(COORDINATOR), _amount, abi.encode(s_subscriptionId)); } /** * @notice Fund link token from the VRF coordinator for subscription * @dev This function must be called by the owner of the contract. */ function fundPeggedLinkToCoordiator(uint256 _amount) external onlyOwner { IERC20(ERC20_LINK_ADDRESS).transferFrom(msg.sender, address(this), _amount); IERC20(ERC20_LINK_ADDRESS).approve(PEGSWAP_ADDRESS, _amount); IPegSwap(PEGSWAP_ADDRESS).swap(_amount, ERC20_LINK_ADDRESS, address(LINKTOKEN)); uint256 tokenBal = LINKTOKEN.balanceOf(address(this)); LINKTOKEN.transferAndCall(address(COORDINATOR), tokenBal, abi.encode(s_subscriptionId)); } /** * @notice Request random words from the VRF coordinator * @dev This function must be called by the owner of the contract. */ function requestRandomWords() external onlyOwner { r_requestId = 0; // Will revert if subscription is not set and funded. s_requestId = COORDINATOR.requestRandomWords(keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { r_requestId = requestId; s_randomWords = randomWords; } function emergencyWithdrawETH() external onlyOwner { uint256 _tokenAmount = address(this).balance; payable(msg.sender).transfer(_tokenAmount); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _token: the address of the token to withdraw * @dev This function is only callable by admin. */ function emergencyWithdrawToken(address _token) external onlyOwner { uint256 _tokenAmount = IERC20(_token).balanceOf(address(this)); IERC20(_token).safeTransfer(msg.sender, _tokenAmount); } function isContract(address _addr) internal view returns (bool) { uint256 size; assembly { size := extcodesize(_addr) } return size > 0; } 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 v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // 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); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IPriceOracle { /** * @notice Get the price of a token * @param token The token to get the price of * @return The asset price mantissa (scaled by 1e18). * Zero means the price is unavailable. */ function getTokenPrice(address token) external view returns (uint256); }
// 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/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @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": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddDistributor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address[3]","name":"winners","type":"address[3]"},{"indexed":false,"internalType":"uint256[3]","name":"amounts","type":"uint256[3]"}],"name":"HolderDistributed","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":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"ServiceInfoUpadted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"SetDistributorLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[3]","name":"rates","type":"uint256[3]"}],"name":"SetDistributorRates","type":"event"},{"inputs":[],"name":"ERC20_LINK_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PEGSWAP_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addDistributor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"airdropRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelSubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributorLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distributors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"emergencyWithdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"fundPeggedLinkToCoordiator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"fundToCoordiator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getAirdropResult","outputs":[{"internalType":"address[3]","name":"","type":"address[3]"},{"internalType":"uint256[3]","name":"","type":"uint256[3]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubscriptionInfo","outputs":[{"internalType":"uint96","name":"balance","type":"uint96"},{"internalType":"uint64","name":"reqCount","type":"uint64"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address[]","name":"consumers","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastAirdropTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numDistributors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"r_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"s_randomWords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_subscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rateA","type":"uint256"},{"internalType":"uint256","name":"_rateB","type":"uint256"},{"internalType":"uint256","name":"_rateC","type":"uint256"}],"name":"setAirdropRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint32","name":"_gasLimit","type":"uint32"},{"internalType":"uint32","name":"_numWords","type":"uint32"}],"name":"setCoordiatorConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setDistributorBalanceLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setServiceInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"}],"name":"startSubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"regAirdropID","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6003805460ff60a01b19168155600780546001600160501b03191666030003000249f01790556001600b5561251c600c55681b1ae4d6e2ef500000600d5561010060405261177060a09081526109c460c0526103e860e0526200006691600e919062000291565b50601580546001600160a01b03191673e2123f0f85953414eb3b4dfa97790ec8e0102d441790556601d8efef488000601655348015620000a557600080fd5b506040516200359638038062003596833981016040819052620000c8916200030e565b6001600055606083901b6001600160601b031916608052620000ea336200023f565b600280546001600160a01b0319166001600160a01b0385169081179091556040805163288688f960e21b8152905163a21a23e4916004808201926020929091908290030181600087803b1580156200014157600080fd5b505af115801562000156573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200017c91906200034e565b60058054600160a01b600160e01b031916600160a01b6001600160401b03938416810291909117918290556006849055600254604051631cd0704360e21b81529190920490921660048301523060248301526001600160a01b031690637341c10c90604401600060405180830381600087803b158015620001fc57600080fd5b505af115801562000211573d6000803e3d6000fd5b5050600380546001600160a01b0319166001600160a01b039590951694909417909355506200037e92505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8260038101928215620002c8579160200282015b82811115620002c8578251829061ffff16905591602001919060010190620002a5565b50620002d6929150620002da565b5090565b5b80821115620002d65760008155600101620002db565b80516001600160a01b03811681146200030957600080fd5b919050565b60008060006060848603121562000323578283fd5b6200032e84620002f1565b92506200033e60208501620002f1565b9150604084015190509250925092565b60006020828403121562000360578081fd5b81516001600160401b038116811462000377578182fd5b9392505050565b60805160601c6131f2620003a4600039600081816109ed0152610a2f01526131f26000f3fe60806040526004361061023f5760003560e01c806385d52d431161012e578063c4b1ea15116100ab578063e89e106a1161006f578063e89e106a14610691578063f2fde38b146106a7578063f6eaffc8146106c7578063fc0c546a146106e7578063fde1baca1461070757600080fd5b8063c4b1ea1514610602578063cd69731514610622578063cdd2efd014610637578063d72310d11461065c578063e0c862891461067c57600080fd5b8063a9d8e968116100f2578063a9d8e96814610580578063ac52480e146105a0578063ae503a94146105a8578063b1c2b3e4146105be578063c3890403146105d457600080fd5b806385d52d43146104ce57806387788782146104ee5780638ac00021146105045780638da5cb5b146105435780638ef40ffd1461055857600080fd5b80634e71d92d116101bc57806376ce6b401161018057806376ce6b4014610445578063817b1cd21461046d57806381b6194814610483578063843cf851146104a357806384536017146104b957600080fd5b80634e71d92d146103bb57806350b492ba146103c35780635f795b4d146103f057806361d027b314610410578063715018a61461043057600080fd5b80631fe543e3116102035780631fe543e31461033057806324e9edb01461035057806339096c3314610365578063485cc9551461037b5780634b18b3df1461039b57600080fd5b8063133f26501461024b578063158ef93e1461026d5780631959a002146102a35780631af03203146102ec5780631c75cfb41461030c57600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b610266366004612be2565b61071c565b005b34801561027957600080fd5b5060035461028e90600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b3480156102af57600080fd5b506102d76102be366004612a35565b6013602052600090815260409020805460019091015482565b6040805192835260208301919091520161029a565b3480156102f857600080fd5b5061026b610307366004612a35565b61091a565b34801561031857600080fd5b50610322600b5481565b60405190815260200161029a565b34801561033c57600080fd5b5061026b61034b366004612b3f565b6109e2565b34801561035c57600080fd5b5061026b610a66565b34801561037157600080fd5b5061032260125481565b34801561038757600080fd5b5061026b610396366004612a51565b610b22565b3480156103a757600080fd5b5061026b6103b6366004612b0f565b610bec565b61026b610c66565b3480156103cf57600080fd5b506103e36103de366004612b0f565b610dc3565b60405161029a9190612d80565b3480156103fc57600080fd5b5061026b61040b366004612c27565b610ded565b34801561041c57600080fd5b506015546103e3906001600160a01b031681565b34801561043c57600080fd5b5061026b610f68565b34801561045157600080fd5b506103e373f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd81565b34801561047957600080fd5b5061032260175481565b34801561048f57600080fd5b5061026b61049e366004612a89565b610fa3565b3480156104af57600080fd5b50610322600d5481565b3480156104c557600080fd5b5061026b61109f565b3480156104da57600080fd5b5061026b6104e9366004612b0f565b6110fd565b3480156104fa57600080fd5b5061032260165481565b34801561051057600080fd5b5060055461052b90600160a01b90046001600160401b031681565b6040516001600160401b03909116815260200161029a565b34801561054f57600080fd5b506103e3611432565b34801561056457600080fd5b506103e3731fcc3b22955e76ca48bf025f1a6993685975bb9e81565b34801561058c57600080fd5b5061026b61059b366004612a35565b611441565b61026b6115f3565b3480156105b457600080fd5b50610322600c5481565b3480156105ca57600080fd5b5061032260095481565b3480156105e057600080fd5b506105f46105ef366004612b0f565b611af8565b60405161029a929190612e34565b34801561060e57600080fd5b5061026b61061d366004612ad4565b611b8e565b34801561062e57600080fd5b5061026b611bf1565b34801561064357600080fd5b5061064c612262565b60405161029a9493929190612fc7565b34801561066857600080fd5b50610322610677366004612b0f565b61230c565b34801561068857600080fd5b5061026b612323565b34801561069d57600080fd5b5061032260085481565b3480156106b357600080fd5b5061026b6106c2366004612a35565b612426565b3480156106d357600080fd5b506103226106e2366004612b0f565b6124c6565b3480156106f357600080fd5b506004546103e3906001600160a01b031681565b34801561071357600080fd5b50601454610322565b33610725611432565b6001600160a01b0316146107545760405162461bcd60e51b815260040161074b90612ec0565b60405180910390fd5b600083116107a45760405162461bcd60e51b815260206004820152601d60248201527f526174652041206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b600082116107f45760405162461bcd60e51b815260206004820152601d60248201527f526174652042206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b600081116108445760405162461bcd60e51b815260206004820152601d60248201527f526174652043206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b612710816108528486613093565b61085c9190613093565b106108b45760405162461bcd60e51b815260206004820152602260248201527f546f74616c2072617465206d757374206265206c657373207468616e20313030604482015261030360f41b606482015260840161074b565b60408051606081018252848152602081018490529081018290526108dc90600e906003612905565b507f9790ef7c1f45d72c28f24be5b24c0bfc1066f8d9d8ed0093f34e330a392ae5ae600e60405161090d9190612e99565b60405180910390a1505050565b33610923611432565b6001600160a01b0316146109495760405162461bcd60e51b815260040161074b90612ec0565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610978903090600401612d80565b60206040518083038186803b15801561099057600080fd5b505afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c89190612b27565b90506109de6001600160a01b03831633836124e7565b5050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a5c5760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602482015260440161074b565b6109de828261253d565b33610a6f611432565b6001600160a01b031614610a955760405162461bcd60e51b815260040161074b90612ec0565b600254600554604051630d7ae1d360e41b81526001600160a01b039092169163d7ae1d3091610ada91600160a01b9091046001600160401b0316903390600401612fa5565b600060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50506005805467ffffffffffffffff60a01b191690555050565b33610b2b611432565b6001600160a01b031614610b515760405162461bcd60e51b815260040161074b90612ec0565b600354600160a01b900460ff1615610bab5760405162461bcd60e51b815260206004820152601c60248201527f436f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161074b565b6003805460ff60a01b1916600160a01b179055600480546001600160a01b039384166001600160a01b03199182161790915560058054929093169116179055565b33610bf5611432565b6001600160a01b031614610c1b5760405162461bcd60e51b815260040161074b90612ec0565b610c2d81670de0b6b3a76400006130bf565b600d556040518181527f60ecaa7da6b4bb3a399ca8b025cdc06c0950a0c9b03644ebf721bf5985ac848d9060200160405180910390a150565b60026000541415610c895760405162461bcd60e51b815260040161074b90612ef5565b600260009081553381526013602052604090208054610cdb5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd081c9959da5cdd195c995960921b604482015260640161074b565b600b54816001015410610d3f5760405162461bcd60e51b815260206004820152602660248201527f63616e20636c61696d206166746572207468697320726f756e642069732066696044820152651b9a5cda195960d21b606482015260840161074b565b610d47612555565b8054600454610d63916001600160a01b039091169033906124e7565b80546040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491610d9691339190612db8565b60405180910390a1805460178054600090610db29084906130de565b909155505060009081905560019055565b60148181548110610dd357600080fd5b6000918252602090912001546001600160a01b0316905081565b33610df6611432565b6001600160a01b031614610e1c5760405162461bcd60e51b815260040161074b90612ec0565b6003546040516323b872dd60e01b81523360048201523060248201526001600160601b03831660448201526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610e7657600080fd5b505af1158015610e8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eae9190612ab4565b5060035460025460055460408051600160a01b9092046001600160401b031660208301526001600160a01b0393841693634000aea09316918591016040516020818303038152906040526040518463ffffffff1660e01b8152600401610f1693929190612e01565b602060405180830381600087803b158015610f3057600080fd5b505af1158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109de9190612ab4565b33610f71611432565b6001600160a01b031614610f975760405162461bcd60e51b815260040161074b90612ec0565b610fa1600061263e565b565b6015546001600160a01b03163314610ff95760405162461bcd60e51b815260206004820152601960248201527839b2ba29b2b93b34b1b2a4b733379d102327a92124a22222a760391b604482015260640161074b565b6001600160a01b0382166110415760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161074b565b601580546001600160a01b0319166001600160a01b03841617905560168190556040517f232f2e6280d2064b1e439bf40ecdada042d84eefbb55039e4c49e8dc4f4c90c9906110939084908490612db8565b60405180910390a15050565b336110a8611432565b6001600160a01b0316146110ce5760405162461bcd60e51b815260040161074b90612ec0565b6040514790339082156108fc029083906000818181858888f193505050501580156109de573d6000803e3d6000fd5b33611106611432565b6001600160a01b03161461112c5760405162461bcd60e51b815260040161074b90612ec0565b6040516323b872dd60e01b815273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd906323b872dd9061116790339030908690600401612d94565b602060405180830381600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b99190612ab4565b5060405163095ea7b360e01b815273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd9063095ea7b39061120790731fcc3b22955e76ca48bf025f1a6993685975bb9e908590600401612db8565b602060405180830381600087803b15801561122157600080fd5b505af1158015611235573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112599190612ab4565b50600354604051632b7f092360e01b81526004810183905273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd60248201526001600160a01b039091166044820152731fcc3b22955e76ca48bf025f1a6993685975bb9e90632b7f092390606401600060405180830381600087803b1580156112d457600080fd5b505af11580156112e8573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152600093506001600160a01b0390911691506370a082319061131f903090600401612d80565b60206040518083038186803b15801561133757600080fd5b505afa15801561134b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136f9190612b27565b60035460025460055460408051600160a01b9092046001600160401b031660208301529394506001600160a01b0392831693634000aea093909216918591016040516020818303038152906040526040518463ffffffff1660e01b81526004016113db93929190612dd1565b602060405180830381600087803b1580156113f557600080fd5b505af1158015611409573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142d9190612ab4565b505050565b6001546001600160a01b031690565b3361144a611432565b6001600160a01b0316146114705760405162461bcd60e51b815260040161074b90612ec0565b600554600160a01b90046001600160401b0316156114d05760405162461bcd60e51b815260206004820152601c60248201527f537562736372697074696f6e20616c7265616479207374617274656400000000604482015260640161074b565b600280546001600160a01b0319166001600160a01b0383169081179091556040805163288688f960e21b8152905163a21a23e4916004808201926020929091908290030181600087803b15801561152657600080fd5b505af115801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e9190612c0d565b6005805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600254604051631cd0704360e21b81526001600160a01b0390911693637341c10c936115be93900416903090600401612fa5565b600060405180830381600087803b1580156115d857600080fd5b505af11580156115ec573d6000803e3d6000fd5b5050505050565b600260005414156116165760405162461bcd60e51b815260040161074b90612ef5565b6002600055600354600160a01b900460ff166116445760405162461bcd60e51b815260040161074b90612f2c565b333b156116935760405162461bcd60e51b815260206004820152601e60248201527f636f6e74726163742063616e6e6f74206265206469737472696275746f720000604482015260640161074b565b336000908152601360205260409020600b546001820154106116e75760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e481859191959609a1b604482015260640161074b565b8054156117365760405162461bcd60e51b815260206004820152601a60248201527f636c61696d2070726576696f7573207374616b65206669727374000000000000604482015260640161074b565b61173e612555565b60055460048054604051630681320d60e51b81526000936001600160a01b039081169363d02641a0936117749392169101612d80565b60206040518083038186803b15801561178c57600080fd5b505afa1580156117a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c49190612b27565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916117f991339101612d80565b60206040518083038186803b15801561181157600080fd5b505afa158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190612b27565b9050600082600d54670de0b6b3a764000061186491906130bf565b61186e91906130ab565b9050600083116118c05760405162461bcd60e51b815260206004820152601a60248201527f4c55434b5920524f4f207072696365206973206d697373696e67000000000000604482015260640161074b565b808210156119105760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e7420686f6c6465722062616c616e63650000000000604482015260640161074b565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161194291309101612d80565b60206040518083038186803b15801561195a57600080fd5b505afa15801561196e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119929190612b27565b6004549091506119ad906001600160a01b0316333085612690565b600480546040516370a0823160e01b815260009284926001600160a01b0316916370a08231916119df91309101612d80565b60206040518083038186803b1580156119f757600080fd5b505afa158015611a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2f9190612b27565b611a3991906130de565b905082811115611a465750815b808655600b5460018088019190915560148054918201815560009081527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910180546001600160a01b0319163317905586546017805491929091611aac908490613093565b90915550506040517fa5babb86a45dcaf11bfb2fb70a03b04ce046203b581637539f567d01f6e8c68390611ae39033908490612db8565b60405180910390a15050600160005550505050565b611b00612943565b611b08612943565b600083815260116020526040908190208151606081019283905290916003808401929184919082845b81546001600160a01b03168152600190910190602001808311611b3157505060408051606081019182905294965085935060039250905082845b815481526020019060010190808311611b6b575050505050905091509150915091565b33611b97611432565b6001600160a01b031614611bbd5760405162461bcd60e51b815260040161074b90612ec0565b6006929092556007805463ffffffff938416600160301b0269ffffffff0000ffffffff199091169390921692909217179055565b33611bfa611432565b6001600160a01b031614611c205760405162461bcd60e51b815260040161074b90612ec0565b600354600160a01b900460ff16611c495760405162461bcd60e51b815260040161074b90612f2c565b60095460085414611c975760405162461bcd60e51b81526020600482015260186024820152770a4cae2eacae6e8409288e640c8de40dcdee840dac2e8c6d60431b604482015260640161074b565b600754600a54600160301b90910463ffffffff1614611cf85760405162461bcd60e51b815260206004820152601e60248201527f4e756d626572206f6620776f72647320646f6573206e6f74206d617463680000604482015260640161074b565b60145460038111611d455760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f756768206469737472696275746f727360481b604482015260640161074b565b6000600855611d52612943565b611d5a612943565b60005b600381101561205c57611d7081856130de565b600a8281548110611d9157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154611da6919061313c565b838260038110611dc657634e487b7160e01b600052603260045260246000fd5b602002015260005b81811015611e9657828160038110611df657634e487b7160e01b600052603260045260246000fd5b6020020151848360038110611e1b57634e487b7160e01b600052603260045260246000fd5b602002015110611e7f57838260038110611e4557634e487b7160e01b600052603260045260246000fd5b6020020151611e55906001613093565b848360038110611e7557634e487b7160e01b600052603260045260246000fd5b6020020152611e84565b611e96565b80611e8e81613121565b915050611dce565b5083838260038110611eb857634e487b7160e01b600052603260045260246000fd5b6020020151611ec7919061313c565b838260038110611ee757634e487b7160e01b600052603260045260246000fd5b6020020152828160038110611f0c57634e487b7160e01b600052603260045260246000fd5b6020020151828260038110611f3157634e487b7160e01b600052603260045260246000fd5b60200201528015801590611f96575081611f4c6001836130de565b60038110611f6a57634e487b7160e01b600052603260045260246000fd5b6020020151828260038110611f8f57634e487b7160e01b600052603260045260246000fd5b6020020151105b1561204a576000828260038110611fbd57634e487b7160e01b600052603260045260246000fd5b6020020151905082611fd06001846130de565b60038110611fee57634e487b7160e01b600052603260045260246000fd5b602002015183836003811061201357634e487b7160e01b600052603260045260246000fd5b602002015280836120256001856130de565b6003811061204357634e487b7160e01b600052603260045260246000fd5b6020020152505b8061205481613121565b915050611d5d565b50600b546000908152601160205260409020600c5447906127109061208190836130bf565b61208b91906130ab565b905060005b60038110156121e757600060148683600381106120bd57634e487b7160e01b600052603260045260246000fd5b6020020151815481106120e057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031690508084836003811061211857634e487b7160e01b600052603260045260246000fd5b0180546001600160a01b0319166001600160a01b03929092169190911790556000612710600e846003811061215d57634e487b7160e01b600052603260045260246000fd5b015461216990866130bf565b61217391906130ab565b90508085600301846003811061219957634e487b7160e01b600052603260045260246000fd5b01556040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121d1573d6000803e3d6000fd5b50505080806121df90613121565b915050612090565b50600b546040517ff60d42537d8c91b054cdf2259dbc4355292892f0cf4b936e64a1025bfb62dcf8916122209185906003820190612f5e565b60405180910390a1600b54612236906001613093565b600b5542601255604080516000815260208101918290525161225a91601491612961565b505050505050565b60025460055460405163523e3b4b60e11b8152600160a01b9091046001600160401b03166004820152600091829182916060916001600160a01b039091169063a47c76969060240160006040518083038186803b1580156122c257600080fd5b505afa1580156122d6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122fe9190810190612c43565b935093509350935090919293565b600e816003811061231c57600080fd5b0154905081565b3361232c611432565b6001600160a01b0316146123525760405162461bcd60e51b815260040161074b90612ec0565b60006009556002546006546005546007546040516305d3b1d360e41b81526004810193909352600160a01b9091046001600160401b03166024830152640100000000810461ffff16604483015263ffffffff8082166064840152600160301b9091041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b1580156123e957600080fd5b505af11580156123fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124219190612b27565b600855565b3361242f611432565b6001600160a01b0316146124555760405162461bcd60e51b815260040161074b90612ec0565b6001600160a01b0381166124ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161074b565b6124c38161263e565b50565b600a81815481106124d657600080fd5b600091825260209091200154905081565b61142d8363a9059cbb60e01b8484604051602401612506929190612db8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126b7565b6009829055805161142d90600a9060208401906129b6565b6016543410156125bc5760405162461bcd60e51b815260206004820152602c60248201527f73686f756c642070617920736d616c6c2067617320746f20616464206173206160448201526b103234b9ba3934b13aba37b960a11b606482015260840161074b565b6015546016546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156125f8573d6000803e3d6000fd5b50601654341115610fa15760165433906108fc9061261690346130de565b6040518115909202916000818181858888f193505050501580156124c3573d6000803e3d6000fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6126b1846323b872dd60e01b85858560405160240161250693929190612d94565b50505050565b600061270c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127899092919063ffffffff16565b80519091501561142d578080602001905181019061272a9190612ab4565b61142d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161074b565b606061279884846000856127a2565b90505b9392505050565b6060824710156128035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161074b565b843b6128515760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161074b565b600080866001600160a01b0316858760405161286d9190612d64565b60006040518083038185875af1925050503d80600081146128aa576040519150601f19603f3d011682016040523d82523d6000602084013e6128af565b606091505b50915091506128bf8282866128cc565b925050505b949350505050565b606083156128db57508161279b565b8251156128eb5782518084602001fd5b8160405162461bcd60e51b815260040161074b9190612ead565b8260038101928215612933579160200282015b82811115612933578251825591602001919060010190612918565b5061293f9291506129f0565b5090565b60405180606001604052806003906020820280368337509192915050565b828054828255906000526020600020908101928215612933579160200282015b8281111561293357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612981565b8280548282559060005260206000209081019282156129335791602002820182811115612933578251825591602001919060010190612918565b5b8082111561293f57600081556001016129f1565b803563ffffffff81168114612a1957600080fd5b919050565b80516001600160401b0381168114612a1957600080fd5b600060208284031215612a46578081fd5b813561279b81613192565b60008060408385031215612a63578081fd5b8235612a6e81613192565b91506020830135612a7e81613192565b809150509250929050565b60008060408385031215612a9b578182fd5b8235612aa681613192565b946020939093013593505050565b600060208284031215612ac5578081fd5b8151801515811461279b578182fd5b600080600060608486031215612ae8578081fd5b83359250612af860208501612a05565b9150612b0660408501612a05565b90509250925092565b600060208284031215612b20578081fd5b5035919050565b600060208284031215612b38578081fd5b5051919050565b60008060408385031215612b51578182fd5b823591506020808401356001600160401b03811115612b6e578283fd5b8401601f81018613612b7e578283fd5b8035612b91612b8c82613070565b613040565b80828252848201915084840189868560051b8701011115612bb0578687fd5b8694505b83851015612bd2578035835260019490940193918501918501612bb4565b5080955050505050509250929050565b600080600060608486031215612bf6578283fd5b505081359360208301359350604090920135919050565b600060208284031215612c1e578081fd5b61279b82612a1e565b600060208284031215612c38578081fd5b813561279b816131a7565b60008060008060808587031215612c58578182fd5b8451612c63816131a7565b93506020612c72868201612a1e565b93506040860151612c8281613192565b60608701519093506001600160401b03811115612c9d578283fd5b8601601f81018813612cad578283fd5b8051612cbb612b8c82613070565b8082825284820191508484018b868560051b8701011115612cda578687fd5b8694505b83851015612d05578051612cf181613192565b835260019490940193918501918501612cde565b50979a9699509497505050505050565b8060005b60038110156126b1578154845260209093019260019182019101612d19565b60008151808452612d508160208601602086016130f5565b601f01601f19169290920160200192915050565b60008251612d768184602087016130f5565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b60018060a01b0384168152826020820152606060408201526000612df86060830184612d38565b95945050505050565b6001600160a01b03841681526001600160601b0383166020820152606060408201819052600090612df890830184612d38565b60c08101818460005b6003811015612e655781516001600160a01b0316835260209283019290910190600101612e3d565b505050606082018360005b6003811015612e8f578151835260209283019290910190600101612e70565b5050509392505050565b60608101612ea78284612d15565b92915050565b60208152600061279b6020830184612d38565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527710dbdb9d1c9858dd081b9bdd081a5b9a5d1a585b1a5e995960421b604082015260600190565b83815260e0810160208083018560005b6003811015612f945781546001600160a01b031683529183019160019182019101612f6e565b505050506128c46080830184612d15565b6001600160401b039290921682526001600160a01b0316602082015260400190565b6000608082016001600160601b038716835260206001600160401b0387168185015260018060a01b0380871660408601526080606086015282865180855260a0870191508388019450855b81811015613030578551841683529484019491840191600101613012565b50909a9950505050505050505050565b604051601f8201601f191681016001600160401b03811182821017156130685761306861317c565b604052919050565b60006001600160401b038211156130895761308961317c565b5060051b60200190565b600082198211156130a6576130a6613150565b500190565b6000826130ba576130ba613166565b500490565b60008160001904831182151516156130d9576130d9613150565b500290565b6000828210156130f0576130f0613150565b500390565b60005b838110156131105781810151838201526020016130f8565b838111156126b15750506000910152565b600060001982141561313557613135613150565b5060010190565b60008261314b5761314b613166565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146124c357600080fd5b6001600160601b03811681146124c357600080fdfea26469706673582212208aab41fd6a4a9178a72dae1e54593ac5d81f75df9f477e80f0fe06024596b98664736f6c63430008040033000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986caff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
Deployed Bytecode
0x60806040526004361061023f5760003560e01c806385d52d431161012e578063c4b1ea15116100ab578063e89e106a1161006f578063e89e106a14610691578063f2fde38b146106a7578063f6eaffc8146106c7578063fc0c546a146106e7578063fde1baca1461070757600080fd5b8063c4b1ea1514610602578063cd69731514610622578063cdd2efd014610637578063d72310d11461065c578063e0c862891461067c57600080fd5b8063a9d8e968116100f2578063a9d8e96814610580578063ac52480e146105a0578063ae503a94146105a8578063b1c2b3e4146105be578063c3890403146105d457600080fd5b806385d52d43146104ce57806387788782146104ee5780638ac00021146105045780638da5cb5b146105435780638ef40ffd1461055857600080fd5b80634e71d92d116101bc57806376ce6b401161018057806376ce6b4014610445578063817b1cd21461046d57806381b6194814610483578063843cf851146104a357806384536017146104b957600080fd5b80634e71d92d146103bb57806350b492ba146103c35780635f795b4d146103f057806361d027b314610410578063715018a61461043057600080fd5b80631fe543e3116102035780631fe543e31461033057806324e9edb01461035057806339096c3314610365578063485cc9551461037b5780634b18b3df1461039b57600080fd5b8063133f26501461024b578063158ef93e1461026d5780631959a002146102a35780631af03203146102ec5780631c75cfb41461030c57600080fd5b3661024657005b600080fd5b34801561025757600080fd5b5061026b610266366004612be2565b61071c565b005b34801561027957600080fd5b5060035461028e90600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b3480156102af57600080fd5b506102d76102be366004612a35565b6013602052600090815260409020805460019091015482565b6040805192835260208301919091520161029a565b3480156102f857600080fd5b5061026b610307366004612a35565b61091a565b34801561031857600080fd5b50610322600b5481565b60405190815260200161029a565b34801561033c57600080fd5b5061026b61034b366004612b3f565b6109e2565b34801561035c57600080fd5b5061026b610a66565b34801561037157600080fd5b5061032260125481565b34801561038757600080fd5b5061026b610396366004612a51565b610b22565b3480156103a757600080fd5b5061026b6103b6366004612b0f565b610bec565b61026b610c66565b3480156103cf57600080fd5b506103e36103de366004612b0f565b610dc3565b60405161029a9190612d80565b3480156103fc57600080fd5b5061026b61040b366004612c27565b610ded565b34801561041c57600080fd5b506015546103e3906001600160a01b031681565b34801561043c57600080fd5b5061026b610f68565b34801561045157600080fd5b506103e373f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd81565b34801561047957600080fd5b5061032260175481565b34801561048f57600080fd5b5061026b61049e366004612a89565b610fa3565b3480156104af57600080fd5b50610322600d5481565b3480156104c557600080fd5b5061026b61109f565b3480156104da57600080fd5b5061026b6104e9366004612b0f565b6110fd565b3480156104fa57600080fd5b5061032260165481565b34801561051057600080fd5b5060055461052b90600160a01b90046001600160401b031681565b6040516001600160401b03909116815260200161029a565b34801561054f57600080fd5b506103e3611432565b34801561056457600080fd5b506103e3731fcc3b22955e76ca48bf025f1a6993685975bb9e81565b34801561058c57600080fd5b5061026b61059b366004612a35565b611441565b61026b6115f3565b3480156105b457600080fd5b50610322600c5481565b3480156105ca57600080fd5b5061032260095481565b3480156105e057600080fd5b506105f46105ef366004612b0f565b611af8565b60405161029a929190612e34565b34801561060e57600080fd5b5061026b61061d366004612ad4565b611b8e565b34801561062e57600080fd5b5061026b611bf1565b34801561064357600080fd5b5061064c612262565b60405161029a9493929190612fc7565b34801561066857600080fd5b50610322610677366004612b0f565b61230c565b34801561068857600080fd5b5061026b612323565b34801561069d57600080fd5b5061032260085481565b3480156106b357600080fd5b5061026b6106c2366004612a35565b612426565b3480156106d357600080fd5b506103226106e2366004612b0f565b6124c6565b3480156106f357600080fd5b506004546103e3906001600160a01b031681565b34801561071357600080fd5b50601454610322565b33610725611432565b6001600160a01b0316146107545760405162461bcd60e51b815260040161074b90612ec0565b60405180910390fd5b600083116107a45760405162461bcd60e51b815260206004820152601d60248201527f526174652041206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b600082116107f45760405162461bcd60e51b815260206004820152601d60248201527f526174652042206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b600081116108445760405162461bcd60e51b815260206004820152601d60248201527f526174652043206d7573742062652067726561746572207468616e2030000000604482015260640161074b565b612710816108528486613093565b61085c9190613093565b106108b45760405162461bcd60e51b815260206004820152602260248201527f546f74616c2072617465206d757374206265206c657373207468616e20313030604482015261030360f41b606482015260840161074b565b60408051606081018252848152602081018490529081018290526108dc90600e906003612905565b507f9790ef7c1f45d72c28f24be5b24c0bfc1066f8d9d8ed0093f34e330a392ae5ae600e60405161090d9190612e99565b60405180910390a1505050565b33610923611432565b6001600160a01b0316146109495760405162461bcd60e51b815260040161074b90612ec0565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610978903090600401612d80565b60206040518083038186803b15801561099057600080fd5b505afa1580156109a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c89190612b27565b90506109de6001600160a01b03831633836124e7565b5050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610a5c5760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916602482015260440161074b565b6109de828261253d565b33610a6f611432565b6001600160a01b031614610a955760405162461bcd60e51b815260040161074b90612ec0565b600254600554604051630d7ae1d360e41b81526001600160a01b039092169163d7ae1d3091610ada91600160a01b9091046001600160401b0316903390600401612fa5565b600060405180830381600087803b158015610af457600080fd5b505af1158015610b08573d6000803e3d6000fd5b50506005805467ffffffffffffffff60a01b191690555050565b33610b2b611432565b6001600160a01b031614610b515760405162461bcd60e51b815260040161074b90612ec0565b600354600160a01b900460ff1615610bab5760405162461bcd60e51b815260206004820152601c60248201527f436f6e747261637420616c726561647920696e697469616c697a656400000000604482015260640161074b565b6003805460ff60a01b1916600160a01b179055600480546001600160a01b039384166001600160a01b03199182161790915560058054929093169116179055565b33610bf5611432565b6001600160a01b031614610c1b5760405162461bcd60e51b815260040161074b90612ec0565b610c2d81670de0b6b3a76400006130bf565b600d556040518181527f60ecaa7da6b4bb3a399ca8b025cdc06c0950a0c9b03644ebf721bf5985ac848d9060200160405180910390a150565b60026000541415610c895760405162461bcd60e51b815260040161074b90612ef5565b600260009081553381526013602052604090208054610cdb5760405162461bcd60e51b815260206004820152600e60248201526d1b9bdd081c9959da5cdd195c995960921b604482015260640161074b565b600b54816001015410610d3f5760405162461bcd60e51b815260206004820152602660248201527f63616e20636c61696d206166746572207468697320726f756e642069732066696044820152651b9a5cda195960d21b606482015260840161074b565b610d47612555565b8054600454610d63916001600160a01b039091169033906124e7565b80546040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491610d9691339190612db8565b60405180910390a1805460178054600090610db29084906130de565b909155505060009081905560019055565b60148181548110610dd357600080fd5b6000918252602090912001546001600160a01b0316905081565b33610df6611432565b6001600160a01b031614610e1c5760405162461bcd60e51b815260040161074b90612ec0565b6003546040516323b872dd60e01b81523360048201523060248201526001600160601b03831660448201526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610e7657600080fd5b505af1158015610e8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eae9190612ab4565b5060035460025460055460408051600160a01b9092046001600160401b031660208301526001600160a01b0393841693634000aea09316918591016040516020818303038152906040526040518463ffffffff1660e01b8152600401610f1693929190612e01565b602060405180830381600087803b158015610f3057600080fd5b505af1158015610f44573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109de9190612ab4565b33610f71611432565b6001600160a01b031614610f975760405162461bcd60e51b815260040161074b90612ec0565b610fa1600061263e565b565b6015546001600160a01b03163314610ff95760405162461bcd60e51b815260206004820152601960248201527839b2ba29b2b93b34b1b2a4b733379d102327a92124a22222a760391b604482015260640161074b565b6001600160a01b0382166110415760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161074b565b601580546001600160a01b0319166001600160a01b03841617905560168190556040517f232f2e6280d2064b1e439bf40ecdada042d84eefbb55039e4c49e8dc4f4c90c9906110939084908490612db8565b60405180910390a15050565b336110a8611432565b6001600160a01b0316146110ce5760405162461bcd60e51b815260040161074b90612ec0565b6040514790339082156108fc029083906000818181858888f193505050501580156109de573d6000803e3d6000fd5b33611106611432565b6001600160a01b03161461112c5760405162461bcd60e51b815260040161074b90612ec0565b6040516323b872dd60e01b815273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd906323b872dd9061116790339030908690600401612d94565b602060405180830381600087803b15801561118157600080fd5b505af1158015611195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b99190612ab4565b5060405163095ea7b360e01b815273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd9063095ea7b39061120790731fcc3b22955e76ca48bf025f1a6993685975bb9e908590600401612db8565b602060405180830381600087803b15801561122157600080fd5b505af1158015611235573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112599190612ab4565b50600354604051632b7f092360e01b81526004810183905273f8a0bf9cf54bb92f17374d9e9a321e6a111a51bd60248201526001600160a01b039091166044820152731fcc3b22955e76ca48bf025f1a6993685975bb9e90632b7f092390606401600060405180830381600087803b1580156112d457600080fd5b505af11580156112e8573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152600093506001600160a01b0390911691506370a082319061131f903090600401612d80565b60206040518083038186803b15801561133757600080fd5b505afa15801561134b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136f9190612b27565b60035460025460055460408051600160a01b9092046001600160401b031660208301529394506001600160a01b0392831693634000aea093909216918591016040516020818303038152906040526040518463ffffffff1660e01b81526004016113db93929190612dd1565b602060405180830381600087803b1580156113f557600080fd5b505af1158015611409573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142d9190612ab4565b505050565b6001546001600160a01b031690565b3361144a611432565b6001600160a01b0316146114705760405162461bcd60e51b815260040161074b90612ec0565b600554600160a01b90046001600160401b0316156114d05760405162461bcd60e51b815260206004820152601c60248201527f537562736372697074696f6e20616c7265616479207374617274656400000000604482015260640161074b565b600280546001600160a01b0319166001600160a01b0383169081179091556040805163288688f960e21b8152905163a21a23e4916004808201926020929091908290030181600087803b15801561152657600080fd5b505af115801561153a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155e9190612c0d565b6005805467ffffffffffffffff60a01b1916600160a01b6001600160401b0393841681029190911791829055600254604051631cd0704360e21b81526001600160a01b0390911693637341c10c936115be93900416903090600401612fa5565b600060405180830381600087803b1580156115d857600080fd5b505af11580156115ec573d6000803e3d6000fd5b5050505050565b600260005414156116165760405162461bcd60e51b815260040161074b90612ef5565b6002600055600354600160a01b900460ff166116445760405162461bcd60e51b815260040161074b90612f2c565b333b156116935760405162461bcd60e51b815260206004820152601e60248201527f636f6e74726163742063616e6e6f74206265206469737472696275746f720000604482015260640161074b565b336000908152601360205260409020600b546001820154106116e75760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e481859191959609a1b604482015260640161074b565b8054156117365760405162461bcd60e51b815260206004820152601a60248201527f636c61696d2070726576696f7573207374616b65206669727374000000000000604482015260640161074b565b61173e612555565b60055460048054604051630681320d60e51b81526000936001600160a01b039081169363d02641a0936117749392169101612d80565b60206040518083038186803b15801561178c57600080fd5b505afa1580156117a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c49190612b27565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916117f991339101612d80565b60206040518083038186803b15801561181157600080fd5b505afa158015611825573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118499190612b27565b9050600082600d54670de0b6b3a764000061186491906130bf565b61186e91906130ab565b9050600083116118c05760405162461bcd60e51b815260206004820152601a60248201527f4c55434b5920524f4f207072696365206973206d697373696e67000000000000604482015260640161074b565b808210156119105760405162461bcd60e51b815260206004820152601b60248201527f696e73756666696369656e7420686f6c6465722062616c616e63650000000000604482015260640161074b565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161194291309101612d80565b60206040518083038186803b15801561195a57600080fd5b505afa15801561196e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119929190612b27565b6004549091506119ad906001600160a01b0316333085612690565b600480546040516370a0823160e01b815260009284926001600160a01b0316916370a08231916119df91309101612d80565b60206040518083038186803b1580156119f757600080fd5b505afa158015611a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2f9190612b27565b611a3991906130de565b905082811115611a465750815b808655600b5460018088019190915560148054918201815560009081527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90910180546001600160a01b0319163317905586546017805491929091611aac908490613093565b90915550506040517fa5babb86a45dcaf11bfb2fb70a03b04ce046203b581637539f567d01f6e8c68390611ae39033908490612db8565b60405180910390a15050600160005550505050565b611b00612943565b611b08612943565b600083815260116020526040908190208151606081019283905290916003808401929184919082845b81546001600160a01b03168152600190910190602001808311611b3157505060408051606081019182905294965085935060039250905082845b815481526020019060010190808311611b6b575050505050905091509150915091565b33611b97611432565b6001600160a01b031614611bbd5760405162461bcd60e51b815260040161074b90612ec0565b6006929092556007805463ffffffff938416600160301b0269ffffffff0000ffffffff199091169390921692909217179055565b33611bfa611432565b6001600160a01b031614611c205760405162461bcd60e51b815260040161074b90612ec0565b600354600160a01b900460ff16611c495760405162461bcd60e51b815260040161074b90612f2c565b60095460085414611c975760405162461bcd60e51b81526020600482015260186024820152770a4cae2eacae6e8409288e640c8de40dcdee840dac2e8c6d60431b604482015260640161074b565b600754600a54600160301b90910463ffffffff1614611cf85760405162461bcd60e51b815260206004820152601e60248201527f4e756d626572206f6620776f72647320646f6573206e6f74206d617463680000604482015260640161074b565b60145460038111611d455760405162461bcd60e51b81526020600482015260176024820152764e6f7420656e6f756768206469737472696275746f727360481b604482015260640161074b565b6000600855611d52612943565b611d5a612943565b60005b600381101561205c57611d7081856130de565b600a8281548110611d9157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154611da6919061313c565b838260038110611dc657634e487b7160e01b600052603260045260246000fd5b602002015260005b81811015611e9657828160038110611df657634e487b7160e01b600052603260045260246000fd5b6020020151848360038110611e1b57634e487b7160e01b600052603260045260246000fd5b602002015110611e7f57838260038110611e4557634e487b7160e01b600052603260045260246000fd5b6020020151611e55906001613093565b848360038110611e7557634e487b7160e01b600052603260045260246000fd5b6020020152611e84565b611e96565b80611e8e81613121565b915050611dce565b5083838260038110611eb857634e487b7160e01b600052603260045260246000fd5b6020020151611ec7919061313c565b838260038110611ee757634e487b7160e01b600052603260045260246000fd5b6020020152828160038110611f0c57634e487b7160e01b600052603260045260246000fd5b6020020151828260038110611f3157634e487b7160e01b600052603260045260246000fd5b60200201528015801590611f96575081611f4c6001836130de565b60038110611f6a57634e487b7160e01b600052603260045260246000fd5b6020020151828260038110611f8f57634e487b7160e01b600052603260045260246000fd5b6020020151105b1561204a576000828260038110611fbd57634e487b7160e01b600052603260045260246000fd5b6020020151905082611fd06001846130de565b60038110611fee57634e487b7160e01b600052603260045260246000fd5b602002015183836003811061201357634e487b7160e01b600052603260045260246000fd5b602002015280836120256001856130de565b6003811061204357634e487b7160e01b600052603260045260246000fd5b6020020152505b8061205481613121565b915050611d5d565b50600b546000908152601160205260409020600c5447906127109061208190836130bf565b61208b91906130ab565b905060005b60038110156121e757600060148683600381106120bd57634e487b7160e01b600052603260045260246000fd5b6020020151815481106120e057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031690508084836003811061211857634e487b7160e01b600052603260045260246000fd5b0180546001600160a01b0319166001600160a01b03929092169190911790556000612710600e846003811061215d57634e487b7160e01b600052603260045260246000fd5b015461216990866130bf565b61217391906130ab565b90508085600301846003811061219957634e487b7160e01b600052603260045260246000fd5b01556040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156121d1573d6000803e3d6000fd5b50505080806121df90613121565b915050612090565b50600b546040517ff60d42537d8c91b054cdf2259dbc4355292892f0cf4b936e64a1025bfb62dcf8916122209185906003820190612f5e565b60405180910390a1600b54612236906001613093565b600b5542601255604080516000815260208101918290525161225a91601491612961565b505050505050565b60025460055460405163523e3b4b60e11b8152600160a01b9091046001600160401b03166004820152600091829182916060916001600160a01b039091169063a47c76969060240160006040518083038186803b1580156122c257600080fd5b505afa1580156122d6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122fe9190810190612c43565b935093509350935090919293565b600e816003811061231c57600080fd5b0154905081565b3361232c611432565b6001600160a01b0316146123525760405162461bcd60e51b815260040161074b90612ec0565b60006009556002546006546005546007546040516305d3b1d360e41b81526004810193909352600160a01b9091046001600160401b03166024830152640100000000810461ffff16604483015263ffffffff8082166064840152600160301b9091041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b1580156123e957600080fd5b505af11580156123fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124219190612b27565b600855565b3361242f611432565b6001600160a01b0316146124555760405162461bcd60e51b815260040161074b90612ec0565b6001600160a01b0381166124ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161074b565b6124c38161263e565b50565b600a81815481106124d657600080fd5b600091825260209091200154905081565b61142d8363a9059cbb60e01b8484604051602401612506929190612db8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126b7565b6009829055805161142d90600a9060208401906129b6565b6016543410156125bc5760405162461bcd60e51b815260206004820152602c60248201527f73686f756c642070617920736d616c6c2067617320746f20616464206173206160448201526b103234b9ba3934b13aba37b960a11b606482015260840161074b565b6015546016546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156125f8573d6000803e3d6000fd5b50601654341115610fa15760165433906108fc9061261690346130de565b6040518115909202916000818181858888f193505050501580156124c3573d6000803e3d6000fd5b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6126b1846323b872dd60e01b85858560405160240161250693929190612d94565b50505050565b600061270c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127899092919063ffffffff16565b80519091501561142d578080602001905181019061272a9190612ab4565b61142d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161074b565b606061279884846000856127a2565b90505b9392505050565b6060824710156128035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161074b565b843b6128515760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161074b565b600080866001600160a01b0316858760405161286d9190612d64565b60006040518083038185875af1925050503d80600081146128aa576040519150601f19603f3d011682016040523d82523d6000602084013e6128af565b606091505b50915091506128bf8282866128cc565b925050505b949350505050565b606083156128db57508161279b565b8251156128eb5782518084602001fd5b8160405162461bcd60e51b815260040161074b9190612ead565b8260038101928215612933579160200282015b82811115612933578251825591602001919060010190612918565b5061293f9291506129f0565b5090565b60405180606001604052806003906020820280368337509192915050565b828054828255906000526020600020908101928215612933579160200282015b8281111561293357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612981565b8280548282559060005260206000209081019282156129335791602002820182811115612933578251825591602001919060010190612918565b5b8082111561293f57600081556001016129f1565b803563ffffffff81168114612a1957600080fd5b919050565b80516001600160401b0381168114612a1957600080fd5b600060208284031215612a46578081fd5b813561279b81613192565b60008060408385031215612a63578081fd5b8235612a6e81613192565b91506020830135612a7e81613192565b809150509250929050565b60008060408385031215612a9b578182fd5b8235612aa681613192565b946020939093013593505050565b600060208284031215612ac5578081fd5b8151801515811461279b578182fd5b600080600060608486031215612ae8578081fd5b83359250612af860208501612a05565b9150612b0660408501612a05565b90509250925092565b600060208284031215612b20578081fd5b5035919050565b600060208284031215612b38578081fd5b5051919050565b60008060408385031215612b51578182fd5b823591506020808401356001600160401b03811115612b6e578283fd5b8401601f81018613612b7e578283fd5b8035612b91612b8c82613070565b613040565b80828252848201915084840189868560051b8701011115612bb0578687fd5b8694505b83851015612bd2578035835260019490940193918501918501612bb4565b5080955050505050509250929050565b600080600060608486031215612bf6578283fd5b505081359360208301359350604090920135919050565b600060208284031215612c1e578081fd5b61279b82612a1e565b600060208284031215612c38578081fd5b813561279b816131a7565b60008060008060808587031215612c58578182fd5b8451612c63816131a7565b93506020612c72868201612a1e565b93506040860151612c8281613192565b60608701519093506001600160401b03811115612c9d578283fd5b8601601f81018813612cad578283fd5b8051612cbb612b8c82613070565b8082825284820191508484018b868560051b8701011115612cda578687fd5b8694505b83851015612d05578051612cf181613192565b835260019490940193918501918501612cde565b50979a9699509497505050505050565b8060005b60038110156126b1578154845260209093019260019182019101612d19565b60008151808452612d508160208601602086016130f5565b601f01601f19169290920160200192915050565b60008251612d768184602087016130f5565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b60018060a01b0384168152826020820152606060408201526000612df86060830184612d38565b95945050505050565b6001600160a01b03841681526001600160601b0383166020820152606060408201819052600090612df890830184612d38565b60c08101818460005b6003811015612e655781516001600160a01b0316835260209283019290910190600101612e3d565b505050606082018360005b6003811015612e8f578151835260209283019290910190600101612e70565b5050509392505050565b60608101612ea78284612d15565b92915050565b60208152600061279b6020830184612d38565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527710dbdb9d1c9858dd081b9bdd081a5b9a5d1a585b1a5e995960421b604082015260600190565b83815260e0810160208083018560005b6003811015612f945781546001600160a01b031683529183019160019182019101612f6e565b505050506128c46080830184612d15565b6001600160401b039290921682526001600160a01b0316602082015260400190565b6000608082016001600160601b038716835260206001600160401b0387168185015260018060a01b0380871660408601526080606086015282865180855260a0870191508388019450855b81811015613030578551841683529484019491840191600101613012565b50909a9950505050505050505050565b604051601f8201601f191681016001600160401b03811182821017156130685761306861317c565b604052919050565b60006001600160401b038211156130895761308961317c565b5060051b60200190565b600082198211156130a6576130a6613150565b500190565b6000826130ba576130ba613166565b500490565b60008160001904831182151516156130d9576130d9613150565b500290565b6000828210156130f0576130f0613150565b500390565b60005b838110156131105781810151838201526020016130f8565b838111156126b15750506000910152565b600060001982141561313557613135613150565b5060010190565b60008261314b5761314b613166565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146124c357600080fd5b6001600160601b03811681146124c357600080fdfea26469706673582212208aab41fd6a4a9178a72dae1e54593ac5d81f75df9f477e80f0fe06024596b98664736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986caff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
-----Decoded View---------------
Arg [0] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [1] : _link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : _keyHash (bytes32): 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : ff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.