编译器
0.8.20+commit.a1b79de6
文件 1 的 12:AutomationBase.sol
pragma solidity ^0.8.0;
contract AutomationBase {
error OnlySimulatedBackend();
function _preventExecution() internal view {
if (tx.origin != address(0) && tx.origin != address(0x1111111111111111111111111111111111111111)) {
revert OnlySimulatedBackend();
}
}
modifier cannotExecute() {
_preventExecution();
_;
}
}
文件 2 的 12:AutomationCompatible.sol
pragma solidity ^0.8.0;
import {AutomationBase} from "./AutomationBase.sol";
import {AutomationCompatibleInterface} from "./interfaces/AutomationCompatibleInterface.sol";
abstract contract AutomationCompatible is AutomationBase, AutomationCompatibleInterface {}
文件 3 的 12:AutomationCompatibleInterface.sol
pragma solidity ^0.8.0;
interface AutomationCompatibleInterface {
function checkUpkeep(bytes calldata checkData) external returns (bool upkeepNeeded, bytes memory performData);
function performUpkeep(bytes calldata performData) external;
}
文件 4 的 12:ConfirmedOwner.sol
pragma solidity ^0.8.0;
import {ConfirmedOwnerWithProposal} from "./ConfirmedOwnerWithProposal.sol";
contract ConfirmedOwner is ConfirmedOwnerWithProposal {
constructor(address newOwner) ConfirmedOwnerWithProposal(newOwner, address(0)) {}
}
文件 5 的 12:ConfirmedOwnerWithProposal.sol
pragma solidity ^0.8.0;
import {IOwnable} from "../interfaces/IOwnable.sol";
contract ConfirmedOwnerWithProposal is IOwnable {
address private s_owner;
address private s_pendingOwner;
event OwnershipTransferRequested(address indexed from, address indexed to);
event OwnershipTransferred(address indexed from, address indexed to);
constructor(address newOwner, address pendingOwner) {
require(newOwner != address(0), "Cannot set owner to zero");
s_owner = newOwner;
if (pendingOwner != address(0)) {
_transferOwnership(pendingOwner);
}
}
function transferOwnership(address to) public override onlyOwner {
_transferOwnership(to);
}
function acceptOwnership() external override {
require(msg.sender == s_pendingOwner, "Must be proposed owner");
address oldOwner = s_owner;
s_owner = msg.sender;
s_pendingOwner = address(0);
emit OwnershipTransferred(oldOwner, msg.sender);
}
function owner() public view override returns (address) {
return s_owner;
}
function _transferOwnership(address to) private {
require(to != msg.sender, "Cannot transfer to self");
s_pendingOwner = to;
emit OwnershipTransferRequested(s_owner, to);
}
function _validateOwnership() internal view {
require(msg.sender == s_owner, "Only callable by owner");
}
modifier onlyOwner() {
_validateOwnership();
_;
}
}
文件 6 的 12:Ethpot.sol
pragma solidity ^0.8.20;
import {VRFConsumerBaseV2Plus} from "lib/chainlink/contracts/src/v0.8/vrf/dev/VRFConsumerBaseV2Plus.sol";
import {VRFV2PlusClient} from "lib/chainlink/contracts/src/v0.8/vrf/dev/libraries/VRFV2PlusClient.sol";
import {AutomationCompatibleInterface} from "lib/chainlink/contracts/src/v0.8/automation/AutomationCompatible.sol";
error Raffle__UpkeepNotNeeded(
uint256 currentBalance,
uint256 numPlayers,
uint256 raffleState
);
error Raffle__RaffleNotOpen();
error WithdrawTransfer();
contract Ethpot is VRFConsumerBaseV2Plus, AutomationCompatibleInterface {
enum RaffleState {
OPEN,
CALCULATING
}
mapping(uint256 => mapping(address => uint256)) private s_tickets;
mapping(uint256 => address) private s_playersMapping;
mapping(address => uint256) private s_playerPoints;
uint256 private immutable i_subscriptionId;
bytes32 private immutable i_gasLane;
uint32 private immutable i_callbackGasLimit;
uint16 private constant REQUEST_CONFIRMATIONS = 3;
uint32 private constant NUM_WORDS = 1;
uint256 private s_interval;
uint256 private s_entranceFee;
uint256 private s_playerTimeStamp;
uint256 private s_seventhDayTimeStamp;
address private s_recentWinner;
address private s_V1;
address private s_V2;
RaffleState private s_raffleState;
uint256 private s_treasuryV1Balance;
uint256 private s_treasuryV2Balance;
uint256 private s_raffleBalance;
uint256 private s_raffleBalanceSeventhDay;
uint256 private s_feePercentV1;
uint256 private s_feePercentV2;
uint256 private s_feePercentRaffleSeventhDay;
uint256 private s_gameCount = 1;
uint256 private s_lotteryDay = 1;
uint256 private s_playersCount;
uint256 private s_bonusPoints;
uint256 private s_period = 7;
event RequestedRaffleWinner(uint256 indexed requestId);
event RaffleEnter(
address indexed player,
uint256 indexed ticketsOfPlayer,
uint256 gameCount
);
event WinnerPicked(
address indexed player,
uint256 indexed ticketsOfPlayer,
uint256 indexed amountWon,
uint256 gameCount,
uint256 ticketsInRound
);
event WeeklyWinnerPicked(
address indexed player,
uint256 indexed ticketsOfPlayer,
uint256 indexed amountWon,
uint256 gameCount,
uint256 ticketsInRound
);
constructor(
address vrfCoordinatorV2Plus,
uint256 subscriptionId,
bytes32 gasLane,
uint256 interval,
uint256 entranceFee,
uint32 callbackGasLimit,
address V1,
address V2
) VRFConsumerBaseV2Plus(vrfCoordinatorV2Plus) {
i_gasLane = gasLane;
s_interval = interval;
i_subscriptionId = subscriptionId;
s_entranceFee = entranceFee;
s_raffleState = RaffleState.OPEN;
s_playerTimeStamp = block.timestamp;
i_callbackGasLimit = callbackGasLimit;
s_bonusPoints = 100;
s_V1 = V1;
s_V2 = V2;
}
function enterRaffle(uint256 entries) public payable {
require((msg.value >= s_entranceFee * entries) && entries > 0);
if (s_raffleState != RaffleState.OPEN) {
revert Raffle__RaffleNotOpen();
}
if (s_playersCount == 0) {
s_playerTimeStamp = block.timestamp;
}
s_raffleBalanceSeventhDay += (((s_entranceFee * entries) *
(s_feePercentRaffleSeventhDay * 1e2)) / 1e4);
s_treasuryV1Balance += (((s_entranceFee * entries) *
(s_feePercentV1 * 1e2)) / 1e4);
s_treasuryV2Balance += (((s_entranceFee * entries) *
(s_feePercentV2 * 1e2)) / 1e4);
s_raffleBalance += ((s_entranceFee * entries) -
(((s_entranceFee * entries) *
(s_feePercentRaffleSeventhDay * 1e2)) / 1e4) -
(((s_entranceFee * entries) * (s_feePercentV1 * 1e2)) / 1e4) -
(((s_entranceFee * entries) * (s_feePercentV2 * 1e2)) / 1e4));
for (uint256 i = 0; i < entries; i++) {
s_playersMapping[s_playersCount] = msg.sender;
++s_playersCount;
++s_tickets[s_gameCount][msg.sender];
}
s_playerPoints[msg.sender] += entries * s_bonusPoints;
emit RaffleEnter(
msg.sender,
s_tickets[s_gameCount][msg.sender],
s_gameCount
);
}
function checkUpkeep(
bytes memory
)
public
view
override
returns (bool upkeepNeeded, bytes memory )
{
bool isOpen = RaffleState.OPEN == s_raffleState;
bool timePassed = ((block.timestamp - s_playerTimeStamp) > s_interval);
bool hasPlayers = s_playersCount > 0;
bool hasBalance = s_raffleBalance > 0;
upkeepNeeded = (timePassed && isOpen && hasBalance && hasPlayers);
return (upkeepNeeded, "0x0");
}
function performUpkeep(bytes calldata ) external override {
(bool upkeepNeeded, ) = checkUpkeep("");
if (!upkeepNeeded) {
revert Raffle__UpkeepNotNeeded(
s_raffleBalance,
s_playersCount,
uint256(s_raffleState)
);
}
s_raffleState = RaffleState.CALCULATING;
uint256 requestId = s_vrfCoordinator.requestRandomWords(
VRFV2PlusClient.RandomWordsRequest({
keyHash: i_gasLane,
subId: i_subscriptionId,
requestConfirmations: REQUEST_CONFIRMATIONS,
callbackGasLimit: i_callbackGasLimit,
numWords: NUM_WORDS,
extraArgs: VRFV2PlusClient._argsToBytes(
VRFV2PlusClient.ExtraArgsV1({nativePayment: false})
)
})
);
emit RequestedRaffleWinner(requestId);
}
function fulfillRandomWords(
uint256 ,
uint256[] calldata randomWords
) internal override {
if (s_lotteryDay == s_period) {
uint256 indexOfWinner = randomWords[0] % s_playersCount;
address recentWinner = s_playersMapping[indexOfWinner];
s_recentWinner = recentWinner;
s_raffleState = RaffleState.OPEN;
s_seventhDayTimeStamp = block.timestamp;
uint256 playersCount = s_playersCount;
s_playersCount = 0;
uint256 newBalance = s_raffleBalanceSeventhDay + s_raffleBalance;
s_raffleBalanceSeventhDay = 0;
s_raffleBalance = 0;
(bool success, ) = recentWinner.call{value: newBalance}("");
require(success, "Transfer failed");
s_lotteryDay = 1;
emit WeeklyWinnerPicked(
recentWinner,
s_tickets[s_gameCount][s_recentWinner],
newBalance,
s_gameCount,
playersCount
);
++s_gameCount;
} else {
uint256 indexOfWinner = randomWords[0] % s_playersCount;
address recentWinner = s_playersMapping[indexOfWinner];
s_recentWinner = recentWinner;
s_raffleState = RaffleState.OPEN;
uint256 playersCount = s_playersCount;
s_playersCount = 0;
uint256 newBalance = s_raffleBalance;
s_raffleBalance = 0;
(bool success, ) = recentWinner.call{value: newBalance}("");
require(success, "Transfer failed");
++s_lotteryDay;
emit WinnerPicked(
recentWinner,
s_tickets[s_gameCount][recentWinner],
newBalance,
s_gameCount,
playersCount
);
++s_gameCount;
}
}
function recoverTreasuryV1() external {
require(msg.sender == s_V1, "Address Not Allowed");
uint256 newBalance = s_treasuryV1Balance;
s_treasuryV1Balance = 0;
(bool success, ) = s_V1.call{value: newBalance}("");
require(success, "Transfer failed");
}
function setInterval(uint256 interval) external onlyOwner {
s_interval = interval;
}
function setEntraceFee(uint256 entranceFee) external onlyOwner {
s_entranceFee = entranceFee;
}
function setFeePercentV1(uint256 feePercent) external onlyOwner {
require(feePercent <= 25, "More than 25");
s_feePercentV1 = feePercent;
}
function setFeePercentV2(uint256 feePercent) external {
require(feePercent <= 25, "More than 25");
require(msg.sender == s_V2, "Address Not Allowed");
s_feePercentV2 = feePercent;
}
function setFeePercentRaffleSeventhDay(
uint256 feePercent
) external onlyOwner {
require(feePercent <= 25, "More than 25");
s_feePercentRaffleSeventhDay = feePercent;
}
function setDay(uint256 day) external onlyOwner {
s_lotteryDay = day;
}
function setPeriod(uint256 period) external onlyOwner {
s_period = period;
}
function setNewWeeklyPrize() external payable onlyOwner {
s_raffleBalanceSeventhDay += msg.value;
}
function recoverTreasuryV2() external {
require(msg.sender == s_V2, "Address Not Allowed");
uint256 newBalance = s_treasuryV2Balance;
s_treasuryV2Balance = 0;
(bool success, ) = s_V2.call{value: newBalance}("");
require(success, "Transfer failed");
}
function emergencyRecovery() external onlyOwner {
require(s_raffleState == RaffleState.CALCULATING, "Not emergency");
uint256 newBalance = s_treasuryV2Balance;
s_treasuryV2Balance = 0;
(bool success, ) = s_V2.call{value: address(this).balance}("");
require(success, "Transfer failed");
newBalance = s_treasuryV1Balance;
s_treasuryV1Balance = 0;
(success, ) = s_V1.call{value: address(this).balance}("");
require(success, "Transfer failed");
newBalance = address(this).balance;
s_raffleBalance = 0;
s_raffleBalanceSeventhDay = 0;
(success, ) = msg.sender.call{value: address(this).balance}("");
require(success, "Transfer failed");
}
function withdrawPayments(address payable payee) external onlyOwner {
uint256 balance = address(this).balance;
(bool transferTx, ) = payee.call{value: balance}("");
if (!transferTx) {
revert WithdrawTransfer();
}
}
function getRaffleState() public view returns (RaffleState) {
return s_raffleState;
}
function getNumWords() public pure returns (uint256) {
return NUM_WORDS;
}
function getRequestConfirmations() public pure returns (uint256) {
return REQUEST_CONFIRMATIONS;
}
function getRecentWinner() public view returns (address) {
return s_recentWinner;
}
function getPlayer(uint256 index) public view returns (address) {
return s_playersMapping[index];
}
function getPeriod() public view returns (uint256) {
return s_period;
}
function getPlayerTimeStamp() public view returns (uint256) {
return s_playerTimeStamp;
}
function getInterval() public view returns (uint256) {
return s_interval;
}
function getEntranceFee() public view returns (uint256) {
return s_entranceFee;
}
function getNumberOfPlayers() public view returns (uint256) {
return s_playersCount;
}
function getTicketsOfPlayer(
address player
) external view returns (uint256) {
return s_tickets[s_gameCount][player];
}
function getVrfCoordinatorV2Address() public view returns (address) {
return address(s_vrfCoordinator);
}
function getGasLane() public view returns (bytes32) {
return i_gasLane;
}
function getSeventhDayTimestamp() public view returns (uint256) {
return s_seventhDayTimeStamp;
}
function getBonusRate() public view returns (uint256) {
return s_bonusPoints;
}
function getBonusPoints(address pointsOwner) public view returns (uint256) {
return s_playerPoints[pointsOwner];
}
function getV1() public view returns (address) {
return s_V1;
}
function getV2() public view returns (address) {
return s_V2;
}
function getTreasuryV1Balance() public view returns (uint256) {
return s_treasuryV1Balance;
}
function getTreasuryV2Balance() public view returns (uint256) {
return s_treasuryV2Balance;
}
function getRaffleBalance() public view returns (uint256) {
return s_raffleBalance;
}
function getRaffleBalanceSeventhDay() public view returns (uint256) {
return s_raffleBalanceSeventhDay;
}
function getFeePercentV1() public view returns (uint256) {
return s_feePercentV1;
}
function getFeePercentRaffleSeventhDay() public view returns (uint256) {
return s_feePercentRaffleSeventhDay;
}
function getGameCount() public view returns (uint256) {
return s_gameCount;
}
function getCurrentLotteryDay() public view returns (uint256) {
return s_lotteryDay;
}
}
文件 7 的 12:IOwnable.sol
pragma solidity ^0.8.0;
interface IOwnable {
function owner() external returns (address);
function transferOwnership(address recipient) external;
function acceptOwnership() external;
}
文件 8 的 12:IVRFCoordinatorV2Plus.sol
pragma solidity ^0.8.0;
import {VRFV2PlusClient} from "../libraries/VRFV2PlusClient.sol";
import {IVRFSubscriptionV2Plus} from "./IVRFSubscriptionV2Plus.sol";
interface IVRFCoordinatorV2Plus is IVRFSubscriptionV2Plus {
function requestRandomWords(VRFV2PlusClient.RandomWordsRequest calldata req) external returns (uint256 requestId);
}
文件 9 的 12:IVRFMigratableConsumerV2Plus.sol
pragma solidity ^0.8.0;
interface IVRFMigratableConsumerV2Plus {
event CoordinatorSet(address vrfCoordinator);
function setCoordinator(address vrfCoordinator) external;
}
文件 10 的 12:IVRFSubscriptionV2Plus.sol
pragma solidity ^0.8.0;
interface IVRFSubscriptionV2Plus {
function addConsumer(uint256 subId, address consumer) external;
function removeConsumer(uint256 subId, address consumer) external;
function cancelSubscription(uint256 subId, address to) external;
function acceptSubscriptionOwnerTransfer(uint256 subId) external;
function requestSubscriptionOwnerTransfer(uint256 subId, address newOwner) external;
function createSubscription() external returns (uint256 subId);
function getSubscription(
uint256 subId
)
external
view
returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address owner, address[] memory consumers);
function pendingRequestExists(uint256 subId) external view returns (bool);
function getActiveSubscriptionIds(uint256 startIndex, uint256 maxCount) external view returns (uint256[] memory);
function fundSubscriptionWithNative(uint256 subId) external payable;
}
文件 11 的 12:VRFConsumerBaseV2Plus.sol
pragma solidity ^0.8.4;
import {IVRFCoordinatorV2Plus} from "./interfaces/IVRFCoordinatorV2Plus.sol";
import {IVRFMigratableConsumerV2Plus} from "./interfaces/IVRFMigratableConsumerV2Plus.sol";
import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol";
abstract contract VRFConsumerBaseV2Plus is IVRFMigratableConsumerV2Plus, ConfirmedOwner {
error OnlyCoordinatorCanFulfill(address have, address want);
error OnlyOwnerOrCoordinator(address have, address owner, address coordinator);
error ZeroAddress();
IVRFCoordinatorV2Plus public s_vrfCoordinator;
constructor(address _vrfCoordinator) ConfirmedOwner(msg.sender) {
if (_vrfCoordinator == address(0)) {
revert ZeroAddress();
}
s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);
}
function fulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) internal virtual;
function rawFulfillRandomWords(uint256 requestId, uint256[] calldata randomWords) external {
if (msg.sender != address(s_vrfCoordinator)) {
revert OnlyCoordinatorCanFulfill(msg.sender, address(s_vrfCoordinator));
}
fulfillRandomWords(requestId, randomWords);
}
function setCoordinator(address _vrfCoordinator) external override onlyOwnerOrCoordinator {
if (_vrfCoordinator == address(0)) {
revert ZeroAddress();
}
s_vrfCoordinator = IVRFCoordinatorV2Plus(_vrfCoordinator);
emit CoordinatorSet(_vrfCoordinator);
}
modifier onlyOwnerOrCoordinator() {
if (msg.sender != owner() && msg.sender != address(s_vrfCoordinator)) {
revert OnlyOwnerOrCoordinator(msg.sender, owner(), address(s_vrfCoordinator));
}
_;
}
}
文件 12 的 12:VRFV2PlusClient.sol
pragma solidity ^0.8.4;
library VRFV2PlusClient {
bytes4 public constant EXTRA_ARGS_V1_TAG = bytes4(keccak256("VRF ExtraArgsV1"));
struct ExtraArgsV1 {
bool nativePayment;
}
struct RandomWordsRequest {
bytes32 keyHash;
uint256 subId;
uint16 requestConfirmations;
uint32 callbackGasLimit;
uint32 numWords;
bytes extraArgs;
}
function _argsToBytes(ExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {
return abi.encodeWithSelector(EXTRA_ARGS_V1_TAG, extraArgs);
}
}
{
"compilationTarget": {
"src/Ethpot.sol": "Ethpot"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@openzeppelin/=lib/openzeppelin-contracts/",
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":chainlink/=lib/chainlink/contracts/",
":ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/"
]
}
[{"inputs":[{"internalType":"address","name":"vrfCoordinatorV2Plus","type":"address"},{"internalType":"uint256","name":"subscriptionId","type":"uint256"},{"internalType":"bytes32","name":"gasLane","type":"bytes32"},{"internalType":"uint256","name":"interval","type":"uint256"},{"internalType":"uint256","name":"entranceFee","type":"uint256"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"address","name":"V1","type":"address"},{"internalType":"address","name":"V2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"coordinator","type":"address"}],"name":"OnlyOwnerOrCoordinator","type":"error"},{"inputs":[],"name":"Raffle__RaffleNotOpen","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentBalance","type":"uint256"},{"internalType":"uint256","name":"numPlayers","type":"uint256"},{"internalType":"uint256","name":"raffleState","type":"uint256"}],"name":"Raffle__UpkeepNotNeeded","type":"error"},{"inputs":[],"name":"WithdrawTransfer","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vrfCoordinator","type":"address"}],"name":"CoordinatorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"ticketsOfPlayer","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gameCount","type":"uint256"}],"name":"RaffleEnter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"RequestedRaffleWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"ticketsOfPlayer","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amountWon","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gameCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ticketsInRound","type":"uint256"}],"name":"WeeklyWinnerPicked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":true,"internalType":"uint256","name":"ticketsOfPlayer","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amountWon","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"gameCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ticketsInRound","type":"uint256"}],"name":"WinnerPicked","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyRecovery","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"entries","type":"uint256"}],"name":"enterRaffle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pointsOwner","type":"address"}],"name":"getBonusPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBonusRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentLotteryDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEntranceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeePercentRaffleSeventhDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeePercentV1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGameCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGasLane","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumWords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getNumberOfPlayers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getPlayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlayerTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaffleBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaffleBalanceSeventhDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaffleState","outputs":[{"internalType":"enum Ethpot.RaffleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRecentWinner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRequestConfirmations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getSeventhDayTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"}],"name":"getTicketsOfPlayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTreasuryV1Balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTreasuryV2Balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getV1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getV2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVrfCoordinatorV2Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"performUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverTreasuryV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recoverTreasuryV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"s_vrfCoordinator","outputs":[{"internalType":"contract IVRFCoordinatorV2Plus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_vrfCoordinator","type":"address"}],"name":"setCoordinator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"day","type":"uint256"}],"name":"setDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"entranceFee","type":"uint256"}],"name":"setEntraceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"setFeePercentRaffleSeventhDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"setFeePercentV1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feePercent","type":"uint256"}],"name":"setFeePercentV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"setInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setNewWeeklyPrize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"period","type":"uint256"}],"name":"setPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"payee","type":"address"}],"name":"withdrawPayments","outputs":[],"stateMutability":"nonpayable","type":"function"}]