Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 199,447 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Dice_Play | 64943986 | 4 days ago | IN | 142.66275754 POL | 0.01001857 | ||||
Dice_Play | 64886609 | 5 days ago | IN | 148.10449791 POL | 0.01046658 | ||||
Dice_Play | 64882970 | 5 days ago | IN | 0.11904025 POL | 0.02332286 | ||||
Dice_Play | 64882953 | 5 days ago | IN | 0.11675864 POL | 0.02301868 | ||||
Dice_Play | 64882932 | 5 days ago | IN | 0.11528316 POL | 0.02318997 | ||||
Dice_Play | 64882915 | 5 days ago | IN | 0.11388441 POL | 0.02368746 | ||||
Dice_Play | 64881490 | 5 days ago | IN | 300.13691209 POL | 0.0274393 | ||||
Dice_Play | 64880204 | 5 days ago | IN | 534.17909385 POL | 0.02799577 | ||||
Dice_Play | 64865104 | 6 days ago | IN | 0.09489811 POL | 0.01060519 | ||||
Dice_Play | 64865038 | 6 days ago | IN | 0.08473961 POL | 0.01056804 | ||||
Dice_Play | 64846060 | 6 days ago | IN | 265.47315682 POL | 0.01010739 | ||||
Dice_Play | 64833087 | 7 days ago | IN | 5.06717427 POL | 0.01104316 | ||||
Dice_Play | 64809956 | 7 days ago | IN | 0.16314804 POL | 0.01010739 | ||||
Dice_Play | 64809923 | 7 days ago | IN | 0.17314804 POL | 0.01010739 | ||||
Dice_Play | 64809681 | 7 days ago | IN | 1.16314804 POL | 0.01010781 | ||||
Dice_Play | 64809649 | 7 days ago | IN | 1.71314804 POL | 0.01010739 | ||||
Dice_Play | 64809618 | 7 days ago | IN | 2.16314804 POL | 0.01010739 | ||||
Dice_Play | 64809586 | 7 days ago | IN | 3.14314804 POL | 0.01010739 | ||||
Dice_Play | 64809555 | 7 days ago | IN | 1.60314804 POL | 0.01010781 | ||||
Dice_Play | 64809531 | 7 days ago | IN | 1.06314804 POL | 0.01010781 | ||||
Dice_Play | 64809505 | 7 days ago | IN | 2.06314804 POL | 0.01010739 | ||||
Dice_Play | 64709340 | 10 days ago | IN | 0.14796058 POL | 0.02527186 | ||||
Dice_Play | 64709301 | 10 days ago | IN | 0.12890326 POL | 0.0208055 | ||||
Dice_Play | 64477789 | 16 days ago | IN | 1.34261345 POL | 0.02136478 | ||||
Dice_Play | 64477675 | 16 days ago | IN | 1.17834612 POL | 0.02270837 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
64943993 | 4 days ago | 142.6 POL | ||||
64943986 | 4 days ago | 0.0125515 POL | ||||
64886617 | 5 days ago | 148.04 POL | ||||
64886609 | 5 days ago | 0.01289958 POL | ||||
64882970 | 5 days ago | 0.03660065 POL | ||||
64882953 | 5 days ago | 0.03518722 POL | ||||
64882932 | 5 days ago | 0.03322058 POL | ||||
64882915 | 5 days ago | 0.03040191 POL | ||||
64881496 | 5 days ago | 300 POL | ||||
64881490 | 5 days ago | 0.02738241 POL | ||||
64880220 | 5 days ago | 534.04 POL | ||||
64880204 | 5 days ago | 0.02781877 POL | ||||
64865112 | 6 days ago | 0.03 POL | ||||
64865104 | 6 days ago | 0.01297962 POL | ||||
64865046 | 6 days ago | 0.02 POL | ||||
64865038 | 6 days ago | 0.01294792 POL | ||||
64846066 | 6 days ago | 265.41 POL | ||||
64846060 | 6 days ago | 0.01263136 POL | ||||
64833096 | 7 days ago | 5 POL | ||||
64833087 | 7 days ago | 0.01343485 POL | ||||
64809963 | 7 days ago | 0.1 POL | ||||
64809956 | 7 days ago | 0.0126296 POL | ||||
64809930 | 7 days ago | 0.11 POL | ||||
64809923 | 7 days ago | 0.0126296 POL | ||||
64809687 | 7 days ago | 1.1 POL |
Loading...
Loading
Contract Name:
Dice
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./Common.sol"; /** * @title Dice game, players predict if outcome will be over or under the selected number */ contract Dice is Common { using SafeERC20 for IERC20; constructor( address _bankroll, address _vrf, address link_eth_feed, address _forwarder ) { Bankroll = IBankRoll(_bankroll); IChainLinkVRF = IVRFCoordinatorV2(_vrf); LINK_ETH_FEED = AggregatorV3Interface(link_eth_feed); ChainLinkVRF = _vrf; _trustedForwarder = _forwarder; } struct DiceGame { uint256 wager; uint256 stopGain; uint256 stopLoss; uint256 requestID; address tokenAddress; uint64 blockNumber; uint32 numBets; uint32 multiplier; bool isOver; } mapping(address => DiceGame) diceGames; mapping(uint256 => address) diceIDs; /** * @dev event emitted at the start of the game * @param playerAddress address of the player that made the bet * @param wager wagered amount * @param multiplier selected multiplier for the wager range 10421-9900000, multiplier values divide by 10000 * @param tokenAddress address of token the wager was made, 0 address is considered the native coin * @param isOver if true dice outcome must be over the selected number, false must be under * @param numBets number of bets the player intends to make * @param stopGain gain value at which the betting stop if a gain is reached * @param stopLoss loss value at which the betting stop if a loss is reached */ event Dice_Play_Event( address indexed playerAddress, uint256 wager, uint32 multiplier, address tokenAddress, bool isOver, uint32 numBets, uint256 stopGain, uint256 stopLoss, uint256 VRFFee ); /** * @dev event emitted by the VRF callback with the bet results * @param playerAddress address of the player that made the bet * @param wager wager amount * @param payout total payout transfered to the player * @param tokenAddress address of token the wager was made and payout, 0 address is considered the native coin * @param diceOutcomes results of dice roll, range 0-9999 * @param payouts individual payouts for each bet * @param numGames number of games performed */ event Dice_Outcome_Event( address indexed playerAddress, uint256 wager, uint256 payout, address tokenAddress, uint32 multiplier, bool isOver, uint256[] diceOutcomes, uint256[] payouts, uint32 numGames ); /** * @dev event emitted when a refund is done in dice * @param player address of the player reciving the refund * @param wager amount of wager that was refunded * @param tokenAddress address of token the refund was made in */ event Dice_Refund_Event( address indexed player, uint256 wager, address tokenAddress ); error AwaitingVRF(uint256 requestID); error InvalidMultiplier(uint256 max, uint256 min, uint256 multiplier); error InvalidNumBets(uint256 maxNumBets); error WagerAboveLimit(uint256 wager, uint256 maxWager); error NotAwaitingVRF(); error BlockNumberTooLow(uint256 have, uint256 want); error OnlyCoordinatorCanFulfill(address have, address want); /** * @dev function to get current request player is await from VRF, returns 0 if none * @param player address of the player to get the state */ function Dice_GetState( address player ) external view returns (DiceGame memory) { return (diceGames[player]); } /** * @dev Function to play Dice, takes the user wager saves bet parameters and makes a request to the VRF * @param wager wager amount * @param tokenAddress address of token to bet, 0 address is considered the native coin * @param numBets number of bets to make, and amount of random numbers to request * @param stopGain treshold value at which the bets stop if a certain profit is obtained * @param stopLoss treshold value at which the bets stop if a certain loss is obtained * @param isOver if true dice outcome must be over the selected number, false must be under * @param multiplier selected multiplier for the wager range 10421-9900000, multiplier values divide by 10000 */ function Dice_Play( uint256 wager, uint32 multiplier, address tokenAddress, bool isOver, uint32 numBets, uint256 stopGain, uint256 stopLoss ) external payable nonReentrant { address msgSender = _msgSender(); if (!(multiplier >= 10421 && multiplier <= 9900000)) { revert InvalidMultiplier(9900000, 10421, multiplier); } if (diceGames[msgSender].requestID != 0) { revert AwaitingVRF(diceGames[msgSender].requestID); } if (!(numBets > 0 && numBets <= 100)) { revert InvalidNumBets(100); } _kellyWager(wager, tokenAddress, multiplier); uint256 fee = _transferWager( tokenAddress, wager * numBets, 1000000, msgSender ); uint256 id = _requestRandomWords(numBets); diceGames[msgSender] = DiceGame( wager, stopGain, stopLoss, id, tokenAddress, uint64(block.number), numBets, multiplier, isOver ); diceIDs[id] = msgSender; emit Dice_Play_Event( msgSender, wager, multiplier, tokenAddress, isOver, numBets, stopGain, stopLoss, fee ); } /** * @dev Function to refund user in case of VRF request failling */ function Dice_Refund() external nonReentrant { address msgSender = _msgSender(); DiceGame storage game = diceGames[msgSender]; if (game.requestID == 0) { revert NotAwaitingVRF(); } if (game.blockNumber + BLOCK_NUMBER_REFUND + 10 > block.number) { revert BlockNumberTooLow( block.number, game.blockNumber + BLOCK_NUMBER_REFUND + 10 ); } uint256 wager = game.wager * game.numBets; address tokenAddress = game.tokenAddress; delete (diceIDs[game.requestID]); delete (diceGames[msgSender]); if (tokenAddress == address(0)) { (bool success, ) = payable(msgSender).call{value: wager}(""); if (!success) { revert TransferFailed(); } } else { IERC20(tokenAddress).safeTransfer(msgSender, wager); } emit Dice_Refund_Event(msgSender, wager, tokenAddress); } /** * @dev function called by Chainlink VRF with random numbers * @param requestId id provided when the request was made * @param randomWords array of random numbers */ function rawFulfillRandomWords( uint256 requestId, uint256[] memory randomWords ) external { if (msg.sender != ChainLinkVRF) { revert OnlyCoordinatorCanFulfill(msg.sender, ChainLinkVRF); } fulfillRandomWords(requestId, randomWords); } function fulfillRandomWords( uint256 requestId, uint256[] memory randomWords ) internal { address playerAddress = diceIDs[requestId]; if (playerAddress == address(0)) revert(); DiceGame storage game = diceGames[playerAddress]; if (block.number > game.blockNumber + BLOCK_NUMBER_REFUND) revert(); int256 totalValue; uint256 payout; uint32 i; uint256[] memory diceOutcomes = new uint256[](game.numBets); uint256[] memory payouts = new uint256[](game.numBets); uint256 winChance = 99000000000 / game.multiplier; uint256 numberToRollOver = 10000000 - winChance; uint256 gamePayout = (game.multiplier * game.wager) / 10000; address tokenAddress = game.tokenAddress; for (i = 0; i < game.numBets; i++) { if (totalValue >= int256(game.stopGain)) { break; } if (totalValue <= -int256(game.stopLoss)) { break; } diceOutcomes[i] = randomWords[i] % 10000000; if (diceOutcomes[i] >= numberToRollOver && game.isOver == true) { totalValue += int256(gamePayout - game.wager); payout += gamePayout; payouts[i] = gamePayout; continue; } if (diceOutcomes[i] <= winChance && game.isOver == false) { totalValue += int256(gamePayout - game.wager); payout += gamePayout; payouts[i] = gamePayout; continue; } totalValue -= int256(game.wager); } payout += (game.numBets - i) * game.wager; emit Dice_Outcome_Event( playerAddress, game.wager, payout, tokenAddress, game.multiplier, game.isOver, diceOutcomes, payouts, i ); _transferToBankroll(tokenAddress, game.wager * game.numBets); delete (diceIDs[requestId]); delete (diceGames[playerAddress]); if (payout != 0) { _transferPayout(playerAddress, payout, tokenAddress); } } /** * @dev calculates the maximum wager allowed based on the bankroll size */ function _kellyWager( uint256 wager, address tokenAddress, uint256 multiplier ) internal view { uint256 balance; if (tokenAddress == address(0)) { balance = address(Bankroll).balance; } else { balance = IERC20(tokenAddress).balanceOf(address(Bankroll)); } uint256 maxWager = (balance * (11000 - 10890)) / (multiplier - 10000); if (wager > maxWager) { revert WagerAboveLimit(wager, maxWager); } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; //import "hardhat/console.sol"; interface IBankRoll { function getIsGame(address game) external view returns (bool); function getIsValidWager( address game, address tokenAddress ) external view returns (bool); function transferPayout( address player, uint256 payout, address token ) external; function getOwner() external view returns (address); function isPlayerSuspended( address player ) external view returns (bool, uint256); } interface IVRFCoordinatorV2 is VRFCoordinatorV2Interface { function getFeeConfig() external view returns ( uint32, uint32, uint32, uint32, uint32, uint24, uint24, uint24, uint24 ); } contract Common is ReentrancyGuard { using SafeERC20 for IERC20; uint256 public VRFFees; address public ChainLinkVRF; address public _trustedForwarder; uint64 constant BLOCK_NUMBER_REFUND = 1000; AggregatorV3Interface public LINK_ETH_FEED; IVRFCoordinatorV2 public IChainLinkVRF; IBankRoll public Bankroll; error NotApprovedBankroll(); error InvalidValue(uint256 required, uint256 sent); error TransferFailed(); error RefundFailed(); error NotOwner(address want, address have); error ZeroWager(); error PlayerSuspended(uint256 suspensionTime); /** * @dev function to transfer the player wager to bankroll, and charge for VRF fee * , reverts if bankroll doesn't approve game or token * @param tokenAddress address of the token the wager is made on * @param wager total amount wagered */ function _transferWager( address tokenAddress, uint256 wager, uint256 gasAmount, address msgSender ) internal returns (uint256 VRFfee) { if (!Bankroll.getIsValidWager(address(this), tokenAddress)) { revert NotApprovedBankroll(); } if (wager == 0) { revert ZeroWager(); } (bool suspended, uint256 suspendedTime) = Bankroll.isPlayerSuspended( msgSender ); if (suspended) { revert PlayerSuspended(suspendedTime); } VRFfee = getVRFFee(gasAmount); if (tokenAddress == address(0)) { if (msg.value < wager + VRFfee) { revert InvalidValue(wager + VRFfee, msg.value); } _refundExcessValue(msg.value - (VRFfee + wager)); } else { if (msg.value < VRFfee) { revert InvalidValue(VRFfee, msg.value); } IERC20(tokenAddress).safeTransferFrom( msgSender, address(this), wager ); _refundExcessValue(msg.value - VRFfee); } VRFFees += VRFfee; } /** * @dev function to transfer the wager held by the game contract to the bankroll * @param tokenAddress address of the token to transfer * @param amount token amount to transfer */ function _transferToBankroll( address tokenAddress, uint256 amount ) internal { if (tokenAddress == address(0)) { (bool success, ) = payable(address(Bankroll)).call{value: amount}( "" ); if (!success) { revert RefundFailed(); } } else { IERC20(tokenAddress).safeTransfer(address(Bankroll), amount); } } /** * @dev calculates in form of native token the fee charged by chainlink VRF * @return fee amount of fee user has to pay */ function getVRFFee(uint256 gasAmount) public view returns (uint256 fee) { (, int256 answer, , , ) = LINK_ETH_FEED.latestRoundData(); (uint32 fulfillmentFlatFeeLinkPPMTier1, , , , , , , , ) = IChainLinkVRF .getFeeConfig(); fee = tx.gasprice * (gasAmount) + ((1e12 * uint256(fulfillmentFlatFeeLinkPPMTier1) * uint256(answer)) / 1e18); } /** * @dev returns to user the excess fee sent to pay for the VRF * @param refund amount to send back to user */ function _refundExcessValue(uint256 refund) internal { if (refund == 0) { return; } (bool success, ) = payable(msg.sender).call{value: refund}(""); if (!success) { revert RefundFailed(); } } /** * @dev function to charge user for VRF */ function _payVRFFee(uint256 gasAmount) internal returns (uint256 VRFfee) { VRFfee = getVRFFee(gasAmount); if (msg.value < VRFfee) { revert InvalidValue(VRFfee, msg.value); } _refundExcessValue(msg.value - VRFfee); VRFFees += VRFfee; } /** * @dev function to transfer VRF fees acumulated in the contract to the Bankroll * Can only be called by owner */ function transferFees(address to) external nonReentrant { if (msg.sender != Bankroll.getOwner()) { revert NotOwner(Bankroll.getOwner(), msg.sender); } uint256 fee = VRFFees; VRFFees = 0; (bool success, ) = payable(address(to)).call{value: fee}(""); if (!success) { revert TransferFailed(); } } /** * @dev function to transfer wager to game contract, without charging for VRF * @param tokenAddress tokenAddress the wager is made on * @param wager wager amount */ function _transferWagerPvPNoVRF( address tokenAddress, uint256 wager ) internal { if (!Bankroll.getIsValidWager(address(this), tokenAddress)) { revert NotApprovedBankroll(); } if (tokenAddress == address(0)) { if (!(msg.value == wager)) { revert InvalidValue(wager, msg.value); } } else { IERC20(tokenAddress).safeTransferFrom( msg.sender, address(this), wager ); } } /** * @dev function to transfer wager to game contract, including charge for VRF * @param tokenAddress tokenAddress the wager is made on * @param wager wager amount */ function _transferWagerPvP( address tokenAddress, uint256 wager, uint256 gasAmount ) internal { if (!Bankroll.getIsValidWager(address(this), tokenAddress)) { revert NotApprovedBankroll(); } uint256 VRFfee = getVRFFee(gasAmount); if (tokenAddress == address(0)) { if (msg.value < wager + VRFfee) { revert InvalidValue(wager, msg.value); } _refundExcessValue(msg.value - (VRFfee + wager)); } else { if (msg.value < VRFfee) { revert InvalidValue(VRFfee, msg.value); } IERC20(tokenAddress).safeTransferFrom( msg.sender, address(this), wager ); _refundExcessValue(msg.value - VRFfee); } VRFFees += VRFfee; } /** * @dev transfers payout from the game contract to the players * @param player address of the player to transfer the payout to * @param payout amount of payout to transfer * @param tokenAddress address of the token that payout will be transfered */ function _transferPayoutPvP( address player, uint256 payout, address tokenAddress ) internal { if (tokenAddress == address(0)) { (bool success, ) = payable(player).call{value: payout}(""); if (!success) { revert TransferFailed(); } } else { IERC20(tokenAddress).safeTransfer(player, payout); } } /** * @dev transfers house edge from game contract to bankroll * @param amount amount to transfer * @param tokenAddress address of token to transfer */ function _transferHouseEdgePvP( uint256 amount, address tokenAddress ) internal { if (tokenAddress == address(0)) { (bool success, ) = payable(address(Bankroll)).call{value: amount}( "" ); if (!success) { revert TransferFailed(); } } else { IERC20(tokenAddress).safeTransfer(address(Bankroll), amount); } } /** * @dev function to request bankroll to give payout to player * @param player address of the player * @param payout amount of payout to give * @param tokenAddress address of the token in which to give the payout */ function _transferPayout( address player, uint256 payout, address tokenAddress ) internal { Bankroll.transferPayout(player, payout, tokenAddress); } /** * @dev function to send the request for randomness to chainlink * @param numWords number of random numbers required */ function _requestRandomWords( uint32 numWords ) internal returns (uint256 s_requestId) { s_requestId = VRFCoordinatorV2Interface(ChainLinkVRF) .requestRandomWords( 0xd729dc84e21ae57ffb6be0053bf2b0668aa2aaf300a2a7b2ddf7dc0bb6e875a8, 576, 3, 2500000, numWords ); } function isTrustedForwarder(address forwarder) public view returns (bool) { return forwarder == _trustedForwarder; } function _msgSender() internal view returns (address ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { // At this point we know that the sender is a trusted forwarder, // so we trust that the last bytes of msg.data are the verified sender address. // extract sender address from the end of msg.data assembly { ret := shr(96, calldataload(sub(calldatasize(), 20))) } } else { ret = msg.sender; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; /* * @notice Check to see if there exists a request commitment consumers * for all consumers and keyhashes for a given sub. * @param subId - ID of the subscription * @return true if there exists at least one unfulfilled request for the subscription, false * otherwise. */ function pendingRequestExists(uint64 subId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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 AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_bankroll","type":"address"},{"internalType":"address","name":"_vrf","type":"address"},{"internalType":"address","name":"link_eth_feed","type":"address"},{"internalType":"address","name":"_forwarder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"requestID","type":"uint256"}],"name":"AwaitingVRF","type":"error"},{"inputs":[{"internalType":"uint256","name":"have","type":"uint256"},{"internalType":"uint256","name":"want","type":"uint256"}],"name":"BlockNumberTooLow","type":"error"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"InvalidMultiplier","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxNumBets","type":"uint256"}],"name":"InvalidNumBets","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"sent","type":"uint256"}],"name":"InvalidValue","type":"error"},{"inputs":[],"name":"NotApprovedBankroll","type":"error"},{"inputs":[],"name":"NotAwaitingVRF","type":"error"},{"inputs":[{"internalType":"address","name":"want","type":"address"},{"internalType":"address","name":"have","type":"address"}],"name":"NotOwner","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[{"internalType":"uint256","name":"suspensionTime","type":"uint256"}],"name":"PlayerSuspended","type":"error"},{"inputs":[],"name":"RefundFailed","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint256","name":"maxWager","type":"uint256"}],"name":"WagerAboveLimit","type":"error"},{"inputs":[],"name":"ZeroWager","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"playerAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"wager","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"payout","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"},{"indexed":false,"internalType":"bool","name":"isOver","type":"bool"},{"indexed":false,"internalType":"uint256[]","name":"diceOutcomes","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"payouts","type":"uint256[]"},{"indexed":false,"internalType":"uint32","name":"numGames","type":"uint32"}],"name":"Dice_Outcome_Event","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"playerAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"wager","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"multiplier","type":"uint32"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"bool","name":"isOver","type":"bool"},{"indexed":false,"internalType":"uint32","name":"numBets","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"stopGain","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stopLoss","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"VRFFee","type":"uint256"}],"name":"Dice_Play_Event","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"wager","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"Dice_Refund_Event","type":"event"},{"inputs":[],"name":"Bankroll","outputs":[{"internalType":"contract IBankRoll","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ChainLinkVRF","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"Dice_GetState","outputs":[{"components":[{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint256","name":"stopGain","type":"uint256"},{"internalType":"uint256","name":"stopLoss","type":"uint256"},{"internalType":"uint256","name":"requestID","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint64","name":"blockNumber","type":"uint64"},{"internalType":"uint32","name":"numBets","type":"uint32"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"bool","name":"isOver","type":"bool"}],"internalType":"struct Dice.DiceGame","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"wager","type":"uint256"},{"internalType":"uint32","name":"multiplier","type":"uint32"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"bool","name":"isOver","type":"bool"},{"internalType":"uint32","name":"numBets","type":"uint32"},{"internalType":"uint256","name":"stopGain","type":"uint256"},{"internalType":"uint256","name":"stopLoss","type":"uint256"}],"name":"Dice_Play","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"Dice_Refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"IChainLinkVRF","outputs":[{"internalType":"contract IVRFCoordinatorV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LINK_ETH_FEED","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRFFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasAmount","type":"uint256"}],"name":"getVRFFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620024f2380380620024f28339810160408190526200003491620000b3565b6001600055600680546001600160a01b039586166001600160a01b031991821617909155600580549486169482168517905560048054938616938216939093179092556002805483169093179092556003805492909316911617905562000110565b80516001600160a01b0381168114620000ae57600080fd5b919050565b60008060008060808587031215620000ca57600080fd5b620000d58562000096565b9350620000e56020860162000096565b9250620000f56040860162000096565b9150620001056060860162000096565b905092959194509250565b6123d280620001206000396000f3fe6080604052600436106100d25760003560e01c806363dc4ef51161007f5780638d7c16d2116100595780638d7c16d214610329578063953995ea1461033f578063ad1783611461035f578063d0bcfc0c1461037f57600080fd5b806363dc4ef5146102c857806374af2e59146102e85780638bd16114146102fb57600080fd5b80634dd189d5116100b05780634dd189d51461023157806356c022bb14610269578063572b6c051461028957600080fd5b806308170595146100d75780631fe543e3146101fa57806324f50d661461021c575b600080fd5b3480156100e357600080fd5b506101e46100f2366004611c54565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810191909152506001600160a01b03908116600090815260076020908152604091829020825161012081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201549283166080820152600160a01b830467ffffffffffffffff1660a0820152600160e01b90920463ffffffff90811660c084015260059091015490811660e0830152640100000000900460ff16151561010082015290565b6040516101f19190611c78565b60405180910390f35b34801561020657600080fd5b5061021a610215366004611d21565b61039f565b005b34801561022857600080fd5b5061021a61040b565b34801561023d57600080fd5b50600554610251906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b34801561027557600080fd5b50600354610251906001600160a01b031681565b34801561029557600080fd5b506102b86102a4366004611c54565b6003546001600160a01b0391821691161490565b60405190151581526020016101f1565b3480156102d457600080fd5b5061021a6102e3366004611c54565b6106ad565b61021a6102f6366004611e0b565b61088a565b34801561030757600080fd5b5061031b610316366004611e85565b610c78565b6040519081526020016101f1565b34801561033557600080fd5b5061031b60015481565b34801561034b57600080fd5b50600254610251906001600160a01b031681565b34801561036b57600080fd5b50600454610251906001600160a01b031681565b34801561038b57600080fd5b50600654610251906001600160a01b031681565b6002546001600160a01b031633146103fd576002546040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b6104078282610dd9565b5050565b61041361127e565b600061041d6112d8565b6001600160a01b0381166000908152600760205260409020600381015491925090610474576040517f49050b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048101544390610499906103e890600160a01b900467ffffffffffffffff16611eb4565b6104a490600a611eb4565b67ffffffffffffffff16111561052957600481015443906104d9906103e890600160a01b900467ffffffffffffffff16611eb4565b6104e490600a611eb4565b6040517fb4ae675a000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff1660248201526044016103f4565b6004810154815460009161054b91600160e01b90910463ffffffff1690611ee0565b6004808401546003808601546000908152600860209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038a8116845260079092528220828155600181018390556002810183905592830182905593820155600501805464ffffffffff191690559192501680610644576000846001600160a01b03168360405160006040518083038185875af1925050503d8060008114610617576040519150601f19603f3d011682016040523d82523d6000602084013e61061c565b606091505b505090508061063e576040516312171d8360e31b815260040160405180910390fd5b50610658565b6106586001600160a01b038216858461130c565b604080518381526001600160a01b0383811660208301528616917fac278bd0c9dff1c7083bac39d01b59001e74bdff34e5c7e75b5362162090cf2a910160405180910390a2505050506106ab6001600055565b565b6106b561127e565b600660009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072c9190611eff565b6001600160a01b0316336001600160a01b0316146107ff57600660009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611eff565b6040517f23295f0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201523360248201526044016103f4565b600180546000918290556040519091906001600160a01b0384169083908381818185875af1925050503d8060008114610854576040519150601f19603f3d011682016040523d82523d6000602084013e610859565b606091505b505090508061087b576040516312171d8360e31b815260040160405180910390fd5b50506108876001600055565b50565b61089261127e565b600061089c6112d8565b90506128b58763ffffffff16101580156108bf575062970fe08763ffffffff1611155b61090e576040517f8fd7642e00000000000000000000000000000000000000000000000000000000815262970fe060048201526128b5602482015263ffffffff881660448201526064016103f4565b6001600160a01b03811660009081526007602052604090206003015415610982576001600160a01b038116600090815260076020526040908190206003015490517f440db96e00000000000000000000000000000000000000000000000000000000815260048101919091526024016103f4565b60008463ffffffff1611801561099f575060648463ffffffff1611155b6109d8576040517f93107491000000000000000000000000000000000000000000000000000000008152606460048201526024016103f4565b6109e988878963ffffffff166113ba565b6000610a09876109ff63ffffffff88168c611ee0565b620f4240856114d7565b90506000610a1686611781565b90506040518061012001604052808b8152602001868152602001858152602001828152602001896001600160a01b031681526020014367ffffffffffffffff1681526020018763ffffffff1681526020018a63ffffffff16815260200188151581525060076000856001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160040160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060c082015181600401601c6101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160050160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160050160046101000a81548160ff021916908315150217905550905050826008600083815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550826001600160a01b03167f555fcdfcc5ece7553c91cf1138f210c45b7c05f292e10ee45ecf36eae80511f98b8b8b8b8b8b8b8a604051610c5a98979695949392919097885263ffffffff96871660208901526001600160a01b0395909516604088015292151560608701529316608085015260a084019290925260c083019190915260e08201526101000190565b60405180910390a2505050610c6f6001600055565b50505050505050565b60048054604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905160009384936001600160a01b03169263feaf968c928183019260a0928290030181865afa158015610cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfe9190611f3b565b5050509150506000600560009054906101000a90046001600160a01b03166001600160a01b0316635fbbc0d26040518163ffffffff1660e01b815260040161012060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611f9e565b50505050505050509050670de0b6b3a7640000828263ffffffff1664e8d4a51000610da99190611ee0565b610db39190611ee0565b610dbd919061206a565b610dc7853a611ee0565b610dd1919061207e565b949350505050565b6000828152600860205260409020546001600160a01b031680610dfb57600080fd5b6001600160a01b03811660009081526007602052604090206004810154610e36906103e890600160a01b900467ffffffffffffffff16611eb4565b67ffffffffffffffff16431115610e4c57600080fd5b6004810154600090819081908190600160e01b900463ffffffff1667ffffffffffffffff811115610e7f57610e7f611d0b565b604051908082528060200260200182016040528015610ea8578160200160208202803683370190505b506004860154909150600090600160e01b900463ffffffff1667ffffffffffffffff811115610ed957610ed9611d0b565b604051908082528060200260200182016040528015610f02578160200160208202803683370190505b506005870154909150600090610f239063ffffffff1664170cdc1e00612096565b64ffffffffff1690506000610f3b82629896806120ba565b885460058a015491925060009161271091610f5b9163ffffffff16611ee0565b610f65919061206a565b60048a0154600097509091506001600160a01b03165b60048a015463ffffffff600160e01b909104811690881610156111145789600101548912610fa857611114565b8960020154610fb6906120d1565b8913610fc157611114565b629896808c8863ffffffff1681518110610fdd57610fdd6120ee565b6020026020010151610fef9190612104565b868863ffffffff1681518110611007576110076120ee565b60200260200101818152505082868863ffffffff168151811061102c5761102c6120ee565b602002602001015110158015611053575060058a0154640100000000900460ff1615156001145b156110a657895461106490836120ba565b61106e908a612118565b985061107a828961207e565b975081858863ffffffff1681518110611095576110956120ee565b602002602001018181525050611102565b83868863ffffffff16815181106110bf576110bf6120ee565b6020026020010151111580156110e2575060058a0154640100000000900460ff16155b156110f357895461106490836120ba565b89546110ff908a612170565b98505b8661110c816121c8565b975050610f7b565b895460048b0154611133908990600160e01b900463ffffffff166121ec565b63ffffffff166111439190611ee0565b61114d908961207e565b97508a6001600160a01b03167f2d1761407720ff80055e1b6c3ca11475592a4f19e2acf6128af5062e007fb1298b600001548a848e60050160009054906101000a900463ffffffff168f60050160049054906101000a900460ff168c8c8f6040516111bf98979695949392919061224c565b60405180910390a260048a01548a546111f09183916111eb91600160e01b900463ffffffff1690611ee0565b611853565b60008d8152600860209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038e168352600790915281208181556001810182905560028101829055600381018290556004810191909155600501805464ffffffffff19169055871561126f5761126f8b89836118ef565b50505050505050505050505050565b600260005414156112d15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103f4565b6002600055565b6000601436108015906112f557506003546001600160a01b031633145b15611307575060131936013560601c90565b503390565b6040516001600160a01b0383166024820152604481018290526113b59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611972565b505050565b60006001600160a01b0383166113dd57506006546001600160a01b031631611467565b6006546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152908416906370a0823190602401602060405180830381865afa158015611440573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146491906122bd565b90505b6000611475612710846120ba565b61148083606e611ee0565b61148a919061206a565b9050808511156114d0576040517fd53662aa00000000000000000000000000000000000000000000000000000000815260048101869052602481018290526044016103f4565b5050505050565b6006546040517fbfd7f9cc0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038681166024830152600092169063bfd7f9cc90604401602060405180830381865afa158015611541573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156591906122d6565b61159b576040517f51c3b94f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836115d2576040517f07375c8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040517f0a5748a80000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526000928392911690630a5748a8906024016040805180830381865afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c91906122f3565b91509150811561169b576040517f6c2775f5000000000000000000000000000000000000000000000000000000008152600481018290526024016103f4565b6116a485610c78565b92506001600160a01b038716611713576116be838761207e565b3410156116f2576116cf838761207e565b60405163de9b74a160e01b815260048101919091523460248201526044016103f4565b61170e6116ff878561207e565b61170990346120ba565b611a57565b61175f565b8234101561173d5760405163de9b74a160e01b8152600481018490523460248201526044016103f4565b6117526001600160a01b038816853089611ac8565b61175f61170984346120ba565b8260016000828254611771919061207e565b9091555092979650505050505050565b6002546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081527fd729dc84e21ae57ffb6be0053bf2b0668aa2aaf300a2a7b2ddf7dc0bb6e875a86004820152610240602482015260036044820152622625a0606482015263ffffffff831660848201526000916001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d91906122bd565b92915050565b6001600160a01b0382166118d5576006546040516000916001600160a01b03169083908381818185875af1925050503d80600081146118ae576040519150601f19603f3d011682016040523d82523d6000602084013e6118b3565b606091505b50509050806113b557604051633c31275160e21b815260040160405180910390fd5b600654610407906001600160a01b0384811691168361130c565b6006546040517f6c025ec20000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201859052838116604483015290911690636c025ec290606401600060405180830381600087803b15801561195e57600080fd5b505af1158015610c6f573d6000803e3d6000fd5b60006119c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b1f9092919063ffffffff16565b8051909150156113b557808060200190518101906119e591906122d6565b6113b55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103f4565b80611a5f5750565b604051600090339083908381818185875af1925050503d8060008114611aa1576040519150601f19603f3d011682016040523d82523d6000602084013e611aa6565b606091505b505090508061040757604051633c31275160e21b815260040160405180910390fd5b6040516001600160a01b0380851660248301528316604482015260648101829052611b199085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611351565b50505050565b6060610dd1848460008585600080866001600160a01b03168587604051611b46919061234d565b60006040518083038185875af1925050503d8060008114611b83576040519150601f19603f3d011682016040523d82523d6000602084013e611b88565b606091505b5091509150611b9987838387611ba4565b979650505050505050565b60608315611c10578251611c09576001600160a01b0385163b611c095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103f4565b5081610dd1565b610dd18383815115611c255781518083602001fd5b8060405162461bcd60e51b81526004016103f49190612369565b6001600160a01b038116811461088757600080fd5b600060208284031215611c6657600080fd5b8135611c7181611c3f565b9392505050565b600061012082019050825182526020830151602083015260408301516040830152606083015160608301526001600160a01b03608084015116608083015267ffffffffffffffff60a08401511660a083015260c0830151611ce160c084018263ffffffff169052565b5060e0830151611cf960e084018263ffffffff169052565b50610100928301511515919092015290565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611d3457600080fd5b8235915060208084013567ffffffffffffffff80821115611d5457600080fd5b818601915086601f830112611d6857600080fd5b813581811115611d7a57611d7a611d0b565b8060051b604051601f19603f83011681018181108582111715611d9f57611d9f611d0b565b604052918252848201925083810185019189831115611dbd57600080fd5b938501935b82851015611ddb57843584529385019392850192611dc2565b8096505050505050509250929050565b63ffffffff8116811461088757600080fd5b801515811461088757600080fd5b600080600080600080600060e0888a031215611e2657600080fd5b873596506020880135611e3881611deb565b95506040880135611e4881611c3f565b94506060880135611e5881611dfd565b93506080880135611e6881611deb565b9699959850939692959460a0840135945060c09093013592915050565b600060208284031215611e9757600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600067ffffffffffffffff808316818516808303821115611ed757611ed7611e9e565b01949350505050565b6000816000190483118215151615611efa57611efa611e9e565b500290565b600060208284031215611f1157600080fd5b8151611c7181611c3f565b805169ffffffffffffffffffff81168114611f3657600080fd5b919050565b600080600080600060a08688031215611f5357600080fd5b611f5c86611f1c565b9450602086015193506040860151925060608601519150611f7f60808701611f1c565b90509295509295909350565b805162ffffff81168114611f3657600080fd5b60008060008060008060008060006101208a8c031215611fbd57600080fd5b8951611fc881611deb565b60208b0151909950611fd981611deb565b60408b0151909850611fea81611deb565b60608b0151909750611ffb81611deb565b60808b015190965061200c81611deb565b945061201a60a08b01611f8b565b935061202860c08b01611f8b565b925061203660e08b01611f8b565b91506120456101008b01611f8b565b90509295985092959850929598565b634e487b7160e01b600052601260045260246000fd5b60008261207957612079612054565b500490565b6000821982111561209157612091611e9e565b500190565b600064ffffffffff808416806120ae576120ae612054565b92169190910492915050565b6000828210156120cc576120cc611e9e565b500390565b6000600160ff1b8214156120e7576120e7611e9e565b5060000390565b634e487b7160e01b600052603260045260246000fd5b60008261211357612113612054565b500690565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561215257612152611e9e565b82600160ff1b03841281161561216a5761216a611e9e565b50500190565b600080831283600160ff1b0183128115161561218e5761218e611e9e565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156121c2576121c2611e9e565b50500390565b600063ffffffff808316818114156121e2576121e2611e9e565b6001019392505050565b600063ffffffff8381169083168181101561220957612209611e9e565b039392505050565b600081518084526020808501945080840160005b8381101561224157815187529582019590820190600101612225565b509495945050505050565b60006101008a83528960208401526001600160a01b038916604084015263ffffffff808916606085015287151560808501528160a085015261229082850188612211565b915083820360c08501526122a48287612211565b925080851660e085015250509998505050505050505050565b6000602082840312156122cf57600080fd5b5051919050565b6000602082840312156122e857600080fd5b8151611c7181611dfd565b6000806040838503121561230657600080fd5b825161231181611dfd565b6020939093015192949293505050565b60005b8381101561233c578181015183820152602001612324565b83811115611b195750506000910152565b6000825161235f818460208701612321565b9190910192915050565b6020815260008251806020840152612388816040850160208701612321565b601f01601f1916919091016040019291505056fea2646970667358221220c7516276423676597481a6f5b6980c903a0243bb532c2d3a9380e42a8452f69964736f6c634300080b003300000000000000000000000051e99a0d09eeca8d7efec3062ac024b6d0989959000000000000000000000000ae975071be8f8ee67addbc1a82488f1c248580670000000000000000000000005787befdc0ecd210dfa948264631cd53e68f7802000000000000000000000000f73ab2d782bf6ba97ac4405d2cd4f1135da8dbd9
Deployed Bytecode
0x6080604052600436106100d25760003560e01c806363dc4ef51161007f5780638d7c16d2116100595780638d7c16d214610329578063953995ea1461033f578063ad1783611461035f578063d0bcfc0c1461037f57600080fd5b806363dc4ef5146102c857806374af2e59146102e85780638bd16114146102fb57600080fd5b80634dd189d5116100b05780634dd189d51461023157806356c022bb14610269578063572b6c051461028957600080fd5b806308170595146100d75780631fe543e3146101fa57806324f50d661461021c575b600080fd5b3480156100e357600080fd5b506101e46100f2366004611c54565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810191909152506001600160a01b03908116600090815260076020908152604091829020825161012081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201549283166080820152600160a01b830467ffffffffffffffff1660a0820152600160e01b90920463ffffffff90811660c084015260059091015490811660e0830152640100000000900460ff16151561010082015290565b6040516101f19190611c78565b60405180910390f35b34801561020657600080fd5b5061021a610215366004611d21565b61039f565b005b34801561022857600080fd5b5061021a61040b565b34801561023d57600080fd5b50600554610251906001600160a01b031681565b6040516001600160a01b0390911681526020016101f1565b34801561027557600080fd5b50600354610251906001600160a01b031681565b34801561029557600080fd5b506102b86102a4366004611c54565b6003546001600160a01b0391821691161490565b60405190151581526020016101f1565b3480156102d457600080fd5b5061021a6102e3366004611c54565b6106ad565b61021a6102f6366004611e0b565b61088a565b34801561030757600080fd5b5061031b610316366004611e85565b610c78565b6040519081526020016101f1565b34801561033557600080fd5b5061031b60015481565b34801561034b57600080fd5b50600254610251906001600160a01b031681565b34801561036b57600080fd5b50600454610251906001600160a01b031681565b34801561038b57600080fd5b50600654610251906001600160a01b031681565b6002546001600160a01b031633146103fd576002546040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911660248201526044015b60405180910390fd5b6104078282610dd9565b5050565b61041361127e565b600061041d6112d8565b6001600160a01b0381166000908152600760205260409020600381015491925090610474576040517f49050b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048101544390610499906103e890600160a01b900467ffffffffffffffff16611eb4565b6104a490600a611eb4565b67ffffffffffffffff16111561052957600481015443906104d9906103e890600160a01b900467ffffffffffffffff16611eb4565b6104e490600a611eb4565b6040517fb4ae675a000000000000000000000000000000000000000000000000000000008152600481019290925267ffffffffffffffff1660248201526044016103f4565b6004810154815460009161054b91600160e01b90910463ffffffff1690611ee0565b6004808401546003808601546000908152600860209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038a8116845260079092528220828155600181018390556002810183905592830182905593820155600501805464ffffffffff191690559192501680610644576000846001600160a01b03168360405160006040518083038185875af1925050503d8060008114610617576040519150601f19603f3d011682016040523d82523d6000602084013e61061c565b606091505b505090508061063e576040516312171d8360e31b815260040160405180910390fd5b50610658565b6106586001600160a01b038216858461130c565b604080518381526001600160a01b0383811660208301528616917fac278bd0c9dff1c7083bac39d01b59001e74bdff34e5c7e75b5362162090cf2a910160405180910390a2505050506106ab6001600055565b565b6106b561127e565b600660009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072c9190611eff565b6001600160a01b0316336001600160a01b0316146107ff57600660009054906101000a90046001600160a01b03166001600160a01b031663893d20e86040518163ffffffff1660e01b8152600401602060405180830381865afa158015610797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bb9190611eff565b6040517f23295f0e0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201523360248201526044016103f4565b600180546000918290556040519091906001600160a01b0384169083908381818185875af1925050503d8060008114610854576040519150601f19603f3d011682016040523d82523d6000602084013e610859565b606091505b505090508061087b576040516312171d8360e31b815260040160405180910390fd5b50506108876001600055565b50565b61089261127e565b600061089c6112d8565b90506128b58763ffffffff16101580156108bf575062970fe08763ffffffff1611155b61090e576040517f8fd7642e00000000000000000000000000000000000000000000000000000000815262970fe060048201526128b5602482015263ffffffff881660448201526064016103f4565b6001600160a01b03811660009081526007602052604090206003015415610982576001600160a01b038116600090815260076020526040908190206003015490517f440db96e00000000000000000000000000000000000000000000000000000000815260048101919091526024016103f4565b60008463ffffffff1611801561099f575060648463ffffffff1611155b6109d8576040517f93107491000000000000000000000000000000000000000000000000000000008152606460048201526024016103f4565b6109e988878963ffffffff166113ba565b6000610a09876109ff63ffffffff88168c611ee0565b620f4240856114d7565b90506000610a1686611781565b90506040518061012001604052808b8152602001868152602001858152602001828152602001896001600160a01b031681526020014367ffffffffffffffff1681526020018763ffffffff1681526020018a63ffffffff16815260200188151581525060076000856001600160a01b03166001600160a01b031681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a08201518160040160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060c082015181600401601c6101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160050160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160050160046101000a81548160ff021916908315150217905550905050826008600083815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550826001600160a01b03167f555fcdfcc5ece7553c91cf1138f210c45b7c05f292e10ee45ecf36eae80511f98b8b8b8b8b8b8b8a604051610c5a98979695949392919097885263ffffffff96871660208901526001600160a01b0395909516604088015292151560608701529316608085015260a084019290925260c083019190915260e08201526101000190565b60405180910390a2505050610c6f6001600055565b50505050505050565b60048054604080517ffeaf968c000000000000000000000000000000000000000000000000000000008152905160009384936001600160a01b03169263feaf968c928183019260a0928290030181865afa158015610cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfe9190611f3b565b5050509150506000600560009054906101000a90046001600160a01b03166001600160a01b0316635fbbc0d26040518163ffffffff1660e01b815260040161012060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611f9e565b50505050505050509050670de0b6b3a7640000828263ffffffff1664e8d4a51000610da99190611ee0565b610db39190611ee0565b610dbd919061206a565b610dc7853a611ee0565b610dd1919061207e565b949350505050565b6000828152600860205260409020546001600160a01b031680610dfb57600080fd5b6001600160a01b03811660009081526007602052604090206004810154610e36906103e890600160a01b900467ffffffffffffffff16611eb4565b67ffffffffffffffff16431115610e4c57600080fd5b6004810154600090819081908190600160e01b900463ffffffff1667ffffffffffffffff811115610e7f57610e7f611d0b565b604051908082528060200260200182016040528015610ea8578160200160208202803683370190505b506004860154909150600090600160e01b900463ffffffff1667ffffffffffffffff811115610ed957610ed9611d0b565b604051908082528060200260200182016040528015610f02578160200160208202803683370190505b506005870154909150600090610f239063ffffffff1664170cdc1e00612096565b64ffffffffff1690506000610f3b82629896806120ba565b885460058a015491925060009161271091610f5b9163ffffffff16611ee0565b610f65919061206a565b60048a0154600097509091506001600160a01b03165b60048a015463ffffffff600160e01b909104811690881610156111145789600101548912610fa857611114565b8960020154610fb6906120d1565b8913610fc157611114565b629896808c8863ffffffff1681518110610fdd57610fdd6120ee565b6020026020010151610fef9190612104565b868863ffffffff1681518110611007576110076120ee565b60200260200101818152505082868863ffffffff168151811061102c5761102c6120ee565b602002602001015110158015611053575060058a0154640100000000900460ff1615156001145b156110a657895461106490836120ba565b61106e908a612118565b985061107a828961207e565b975081858863ffffffff1681518110611095576110956120ee565b602002602001018181525050611102565b83868863ffffffff16815181106110bf576110bf6120ee565b6020026020010151111580156110e2575060058a0154640100000000900460ff16155b156110f357895461106490836120ba565b89546110ff908a612170565b98505b8661110c816121c8565b975050610f7b565b895460048b0154611133908990600160e01b900463ffffffff166121ec565b63ffffffff166111439190611ee0565b61114d908961207e565b97508a6001600160a01b03167f2d1761407720ff80055e1b6c3ca11475592a4f19e2acf6128af5062e007fb1298b600001548a848e60050160009054906101000a900463ffffffff168f60050160049054906101000a900460ff168c8c8f6040516111bf98979695949392919061224c565b60405180910390a260048a01548a546111f09183916111eb91600160e01b900463ffffffff1690611ee0565b611853565b60008d8152600860209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b038e168352600790915281208181556001810182905560028101829055600381018290556004810191909155600501805464ffffffffff19169055871561126f5761126f8b89836118ef565b50505050505050505050505050565b600260005414156112d15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103f4565b6002600055565b6000601436108015906112f557506003546001600160a01b031633145b15611307575060131936013560601c90565b503390565b6040516001600160a01b0383166024820152604481018290526113b59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611972565b505050565b60006001600160a01b0383166113dd57506006546001600160a01b031631611467565b6006546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152908416906370a0823190602401602060405180830381865afa158015611440573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146491906122bd565b90505b6000611475612710846120ba565b61148083606e611ee0565b61148a919061206a565b9050808511156114d0576040517fd53662aa00000000000000000000000000000000000000000000000000000000815260048101869052602481018290526044016103f4565b5050505050565b6006546040517fbfd7f9cc0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038681166024830152600092169063bfd7f9cc90604401602060405180830381865afa158015611541573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156591906122d6565b61159b576040517f51c3b94f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836115d2576040517f07375c8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006546040517f0a5748a80000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526000928392911690630a5748a8906024016040805180830381865afa158015611638573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165c91906122f3565b91509150811561169b576040517f6c2775f5000000000000000000000000000000000000000000000000000000008152600481018290526024016103f4565b6116a485610c78565b92506001600160a01b038716611713576116be838761207e565b3410156116f2576116cf838761207e565b60405163de9b74a160e01b815260048101919091523460248201526044016103f4565b61170e6116ff878561207e565b61170990346120ba565b611a57565b61175f565b8234101561173d5760405163de9b74a160e01b8152600481018490523460248201526044016103f4565b6117526001600160a01b038816853089611ac8565b61175f61170984346120ba565b8260016000828254611771919061207e565b9091555092979650505050505050565b6002546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081527fd729dc84e21ae57ffb6be0053bf2b0668aa2aaf300a2a7b2ddf7dc0bb6e875a86004820152610240602482015260036044820152622625a0606482015263ffffffff831660848201526000916001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d91906122bd565b92915050565b6001600160a01b0382166118d5576006546040516000916001600160a01b03169083908381818185875af1925050503d80600081146118ae576040519150601f19603f3d011682016040523d82523d6000602084013e6118b3565b606091505b50509050806113b557604051633c31275160e21b815260040160405180910390fd5b600654610407906001600160a01b0384811691168361130c565b6006546040517f6c025ec20000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201859052838116604483015290911690636c025ec290606401600060405180830381600087803b15801561195e57600080fd5b505af1158015610c6f573d6000803e3d6000fd5b60006119c7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b1f9092919063ffffffff16565b8051909150156113b557808060200190518101906119e591906122d6565b6113b55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103f4565b80611a5f5750565b604051600090339083908381818185875af1925050503d8060008114611aa1576040519150601f19603f3d011682016040523d82523d6000602084013e611aa6565b606091505b505090508061040757604051633c31275160e21b815260040160405180910390fd5b6040516001600160a01b0380851660248301528316604482015260648101829052611b199085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611351565b50505050565b6060610dd1848460008585600080866001600160a01b03168587604051611b46919061234d565b60006040518083038185875af1925050503d8060008114611b83576040519150601f19603f3d011682016040523d82523d6000602084013e611b88565b606091505b5091509150611b9987838387611ba4565b979650505050505050565b60608315611c10578251611c09576001600160a01b0385163b611c095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103f4565b5081610dd1565b610dd18383815115611c255781518083602001fd5b8060405162461bcd60e51b81526004016103f49190612369565b6001600160a01b038116811461088757600080fd5b600060208284031215611c6657600080fd5b8135611c7181611c3f565b9392505050565b600061012082019050825182526020830151602083015260408301516040830152606083015160608301526001600160a01b03608084015116608083015267ffffffffffffffff60a08401511660a083015260c0830151611ce160c084018263ffffffff169052565b5060e0830151611cf960e084018263ffffffff169052565b50610100928301511515919092015290565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611d3457600080fd5b8235915060208084013567ffffffffffffffff80821115611d5457600080fd5b818601915086601f830112611d6857600080fd5b813581811115611d7a57611d7a611d0b565b8060051b604051601f19603f83011681018181108582111715611d9f57611d9f611d0b565b604052918252848201925083810185019189831115611dbd57600080fd5b938501935b82851015611ddb57843584529385019392850192611dc2565b8096505050505050509250929050565b63ffffffff8116811461088757600080fd5b801515811461088757600080fd5b600080600080600080600060e0888a031215611e2657600080fd5b873596506020880135611e3881611deb565b95506040880135611e4881611c3f565b94506060880135611e5881611dfd565b93506080880135611e6881611deb565b9699959850939692959460a0840135945060c09093013592915050565b600060208284031215611e9757600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600067ffffffffffffffff808316818516808303821115611ed757611ed7611e9e565b01949350505050565b6000816000190483118215151615611efa57611efa611e9e565b500290565b600060208284031215611f1157600080fd5b8151611c7181611c3f565b805169ffffffffffffffffffff81168114611f3657600080fd5b919050565b600080600080600060a08688031215611f5357600080fd5b611f5c86611f1c565b9450602086015193506040860151925060608601519150611f7f60808701611f1c565b90509295509295909350565b805162ffffff81168114611f3657600080fd5b60008060008060008060008060006101208a8c031215611fbd57600080fd5b8951611fc881611deb565b60208b0151909950611fd981611deb565b60408b0151909850611fea81611deb565b60608b0151909750611ffb81611deb565b60808b015190965061200c81611deb565b945061201a60a08b01611f8b565b935061202860c08b01611f8b565b925061203660e08b01611f8b565b91506120456101008b01611f8b565b90509295985092959850929598565b634e487b7160e01b600052601260045260246000fd5b60008261207957612079612054565b500490565b6000821982111561209157612091611e9e565b500190565b600064ffffffffff808416806120ae576120ae612054565b92169190910492915050565b6000828210156120cc576120cc611e9e565b500390565b6000600160ff1b8214156120e7576120e7611e9e565b5060000390565b634e487b7160e01b600052603260045260246000fd5b60008261211357612113612054565b500690565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561215257612152611e9e565b82600160ff1b03841281161561216a5761216a611e9e565b50500190565b600080831283600160ff1b0183128115161561218e5761218e611e9e565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156121c2576121c2611e9e565b50500390565b600063ffffffff808316818114156121e2576121e2611e9e565b6001019392505050565b600063ffffffff8381169083168181101561220957612209611e9e565b039392505050565b600081518084526020808501945080840160005b8381101561224157815187529582019590820190600101612225565b509495945050505050565b60006101008a83528960208401526001600160a01b038916604084015263ffffffff808916606085015287151560808501528160a085015261229082850188612211565b915083820360c08501526122a48287612211565b925080851660e085015250509998505050505050505050565b6000602082840312156122cf57600080fd5b5051919050565b6000602082840312156122e857600080fd5b8151611c7181611dfd565b6000806040838503121561230657600080fd5b825161231181611dfd565b6020939093015192949293505050565b60005b8381101561233c578181015183820152602001612324565b83811115611b195750506000910152565b6000825161235f818460208701612321565b9190910192915050565b6020815260008251806020840152612388816040850160208701612321565b601f01601f1916919091016040019291505056fea2646970667358221220c7516276423676597481a6f5b6980c903a0243bb532c2d3a9380e42a8452f69964736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000051e99a0d09eeca8d7efec3062ac024b6d0989959000000000000000000000000ae975071be8f8ee67addbc1a82488f1c248580670000000000000000000000005787befdc0ecd210dfa948264631cd53e68f7802000000000000000000000000f73ab2d782bf6ba97ac4405d2cd4f1135da8dbd9
-----Decoded View---------------
Arg [0] : _bankroll (address): 0x51e99A0D09EeCa8d7EFEc3062AC024B6d0989959
Arg [1] : _vrf (address): 0xAE975071Be8F8eE67addBC1A82488F1C24858067
Arg [2] : link_eth_feed (address): 0x5787BefDc0ECd210Dfa948264631CD53E68F7802
Arg [3] : _forwarder (address): 0xF73ab2d782bf6BA97ac4405D2CD4F1135da8dbd9
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000051e99a0d09eeca8d7efec3062ac024b6d0989959
Arg [1] : 000000000000000000000000ae975071be8f8ee67addbc1a82488f1c24858067
Arg [2] : 0000000000000000000000005787befdc0ecd210dfa948264631cd53e68f7802
Arg [3] : 000000000000000000000000f73ab2d782bf6ba97ac4405d2cd4f1135da8dbd9
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.