Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 65 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 15985397 | 716 days ago | IN | 0 ETH | 0.00064922 | ||||
Star Raffle | 15685364 | 758 days ago | IN | 0 ETH | 0.06460781 | ||||
Pick Winner | 15684978 | 758 days ago | IN | 0 ETH | 0.00316413 | ||||
Buy Tickets | 15684880 | 758 days ago | IN | 0 ETH | 0.08555963 | ||||
Buy Tickets | 15684876 | 758 days ago | IN | 0 ETH | 0.08884564 | ||||
Buy Tickets | 15684872 | 758 days ago | IN | 0 ETH | 0.07463316 | ||||
Buy Tickets | 15684870 | 758 days ago | IN | 0 ETH | 0.04144892 | ||||
Buy Tickets | 15684605 | 759 days ago | IN | 0 ETH | 0.00531392 | ||||
Reward Tickets | 15684098 | 759 days ago | IN | 0 ETH | 0.00066258 | ||||
Seteth Raffle Ma... | 15683962 | 759 days ago | IN | 0 ETH | 0.00039651 | ||||
Seteth Raffle Ma... | 15683961 | 759 days ago | IN | 0 ETH | 0.00038124 | ||||
Seteth Raffle Ma... | 15683924 | 759 days ago | IN | 0 ETH | 0.00053805 | ||||
Buy Tickets | 15683902 | 759 days ago | IN | 0 ETH | 0.06368118 | ||||
Buy Tickets | 15679944 | 759 days ago | IN | 0 ETH | 0.00594045 | ||||
Seteth Raffle Ma... | 15677871 | 759 days ago | IN | 0 ETH | 0.00032739 | ||||
Reward Tickets | 15677638 | 759 days ago | IN | 0 ETH | 0.00165133 | ||||
Reward Tickets | 15677591 | 759 days ago | IN | 0 ETH | 0.00185597 | ||||
Reward Tickets | 15677578 | 759 days ago | IN | 0 ETH | 0.00128576 | ||||
Reward Tickets | 15676710 | 760 days ago | IN | 0 ETH | 0.0028948 | ||||
Reward Tickets | 15676165 | 760 days ago | IN | 0 ETH | 0.00256972 | ||||
Reward Tickets | 15675251 | 760 days ago | IN | 0 ETH | 0.00204164 | ||||
Buy Tickets | 15673430 | 760 days ago | IN | 0 ETH | 0.01275839 | ||||
Buy Tickets | 15672925 | 760 days ago | IN | 0 ETH | 0.03266942 | ||||
Buy Tickets | 15672236 | 760 days ago | IN | 0 ETH | 0.00983752 | ||||
Buy Tickets | 15672079 | 760 days ago | IN | 0 ETH | 0.02445002 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
15985397 | 716 days ago | 25.17437055 ETH | ||||
15829820 | 738 days ago | 0.02771112 ETH | ||||
15787951 | 744 days ago | 0.03731848 ETH | ||||
15741701 | 751 days ago | 0.05460074 ETH | ||||
15718475 | 754 days ago | 0.04917309 ETH | ||||
15718471 | 754 days ago | 0.02537981 ETH | ||||
15706944 | 755 days ago | 0.06107638 ETH | ||||
15702205 | 756 days ago | 0.07467865 ETH | ||||
15696512 | 757 days ago | 0.03785423 ETH | ||||
15695862 | 757 days ago | 0.03785423 ETH | ||||
15693945 | 757 days ago | 0.05053435 ETH | ||||
15693809 | 757 days ago | 0.03313133 ETH | ||||
15693807 | 757 days ago | 0.06090645 ETH | ||||
15692714 | 757 days ago | 0.04770119 ETH | ||||
15691967 | 757 days ago | 0.04734302 ETH | ||||
15691937 | 757 days ago | 0.06472591 ETH | ||||
15691934 | 757 days ago | 0.06472591 ETH | ||||
15691910 | 757 days ago | 0.04986661 ETH | ||||
15691907 | 757 days ago | 0.04986661 ETH | ||||
15691877 | 757 days ago | 0.04242403 ETH | ||||
15691838 | 757 days ago | 0.03996962 ETH | ||||
15691368 | 758 days ago | 0.03946821 ETH | ||||
15691294 | 758 days ago | 0.04008153 ETH | ||||
15691289 | 758 days ago | 0.04008153 ETH | ||||
15691251 | 758 days ago | 0.07174251 ETH |
Loading...
Loading
Contract Name:
RocketRaffle
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity >=0.8.10 >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; //Rocket Raffle Contract contract RocketRaffle is VRFConsumerBaseV2, Ownable { using SafeMath for uint256; VRFCoordinatorV2Interface COORDINATOR; //VRF values uint64 s_subscriptionId; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint32 callbackGasLimit = 1000000; uint16 requestConfirmations = 3; uint32 numWords = 1; uint256 public s_requestId; //Game Values enum RAFFLE_STATE { OPEN, CLOSED, CALCULATING_WINNER } RAFFLE_STATE public raffle_state; address payable[] public players; uint256 public raffleId; uint public raffleStartDate; uint public raffleEndDate; uint256 ticketCostRKTN = 10_000 * 1e18; uint256 ticketCostRKFL = 100_000 * 1e18; uint256 MaxRaffleAmount = 5 *1e18; //Player info struct player{ uint256 ticketsBought; uint256 gamesWon; } mapping(address => player) public playerStats; //events event RaffleOpen(uint256 _raffleId); event RaffleClose(uint256 _raffleId); event RaffleWinner( uint256 _raffleId, uint256 _randomness, uint256 _index, address indexed _from, uint256 _amount ); event PlayerJoined(uint256 _raffleId, address indexed _from); event TicketsRewarded(address _address, uint256 _amountRewarded); //Rocket Token and Rocket Fuel IUniswapV2Router02 public immutable uniswapV2Router; IERC20 rocketToken; IERC20 rocketFuel; //modifier to check state of game modifier atState(RAFFLE_STATE _state) { require(raffle_state == _state, "Function cannot be called at this time."); _; } //constructor constructor(uint64 subscriptionId, address _rocketToken, address _rocketFuel) VRFConsumerBaseV2(vrfCoordinator) { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); s_subscriptionId = subscriptionId; raffleId = 1; raffle_state = RAFFLE_STATE.CLOSED; rocketToken = IERC20(_rocketToken); rocketFuel = IERC20(_rocketFuel); } receive() external payable {} function setethRaffleMaxWin(uint256 _eth) public onlyOwner{ require(_eth*1e18 > 1 *1e18, "max winner must be bigger than 1 eth"); MaxRaffleAmount = _eth *1e18; } function setethRaffleTicketPriceRKTN(uint256 ticketPrice) public onlyOwner{ uint256 totalSuypply = rocketToken.totalSupply(); require(ticketPrice < ( totalSuypply* 5) / 1000, "Set a reasonable price ticket cost has to be lower then .5%"); ticketCostRKTN = ticketPrice; } function setethRaffleTicketPriceRKFL(uint256 ticketPrice) public onlyOwner{ uint256 totalSuypply = rocketFuel.totalSupply(); require(ticketPrice < ( totalSuypply* 5) / 1000, "Set a reasonable price ticket cost has to be lower then .5%"); ticketCostRKFL = ticketPrice; } function starRaffle() public onlyOwner { require(raffle_state == RAFFLE_STATE.CLOSED, "can't start a new raffle yet"); players = new address payable[](0); raffleStartDate = block.timestamp; raffle_state = RAFFLE_STATE.OPEN; emit RaffleOpen(raffleId); } function getAmountOfTicketsOwned(address _address) public view returns(uint256 amountOfTickets){ uint256 amount = players.length; uint256 tickets = 0; for (uint i=0; i < amount; i++) { if(players[i] == _address){ tickets += 1; } } return tickets; } function getTotalTicketsPurchased() public view returns(uint256 amountOfTickets){ uint256 amount = players.length; return amount; } function getWinnings() public view returns(uint256 winnings){ uint256 contractBalance = address(this).balance; if(contractBalance < MaxRaffleAmount){ return (contractBalance / 2); } else { return MaxRaffleAmount; } } //calls chainlink vrf to select winner of raffle function PickWinner() public onlyOwner { require(raffle_state == RAFFLE_STATE.OPEN); raffle_state = RAFFLE_STATE.CALCULATING_WINNER; requestRandomWords(); } //for upgrading raffle contract or emergency function Withdraw() public onlyOwner{ bool success; (success, ) = address(msg.sender).call{value: address(this).balance}(""); } //reward up to 10 raffle tickets function rewardTickets(address _address, uint256 _amount) public onlyOwner { require(_amount <= 10, "cannot rewrd more than 10 tickets"); for (uint i=1; i <= _amount; i++) { players.push(payable(_address)); playerStats[_address].ticketsBought +=1; } emit TicketsRewarded(_address, _amount); } //buy raffle tickets function buyTickets(uint256 numberOfTickets, uint256 _token) public payable atState(RAFFLE_STATE.OPEN) { require(_token == 0 || _token == 1, "invalid token selection"); if(_token == 0){ uint256 balance = rocketToken.balanceOf(msg.sender); uint256 amount = ticketCostRKTN * numberOfTickets; require(balance >= amount, "You must pay the proper amount for ticket"); uint256 allowance = rocketToken.allowance(msg.sender, address(this)); require(allowance >= amount, "Check token allowance"); rocketToken.transferFrom(msg.sender, address(0xdead), amount); } else if(_token == 1){ uint256 balance = rocketFuel.balanceOf(msg.sender); uint256 amount = ticketCostRKFL * numberOfTickets; require(balance >= amount, "You must pay the proper amount for ticket"); uint256 allowance = rocketFuel.allowance(msg.sender, address(this)); require(allowance >= amount, "Check token allowance"); rocketFuel.transferFrom(msg.sender, address(0xdead), amount); } //add player and set info for (uint i=1; i <= numberOfTickets; i++) { players.push(payable(msg.sender)); playerStats[msg.sender].ticketsBought +=1; } emit PlayerJoined(raffleId, msg.sender); } //buy back RKTN with 10% of raffle winnings function swapEthForTokens(address token, uint256 ethAmount) private { // generate the uniswap pair path of weth -> token address[] memory path = new address[](2); path[0] = uniswapV2Router.WETH(); path[1] = token; // make the swap uniswapV2Router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: ethAmount}( 0, path, address(this), block.timestamp ); } function BuyBack() private{ uint256 amount = getWinnings() * 10 / 100; swapEthForTokens(address(rocketToken), amount / 2); uint256 rocketTokenBalance = rocketToken.balanceOf(address(this)); rocketToken.transfer(address(0xdead), rocketTokenBalance); } //gets random number function requestRandomWords() private { // Will revert if subscription is not set and funded. s_requestId = COORDINATOR.requestRandomWords( keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords ); } //pays winner closes game and does buyback function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) internal override { //pick winner uint256 index = randomWords[0] % players.length; uint256 winnings = getWinnings() * 90 / 100; BuyBack(); address winner = players[index]; //pay winner bool success; (success, ) = address(winner).call{value: winnings}(""); raffle_state = RAFFLE_STATE.CLOSED; emit RaffleWinner(raffleId, randomWords[0], index, winner, winnings); emit RaffleClose(raffleId); raffleId = raffleId + 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// 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 (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: 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 v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// 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; } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
{ "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":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"_rocketToken","type":"address"},{"internalType":"address","name":"_rocketFuel","type":"address"}],"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_raffleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_from","type":"address"}],"name":"PlayerJoined","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"RaffleClose","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_raffleId","type":"uint256"}],"name":"RaffleOpen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_raffleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_randomness","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_index","type":"uint256"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RaffleWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountRewarded","type":"uint256"}],"name":"TicketsRewarded","type":"event"},{"inputs":[],"name":"PickWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTickets","type":"uint256"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"buyTickets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAmountOfTicketsOwned","outputs":[{"internalType":"uint256","name":"amountOfTickets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTicketsPurchased","outputs":[{"internalType":"uint256","name":"amountOfTickets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWinnings","outputs":[{"internalType":"uint256","name":"winnings","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"playerStats","outputs":[{"internalType":"uint256","name":"ticketsBought","type":"uint256"},{"internalType":"uint256","name":"gamesWon","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"players","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleEndDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleStartDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffle_state","outputs":[{"internalType":"enum RocketRaffle.RAFFLE_STATE","name":"","type":"uint8"}],"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":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rewardTickets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eth","type":"uint256"}],"name":"setethRaffleMaxWin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ticketPrice","type":"uint256"}],"name":"setethRaffleTicketPriceRKFL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ticketPrice","type":"uint256"}],"name":"setethRaffleTicketPriceRKTN","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"starRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c0604052600280546001600160a01b03191673271682deb8c4e0901d1a1550ad2e64d568e699091790557f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef6003556004805466010003000f42406001600160501b031990911617905569021e19e0c9bab2400000600b5569152d02c7e14af6800000600c55674563918244f40000600d553480156200009e57600080fd5b506040516200212338038062002123833981016040819052620000c191620001df565b6002546001600160a01b0316608052620000db3362000172565b737a250d5630b4cf539739df2c5dacb4c659f2488d60a0819052600254600180546001600160a01b039092166001600160e01b031990921691909117600160a01b6001600160401b0387160217815560088190556006805460ff19168280021790555050600f80546001600160a01b039384166001600160a01b031991821617909155601080549290931691161790555062000236565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001da57600080fd5b919050565b600080600060608486031215620001f557600080fd5b83516001600160401b03811681146200020d57600080fd5b92506200021d60208501620001c2565b91506200022d60408501620001c2565b90509250925092565b60805160a051611eb262000271600039600081816101c3015281816119480152611a4d0152600081816105d3015261062e0152611eb26000f3fe6080604052600436106101835760003560e01c8063ae81cb30116100d6578063cdafbbb61161007f578063f06fc0a011610059578063f06fc0a014610412578063f2fde38b14610427578063f71d96cb1461044757600080fd5b8063cdafbbb614610393578063e87a6637146103dc578063e89e106a146103fc57600080fd5b8063b7d2c654116100b0578063b7d2c65414610348578063c1b119921461035d578063ccee2cec1461037357600080fd5b8063ae81cb30146102f2578063ae98345d14610312578063b375603c1461033257600080fd5b806370b7596b11610138578063848b0f5f11610112578063848b0f5f1461029a5780638627df46146102c15780638da5cb5b146102d457600080fd5b806370b7596b1461024c578063715018a61461026f57806382d1ae7c1461028457600080fd5b80631fe543e3116101695780631fe543e31461020257806324e62fad1461022257806357ea89b61461023757600080fd5b806272846c1461018f5780631694505e146101b157600080fd5b3661018a57005b600080fd5b34801561019b57600080fd5b506101af6101aa366004611b42565b610467565b005b3480156101bd57600080fd5b506101e57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561020e57600080fd5b506101af61021d366004611b71565b6105c8565b34801561022e57600080fd5b506101af610669565b34801561024357600080fd5b506101af61078d565b34801561025857600080fd5b50610261610834565b6040519081526020016101f9565b34801561027b57600080fd5b506101af610860565b34801561029057600080fd5b50610261600a5481565b3480156102a657600080fd5b506006546102b49060ff1681565b6040516101f99190611c51565b6101af6102cf366004611c79565b6108c6565b3480156102e057600080fd5b506000546001600160a01b03166101e5565b3480156102fe57600080fd5b506101af61030d366004611cb0565b610ee0565b34801561031e57600080fd5b506101af61032d366004611b42565b61108f565b34801561033e57600080fd5b5061026160085481565b34801561035457600080fd5b506101af6111eb565b34801561036957600080fd5b5061026160095481565b34801561037f57600080fd5b5061026161038e366004611cdc565b61127d565b34801561039f57600080fd5b506103c76103ae366004611cdc565b600e602052600090815260409020805460019091015482565b604080519283526020830191909152016101f9565b3480156103e857600080fd5b506101af6103f7366004611b42565b6112ed565b34801561040857600080fd5b5061026160055481565b34801561041e57600080fd5b50600754610261565b34801561043357600080fd5b506101af610442366004611cdc565b6113e4565b34801561045357600080fd5b506101e5610462366004611b42565b6114c6565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610510573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105349190611d00565b90506103e8610544826005611d2f565b61054e9190611d64565b82106105c25760405162461bcd60e51b815260206004820152603b60248201527f536574206120726561736f6e61626c65207072696365207469636b657420636f60448201527f73742068617320746f206265206c6f776572207468656e202e3525000000000060648201526084016104bd565b50600c55565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461065b576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044016104bd565b61066582826114f0565b5050565b6000546001600160a01b031633146106c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600160065460ff1660028111156106dc576106dc611c3b565b146107295760405162461bcd60e51b815260206004820152601c60248201527f63616e27742073746172742061206e657720726166666c65207965740000000060448201526064016104bd565b604080516000815260208101918290525161074691600791611ac4565b50426009556006805460ff191690556008546040519081527f93df2161ff4b628e09db63ad18cfd68a7cbf8f3164fb9fb921ad3387cb0f9d479060200160405180910390a1565b6000546001600160a01b031633146107e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b604051600090339047908381818185875af1925050503d8060008114610829576040519150601f19603f3d011682016040523d82523d6000602084013e61082e565b606091505b50505050565b600d5460009047908110156108545761084e600282611d64565b91505090565b5050600d5490565b5090565b6000546001600160a01b031633146108ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b6108c46000611695565b565b60008060065460ff1660028111156108e0576108e0611c3b565b146109535760405162461bcd60e51b815260206004820152602760248201527f46756e6374696f6e2063616e6e6f742062652063616c6c65642061742074686960448201527f732074696d652e0000000000000000000000000000000000000000000000000060648201526084016104bd565b8115806109605750816001145b6109ac5760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420746f6b656e2073656c656374696f6e00000000000000000060448201526064016104bd565b81600003610be257600f546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a219190611d00565b9050600084600b54610a339190611d2f565b905080821015610a975760405162461bcd60e51b815260206004820152602960248201527f596f75206d75737420706179207468652070726f70657220616d6f756e7420666044820152681bdc881d1a58dad95d60ba1b60648201526084016104bd565b600f54604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190611d00565b905081811015610b5c5760405162461bcd60e51b815260206004820152601560248201527f436865636b20746f6b656e20616c6c6f77616e6365000000000000000000000060448201526064016104bd565b600f546040516323b872dd60e01b815233600482015261dead6024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610bb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd99190611d78565b50505050610e14565b81600103610e14576010546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c579190611d00565b9050600084600c54610c699190611d2f565b905080821015610ccd5760405162461bcd60e51b815260206004820152602960248201527f596f75206d75737420706179207468652070726f70657220616d6f756e7420666044820152681bdc881d1a58dad95d60ba1b60648201526084016104bd565b601054604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d409190611d00565b905081811015610d925760405162461bcd60e51b815260206004820152601560248201527f436865636b20746f6b656e20616c6c6f77616e6365000000000000000000000060448201526064016104bd565b6010546040516323b872dd60e01b815233600482015261dead6024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190611d78565b505050505b60015b838111610ea2576007805460018181019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff1916339081179091556000908152600e602052604081208054909190610e8a908490611d9a565b90915550819050610e9a81611db2565b915050610e17565b5060085460405190815233907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a2505050565b6000546001600160a01b03163314610f3a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600a811115610fb15760405162461bcd60e51b815260206004820152602160248201527f63616e6e6f74207265777264206d6f7265207468616e203130207469636b657460448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104bd565b60015b818111611048576007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386169081179091556000908152600e602052604081208054909190611030908490611d9a565b9091555081905061104081611db2565b915050610fb4565b50604080516001600160a01b0384168152602081018390527f7f066478479faa2e851964186ad2982df0e99cef716c66915751a318deec9241910160405180910390a15050565b6000546001600160a01b031633146110e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600f54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611133573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111579190611d00565b90506103e8611167826005611d2f565b6111719190611d64565b82106111e55760405162461bcd60e51b815260206004820152603b60248201527f536574206120726561736f6e61626c65207072696365207469636b657420636f60448201527f73742068617320746f206265206c6f776572207468656e202e3525000000000060648201526084016104bd565b50600b55565b6000546001600160a01b031633146112455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600060065460ff16600281111561125e5761125e611c3b565b1461126857600080fd5b6006805460ff191660021790556108c46116f2565b60075460009081805b828110156112e557846001600160a01b0316600782815481106112ab576112ab611dcb565b6000918252602090912001546001600160a01b0316036112d3576112d0600183611d9a565b91505b806112dd81611db2565b915050611286565b509392505050565b6000546001600160a01b031633146113475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b670de0b6b3a764000061135a8282611d2f565b116113cc5760405162461bcd60e51b8152602060048201526024808201527f6d61782077696e6e6572206d75737420626520626967676572207468616e203160448201527f206574680000000000000000000000000000000000000000000000000000000060648201526084016104bd565b6113de81670de0b6b3a7640000611d2f565b600d5550565b6000546001600160a01b0316331461143e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b6001600160a01b0381166114ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104bd565b6114c381611695565b50565b600781815481106114d657600080fd5b6000918252602090912001546001600160a01b0316905081565b60006007805490508260008151811061150b5761150b611dcb565b602002602001015161151d9190611de1565b90506000606461152b610834565b61153690605a611d2f565b6115409190611d64565b905061154a6117de565b60006007838154811061155f5761155f611dcb565b60009182526020822001546040516001600160a01b039091169250829084908381818185875af1925050503d80600081146115b6576040519150601f19603f3d011682016040523d82523d6000602084013e6115bb565b606091505b50506006805491925060019160ff191682800217905550816001600160a01b03167fe26b789227265a2be125ed60419a9ff1412a152c891a057705e00b6411361a256008548760008151811061161357611613611dcb565b602090810291909101810151604080519384529183015281018790526060810186905260800160405180910390a27f95d5a37bcceaa8b1d6fef21292ab6b23ee3863c4364795d79e791c5a6d00597a60085460405161167491815260200190565b60405180910390a160085461168a906001611d9a565b600855505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600154600354600480546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081529182019290925274010000000000000000000000000000000000000000830467ffffffffffffffff166024820152640100000000820461ffff16604482015263ffffffff8083166064830152660100000000000090920490911660848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af11580156117b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d99190611d00565b600555565b600060646117ea610834565b6117f590600a611d2f565b6117ff9190611d64565b600f54909150611822906001600160a01b031661181d600284611d64565b611925565b600f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561186b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188f9190611d00565b600f546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815261dead6004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156118fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119209190611d78565b505050565b6040805160028082526060820183526000926020830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c89190611df5565b816000815181106119db576119db611dcb565b60200260200101906001600160a01b031690816001600160a01b0316815250508281600181518110611a0f57611a0f611dcb565b6001600160a01b0392831660209182029290920101526040517fb6f9de950000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000009091169063b6f9de95908490611a8d90600090869030904290600401611e12565b6000604051808303818588803b158015611aa657600080fd5b505af1158015611aba573d6000803e3d6000fd5b5050505050505050565b828054828255906000526020600020908101928215611b26579160200282015b82811115611b26578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611ae4565b5061085c9291505b8082111561085c5760008155600101611b2e565b600060208284031215611b5457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611b8457600080fd5b8235915060208084013567ffffffffffffffff80821115611ba457600080fd5b818601915086601f830112611bb857600080fd5b813581811115611bca57611bca611b5b565b8060051b604051601f19603f83011681018181108582111715611bef57611bef611b5b565b604052918252848201925083810185019189831115611c0d57600080fd5b938501935b82851015611c2b57843584529385019392850192611c12565b8096505050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310611c7357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611c8c57600080fd5b50508035926020909101359150565b6001600160a01b03811681146114c357600080fd5b60008060408385031215611cc357600080fd5b8235611cce81611c9b565b946020939093013593505050565b600060208284031215611cee57600080fd5b8135611cf981611c9b565b9392505050565b600060208284031215611d1257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611d4957611d49611d19565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611d7357611d73611d4e565b500490565b600060208284031215611d8a57600080fd5b81518015158114611cf957600080fd5b60008219821115611dad57611dad611d19565b500190565b600060018201611dc457611dc4611d19565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600082611df057611df0611d4e565b500690565b600060208284031215611e0757600080fd5b8151611cf981611c9b565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015611e5c5784516001600160a01b031683529383019391830191600101611e37565b50506001600160a01b03969096166040850152505050606001529291505056fea26469706673582212207edba978e8a2b5cbe11a5c5237725f4e82d59bf32aac2d9df0aef8bab5b2745b64736f6c634300080d003300000000000000000000000000000000000000000000000000000000000000b60000000000000000000000005ca5a5efb57dbaf4462edbd15da889448b1919ed0000000000000000000000006194ffcebc2b091dac598455f3662b7bd9470e15
Deployed Bytecode
0x6080604052600436106101835760003560e01c8063ae81cb30116100d6578063cdafbbb61161007f578063f06fc0a011610059578063f06fc0a014610412578063f2fde38b14610427578063f71d96cb1461044757600080fd5b8063cdafbbb614610393578063e87a6637146103dc578063e89e106a146103fc57600080fd5b8063b7d2c654116100b0578063b7d2c65414610348578063c1b119921461035d578063ccee2cec1461037357600080fd5b8063ae81cb30146102f2578063ae98345d14610312578063b375603c1461033257600080fd5b806370b7596b11610138578063848b0f5f11610112578063848b0f5f1461029a5780638627df46146102c15780638da5cb5b146102d457600080fd5b806370b7596b1461024c578063715018a61461026f57806382d1ae7c1461028457600080fd5b80631fe543e3116101695780631fe543e31461020257806324e62fad1461022257806357ea89b61461023757600080fd5b806272846c1461018f5780631694505e146101b157600080fd5b3661018a57005b600080fd5b34801561019b57600080fd5b506101af6101aa366004611b42565b610467565b005b3480156101bd57600080fd5b506101e57f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561020e57600080fd5b506101af61021d366004611b71565b6105c8565b34801561022e57600080fd5b506101af610669565b34801561024357600080fd5b506101af61078d565b34801561025857600080fd5b50610261610834565b6040519081526020016101f9565b34801561027b57600080fd5b506101af610860565b34801561029057600080fd5b50610261600a5481565b3480156102a657600080fd5b506006546102b49060ff1681565b6040516101f99190611c51565b6101af6102cf366004611c79565b6108c6565b3480156102e057600080fd5b506000546001600160a01b03166101e5565b3480156102fe57600080fd5b506101af61030d366004611cb0565b610ee0565b34801561031e57600080fd5b506101af61032d366004611b42565b61108f565b34801561033e57600080fd5b5061026160085481565b34801561035457600080fd5b506101af6111eb565b34801561036957600080fd5b5061026160095481565b34801561037f57600080fd5b5061026161038e366004611cdc565b61127d565b34801561039f57600080fd5b506103c76103ae366004611cdc565b600e602052600090815260409020805460019091015482565b604080519283526020830191909152016101f9565b3480156103e857600080fd5b506101af6103f7366004611b42565b6112ed565b34801561040857600080fd5b5061026160055481565b34801561041e57600080fd5b50600754610261565b34801561043357600080fd5b506101af610442366004611cdc565b6113e4565b34801561045357600080fd5b506101e5610462366004611b42565b6114c6565b6000546001600160a01b031633146104c65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601054604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610510573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105349190611d00565b90506103e8610544826005611d2f565b61054e9190611d64565b82106105c25760405162461bcd60e51b815260206004820152603b60248201527f536574206120726561736f6e61626c65207072696365207469636b657420636f60448201527f73742068617320746f206265206c6f776572207468656e202e3525000000000060648201526084016104bd565b50600c55565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909161461065b576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044016104bd565b61066582826114f0565b5050565b6000546001600160a01b031633146106c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600160065460ff1660028111156106dc576106dc611c3b565b146107295760405162461bcd60e51b815260206004820152601c60248201527f63616e27742073746172742061206e657720726166666c65207965740000000060448201526064016104bd565b604080516000815260208101918290525161074691600791611ac4565b50426009556006805460ff191690556008546040519081527f93df2161ff4b628e09db63ad18cfd68a7cbf8f3164fb9fb921ad3387cb0f9d479060200160405180910390a1565b6000546001600160a01b031633146107e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b604051600090339047908381818185875af1925050503d8060008114610829576040519150601f19603f3d011682016040523d82523d6000602084013e61082e565b606091505b50505050565b600d5460009047908110156108545761084e600282611d64565b91505090565b5050600d5490565b5090565b6000546001600160a01b031633146108ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b6108c46000611695565b565b60008060065460ff1660028111156108e0576108e0611c3b565b146109535760405162461bcd60e51b815260206004820152602760248201527f46756e6374696f6e2063616e6e6f742062652063616c6c65642061742074686960448201527f732074696d652e0000000000000000000000000000000000000000000000000060648201526084016104bd565b8115806109605750816001145b6109ac5760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420746f6b656e2073656c656374696f6e00000000000000000060448201526064016104bd565b81600003610be257600f546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156109fd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a219190611d00565b9050600084600b54610a339190611d2f565b905080821015610a975760405162461bcd60e51b815260206004820152602960248201527f596f75206d75737420706179207468652070726f70657220616d6f756e7420666044820152681bdc881d1a58dad95d60ba1b60648201526084016104bd565b600f54604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0a9190611d00565b905081811015610b5c5760405162461bcd60e51b815260206004820152601560248201527f436865636b20746f6b656e20616c6c6f77616e6365000000000000000000000060448201526064016104bd565b600f546040516323b872dd60e01b815233600482015261dead6024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610bb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd99190611d78565b50505050610e14565b81600103610e14576010546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c579190611d00565b9050600084600c54610c699190611d2f565b905080821015610ccd5760405162461bcd60e51b815260206004820152602960248201527f596f75206d75737420706179207468652070726f70657220616d6f756e7420666044820152681bdc881d1a58dad95d60ba1b60648201526084016104bd565b601054604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e90604401602060405180830381865afa158015610d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d409190611d00565b905081811015610d925760405162461bcd60e51b815260206004820152601560248201527f436865636b20746f6b656e20616c6c6f77616e6365000000000000000000000060448201526064016104bd565b6010546040516323b872dd60e01b815233600482015261dead6024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0f9190611d78565b505050505b60015b838111610ea2576007805460018181019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff1916339081179091556000908152600e602052604081208054909190610e8a908490611d9a565b90915550819050610e9a81611db2565b915050610e17565b5060085460405190815233907f87969bc7faf902221a147b95ceba76e011c5efb0339a0a8ee7a2bb82d9cfbbd69060200160405180910390a2505050565b6000546001600160a01b03163314610f3a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600a811115610fb15760405162461bcd60e51b815260206004820152602160248201527f63616e6e6f74207265777264206d6f7265207468616e203130207469636b657460448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104bd565b60015b818111611048576007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386169081179091556000908152600e602052604081208054909190611030908490611d9a565b9091555081905061104081611db2565b915050610fb4565b50604080516001600160a01b0384168152602081018390527f7f066478479faa2e851964186ad2982df0e99cef716c66915751a318deec9241910160405180910390a15050565b6000546001600160a01b031633146110e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600f54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015611133573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111579190611d00565b90506103e8611167826005611d2f565b6111719190611d64565b82106111e55760405162461bcd60e51b815260206004820152603b60248201527f536574206120726561736f6e61626c65207072696365207469636b657420636f60448201527f73742068617320746f206265206c6f776572207468656e202e3525000000000060648201526084016104bd565b50600b55565b6000546001600160a01b031633146112455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b600060065460ff16600281111561125e5761125e611c3b565b1461126857600080fd5b6006805460ff191660021790556108c46116f2565b60075460009081805b828110156112e557846001600160a01b0316600782815481106112ab576112ab611dcb565b6000918252602090912001546001600160a01b0316036112d3576112d0600183611d9a565b91505b806112dd81611db2565b915050611286565b509392505050565b6000546001600160a01b031633146113475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b670de0b6b3a764000061135a8282611d2f565b116113cc5760405162461bcd60e51b8152602060048201526024808201527f6d61782077696e6e6572206d75737420626520626967676572207468616e203160448201527f206574680000000000000000000000000000000000000000000000000000000060648201526084016104bd565b6113de81670de0b6b3a7640000611d2f565b600d5550565b6000546001600160a01b0316331461143e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bd565b6001600160a01b0381166114ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104bd565b6114c381611695565b50565b600781815481106114d657600080fd5b6000918252602090912001546001600160a01b0316905081565b60006007805490508260008151811061150b5761150b611dcb565b602002602001015161151d9190611de1565b90506000606461152b610834565b61153690605a611d2f565b6115409190611d64565b905061154a6117de565b60006007838154811061155f5761155f611dcb565b60009182526020822001546040516001600160a01b039091169250829084908381818185875af1925050503d80600081146115b6576040519150601f19603f3d011682016040523d82523d6000602084013e6115bb565b606091505b50506006805491925060019160ff191682800217905550816001600160a01b03167fe26b789227265a2be125ed60419a9ff1412a152c891a057705e00b6411361a256008548760008151811061161357611613611dcb565b602090810291909101810151604080519384529183015281018790526060810186905260800160405180910390a27f95d5a37bcceaa8b1d6fef21292ab6b23ee3863c4364795d79e791c5a6d00597a60085460405161167491815260200190565b60405180910390a160085461168a906001611d9a565b600855505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600154600354600480546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081529182019290925274010000000000000000000000000000000000000000830467ffffffffffffffff166024820152640100000000820461ffff16604482015263ffffffff8083166064830152660100000000000090920490911660848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af11580156117b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d99190611d00565b600555565b600060646117ea610834565b6117f590600a611d2f565b6117ff9190611d64565b600f54909150611822906001600160a01b031661181d600284611d64565b611925565b600f546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561186b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188f9190611d00565b600f546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815261dead6004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156118fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119209190611d78565b505050565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c89190611df5565b816000815181106119db576119db611dcb565b60200260200101906001600160a01b031690816001600160a01b0316815250508281600181518110611a0f57611a0f611dcb565b6001600160a01b0392831660209182029290920101526040517fb6f9de950000000000000000000000000000000000000000000000000000000081527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d9091169063b6f9de95908490611a8d90600090869030904290600401611e12565b6000604051808303818588803b158015611aa657600080fd5b505af1158015611aba573d6000803e3d6000fd5b5050505050505050565b828054828255906000526020600020908101928215611b26579160200282015b82811115611b26578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611ae4565b5061085c9291505b8082111561085c5760008155600101611b2e565b600060208284031215611b5457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611b8457600080fd5b8235915060208084013567ffffffffffffffff80821115611ba457600080fd5b818601915086601f830112611bb857600080fd5b813581811115611bca57611bca611b5b565b8060051b604051601f19603f83011681018181108582111715611bef57611bef611b5b565b604052918252848201925083810185019189831115611c0d57600080fd5b938501935b82851015611c2b57843584529385019392850192611c12565b8096505050505050509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310611c7357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060408385031215611c8c57600080fd5b50508035926020909101359150565b6001600160a01b03811681146114c357600080fd5b60008060408385031215611cc357600080fd5b8235611cce81611c9b565b946020939093013593505050565b600060208284031215611cee57600080fd5b8135611cf981611c9b565b9392505050565b600060208284031215611d1257600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611d4957611d49611d19565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611d7357611d73611d4e565b500490565b600060208284031215611d8a57600080fd5b81518015158114611cf957600080fd5b60008219821115611dad57611dad611d19565b500190565b600060018201611dc457611dc4611d19565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600082611df057611df0611d4e565b500690565b600060208284031215611e0757600080fd5b8151611cf981611c9b565b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015611e5c5784516001600160a01b031683529383019391830191600101611e37565b50506001600160a01b03969096166040850152505050606001529291505056fea26469706673582212207edba978e8a2b5cbe11a5c5237725f4e82d59bf32aac2d9df0aef8bab5b2745b64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000b60000000000000000000000005ca5a5efb57dbaf4462edbd15da889448b1919ed0000000000000000000000006194ffcebc2b091dac598455f3662b7bd9470e15
-----Decoded View---------------
Arg [0] : subscriptionId (uint64): 182
Arg [1] : _rocketToken (address): 0x5CA5a5Efb57dBaF4462eDBD15dA889448b1919ED
Arg [2] : _rocketFuel (address): 0x6194FfceBc2B091DAC598455F3662B7BD9470e15
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000b6
Arg [1] : 0000000000000000000000005ca5a5efb57dbaf4462edbd15da889448b1919ed
Arg [2] : 0000000000000000000000006194ffcebc2b091dac598455f3662b7bd9470e15
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.