Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 79 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Roll Dice | 15474734 | 805 days ago | IN | 0.0035 ETH | 0.00194483 | ||||
Roll Dice | 15474711 | 805 days ago | IN | 0.0035 ETH | 0.00250134 | ||||
Roll Dice | 15474704 | 805 days ago | IN | 0.0035 ETH | 0.00232032 | ||||
Roll Dice | 15474611 | 805 days ago | IN | 0.0035 ETH | 0.00221877 | ||||
Roll Dice | 15474575 | 805 days ago | IN | 0.0035 ETH | 0.00425964 | ||||
Roll Dice | 15474554 | 805 days ago | IN | 0.0035 ETH | 0.00250785 | ||||
Roll Dice | 15474537 | 805 days ago | IN | 0.0035 ETH | 0.00209534 | ||||
Roll Dice | 15474478 | 805 days ago | IN | 0.0035 ETH | 0.00418246 | ||||
Roll Dice | 15293586 | 834 days ago | IN | 0.0035 ETH | 0.00140174 | ||||
Roll Dice | 15257768 | 839 days ago | IN | 0.0035 ETH | 0.0069101 | ||||
Roll Dice | 15257741 | 839 days ago | IN | 0.0035 ETH | 0.00590971 | ||||
Roll Dice | 15257549 | 839 days ago | IN | 0.0035 ETH | 0.00486174 | ||||
Roll Dice | 15257524 | 839 days ago | IN | 0.0035 ETH | 0.00513982 | ||||
Roll Dice | 15257494 | 839 days ago | IN | 0.0035 ETH | 0.00514046 | ||||
Roll Dice | 15257472 | 839 days ago | IN | 0.0035 ETH | 0.00674824 | ||||
Roll Dice | 15257459 | 839 days ago | IN | 0.0035 ETH | 0.00926005 | ||||
Roll Dice | 15257453 | 839 days ago | IN | 0.0035 ETH | 0.00957606 | ||||
Roll Dice | 15257434 | 839 days ago | IN | 0.0035 ETH | 0.00954232 | ||||
Roll Dice | 15257369 | 839 days ago | IN | 0.0035 ETH | 0.00531499 | ||||
Roll Dice | 15257320 | 839 days ago | IN | 0.0035 ETH | 0.00323272 | ||||
Roll Dice | 15257285 | 839 days ago | IN | 0.0035 ETH | 0.0042293 | ||||
Roll Dice | 15257250 | 839 days ago | IN | 0.0035 ETH | 0.00437145 | ||||
Roll Dice | 15232871 | 843 days ago | IN | 0.0035 ETH | 0.01150641 | ||||
Roll Dice | 15232854 | 843 days ago | IN | 0.0035 ETH | 0.01271158 | ||||
Roll Dice | 15232785 | 843 days ago | IN | 0.0035 ETH | 0.01071571 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
15474734 | 805 days ago | 0.0035 ETH | ||||
15474711 | 805 days ago | 0.0035 ETH | ||||
15474704 | 805 days ago | 0.0035 ETH | ||||
15474611 | 805 days ago | 0.0035 ETH | ||||
15474575 | 805 days ago | 0.0035 ETH | ||||
15474554 | 805 days ago | 0.0035 ETH | ||||
15474537 | 805 days ago | 0.0035 ETH | ||||
15474478 | 805 days ago | 0.0035 ETH | ||||
15293586 | 834 days ago | 0.0035 ETH | ||||
15257768 | 839 days ago | 0.0035 ETH | ||||
15257741 | 839 days ago | 0.0035 ETH | ||||
15257549 | 839 days ago | 0.0035 ETH | ||||
15257524 | 839 days ago | 0.0035 ETH | ||||
15257494 | 839 days ago | 0.0035 ETH | ||||
15257472 | 839 days ago | 0.0035 ETH | ||||
15257459 | 839 days ago | 0.0035 ETH | ||||
15257453 | 839 days ago | 0.0035 ETH | ||||
15257434 | 839 days ago | 0.0035 ETH | ||||
15257369 | 839 days ago | 0.0035 ETH | ||||
15257320 | 839 days ago | 0.0035 ETH | ||||
15257285 | 839 days ago | 0.0035 ETH | ||||
15257250 | 839 days ago | 0.0035 ETH | ||||
15232871 | 843 days ago | 0.0035 ETH | ||||
15232854 | 843 days ago | 0.0035 ETH | ||||
15232785 | 843 days ago | 0.0035 ETH |
Loading...
Loading
Contract Name:
Dice
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol'; import '@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol'; import '@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol'; import './interfaces/ISmoltingInu.sol'; import './SmolGame.sol'; /** * @title Dice * @dev Chainlink VRF powered lottery for ERC-20 tokens */ contract Dice is SmolGame, VRFConsumerBaseV2 { uint256 private constant PERCENT_DENOMENATOR = 1000; ISmoltingInu smol = ISmoltingInu(0x2bf6267c4997548d8de56087E5d48bDCCb877E77); uint256 public diceMinBalancePerc = (PERCENT_DENOMENATOR * 35) / 100; // 35% user's balance uint256 public diceMinWagerAbsolute; uint256 public diceMaxWagerAbsolute; uint256 public payoutMultiple = PERCENT_DENOMENATOR * 5; uint256 public diceWon; uint256 public diceLost; uint256 public diceAmountWon; uint256 public diceAmountLost; mapping(address => uint256) public diceUserWon; mapping(address => uint256) public diceUserLost; mapping(address => uint256) public diceUserAmountWon; mapping(address => uint256) public diceUserAmountLost; mapping(address => bool) public lastRollDiceWon; mapping(uint8 => uint256) public sidesRolled; mapping(uint256 => address) private _rollDiceInit; mapping(address => uint256) private _rollDiceInitAmount; mapping(address => uint8) private _rollDiceInitSideSelected; VRFCoordinatorV2Interface vrfCoord; LinkTokenInterface link; uint64 private _vrfSubscriptionId; bytes32 private _vrfKeyHash; uint16 private _vrfNumBlocks = 3; uint32 private _vrfCallbackGasLimit = 600000; event RollDice( address indexed user, uint8 indexed sideSelected, uint256 amount ); event GetDiceResult( address indexed user, uint8 indexed sideSelected, bool indexed isWinner, uint256 amountWon ); constructor( address _vrfCoordinator, uint64 _subscriptionId, address _linkToken, bytes32 _keyHash ) VRFConsumerBaseV2(_vrfCoordinator) { vrfCoord = VRFCoordinatorV2Interface(_vrfCoordinator); link = LinkTokenInterface(_linkToken); _vrfSubscriptionId = _subscriptionId; _vrfKeyHash = _keyHash; } function rollDice(uint8 _sideSelected, uint256 _percent) external payable { require(_sideSelected > 0 && _sideSelected <= 6, 'invalid side selected'); require( _percent >= diceMinBalancePerc && _percent <= PERCENT_DENOMENATOR, 'must wager between half and your entire bag' ); uint256 _finalWagerAmount = (smol.balanceOf(msg.sender) * _percent) / PERCENT_DENOMENATOR; require( _finalWagerAmount >= diceMinWagerAbsolute, 'does not meet minimum amount requirements' ); require( diceMaxWagerAbsolute == 0 || _finalWagerAmount <= diceMaxWagerAbsolute, 'exceeded maximum amount requirements' ); require(_rollDiceInitAmount[msg.sender] == 0, 'already initiated'); smol.transferFrom(msg.sender, address(this), _finalWagerAmount); uint256 requestId = vrfCoord.requestRandomWords( _vrfKeyHash, _vrfSubscriptionId, _vrfNumBlocks, _vrfCallbackGasLimit, uint16(1) ); _rollDiceInit[requestId] = msg.sender; _rollDiceInitAmount[msg.sender] = _finalWagerAmount; _rollDiceInitSideSelected[msg.sender] = _sideSelected; _payServiceFee(); emit RollDice(msg.sender, _sideSelected, _finalWagerAmount); } function manualSettleRollDice(uint256 requestId, uint256[] memory randomWords) external onlyOwner { _settleRollDIce(requestId, randomWords[0]); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { _settleRollDIce(requestId, randomWords[0]); } function _settleRollDIce(uint256 requestId, uint256 randomNumber) internal { address _user = _rollDiceInit[requestId]; require(_user != address(0), 'coin flip record does not exist'); uint256 _amountWagered = _rollDiceInitAmount[_user]; uint256 _amountToWin = (_amountWagered * payoutMultiple) / PERCENT_DENOMENATOR; uint8 _sideSelected = _rollDiceInitSideSelected[_user]; // `X mod 6` returns 0-5, so need to subtract side selected by 1 to get real result bool _didUserWin = randomNumber % 6 == _sideSelected - 1; sidesRolled[uint8(randomNumber % 6) + 1]++; if (_didUserWin) { smol.transfer(_user, _amountWagered); smol.gameMint(_user, _amountToWin); diceWon++; diceAmountWon += _amountToWin; diceUserWon[_user]++; diceUserAmountWon[_user] += _amountToWin; lastRollDiceWon[_user] = true; } else { smol.gameBurn(address(this), _amountWagered); diceLost++; diceAmountLost += _amountWagered; diceUserLost[_user]++; diceUserAmountLost[_user] += _amountWagered; lastRollDiceWon[_user] = false; } // reset to allow wagering again _rollDiceInitAmount[_user] = 0; _rollDiceInitSideSelected[_user] = 0; emit GetDiceResult(_user, _sideSelected, _didUserWin, _amountToWin); } function getSmolToken() external view returns (address) { return address(smol); } function setPayoutMultiple(uint256 _multiple) external onlyOwner { require(_multiple > 0, 'must be more than 0'); payoutMultiple = _multiple; } function setSmolToken(address _token) external onlyOwner { smol = ISmoltingInu(_token); } function setDiceMinWagerAbsolute(uint256 _amount) external onlyOwner { diceMinWagerAbsolute = _amount; } function setDiceMaxWagerAbsolute(uint256 _amount) external onlyOwner { diceMaxWagerAbsolute = _amount; } function setVrfSubscriptionId(uint64 _subId) external onlyOwner { _vrfSubscriptionId = _subId; } function setVrfNumBlocks(uint16 _numBlocks) external onlyOwner { _vrfNumBlocks = _numBlocks; } function setVrfCallbackGasLimit(uint32 _gas) external onlyOwner { _vrfCallbackGasLimit = _gas; } }
// 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.0; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/interfaces/IERC20.sol'; /** * @dev SmoltingInu token interface */ interface ISmoltingInu is IERC20 { function decimals() external view returns (uint8); function gameMint(address _user, uint256 _amount) external; function gameBurn(address _user, uint256 _amount) external; }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/interfaces/IERC20.sol'; contract SmolGame is Ownable { address payable public treasury; uint256 public serviceFeeWei; function _payServiceFee() internal { if (serviceFeeWei > 0) { require(msg.value >= serviceFeeWei, 'not able to pay service fee'); address payable _treasury = treasury == address(0) ? payable(owner()) : treasury; (bool success, ) = _treasury.call{ value: serviceFeeWei }(''); require(success, 'could not pay service fee'); } } function setTreasury(address _treasury) external onlyOwner { treasury = payable(_treasury); } function setServiceFeeWei(uint256 _feeWei) external onlyOwner { serviceFeeWei = _feeWei; } function withdrawTokens(address _tokenAddy, uint256 _amount) external onlyOwner { IERC20 _token = IERC20(_tokenAddy); _amount = _amount > 0 ? _amount : _token.balanceOf(address(this)); require(_amount > 0, 'make sure there is a balance available to withdraw'); _token.transfer(owner(), _amount); } function withdrawETH(uint256 _amountWei) external onlyOwner { _amountWei = _amountWei == 0 ? address(this).balance : _amountWei; payable(owner()).call{ value: _amountWei }(''); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (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 `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); /** * @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 (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 (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; } }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 200 }, "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":"_vrfCoordinator","type":"address"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"},{"internalType":"address","name":"_linkToken","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint8","name":"sideSelected","type":"uint8"},{"indexed":true,"internalType":"bool","name":"isWinner","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amountWon","type":"uint256"}],"name":"GetDiceResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint8","name":"sideSelected","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RollDice","type":"event"},{"inputs":[],"name":"diceAmountLost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceAmountWon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceLost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceMaxWagerAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceMinBalancePerc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceMinWagerAbsolute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"diceUserAmountLost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"diceUserAmountWon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"diceUserLost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"diceUserWon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"diceWon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSmolToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastRollDiceWon","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"manualSettleRollDice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutMultiple","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":[{"internalType":"uint8","name":"_sideSelected","type":"uint8"},{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"rollDice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"serviceFeeWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setDiceMaxWagerAbsolute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setDiceMinWagerAbsolute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_multiple","type":"uint256"}],"name":"setPayoutMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeWei","type":"uint256"}],"name":"setServiceFeeWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setSmolToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_gas","type":"uint32"}],"name":"setVrfCallbackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_numBlocks","type":"uint16"}],"name":"setVrfNumBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_subId","type":"uint64"}],"name":"setVrfSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"sidesRolled","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 payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountWei","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddy","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052600380546001600160a01b031916732bf6267c4997548d8de56087e5d48bdccb877e7717905560646200003b6103e860236200015f565b6200004791906200018d565b600455620000596103e860056200015f565b6007556018805465ffffffffffff1916640927c000031790553480156200007f57600080fd5b5060405162001cef38038062001cef833981016040819052620000a291620001cd565b83620000ae336200010f565b6001600160a01b03908116608052601580549582166001600160a01b031990961695909517909455601680546001600160401b03909416600160a01b026001600160e01b03199094169290941691909117919091179091556017556200022d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008160001904831182151516156200018857634e487b7160e01b600052601160045260246000fd5b500290565b600082620001ab57634e487b7160e01b600052601260045260246000fd5b500490565b80516001600160a01b0381168114620001c857600080fd5b919050565b60008060008060808587031215620001e457600080fd5b620001ef85620001b0565b60208601519094506001600160401b03811681146200020d57600080fd5b92506200021d60408601620001b0565b6060959095015193969295505050565b608051611a9f620002506000396000818161086601526108a80152611a9f6000f3fe6080604052600436106101fd5760003560e01c806372e0c2461161010d578063c5c1f4e4116100a0578063f08103091161006f578063f0810309146105c3578063f0f44260146105e3578063f14210a614610603578063f2fde38b14610623578063f81ca2581461064357600080fd5b8063c5c1f4e414610557578063c6bfbf9c1461056d578063dc0cf39e14610583578063e06d05f11461059657600080fd5b80638da5cb5b116100dc5780638da5cb5b146104ed578063966019241461050b578063bba042f31461052b578063c0425f591461054157600080fd5b806372e0c2461461048157806380b79553146104a15780638156a18f146104b757806386f1ff4a146104d757600080fd5b806344164abd116101905780635b00cfcb1161015f5780635b00cfcb146103de57806361d027b3146103fe578063685d0e99146104365780636d8b71bd1461044c578063715018a61461046c57600080fd5b806344164abd1461035b578063482b3739146103715780635611b6bb146103915780635a405c87146103be57600080fd5b80632685d7a5116101cc5780632685d7a5146102ab5780632a312e17146102eb5780632d603f14146103185780633bf02ce31461034557600080fd5b806301b9512a1461020957806306b091f91461024957806312f2eb901461026b5780631fe543e31461028b57600080fd5b3661020457005b600080fd5b34801561021557600080fd5b50610236610224366004611717565b60116020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611750565b610661565b005b34801561027757600080fd5b5061026961028636600461177a565b61082c565b34801561029757600080fd5b506102696102a63660046117a9565b61085b565b3480156102b757600080fd5b506102db6102c6366004611873565b60106020526000908152604090205460ff1681565b6040519015158152602001610240565b3480156102f757600080fd5b50610236610306366004611873565b600f6020526000908152604090205481565b34801561032457600080fd5b50610236610333366004611873565b600d6020526000908152604090205481565b34801561035157600080fd5b5061023660025481565b34801561036757600080fd5b5061023660075481565b34801561037d57600080fd5b5061026961038c36600461177a565b6108e3565b34801561039d57600080fd5b506102366103ac366004611873565b600c6020526000908152604090205481565b3480156103ca57600080fd5b506102696103d936600461188e565b610958565b3480156103ea57600080fd5b506102696103f9366004611873565b6109a6565b34801561040a57600080fd5b5060015461041e906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b34801561044257600080fd5b5061023660095481565b34801561045857600080fd5b5061026961046736600461177a565b6109f2565b34801561047857600080fd5b50610269610a21565b34801561048d57600080fd5b5061026961049c36600461177a565b610a57565b3480156104ad57600080fd5b50610236600a5481565b3480156104c357600080fd5b506102696104d23660046117a9565b610a86565b3480156104e357600080fd5b5061023660055481565b3480156104f957600080fd5b506000546001600160a01b031661041e565b34801561051757600080fd5b506102696105263660046118b4565b610ad4565b34801561053757600080fd5b5061023660065481565b34801561054d57600080fd5b5061023660085481565b34801561056357600080fd5b50610236600b5481565b34801561057957600080fd5b5061023660045481565b6102696105913660046118d8565b610b16565b3480156105a257600080fd5b506102366105b1366004611873565b600e6020526000908152604090205481565b3480156105cf57600080fd5b506102696105de3660046118f4565b610f77565b3480156105ef57600080fd5b506102696105fe366004611873565b610fcf565b34801561060f57600080fd5b5061026961061e36600461177a565b61101b565b34801561062f57600080fd5b5061026961063e366004611873565b6110b1565b34801561064f57600080fd5b506003546001600160a01b031661041e565b6000546001600160a01b031633146106945760405162461bcd60e51b815260040161068b9061191e565b60405180910390fd5b8181610716576040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b1580156106d957600080fd5b505afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190611953565b610718565b815b9150600082116107855760405162461bcd60e51b815260206004820152603260248201527f6d616b65207375726520746865726520697320612062616c616e636520617661604482015271696c61626c6520746f20776974686472617760701b606482015260840161068b565b806001600160a01b031663a9059cbb6107a66000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b1580156107ee57600080fd5b505af1158015610802573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610826919061196c565b50505050565b6000546001600160a01b031633146108565760405162461bcd60e51b815260040161068b9061191e565b600655565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108d55760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602482015260440161068b565b6108df8282610ab0565b5050565b6000546001600160a01b0316331461090d5760405162461bcd60e51b815260040161068b9061191e565b600081116109535760405162461bcd60e51b815260206004820152601360248201527206d757374206265206d6f7265207468616e203606c1b604482015260640161068b565b600755565b6000546001600160a01b031633146109825760405162461bcd60e51b815260040161068b9061191e565b6018805463ffffffff909216620100000265ffffffff000019909216919091179055565b6000546001600160a01b031633146109d05760405162461bcd60e51b815260040161068b9061191e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a1c5760405162461bcd60e51b815260040161068b9061191e565b600555565b6000546001600160a01b03163314610a4b5760405162461bcd60e51b815260040161068b9061191e565b610a55600061114c565b565b6000546001600160a01b03163314610a815760405162461bcd60e51b815260040161068b9061191e565b600255565b6000546001600160a01b03163314610ab05760405162461bcd60e51b815260040161068b9061191e565b6108df8282600081518110610ac757610ac761198e565b602002602001015161119c565b6000546001600160a01b03163314610afe5760405162461bcd60e51b815260040161068b9061191e565b6018805461ffff191661ffff92909216919091179055565b60008260ff16118015610b2d575060068260ff1611155b610b715760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a59081cda5919481cd95b1958dd1959605a1b604482015260640161068b565b6004548110158015610b8557506103e88111155b610be55760405162461bcd60e51b815260206004820152602b60248201527f6d757374207761676572206265747765656e2068616c6620616e6420796f757260448201526a20656e746972652062616760a81b606482015260840161068b565b6003546040516370a0823160e01b81523360048201526000916103e89184916001600160a01b0316906370a082319060240160206040518083038186803b158015610c2f57600080fd5b505afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c679190611953565b610c7191906119ba565b610c7b91906119ef565b9050600554811015610ce15760405162461bcd60e51b815260206004820152602960248201527f646f6573206e6f74206d656574206d696e696d756d20616d6f756e7420726571604482015268756972656d656e747360b81b606482015260840161068b565b6006541580610cf257506006548111155b610d4a5760405162461bcd60e51b8152602060048201526024808201527f6578636565646564206d6178696d756d20616d6f756e7420726571756972656d604482015263656e747360e01b606482015260840161068b565b3360009081526013602052604090205415610d9b5760405162461bcd60e51b8152602060048201526011602482015270185b1c9958591e481a5b9a5d1a585d1959607a1b604482015260640161068b565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610ded57600080fd5b505af1158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e25919061196c565b506015546017546016546018546040516305d3b1d360e41b81526004810193909352600160a01b90910467ffffffffffffffff16602483015261ffff8116604483015262010000900463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee89190611953565b60008181526012602090815260408083208054336001600160a01b0319909116811790915583526013825280832086905560149091529020805460ff191660ff87161790559050610f376115ce565b60405182815260ff85169033907fa0ff4513f47de9119e0d85e52bc78ecc97a2c7a085e804b95f114448caa7eaa29060200160405180910390a350505050565b6000546001600160a01b03163314610fa15760405162461bcd60e51b815260040161068b9061191e565b6016805467ffffffffffffffff909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b6000546001600160a01b03163314610ff95760405162461bcd60e51b815260040161068b9061191e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110455760405162461bcd60e51b815260040161068b9061191e565b80156110515780611053565b475b90506110676000546001600160a01b031690565b6001600160a01b03168160405160006040518083038185875af1925050503d8060008114610826576040519150601f19603f3d011682016040523d82523d6000602084013e610826565b6000546001600160a01b031633146110db5760405162461bcd60e51b815260040161068b9061191e565b6001600160a01b0381166111405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161068b565b6111498161114c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152601260205260409020546001600160a01b0316806112015760405162461bcd60e51b815260206004820152601f60248201527f636f696e20666c6970207265636f726420646f6573206e6f7420657869737400604482015260640161068b565b6001600160a01b0381166000908152601360205260408120546007549091906103e89061122e90846119ba565b61123891906119ef565b6001600160a01b03841660009081526014602052604081205491925060ff90911690611265600183611a03565b60ff16611273600688611a26565b14905060116000611285600689611a26565b611290906001611a3a565b60ff168152602081019190915260400160009081208054916112b183611a5f565b919050555080156114545760035460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb90604401602060405180830381600087803b15801561130a57600080fd5b505af115801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061196c565b50600354604051634eb9029960e01b81526001600160a01b0387811660048301526024820186905290911690634eb9029990604401600060405180830381600087803b15801561139157600080fd5b505af11580156113a5573d6000803e3d6000fd5b5050600880549250905060006113ba83611a5f565b919050555082600a60008282546113d19190611a7a565b90915550506001600160a01b0385166000908152600c602052604081208054916113fa83611a5f565b90915550506001600160a01b0385166000908152600e602052604081208054859290611427908490611a7a565b90915550506001600160a01b0385166000908152601060205260409020805460ff1916600117905561155c565b60035460405163271292f560e01b8152306004820152602481018690526001600160a01b039091169063271292f590604401600060405180830381600087803b1580156114a057600080fd5b505af11580156114b4573d6000803e3d6000fd5b5050600980549250905060006114c983611a5f565b919050555083600b60008282546114e09190611a7a565b90915550506001600160a01b0385166000908152600d6020526040812080549161150983611a5f565b90915550506001600160a01b0385166000908152600f602052604081208054869290611536908490611a7a565b90915550506001600160a01b0385166000908152601060205260409020805460ff191690555b6001600160a01b03851660008181526013602090815260408083208390556014825291829020805460ff1916905590518581528315159260ff86169290917fa86ec170380729c69df6054a0de43b212a074b27d7f22036df6bbea0989aa3e7910160405180910390a450505050505050565b60025415610a55576002543410156116285760405162461bcd60e51b815260206004820152601b60248201527f6e6f742061626c6520746f207061792073657276696365206665650000000000604482015260640161068b565b6001546000906001600160a01b03161561164d576001546001600160a01b031661165a565b6000546001600160a01b03165b90506000816001600160a01b031660025460405160006040518083038185875af1925050503d80600081146116ab576040519150601f19603f3d011682016040523d82523d6000602084013e6116b0565b606091505b50509050806108df5760405162461bcd60e51b815260206004820152601960248201527f636f756c64206e6f742070617920736572766963652066656500000000000000604482015260640161068b565b803560ff8116811461171257600080fd5b919050565b60006020828403121561172957600080fd5b61173282611701565b9392505050565b80356001600160a01b038116811461171257600080fd5b6000806040838503121561176357600080fd5b61176c83611739565b946020939093013593505050565b60006020828403121561178c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156117bc57600080fd5b8235915060208084013567ffffffffffffffff808211156117dc57600080fd5b818601915086601f8301126117f057600080fd5b81358181111561180257611802611793565b8060051b604051601f19603f8301168101818110858211171561182757611827611793565b60405291825284820192508381018501918983111561184557600080fd5b938501935b828510156118635784358452938501939285019261184a565b8096505050505050509250929050565b60006020828403121561188557600080fd5b61173282611739565b6000602082840312156118a057600080fd5b813563ffffffff8116811461173257600080fd5b6000602082840312156118c657600080fd5b813561ffff8116811461173257600080fd5b600080604083850312156118eb57600080fd5b61176c83611701565b60006020828403121561190657600080fd5b813567ffffffffffffffff8116811461173257600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561196557600080fd5b5051919050565b60006020828403121561197e57600080fd5b8151801515811461173257600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156119d4576119d46119a4565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826119fe576119fe6119d9565b500490565b600060ff821660ff841680821015611a1d57611a1d6119a4565b90039392505050565b600082611a3557611a356119d9565b500690565b600060ff821660ff84168060ff03821115611a5757611a576119a4565b019392505050565b6000600019821415611a7357611a736119a4565b5060010190565b60008219821115611a8d57611a8d6119a4565b50019056fea164736f6c6343000809000a000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000000000000000000000000000000000000000000043000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Deployed Bytecode
0x6080604052600436106101fd5760003560e01c806372e0c2461161010d578063c5c1f4e4116100a0578063f08103091161006f578063f0810309146105c3578063f0f44260146105e3578063f14210a614610603578063f2fde38b14610623578063f81ca2581461064357600080fd5b8063c5c1f4e414610557578063c6bfbf9c1461056d578063dc0cf39e14610583578063e06d05f11461059657600080fd5b80638da5cb5b116100dc5780638da5cb5b146104ed578063966019241461050b578063bba042f31461052b578063c0425f591461054157600080fd5b806372e0c2461461048157806380b79553146104a15780638156a18f146104b757806386f1ff4a146104d757600080fd5b806344164abd116101905780635b00cfcb1161015f5780635b00cfcb146103de57806361d027b3146103fe578063685d0e99146104365780636d8b71bd1461044c578063715018a61461046c57600080fd5b806344164abd1461035b578063482b3739146103715780635611b6bb146103915780635a405c87146103be57600080fd5b80632685d7a5116101cc5780632685d7a5146102ab5780632a312e17146102eb5780632d603f14146103185780633bf02ce31461034557600080fd5b806301b9512a1461020957806306b091f91461024957806312f2eb901461026b5780631fe543e31461028b57600080fd5b3661020457005b600080fd5b34801561021557600080fd5b50610236610224366004611717565b60116020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611750565b610661565b005b34801561027757600080fd5b5061026961028636600461177a565b61082c565b34801561029757600080fd5b506102696102a63660046117a9565b61085b565b3480156102b757600080fd5b506102db6102c6366004611873565b60106020526000908152604090205460ff1681565b6040519015158152602001610240565b3480156102f757600080fd5b50610236610306366004611873565b600f6020526000908152604090205481565b34801561032457600080fd5b50610236610333366004611873565b600d6020526000908152604090205481565b34801561035157600080fd5b5061023660025481565b34801561036757600080fd5b5061023660075481565b34801561037d57600080fd5b5061026961038c36600461177a565b6108e3565b34801561039d57600080fd5b506102366103ac366004611873565b600c6020526000908152604090205481565b3480156103ca57600080fd5b506102696103d936600461188e565b610958565b3480156103ea57600080fd5b506102696103f9366004611873565b6109a6565b34801561040a57600080fd5b5060015461041e906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b34801561044257600080fd5b5061023660095481565b34801561045857600080fd5b5061026961046736600461177a565b6109f2565b34801561047857600080fd5b50610269610a21565b34801561048d57600080fd5b5061026961049c36600461177a565b610a57565b3480156104ad57600080fd5b50610236600a5481565b3480156104c357600080fd5b506102696104d23660046117a9565b610a86565b3480156104e357600080fd5b5061023660055481565b3480156104f957600080fd5b506000546001600160a01b031661041e565b34801561051757600080fd5b506102696105263660046118b4565b610ad4565b34801561053757600080fd5b5061023660065481565b34801561054d57600080fd5b5061023660085481565b34801561056357600080fd5b50610236600b5481565b34801561057957600080fd5b5061023660045481565b6102696105913660046118d8565b610b16565b3480156105a257600080fd5b506102366105b1366004611873565b600e6020526000908152604090205481565b3480156105cf57600080fd5b506102696105de3660046118f4565b610f77565b3480156105ef57600080fd5b506102696105fe366004611873565b610fcf565b34801561060f57600080fd5b5061026961061e36600461177a565b61101b565b34801561062f57600080fd5b5061026961063e366004611873565b6110b1565b34801561064f57600080fd5b506003546001600160a01b031661041e565b6000546001600160a01b031633146106945760405162461bcd60e51b815260040161068b9061191e565b60405180910390fd5b8181610716576040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b1580156106d957600080fd5b505afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107119190611953565b610718565b815b9150600082116107855760405162461bcd60e51b815260206004820152603260248201527f6d616b65207375726520746865726520697320612062616c616e636520617661604482015271696c61626c6520746f20776974686472617760701b606482015260840161068b565b806001600160a01b031663a9059cbb6107a66000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381600087803b1580156107ee57600080fd5b505af1158015610802573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610826919061196c565b50505050565b6000546001600160a01b031633146108565760405162461bcd60e51b815260040161068b9061191e565b600655565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146108d55760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916602482015260440161068b565b6108df8282610ab0565b5050565b6000546001600160a01b0316331461090d5760405162461bcd60e51b815260040161068b9061191e565b600081116109535760405162461bcd60e51b815260206004820152601360248201527206d757374206265206d6f7265207468616e203606c1b604482015260640161068b565b600755565b6000546001600160a01b031633146109825760405162461bcd60e51b815260040161068b9061191e565b6018805463ffffffff909216620100000265ffffffff000019909216919091179055565b6000546001600160a01b031633146109d05760405162461bcd60e51b815260040161068b9061191e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a1c5760405162461bcd60e51b815260040161068b9061191e565b600555565b6000546001600160a01b03163314610a4b5760405162461bcd60e51b815260040161068b9061191e565b610a55600061114c565b565b6000546001600160a01b03163314610a815760405162461bcd60e51b815260040161068b9061191e565b600255565b6000546001600160a01b03163314610ab05760405162461bcd60e51b815260040161068b9061191e565b6108df8282600081518110610ac757610ac761198e565b602002602001015161119c565b6000546001600160a01b03163314610afe5760405162461bcd60e51b815260040161068b9061191e565b6018805461ffff191661ffff92909216919091179055565b60008260ff16118015610b2d575060068260ff1611155b610b715760405162461bcd60e51b81526020600482015260156024820152741a5b9d985b1a59081cda5919481cd95b1958dd1959605a1b604482015260640161068b565b6004548110158015610b8557506103e88111155b610be55760405162461bcd60e51b815260206004820152602b60248201527f6d757374207761676572206265747765656e2068616c6620616e6420796f757260448201526a20656e746972652062616760a81b606482015260840161068b565b6003546040516370a0823160e01b81523360048201526000916103e89184916001600160a01b0316906370a082319060240160206040518083038186803b158015610c2f57600080fd5b505afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c679190611953565b610c7191906119ba565b610c7b91906119ef565b9050600554811015610ce15760405162461bcd60e51b815260206004820152602960248201527f646f6573206e6f74206d656574206d696e696d756d20616d6f756e7420726571604482015268756972656d656e747360b81b606482015260840161068b565b6006541580610cf257506006548111155b610d4a5760405162461bcd60e51b8152602060048201526024808201527f6578636565646564206d6178696d756d20616d6f756e7420726571756972656d604482015263656e747360e01b606482015260840161068b565b3360009081526013602052604090205415610d9b5760405162461bcd60e51b8152602060048201526011602482015270185b1c9958591e481a5b9a5d1a585d1959607a1b604482015260640161068b565b6003546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610ded57600080fd5b505af1158015610e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e25919061196c565b506015546017546016546018546040516305d3b1d360e41b81526004810193909352600160a01b90910467ffffffffffffffff16602483015261ffff8116604483015262010000900463ffffffff166064820152600160848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015610eb057600080fd5b505af1158015610ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee89190611953565b60008181526012602090815260408083208054336001600160a01b0319909116811790915583526013825280832086905560149091529020805460ff191660ff87161790559050610f376115ce565b60405182815260ff85169033907fa0ff4513f47de9119e0d85e52bc78ecc97a2c7a085e804b95f114448caa7eaa29060200160405180910390a350505050565b6000546001600160a01b03163314610fa15760405162461bcd60e51b815260040161068b9061191e565b6016805467ffffffffffffffff909216600160a01b0267ffffffffffffffff60a01b19909216919091179055565b6000546001600160a01b03163314610ff95760405162461bcd60e51b815260040161068b9061191e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146110455760405162461bcd60e51b815260040161068b9061191e565b80156110515780611053565b475b90506110676000546001600160a01b031690565b6001600160a01b03168160405160006040518083038185875af1925050503d8060008114610826576040519150601f19603f3d011682016040523d82523d6000602084013e610826565b6000546001600160a01b031633146110db5760405162461bcd60e51b815260040161068b9061191e565b6001600160a01b0381166111405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161068b565b6111498161114c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828152601260205260409020546001600160a01b0316806112015760405162461bcd60e51b815260206004820152601f60248201527f636f696e20666c6970207265636f726420646f6573206e6f7420657869737400604482015260640161068b565b6001600160a01b0381166000908152601360205260408120546007549091906103e89061122e90846119ba565b61123891906119ef565b6001600160a01b03841660009081526014602052604081205491925060ff90911690611265600183611a03565b60ff16611273600688611a26565b14905060116000611285600689611a26565b611290906001611a3a565b60ff168152602081019190915260400160009081208054916112b183611a5f565b919050555080156114545760035460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb90604401602060405180830381600087803b15801561130a57600080fd5b505af115801561131e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611342919061196c565b50600354604051634eb9029960e01b81526001600160a01b0387811660048301526024820186905290911690634eb9029990604401600060405180830381600087803b15801561139157600080fd5b505af11580156113a5573d6000803e3d6000fd5b5050600880549250905060006113ba83611a5f565b919050555082600a60008282546113d19190611a7a565b90915550506001600160a01b0385166000908152600c602052604081208054916113fa83611a5f565b90915550506001600160a01b0385166000908152600e602052604081208054859290611427908490611a7a565b90915550506001600160a01b0385166000908152601060205260409020805460ff1916600117905561155c565b60035460405163271292f560e01b8152306004820152602481018690526001600160a01b039091169063271292f590604401600060405180830381600087803b1580156114a057600080fd5b505af11580156114b4573d6000803e3d6000fd5b5050600980549250905060006114c983611a5f565b919050555083600b60008282546114e09190611a7a565b90915550506001600160a01b0385166000908152600d6020526040812080549161150983611a5f565b90915550506001600160a01b0385166000908152600f602052604081208054869290611536908490611a7a565b90915550506001600160a01b0385166000908152601060205260409020805460ff191690555b6001600160a01b03851660008181526013602090815260408083208390556014825291829020805460ff1916905590518581528315159260ff86169290917fa86ec170380729c69df6054a0de43b212a074b27d7f22036df6bbea0989aa3e7910160405180910390a450505050505050565b60025415610a55576002543410156116285760405162461bcd60e51b815260206004820152601b60248201527f6e6f742061626c6520746f207061792073657276696365206665650000000000604482015260640161068b565b6001546000906001600160a01b03161561164d576001546001600160a01b031661165a565b6000546001600160a01b03165b90506000816001600160a01b031660025460405160006040518083038185875af1925050503d80600081146116ab576040519150601f19603f3d011682016040523d82523d6000602084013e6116b0565b606091505b50509050806108df5760405162461bcd60e51b815260206004820152601960248201527f636f756c64206e6f742070617920736572766963652066656500000000000000604482015260640161068b565b803560ff8116811461171257600080fd5b919050565b60006020828403121561172957600080fd5b61173282611701565b9392505050565b80356001600160a01b038116811461171257600080fd5b6000806040838503121561176357600080fd5b61176c83611739565b946020939093013593505050565b60006020828403121561178c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156117bc57600080fd5b8235915060208084013567ffffffffffffffff808211156117dc57600080fd5b818601915086601f8301126117f057600080fd5b81358181111561180257611802611793565b8060051b604051601f19603f8301168101818110858211171561182757611827611793565b60405291825284820192508381018501918983111561184557600080fd5b938501935b828510156118635784358452938501939285019261184a565b8096505050505050509250929050565b60006020828403121561188557600080fd5b61173282611739565b6000602082840312156118a057600080fd5b813563ffffffff8116811461173257600080fd5b6000602082840312156118c657600080fd5b813561ffff8116811461173257600080fd5b600080604083850312156118eb57600080fd5b61176c83611701565b60006020828403121561190657600080fd5b813567ffffffffffffffff8116811461173257600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561196557600080fd5b5051919050565b60006020828403121561197e57600080fd5b8151801515811461173257600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156119d4576119d46119a4565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826119fe576119fe6119d9565b500490565b600060ff821660ff841680821015611a1d57611a1d6119a4565b90039392505050565b600082611a3557611a356119d9565b500690565b600060ff821660ff84168060ff03821115611a5757611a576119a4565b019392505050565b6000600019821415611a7357611a736119a4565b5060010190565b60008219821115611a8d57611a8d6119a4565b50019056fea164736f6c6343000809000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000000000000000000000000000000000000000000043000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
-----Decoded View---------------
Arg [0] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [1] : _subscriptionId (uint64): 67
Arg [2] : _linkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [3] : _keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [2] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [3] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
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.