S Price: $0.501352 (+2.94%)

Contract

0x28D5322A88954Aa070EE591a05f870a9Baee6Fc4

Overview

S Balance

Sonic LogoSonic LogoSonic Logo5 S

S Value

$2.51 (@ $0.50/S)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create Lobby198773042025-04-12 22:47:0530 hrs ago1744498025IN
0x28D5322A...9Baee6Fc4
2.5 S0.073377255
Create Lobby193546992025-04-10 10:45:113 days ago1744281911IN
0x28D5322A...9Baee6Fc4
2.5 S0.0635328750.0001
Withdraw190805752025-04-09 5:03:025 days ago1744174982IN
0x28D5322A...9Baee6Fc4
0 S0.001891955.01
Update Beneficia...190805612025-04-09 5:02:575 days ago1744174977IN
0x28D5322A...9Baee6Fc4
0 S0.0016738455.01
Create Lobby189519222025-04-08 14:45:525 days ago1744123552IN
0x28D5322A...9Baee6Fc4
2.5 S0.0025802955.01
Create Lobby188370052025-04-08 0:54:026 days ago1744073642IN
0x28D5322A...9Baee6Fc4
2.5 S0.0733803955
Create Lobby188339902025-04-08 0:30:286 days ago1744072228IN
0x28D5322A...9Baee6Fc4
2.5 S0.0030957966
Create Lobby188336922025-04-08 0:28:076 days ago1744072087IN
0x28D5322A...9Baee6Fc4
2.5 S0.0027088257.75
Create Lobby188335572025-04-08 0:27:096 days ago1744072029IN
0x28D5322A...9Baee6Fc4
2.5 S0.0758852457
Create Lobby175510792025-04-01 21:42:5412 days ago1743543774IN
0x28D5322A...9Baee6Fc4
2.5 S0.0025791755
Create Lobby175508582025-04-01 21:41:3112 days ago1743543691IN
0x28D5322A...9Baee6Fc4
2.5 S0.0025791755
Update Fees155864792025-03-24 6:31:4120 days ago1742797901IN
0x28D5322A...9Baee6Fc4
0 S0.0054787755
Update Ranges155864752025-03-24 6:31:3820 days ago1742797898IN
0x28D5322A...9Baee6Fc4
0 S0.005057855

Latest 5 internal transactions

Parent Transaction Hash Block From To
198773042025-04-12 22:47:0530 hrs ago1744498025
0x28D5322A...9Baee6Fc4
 Contract Creation0 S
193546992025-04-10 10:45:113 days ago1744281911
0x28D5322A...9Baee6Fc4
 Contract Creation0 S
190805752025-04-09 5:03:025 days ago1744174982
0x28D5322A...9Baee6Fc4
5 S
188370052025-04-08 0:54:026 days ago1744073642
0x28D5322A...9Baee6Fc4
 Contract Creation0 S
188335572025-04-08 0:27:096 days ago1744072029
0x28D5322A...9Baee6Fc4
 Contract Creation0 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RaffleFactory

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 19 : RaffleFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
// Local imports
import {Raffle, IERC20, IRaffleSync, RaffleLobby} from "../Games/Raffle.sol";
import {IRugTARDS} from "../Interfaces/IRugTARDS.sol";
import {ITokenWhitelist} from "../Interfaces/ITokenWhitelist.sol";

contract RaffleFactory is Ownable {
    // Array of Games
    address[] public games;
    // beneficiary address
    address private beneficiary;
    // Price to create Lotto
    uint256 public creationFee;
    // Open or Close Creation.
    bool public creationOpen;
    // Entry min and max range
    uint16[2] public entryRange;
    // Entry min and max losers
    uint16[2] public winnerRange;
    // Creators percentage
    uint256 public creatorPercentageFee;  
    // Protocol percentage
    uint256 public percentageFee;
    // Contract that Syncs all RugPoolz Events
    address public rugletteSync;
    // Empty array for initializing lobby
    address[] internal winners;
    // Protocol TokenWhitelist 
    ITokenWhitelist public tokenWhitelist;

    // Custom Errors
    error CreationClosed();
    error InvalidCostAmount();
    error InvalidDates(); 
    error InvalidEntryAmount();
    error InvalidEntryLoserRatio();
    error InvalidPayment();
    error InvalidTokenPayment();
    error InvalidWinnersAmount();
    error TokenNotWhitelisted();

    constructor(address benefiter, 
                address sync,
                address whitelisterAddress) Ownable(msg.sender) {
        beneficiary = benefiter;
        creationOpen = true;
        rugletteSync = sync;
        tokenWhitelist = ITokenWhitelist(whitelisterAddress);
    }

    // External Functions

    /// @notice Create a lobby
    /// @param tokenUsed The token users will need to buy entries
    /// @param maxEntries How many entries available in lobby
    /// @param price How many tokens to enter lobby
    /// @param end datetime for when entry availability ends
    /// @param winnerCount How many winners in Raffle
    function createLobby (
        address tokenUsed, 
        uint16 maxEntries, 
        uint256 price, 
        uint256 end,
        uint256 winnerCount) external payable returns(address) {

        if(!creationOpen) { revert CreationClosed(); }
        if(!tokenWhitelist.isTokenWhitelist(tokenUsed)) { revert TokenNotWhitelisted(); }

        // Avoid divide by zero
        if(creationFee > 0) {
            // Take payment
            if(creationFee > msg.value) { revert InvalidPayment(); }
        }

        // Validate the entries and losers are withing the accepted range
        if(maxEntries < entryRange[0] || maxEntries > entryRange[1]) { revert InvalidEntryAmount(); }
        if(winnerCount < winnerRange[0] || winnerCount > winnerRange[1]) { revert InvalidWinnersAmount(); }
        if(winnerCount >= maxEntries) { revert InvalidEntryLoserRatio(); }
        // No empty lobbies
        if(price <= 0) { revert InvalidCostAmount(); }

        // end dateime must be after Open OR close must be future date OR open must be future date
        if(block.timestamp > end) { revert InvalidDates(); }

        if(IERC20(tokenUsed).balanceOf(msg.sender) <= price) { revert InvalidTokenPayment(); }

        RaffleLobby memory newRaffle;

        newRaffle = RaffleLobby(games.length, 
                                maxEntries,
                                tokenUsed, 
                                price,
                                end,
                                winnerCount,
                                winners,
                                percentageFee,
                                creatorPercentageFee,
                                msg.sender);

        Raffle newGame = new Raffle(newRaffle, beneficiary, rugletteSync);
                                      
        address newLobbyAddress = address(newGame);
        address[] memory formattedLobby = new address[](1);
        formattedLobby[0] = newLobbyAddress;
        IRaffleSync(rugletteSync).updateWhitelist(formattedLobby, true);
        IRaffleSync(rugletteSync).newLobby(newLobbyAddress, games.length, tokenUsed, msg.sender);
        games.push(newLobbyAddress);

        return newLobbyAddress;
    }

    /// @dev Returns count of all lobbies created
    function gameCount() external view returns(uint256) {
        return games.length;
    }

    /// @dev Update the protocol fees beneficiary
    /// @param newBenef the new benef address
    function updateBeneficiary(address newBenef) external onlyOwner {
        beneficiary = newBenef;
    }

    /// @dev Toggle Creation ON/OFF
    function updateCreationClose() external onlyOwner {
        creationOpen = !creationOpen;
    }

    /// @dev Update the protocol fees
    /// @param newCreation Fee in gas token charged to create a lobby
    /// @param newPercentage Percentage of lobby that is taxed
    /// @param creatorPercentage percentage of lobby that is taxes for creator
    function updateFees(uint256 newCreation, uint256 newPercentage, uint256 creatorPercentage) external onlyOwner {
        creationFee = newCreation;
        percentageFee = newPercentage;
        creatorPercentageFee = creatorPercentage;
        IRaffleSync(rugletteSync).updatedFees(creationFee, percentageFee, creatorPercentageFee);
    }

    /// @dev Update the entry and loser ranges
    /// @param entries mininum and maxium lobby entries
    /// @param winRange minimum and maximum winners    
    function updateRanges(uint16[2] memory entries, uint16[2] memory winRange) external onlyOwner {
        entryRange =  entries;
        winnerRange =  winRange;
        IRaffleSync(rugletteSync).updatedRanges(entries, winRange);
    }

    /// @dev Withdraw funds from Factory
    function withdraw() external onlyOwner {
        payable(beneficiary).transfer(address(this).balance);
    }
}

File 2 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

File 3 of 19 : IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 4 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 5 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 6 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 7 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

File 8 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC-721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC-721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 9 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)

pragma solidity ^0.8.20;

import {Errors} from "./Errors.sol";

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert Errors.InsufficientBalance(address(this).balance, amount);
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert Errors.FailedCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {Errors.FailedCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert Errors.InsufficientBalance(address(this).balance, value);
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
     * of an unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {Errors.FailedCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            assembly ("memory-safe") {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert Errors.FailedCall();
        }
    }
}

File 10 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 11 of 19 : Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of common custom errors used in multiple contracts
 *
 * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
 * It is recommended to avoid relying on the error API for critical functionality.
 *
 * _Available since v5.1._
 */
library Errors {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedCall();

    /**
     * @dev The deployment failed.
     */
    error FailedDeployment();

    /**
     * @dev A necessary precompile is missing.
     */
    error MissingPrecompile(address);
}

File 12 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 14 of 19 : Raffle.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

// Local imports
import {IRaffleSync} from "../Interfaces/IRaffleSync.sol";
import {RaffleLobby} from "../Structs/RaffleLobby.sol";
import {RNGLib} from "../Utils/RNGLib.sol";

contract Raffle is ReentrancyGuard {
    using SafeERC20 for IERC20;
    // Beneficiary address
    address public beneficiary;    
    // List of users
    address[] public userEntries;
    // All data for Pool
    RaffleLobby internal gameData;
    // Contract synchronizes pool events
    address public raffleSync;
    // Pool Completed Flag
    bool public gameOver;

    // Custom Errors
    error AlreadyEntered();
    error InvalidEntryQuantity();
    error NotEnoughOpenSpots();
    error NotEnoughTokens();
    error NotEnoughExGens();
    error NotExpiredYet();
    error GameOver();

    constructor(RaffleLobby memory gameLaunch, address benef, address sync) {
        // Storing Pool Data
        gameData = gameLaunch;
        beneficiary = benef;
        raffleSync = sync;
    }

    /// @notice Buy entries into game
    /// @param quantity How many entries to buy
    function buyEntry(uint256 quantity) external nonReentrant() {
        uint256 total = userEntries.length + quantity;

        if(total > gameData.maxEntries) { revert NotEnoughOpenSpots(); }
        
        for(uint256 i; i < quantity; i++)
        {
            userEntries.push(msg.sender);
            IRaffleSync(raffleSync).lobbyEntry(address(this), msg.sender);
        }

        total = quantity * gameData.price;
        IERC20(gameData.token).transferFrom(msg.sender, address(this), total);
    }

    /// @notice Sometimes gameData() doesn't get recognized by frontends, this helps
    function getgameData() external view returns(RaffleLobby memory) {
        return gameData;
    }

    /// @notice Use Gelato RNG library to determine rugger
    /// @param exgen ex gen
    function rugPool(uint256[] calldata exgen) external nonReentrant {
        if(gameOver) { revert GameOver(); }
        if(userEntries.length < gameData.maxEntries) {
            if(gameData.end > block.timestamp) { revert NotExpiredYet(); }
        }
        
        if(exgen.length < gameData.winnerCount) { revert NotEnoughExGens(); }

        uint256 lucky;
        // CALL RNG 0 - totalSupply
        for (uint256 i; i < gameData.winnerCount; i++) {
            lucky = RNGLib.revealRugger(exgen[i], 
                                        userEntries.length, 
                                        string(abi.encodePacked(gameData.price, block.timestamp)));
            gameData.winners.push(userEntries[lucky]);
            removeIndex(lucky);
        }

        // Rug the Pool
        gameOver = true;
        processFees();
        uint256 shares = IERC20(gameData.token).balanceOf(address(this)) / gameData.winnerCount;

        IRaffleSync(raffleSync).results(address(this), gameData.winners, shares);

        for (uint256 i = 0; i < gameData.winners.length; i++) {
            if(gameData.winners[i] != address(0)) {
                IERC20(gameData.token).transfer(gameData.winners[i], shares);
            }
        }
    }

    /// @notice Process the fees for creator and protocol
    function processFees() internal {
        uint256 _protocolFee;
        uint256 gameBalance = IERC20(gameData.token).balanceOf(address(this));
        uint256 _creatorFee;

        // Prevent Divide by 0 if protocol fees are off
        if(gameData.protocolPercent > 0)
        {
            // Protocol Fee
            _protocolFee = gameBalance * gameData.protocolPercent / 1e18;
            IERC20(gameData.token).transfer(beneficiary, _protocolFee);
        }

        // Prevent Divide by 0 if creator fees are off
        if(gameData.creatorPercent > 0)
        {
            // Creator Fee
            _creatorFee = gameBalance * gameData.creatorPercent / 1e18;
            IERC20(gameData.token).transfer(gameData.creator, _creatorFee);
        }

        IRaffleSync(raffleSync).entryFees(address(this), _protocolFee, _creatorFee);
    }

    /// @dev Remove index and shift userEntries array
    /// @param index The index to remove and shift
    function removeIndex(uint256 index) internal {
        require(index < userEntries.length, "Index out of bounds");

        // Shift elements left to fill the gap
        for (uint256 i = index; i < userEntries.length - 1; i++) {
            userEntries[i] = userEntries[i + 1];
        }

        // Remove the last element (since it's now duplicated)
        userEntries.pop();
    }       
}

File 15 of 19 : IRaffleSync.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IRaffleSync {

    function lobbyEntry(address pool, address minter) external;

    function newLobby(address pool, uint256 id, address token, address creator) external;

    function entryFees(address pool, uint256 protocolFee, uint256 creatorFee) external;

    function results(address pool, address[] calldata ruggers, uint256 prizeShare) external;

    function updatedFees(uint256 creationFee,  uint256 protocolFee, uint256 creatorFee) external;

    function updatedRanges(uint16[2] memory entries, uint16[2] memory winners) external;

    function updateWhitelist(address[] memory addressList, bool action) external;
}

File 16 of 19 : IRugTARDS.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface IRugTARDS {

    function getTotalSupply() external view returns(uint256);

    function distributePayment(address payer, address token, uint256 amount) external;
}

File 17 of 19 : ITokenWhitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

interface ITokenWhitelist {

    function isTokenWhitelist(address _token) external view returns(bool);

    function whitelistTokens(address[] calldata newTokens, bool action) external;
}

File 18 of 19 : RaffleLobby.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

struct RaffleLobby {
    uint256 id;
    // Maximum Number of entries.
    uint256 maxEntries;
    // Token used
    address token;
    // Cost per Ticket
    uint256 price;
    // Ticket Sale Ends
    uint256 end;
    // How many losers in the game
    uint256 winnerCount;
    // Selected Losers
    address[] winners;
    // Protocol Percent
    uint256 protocolPercent;
    // Creator Percent
    uint256 creatorPercent;
    // Creator Address
    address creator;
}

File 19 of 19 : RNGLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title RNGLib
 * @dev Library providing a simple interface to manage a
 * contract-internal PRNG and pull random numbers from it.
 */
library RNGLib {
    /// @dev Structure to hold the state of the random number generator (RNG).
    struct RNGState {
        bytes32 seed;
        uint256 counter;
    }

    /// @notice Seed a new RNG based on value from a public randomness beacon.
    /// @dev To ensure domain separation, at least one of randomness, chain id, current contract
    /// address, or the domain string must be different between two different RNGs.
    /// @param randomness The value from a public randomness beacon.
    /// @param domain A string that contributes to domain separation.
    /// @return st The initialized RNGState struct.
    function makeRNG(
        uint256 randomness,
        string memory domain
    ) internal view returns (RNGState memory st) {
        st.seed = keccak256(
            abi.encodePacked(randomness, block.chainid, address(this), domain)
        );
        st.counter = 0;
    }

    /// @notice Generate a distinct, uniformly distributed number, and advance the RNG.
    /// @param st The RNGState struct representing the state of the RNG.
    /// @return random A distinct, uniformly distributed number.
    function randomUint256(
        RNGState memory st
    ) internal pure returns (uint256 random) {
        random = uint256(keccak256(abi.encodePacked(st.seed, st.counter)));
        unchecked {
            // It's not possible to call random enough times to overflow
            st.counter++;
        }
    }

    /// @notice Generate a distinct, uniformly distributed number less than max, and advance the RNG
    /// @dev Max is limited to uint224 to ensure modulo bias probability is negligible.
    /// @param st The RNGState struct representing the state of the RNG.
    /// @param max The upper limit for the generated random number (exclusive).
    /// @return A distinct, uniformly distributed number less than max.
    function randomUintLessThan(
        RNGState memory st,
        uint224 max
    ) internal pure returns (uint224) {
        return uint224(randomUint256(st) % max);
    }

    /// @dev Custom function that will return the rugger number using gelato RNGLib
    /// @param rand1 random value to help RNG, this case it's pool ID which will be difrerent every pool
    /// @param rand2 random value to help RNG, this case it's totalMinted which can be different every pool
    /// @param rand3 string made up of multiple random values to help with RNG
    function revealRugger(uint256 rand1, uint256 rand2, string memory rand3) internal view returns(uint256 rugger) {
        RNGState memory rng = makeRNG(rand1, rand3);
        rugger = RNGLib.randomUint256(rng) % rand2;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"benefiter","type":"address"},{"internalType":"address","name":"sync","type":"address"},{"internalType":"address","name":"whitelisterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CreationClosed","type":"error"},{"inputs":[],"name":"InvalidCostAmount","type":"error"},{"inputs":[],"name":"InvalidDates","type":"error"},{"inputs":[],"name":"InvalidEntryAmount","type":"error"},{"inputs":[],"name":"InvalidEntryLoserRatio","type":"error"},{"inputs":[],"name":"InvalidPayment","type":"error"},{"inputs":[],"name":"InvalidTokenPayment","type":"error"},{"inputs":[],"name":"InvalidWinnersAmount","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TokenNotWhitelisted","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"},{"inputs":[{"internalType":"address","name":"tokenUsed","type":"address"},{"internalType":"uint16","name":"maxEntries","type":"uint16"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"winnerCount","type":"uint256"}],"name":"createLobby","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"creationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creationOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creatorPercentageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"entryRange","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"games","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"percentageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rugletteSync","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenWhitelist","outputs":[{"internalType":"contract ITokenWhitelist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newBenef","type":"address"}],"name":"updateBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateCreationClose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCreation","type":"uint256"},{"internalType":"uint256","name":"newPercentage","type":"uint256"},{"internalType":"uint256","name":"creatorPercentage","type":"uint256"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[2]","name":"entries","type":"uint16[2]"},{"internalType":"uint16[2]","name":"winRange","type":"uint16[2]"}],"name":"updateRanges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"winnerRange","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200285738038062002857833981016040819052620000349162000124565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006681620000b7565b50600280546001600160a01b039485166001600160a01b0319918216179091556004805460ff191660011790556009805493851693821693909317909255600b80549190931691161790556200016e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011f57600080fd5b919050565b6000806000606084860312156200013a57600080fd5b620001458462000107565b9250620001556020850162000107565b9150620001656040850162000107565b90509250925092565b6126d9806200017e6000396000f3fe6080604052600436106200015e5760003560e01c80638da5cb5b11620000cf578063ca735cc1116200007d578063d6ef90df1162000060578063d6ef90df146200039d578063dce0b4e414620003b5578063f2fde38b14620003cd57600080fd5b8063ca735cc11462000363578063d3e72637146200038557600080fd5b8063a1e1fa2011620000b2578063a1e1fa2014620002fa578063a96b415f1462000311578063bd1533f5146200033657600080fd5b80638da5cb5b14620002a157806391741fee14620002c157600080fd5b80633ccfd60b116200012d5780634f41fb6111620001105780634f41fb61146200024c578063715018a61462000271578063780a7ff0146200028957600080fd5b80633ccfd60b14620002135780634d1975b4146200022b57600080fd5b80630aaffd2a1462000163578063117a5b90146200018a5780631f84ff4114620001cc5780632242908514620001ee575b600080fd5b3480156200017057600080fd5b50620001886200018236600462000efc565b620003f2565b005b3480156200019757600080fd5b50620001af620001a936600462000f21565b6200042b565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620001d957600080fd5b50600954620001af906001600160a01b031681565b348015620001fb57600080fd5b50620001886200020d36600462000f3b565b62000456565b3480156200022057600080fd5b5062000188620004fb565b3480156200023857600080fd5b506001545b604051908152602001620001c3565b3480156200025957600080fd5b50620001886200026b36600462001007565b62000542565b3480156200027e57600080fd5b5062000188620005f1565b3480156200029657600080fd5b506200023d60085481565b348015620002ae57600080fd5b506000546001600160a01b0316620001af565b348015620002ce57600080fd5b50620002e6620002e036600462000f21565b62000609565b60405161ffff9091168152602001620001c3565b620001af6200030b36600462001041565b62000638565b3480156200031e57600080fd5b50620002e66200033036600462000f21565b62000ceb565b3480156200034357600080fd5b50600454620003529060ff1681565b6040519015158152602001620001c3565b3480156200037057600080fd5b50600b54620001af906001600160a01b031681565b3480156200039257600080fd5b506200018862000cfc565b348015620003aa57600080fd5b506200023d60075481565b348015620003c257600080fd5b506200023d60035481565b348015620003da57600080fd5b5062000188620003ec36600462000efc565b62000d1a565b620003fc62000d78565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600181815481106200043c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6200046062000d78565b6003839055600882905560078190556009546040517f3aa9378e0000000000000000000000000000000000000000000000000000000081526004810185905260248101849052604481018390526001600160a01b0390911690633aa9378e90606401600060405180830381600087803b158015620004dd57600080fd5b505af1158015620004f2573d6000803e3d6000fd5b50505050505050565b6200050562000d78565b6002546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156200053f573d6000803e3d6000fd5b50565b6200054c62000d78565b6200055b600583600262000e1d565b506200056b600682600262000e1d565b506009546040517f728155320000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690637281553290620005b99085908590600401620010c2565b600060405180830381600087803b158015620005d457600080fd5b505af1158015620005e9573d6000803e3d6000fd5b505050505050565b620005fb62000d78565b62000607600062000dc0565b565b600581600281106200061a57600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b60045460009060ff1662000678576040517f2a046d3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b546040517f82dc67ca0000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152909116906382dc67ca90602401602060405180830381865afa158015620006dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007029190620010e1565b62000739576040517ff84835a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600354156200077f573460035411156200077f576040517f3c6b4b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055461ffff9081169086161080620007a7575060055461ffff620100009091048116908616115b15620007df576040517f78c103f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065461ffff16821080620007ff575060065462010000900461ffff1682115b1562000837576040517fde1430d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461ffff16821062000875576040517fb9f6588200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008411620008b0576040517f3d978c3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82421115620008eb576040517fd937486c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015284906001600160a01b038816906370a0823190602401602060405180830381865afa1580156200094b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200097191906200111b565b11620009a9576040517ffbccebae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a12604051806101400160405280600081526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b031681525090565b60405180610140016040528060018054905081526020018761ffff168152602001886001600160a01b03168152602001868152602001858152602001848152602001600a80548060200260200160405190810160405280929190818152602001828054801562000aac57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000a8d575b5050509183525050600854602082015260075460408083019190915233606090920191909152600254600954915192935060009284926001600160a01b0392831692169062000afb9062000eba565b62000b09939291906200117c565b604051809103906000f08015801562000b26573d6000803e3d6000fd5b50604080516001808252818301909252919250829160009160208083019080368337019050509050818160008151811062000b655762000b6562001105565b6001600160a01b0392831660209182029290920101526009546040517faff177ca00000000000000000000000000000000000000000000000000000000815291169063aff177ca9062000bc090849060019060040162001231565b600060405180830381600087803b15801562000bdb57600080fd5b505af115801562000bf0573d6000803e3d6000fd5b50506009546001546040517f8fbce55a0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260248201929092528e8216604482015233606482015291169250638fbce55a9150608401600060405180830381600087803b15801562000c6d57600080fd5b505af115801562000c82573d6000803e3d6000fd5b50506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861617905550919a9950505050505050505050565b600681600281106200061a57600080fd5b62000d0662000d78565b6004805460ff19811660ff90911615179055565b62000d2462000d78565b6001600160a01b03811662000d6d576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b6200053f8162000dc0565b6000546001600160a01b0316331462000607576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240162000d64565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60018301918390821562000ea85791602002820160005b8382111562000e7657835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000e34565b801562000ea65782816101000a81549061ffff021916905560020160208160010104928301926001030262000e76565b505b5062000eb692915062000ec8565b5090565b61144c806200125883390190565b5b8082111562000eb6576000815560010162000ec9565b80356001600160a01b038116811462000ef757600080fd5b919050565b60006020828403121562000f0f57600080fd5b62000f1a8262000edf565b9392505050565b60006020828403121562000f3457600080fd5b5035919050565b60008060006060848603121562000f5157600080fd5b505081359360208301359350604090920135919050565b803561ffff8116811462000ef757600080fd5b600082601f83011262000f8d57600080fd5b6040516040810181811067ffffffffffffffff8211171562000fbf57634e487b7160e01b600052604160045260246000fd5b806040525080604084018581111562000fd757600080fd5b845b8181101562000ffc5762000fed8162000f68565b83526020928301920162000fd9565b509195945050505050565b600080608083850312156200101b57600080fd5b62001027848462000f7b565b915062001038846040850162000f7b565b90509250929050565b600080600080600060a086880312156200105a57600080fd5b620010658662000edf565b9450620010756020870162000f68565b94979496505050506040830135926060810135926080909101359150565b8060005b6002811015620010bc57815161ffff1684526020938401939091019060010162001097565b50505050565b60808101620010d2828562001093565b62000f1a604083018462001093565b600060208284031215620010f457600080fd5b8151801515811462000f1a57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200112e57600080fd5b5051919050565b60008151808452602080850194506020840160005b83811015620011715781516001600160a01b0316875295820195908201906001016200114a565b509495945050505050565b60608152835160608201526020840151608082015260006040850151620011ae60a08401826001600160a01b03169052565b50606085015160c0830152608085015160e083015260a0850151610100818185015260c087015191506101406101208181870152620011f26101a087018562001135565b60e08a015192870192909252918801516101608601529601516001600160a01b0390811661018085015294851660208401525050911660409091015290565b60408152600062001246604083018562001135565b90508215156020830152939250505056fe60806040523480156200001157600080fd5b506040516200144c3803806200144c833981016040819052620000349162000292565b6001600055825160039081556020808501516004556040850151600580546001600160a01b0319166001600160a01b039092169190911790556060850151600655608085015160075560a085015160085560c08501518051869392620000a09260099291019062000102565b5060e08201516007820155610100820151600882015561012090910151600990910180546001600160a01b03199081166001600160a01b039384161790915560018054821694831694909417909355600d80549093169116179055506200039e565b8280548282559060005260206000209081019282156200015a579160200282015b828111156200015a57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000123565b50620001689291506200016c565b5090565b5b808211156200016857600081556001016200016d565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b0381118282101715620001bf57620001bf62000183565b60405290565b80516001600160a01b0381168114620001dd57600080fd5b919050565b600082601f830112620001f457600080fd5b815160206001600160401b038083111562000213576200021362000183565b8260051b604051601f19603f830116810181811084821117156200023b576200023b62000183565b60405293845260208187018101949081019250878511156200025c57600080fd5b6020870191505b8482101562000287576200027782620001c5565b8352918301919083019062000263565b979650505050505050565b600080600060608486031215620002a857600080fd5b83516001600160401b0380821115620002c057600080fd5b908501906101408288031215620002d657600080fd5b620002e062000199565b8251815260208301516020820152620002fc60408401620001c5565b6040820152606083015160608201526080830151608082015260a083015160a082015260c0830151828111156200033257600080fd5b6200034089828601620001e2565b60c08301525060e08381015190820152610100808401519082015261012091506200036d828401620001c5565b828201528095505050506200038560208501620001c5565b91506200039560408501620001c5565b90509250925092565b61109e80620003ae6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806338af3eed1161005b57806338af3eed146100da578063396a9e5d146100ed578063767d59af14610102578063bdb337d11461011557600080fd5b8063152b1f7c14610082578063215e1138146100b257806321af326a146100c7575b600080fd5b610095610090366004610d27565b610139565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ba610163565b6040516100a99190610d85565b600d54610095906001600160a01b031681565b600154610095906001600160a01b031681565b6101006100fb366004610e27565b61029c565b005b610100610110366004610d27565b61068f565b600d5461012990600160a01b900460ff1681565b60405190151581526020016100a9565b6002818154811061014957600080fd5b6000918252602090912001546001600160a01b0316905081565b6101cb604051806101400160405280600081526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b031681525090565b60408051610140810182526003805482526004546020808401919091526005546001600160a01b0316838501526006546060840152600754608084015260085460a0840152600980548551818402810184019096528086529394929360c08601939283018282801561026657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610248575b505050918352505060078201546020820152600882015460408201526009909101546001600160a01b0316606090910152919050565b6102a461087e565b600d54600160a01b900460ff16156102e8576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454600254101561033057600754421015610330576040517fa8058ea900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085481101561036c576040517f7051d14d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b600854811015610443576103d084848381811061038f5761038f610e9c565b905060200201356002805490506003800154426040516020016103bc929190918252602082015260400190565b6040516020818303038152906040526108c1565b91506003600601600283815481106103ea576103ea610e9c565b600091825260208083209091015483546001810185559383529120909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117905561043b826108ed565b600101610370565b50600d80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17905561047a610a3f565b6008546005546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a0823190602401602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190610eb2565b6104f59190610ef7565b600d546040517f18a6f6ae0000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906318a6f6ae906105449030906009908690600401610f0b565b600060405180830381600087803b15801561055e57600080fd5b505af1158015610572573d6000803e3d6000fd5b5050505060005b60095481101561067e5760098054600091908390811061059b5761059b610e9c565b6000918252602090912001546001600160a01b03161461067657600554600980546001600160a01b039092169163a9059cbb9190849081106105df576105df610e9c565b60009182526020909120015460405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610f76565b505b600101610579565b50505061068b6001600055565b5050565b61069761087e565b6002546000906106a8908390610f9f565b6004549091508111156106e7576040517fbda98fc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b828110156107cc57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600d546040517f57b8f18700000000000000000000000000000000000000000000000000000000815230600482015260248101929092526001600160a01b0316906357b8f18790604401600060405180830381600087803b1580156107a857600080fd5b505af11580156107bc573d6000803e3d6000fd5b5050600190920191506106ea9050565b506006546107da9083610fb8565b6005546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af115801561084b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086f9190610f76565b505061087b6001600055565b50565b6002600054036108ba576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6000806108ce8584610c8b565b9050836108da82610cdc565b6108e49190610fcf565b95945050505050565b600254811061095c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e646578206f7574206f6620626f756e647300000000000000000000000000604482015260640160405180910390fd5b805b60025461096d90600190610fe3565b8110156109fb576002610981826001610f9f565b8154811061099157610991610e9c565b600091825260209091200154600280546001600160a01b0390921691839081106109bd576109bd610e9c565b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905560010161095e565b506002805480610a0d57610a0d610ff6565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905550565b6005546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab09190610eb2565b600a5490915060009015610b5c57600a54670de0b6b3a764000090610ad59084610fb8565b610adf9190610ef7565b60055460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929550169063a9059cbb906044016020604051808303816000875af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610f76565b505b600b5415610c0257600b54670de0b6b3a764000090610b7b9084610fb8565b610b859190610ef7565b600554600c5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c009190610f76565b505b600d546040517f413fa17a00000000000000000000000000000000000000000000000000000000815230600482015260248101859052604481018390526001600160a01b039091169063413fa17a90606401600060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b50505050505050565b604080518082019091526000808252602082015282463084604051602001610cb6949392919061100c565b60408051601f198184030181529190528051602091820120825260009082015292915050565b600081600001518260200151604051602001610d02929190918252602082015260400190565b60408051601f1981840301815291905280516020918201209201805160010190525090565b600060208284031215610d3957600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015610d7a5781516001600160a01b031687529582019590820190600101610d55565b509495945050505050565b60208152815160208201526020820151604082015260006040830151610db660608401826001600160a01b03169052565b5060608301516080830152608083015160a083015260a083015160c083015260c08301516101408060e0850152610df1610160850183610d40565b60e08601516101008681019190915286015161012080870191909152909501516001600160a01b03169301929092525090919050565b60008060208385031215610e3a57600080fd5b823567ffffffffffffffff80821115610e5257600080fd5b818501915085601f830112610e6657600080fd5b813581811115610e7557600080fd5b8660208260051b8501011115610e8a57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ec457600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082610f0657610f06610ecb565b500490565b6000606082016001600160a01b038087168452602060606020860152828754808552608087019150886000526020600020945060005b81811015610f5f578554851683526001958601959284019201610f41565b505080945050505050826040830152949350505050565b600060208284031215610f8857600080fd5b81518015158114610f9857600080fd5b9392505050565b80820180821115610fb257610fb2610ee1565b92915050565b8082028115828204841417610fb257610fb2610ee1565b600082610fde57610fde610ecb565b500690565b81810381811115610fb257610fb2610ee1565b634e487b7160e01b600052603160045260246000fd5b848152600060208560208401526bffffffffffffffffffffffff198560601b166040840152835160005b8181101561105257858101830151858201605401528201611036565b506000930160540192835250909594505050505056fea264697066735822122065b1aa2802e2710aef021a62ae61f5191c425c655b29df6e0a538066c74711ed64736f6c63430008180033a264697066735822122080be65bc4faeb866df096950d9898f39b46d0cc184d989d80b0bb6118a37370764736f6c634300081800330000000000000000000000003235164f2f5627b2606cebbd8065c8a419955c6d0000000000000000000000007f725be888178aaf9d72ec98e720f8c55c0c97ac000000000000000000000000a4dfb624ba866b70c44718ad825b798a2008cf42

Deployed Bytecode

0x6080604052600436106200015e5760003560e01c80638da5cb5b11620000cf578063ca735cc1116200007d578063d6ef90df1162000060578063d6ef90df146200039d578063dce0b4e414620003b5578063f2fde38b14620003cd57600080fd5b8063ca735cc11462000363578063d3e72637146200038557600080fd5b8063a1e1fa2011620000b2578063a1e1fa2014620002fa578063a96b415f1462000311578063bd1533f5146200033657600080fd5b80638da5cb5b14620002a157806391741fee14620002c157600080fd5b80633ccfd60b116200012d5780634f41fb6111620001105780634f41fb61146200024c578063715018a61462000271578063780a7ff0146200028957600080fd5b80633ccfd60b14620002135780634d1975b4146200022b57600080fd5b80630aaffd2a1462000163578063117a5b90146200018a5780631f84ff4114620001cc5780632242908514620001ee575b600080fd5b3480156200017057600080fd5b50620001886200018236600462000efc565b620003f2565b005b3480156200019757600080fd5b50620001af620001a936600462000f21565b6200042b565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620001d957600080fd5b50600954620001af906001600160a01b031681565b348015620001fb57600080fd5b50620001886200020d36600462000f3b565b62000456565b3480156200022057600080fd5b5062000188620004fb565b3480156200023857600080fd5b506001545b604051908152602001620001c3565b3480156200025957600080fd5b50620001886200026b36600462001007565b62000542565b3480156200027e57600080fd5b5062000188620005f1565b3480156200029657600080fd5b506200023d60085481565b348015620002ae57600080fd5b506000546001600160a01b0316620001af565b348015620002ce57600080fd5b50620002e6620002e036600462000f21565b62000609565b60405161ffff9091168152602001620001c3565b620001af6200030b36600462001041565b62000638565b3480156200031e57600080fd5b50620002e66200033036600462000f21565b62000ceb565b3480156200034357600080fd5b50600454620003529060ff1681565b6040519015158152602001620001c3565b3480156200037057600080fd5b50600b54620001af906001600160a01b031681565b3480156200039257600080fd5b506200018862000cfc565b348015620003aa57600080fd5b506200023d60075481565b348015620003c257600080fd5b506200023d60035481565b348015620003da57600080fd5b5062000188620003ec36600462000efc565b62000d1a565b620003fc62000d78565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600181815481106200043c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6200046062000d78565b6003839055600882905560078190556009546040517f3aa9378e0000000000000000000000000000000000000000000000000000000081526004810185905260248101849052604481018390526001600160a01b0390911690633aa9378e90606401600060405180830381600087803b158015620004dd57600080fd5b505af1158015620004f2573d6000803e3d6000fd5b50505050505050565b6200050562000d78565b6002546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156200053f573d6000803e3d6000fd5b50565b6200054c62000d78565b6200055b600583600262000e1d565b506200056b600682600262000e1d565b506009546040517f728155320000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690637281553290620005b99085908590600401620010c2565b600060405180830381600087803b158015620005d457600080fd5b505af1158015620005e9573d6000803e3d6000fd5b505050505050565b620005fb62000d78565b62000607600062000dc0565b565b600581600281106200061a57600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b60045460009060ff1662000678576040517f2a046d3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b546040517f82dc67ca0000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152909116906382dc67ca90602401602060405180830381865afa158015620006dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007029190620010e1565b62000739576040517ff84835a000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600354156200077f573460035411156200077f576040517f3c6b4b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055461ffff9081169086161080620007a7575060055461ffff620100009091048116908616115b15620007df576040517f78c103f400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065461ffff16821080620007ff575060065462010000900461ffff1682115b1562000837576040517fde1430d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461ffff16821062000875576040517fb9f6588200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008411620008b0576040517f3d978c3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82421115620008eb576040517fd937486c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015284906001600160a01b038816906370a0823190602401602060405180830381865afa1580156200094b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200097191906200111b565b11620009a9576040517ffbccebae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a12604051806101400160405280600081526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b031681525090565b60405180610140016040528060018054905081526020018761ffff168152602001886001600160a01b03168152602001868152602001858152602001848152602001600a80548060200260200160405190810160405280929190818152602001828054801562000aac57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000a8d575b5050509183525050600854602082015260075460408083019190915233606090920191909152600254600954915192935060009284926001600160a01b0392831692169062000afb9062000eba565b62000b09939291906200117c565b604051809103906000f08015801562000b26573d6000803e3d6000fd5b50604080516001808252818301909252919250829160009160208083019080368337019050509050818160008151811062000b655762000b6562001105565b6001600160a01b0392831660209182029290920101526009546040517faff177ca00000000000000000000000000000000000000000000000000000000815291169063aff177ca9062000bc090849060019060040162001231565b600060405180830381600087803b15801562000bdb57600080fd5b505af115801562000bf0573d6000803e3d6000fd5b50506009546001546040517f8fbce55a0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260248201929092528e8216604482015233606482015291169250638fbce55a9150608401600060405180830381600087803b15801562000c6d57600080fd5b505af115801562000c82573d6000803e3d6000fd5b50506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861617905550919a9950505050505050505050565b600681600281106200061a57600080fd5b62000d0662000d78565b6004805460ff19811660ff90911615179055565b62000d2462000d78565b6001600160a01b03811662000d6d576040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600060048201526024015b60405180910390fd5b6200053f8162000dc0565b6000546001600160a01b0316331462000607576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240162000d64565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60018301918390821562000ea85791602002820160005b8382111562000e7657835183826101000a81548161ffff021916908361ffff160217905550926020019260020160208160010104928301926001030262000e34565b801562000ea65782816101000a81549061ffff021916905560020160208160010104928301926001030262000e76565b505b5062000eb692915062000ec8565b5090565b61144c806200125883390190565b5b8082111562000eb6576000815560010162000ec9565b80356001600160a01b038116811462000ef757600080fd5b919050565b60006020828403121562000f0f57600080fd5b62000f1a8262000edf565b9392505050565b60006020828403121562000f3457600080fd5b5035919050565b60008060006060848603121562000f5157600080fd5b505081359360208301359350604090920135919050565b803561ffff8116811462000ef757600080fd5b600082601f83011262000f8d57600080fd5b6040516040810181811067ffffffffffffffff8211171562000fbf57634e487b7160e01b600052604160045260246000fd5b806040525080604084018581111562000fd757600080fd5b845b8181101562000ffc5762000fed8162000f68565b83526020928301920162000fd9565b509195945050505050565b600080608083850312156200101b57600080fd5b62001027848462000f7b565b915062001038846040850162000f7b565b90509250929050565b600080600080600060a086880312156200105a57600080fd5b620010658662000edf565b9450620010756020870162000f68565b94979496505050506040830135926060810135926080909101359150565b8060005b6002811015620010bc57815161ffff1684526020938401939091019060010162001097565b50505050565b60808101620010d2828562001093565b62000f1a604083018462001093565b600060208284031215620010f457600080fd5b8151801515811462000f1a57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000602082840312156200112e57600080fd5b5051919050565b60008151808452602080850194506020840160005b83811015620011715781516001600160a01b0316875295820195908201906001016200114a565b509495945050505050565b60608152835160608201526020840151608082015260006040850151620011ae60a08401826001600160a01b03169052565b50606085015160c0830152608085015160e083015260a0850151610100818185015260c087015191506101406101208181870152620011f26101a087018562001135565b60e08a015192870192909252918801516101608601529601516001600160a01b0390811661018085015294851660208401525050911660409091015290565b60408152600062001246604083018562001135565b90508215156020830152939250505056fe60806040523480156200001157600080fd5b506040516200144c3803806200144c833981016040819052620000349162000292565b6001600055825160039081556020808501516004556040850151600580546001600160a01b0319166001600160a01b039092169190911790556060850151600655608085015160075560a085015160085560c08501518051869392620000a09260099291019062000102565b5060e08201516007820155610100820151600882015561012090910151600990910180546001600160a01b03199081166001600160a01b039384161790915560018054821694831694909417909355600d80549093169116179055506200039e565b8280548282559060005260206000209081019282156200015a579160200282015b828111156200015a57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000123565b50620001689291506200016c565b5090565b5b808211156200016857600081556001016200016d565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b0381118282101715620001bf57620001bf62000183565b60405290565b80516001600160a01b0381168114620001dd57600080fd5b919050565b600082601f830112620001f457600080fd5b815160206001600160401b038083111562000213576200021362000183565b8260051b604051601f19603f830116810181811084821117156200023b576200023b62000183565b60405293845260208187018101949081019250878511156200025c57600080fd5b6020870191505b8482101562000287576200027782620001c5565b8352918301919083019062000263565b979650505050505050565b600080600060608486031215620002a857600080fd5b83516001600160401b0380821115620002c057600080fd5b908501906101408288031215620002d657600080fd5b620002e062000199565b8251815260208301516020820152620002fc60408401620001c5565b6040820152606083015160608201526080830151608082015260a083015160a082015260c0830151828111156200033257600080fd5b6200034089828601620001e2565b60c08301525060e08381015190820152610100808401519082015261012091506200036d828401620001c5565b828201528095505050506200038560208501620001c5565b91506200039560408501620001c5565b90509250925092565b61109e80620003ae6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806338af3eed1161005b57806338af3eed146100da578063396a9e5d146100ed578063767d59af14610102578063bdb337d11461011557600080fd5b8063152b1f7c14610082578063215e1138146100b257806321af326a146100c7575b600080fd5b610095610090366004610d27565b610139565b6040516001600160a01b0390911681526020015b60405180910390f35b6100ba610163565b6040516100a99190610d85565b600d54610095906001600160a01b031681565b600154610095906001600160a01b031681565b6101006100fb366004610e27565b61029c565b005b610100610110366004610d27565b61068f565b600d5461012990600160a01b900460ff1681565b60405190151581526020016100a9565b6002818154811061014957600080fd5b6000918252602090912001546001600160a01b0316905081565b6101cb604051806101400160405280600081526020016000815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160006001600160a01b031681525090565b60408051610140810182526003805482526004546020808401919091526005546001600160a01b0316838501526006546060840152600754608084015260085460a0840152600980548551818402810184019096528086529394929360c08601939283018282801561026657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610248575b505050918352505060078201546020820152600882015460408201526009909101546001600160a01b0316606090910152919050565b6102a461087e565b600d54600160a01b900460ff16156102e8576040517fdf469ccb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454600254101561033057600754421015610330576040517fa8058ea900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085481101561036c576040517f7051d14d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b600854811015610443576103d084848381811061038f5761038f610e9c565b905060200201356002805490506003800154426040516020016103bc929190918252602082015260400190565b6040516020818303038152906040526108c1565b91506003600601600283815481106103ea576103ea610e9c565b600091825260208083209091015483546001810185559383529120909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117905561043b826108ed565b600101610370565b50600d80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17905561047a610a3f565b6008546005546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a0823190602401602060405180830381865afa1580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190610eb2565b6104f59190610ef7565b600d546040517f18a6f6ae0000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906318a6f6ae906105449030906009908690600401610f0b565b600060405180830381600087803b15801561055e57600080fd5b505af1158015610572573d6000803e3d6000fd5b5050505060005b60095481101561067e5760098054600091908390811061059b5761059b610e9c565b6000918252602090912001546001600160a01b03161461067657600554600980546001600160a01b039092169163a9059cbb9190849081106105df576105df610e9c565b60009182526020909120015460405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039091166004820152602481018590526044016020604051808303816000875af1158015610650573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106749190610f76565b505b600101610579565b50505061068b6001600055565b5050565b61069761087e565b6002546000906106a8908390610f9f565b6004549091508111156106e7576040517fbda98fc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b828110156107cc57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff191633908117909155600d546040517f57b8f18700000000000000000000000000000000000000000000000000000000815230600482015260248101929092526001600160a01b0316906357b8f18790604401600060405180830381600087803b1580156107a857600080fd5b505af11580156107bc573d6000803e3d6000fd5b5050600190920191506106ea9050565b506006546107da9083610fb8565b6005546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af115801561084b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086f9190610f76565b505061087b6001600055565b50565b6002600054036108ba576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6000806108ce8584610c8b565b9050836108da82610cdc565b6108e49190610fcf565b95945050505050565b600254811061095c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e646578206f7574206f6620626f756e647300000000000000000000000000604482015260640160405180910390fd5b805b60025461096d90600190610fe3565b8110156109fb576002610981826001610f9f565b8154811061099157610991610e9c565b600091825260209091200154600280546001600160a01b0390921691839081106109bd576109bd610e9c565b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905560010161095e565b506002805480610a0d57610a0d610ff6565b6000828152602090208101600019908101805473ffffffffffffffffffffffffffffffffffffffff1916905501905550565b6005546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab09190610eb2565b600a5490915060009015610b5c57600a54670de0b6b3a764000090610ad59084610fb8565b610adf9190610ef7565b60055460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929550169063a9059cbb906044016020604051808303816000875af1158015610b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5a9190610f76565b505b600b5415610c0257600b54670de0b6b3a764000090610b7b9084610fb8565b610b859190610ef7565b600554600c5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015610bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c009190610f76565b505b600d546040517f413fa17a00000000000000000000000000000000000000000000000000000000815230600482015260248101859052604481018390526001600160a01b039091169063413fa17a90606401600060405180830381600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b50505050505050565b604080518082019091526000808252602082015282463084604051602001610cb6949392919061100c565b60408051601f198184030181529190528051602091820120825260009082015292915050565b600081600001518260200151604051602001610d02929190918252602082015260400190565b60408051601f1981840301815291905280516020918201209201805160010190525090565b600060208284031215610d3957600080fd5b5035919050565b60008151808452602080850194506020840160005b83811015610d7a5781516001600160a01b031687529582019590820190600101610d55565b509495945050505050565b60208152815160208201526020820151604082015260006040830151610db660608401826001600160a01b03169052565b5060608301516080830152608083015160a083015260a083015160c083015260c08301516101408060e0850152610df1610160850183610d40565b60e08601516101008681019190915286015161012080870191909152909501516001600160a01b03169301929092525090919050565b60008060208385031215610e3a57600080fd5b823567ffffffffffffffff80821115610e5257600080fd5b818501915085601f830112610e6657600080fd5b813581811115610e7557600080fd5b8660208260051b8501011115610e8a57600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610ec457600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082610f0657610f06610ecb565b500490565b6000606082016001600160a01b038087168452602060606020860152828754808552608087019150886000526020600020945060005b81811015610f5f578554851683526001958601959284019201610f41565b505080945050505050826040830152949350505050565b600060208284031215610f8857600080fd5b81518015158114610f9857600080fd5b9392505050565b80820180821115610fb257610fb2610ee1565b92915050565b8082028115828204841417610fb257610fb2610ee1565b600082610fde57610fde610ecb565b500690565b81810381811115610fb257610fb2610ee1565b634e487b7160e01b600052603160045260246000fd5b848152600060208560208401526bffffffffffffffffffffffff198560601b166040840152835160005b8181101561105257858101830151858201605401528201611036565b506000930160540192835250909594505050505056fea264697066735822122065b1aa2802e2710aef021a62ae61f5191c425c655b29df6e0a538066c74711ed64736f6c63430008180033a264697066735822122080be65bc4faeb866df096950d9898f39b46d0cc184d989d80b0bb6118a37370764736f6c63430008180033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003235164f2f5627b2606cebbd8065c8a419955c6d0000000000000000000000007f725be888178aaf9d72ec98e720f8c55c0c97ac000000000000000000000000a4dfb624ba866b70c44718ad825b798a2008cf42

-----Decoded View---------------
Arg [0] : benefiter (address): 0x3235164f2F5627b2606CeBbd8065C8A419955C6D
Arg [1] : sync (address): 0x7F725be888178aAf9D72eC98E720f8c55c0C97ac
Arg [2] : whitelisterAddress (address): 0xa4DFB624ba866b70c44718ad825B798a2008CF42

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003235164f2f5627b2606cebbd8065c8a419955c6d
Arg [1] : 0000000000000000000000007f725be888178aaf9d72ec98e720f8c55c0c97ac
Arg [2] : 000000000000000000000000a4dfb624ba866b70c44718ad825b798a2008cf42


Block Transaction Gas Used Reward
view all blocks ##produced##

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.