Contract

0x6af31eaEa31Ac01bac2b1D968bB958ad2AF4A938

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Fulfill Random W...15906212024-12-25 19:31:1640 hrs ago1735155076IN
0x6af31eaE...d2AF4A938
0 S0.000219331
Bet15906202024-12-25 19:31:1540 hrs ago1735155075IN
0x6af31eaE...d2AF4A938
0.000288 S0.000320421.11
Purchase Points15813562024-12-25 17:30:2442 hrs ago1735147824IN
0x6af31eaE...d2AF4A938
0 S0.000064411.1
Fulfill Random W...15811492024-12-25 17:27:2842 hrs ago1735147648IN
0x6af31eaE...d2AF4A938
0 S0.000258251
Bet15811472024-12-25 17:27:2642 hrs ago1735147646IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307221.1
Sell Points14930942024-12-24 19:38:102 days ago1735069090IN
0x6af31eaE...d2AF4A938
0 S0.000067231.1
Fulfill Random W...14930282024-12-24 19:36:572 days ago1735069017IN
0x6af31eaE...d2AF4A938
0 S0.000253771
Bet14930262024-12-24 19:36:562 days ago1735069016IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307221.1
Fulfill Random W...14925302024-12-24 19:26:222 days ago1735068382IN
0x6af31eaE...d2AF4A938
0 S0.000255991
Bet14925272024-12-24 19:26:202 days ago1735068380IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307261.1
Fulfill Random W...14925082024-12-24 19:26:092 days ago1735068369IN
0x6af31eaE...d2AF4A938
0 S0.000258221
Bet14925062024-12-24 19:26:082 days ago1735068368IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307261.1
Fulfill Random W...14924912024-12-24 19:25:512 days ago1735068351IN
0x6af31eaE...d2AF4A938
0 S0.000219331
Bet14924882024-12-24 19:25:502 days ago1735068350IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307261.1
Fulfill Random W...14924752024-12-24 19:25:342 days ago1735068334IN
0x6af31eaE...d2AF4A938
0 S0.000253721
Bet14924742024-12-24 19:25:332 days ago1735068333IN
0x6af31eaE...d2AF4A938
0.000288 S0.000307221.1
Fulfill Random W...14923552024-12-24 19:22:512 days ago1735068171IN
0x6af31eaE...d2AF4A938
0 S0.00025381
Bet14923542024-12-24 19:22:492 days ago1735068169IN
0x6af31eaE...d2AF4A938
0.000288 S0.000296251.1
Purchase Points14863242024-12-24 17:46:402 days ago1735062400IN
0x6af31eaE...d2AF4A938
0 S0.000069691.1
Purchase Points14518812024-12-24 10:43:073 days ago1735036987IN
0x6af31eaE...d2AF4A938
0 S0.000040521.11
Purchase Points14270092024-12-24 6:07:083 days ago1735020428IN
0x6af31eaE...d2AF4A938
0 S0.000083041.11
Purchase Points13955182024-12-23 23:00:283 days ago1734994828IN
0x6af31eaE...d2AF4A938
0 S0.000064391.1
Sell Points13941092024-12-23 22:42:533 days ago1734993773IN
0x6af31eaE...d2AF4A938
0 S0.000067211.1
Purchase Points13936362024-12-23 22:37:273 days ago1734993447IN
0x6af31eaE...d2AF4A938
0 S0.000083221.1
Sell Points13935932024-12-23 22:36:593 days ago1734993419IN
0x6af31eaE...d2AF4A938
0 S0.000061951.1
View all transactions

Latest 12 internal transactions

Parent Transaction Hash Block From To
15906202024-12-25 19:31:1540 hrs ago1735155075
0x6af31eaE...d2AF4A938
0.000288 S
15811472024-12-25 17:27:2642 hrs ago1735147646
0x6af31eaE...d2AF4A938
0.000288 S
14930262024-12-24 19:36:562 days ago1735069016
0x6af31eaE...d2AF4A938
0.000288 S
14925272024-12-24 19:26:202 days ago1735068380
0x6af31eaE...d2AF4A938
0.000288 S
14925062024-12-24 19:26:082 days ago1735068368
0x6af31eaE...d2AF4A938
0.000288 S
14924882024-12-24 19:25:502 days ago1735068350
0x6af31eaE...d2AF4A938
0.000288 S
14924742024-12-24 19:25:332 days ago1735068333
0x6af31eaE...d2AF4A938
0.000288 S
14923542024-12-24 19:22:492 days ago1735068169
0x6af31eaE...d2AF4A938
0.000288 S
13611962024-12-23 16:40:043 days ago1734972004
0x6af31eaE...d2AF4A938
0.000288 S
13611592024-12-23 16:39:473 days ago1734971987
0x6af31eaE...d2AF4A938
0.000288 S
13381192024-12-23 12:24:053 days ago1734956645
0x6af31eaE...d2AF4A938
0.01 S
13381192024-12-23 12:24:053 days ago1734956645
0x6af31eaE...d2AF4A938
0.01 S
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xec7f8176...615e1B813
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
DiceGame

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : DiceGame.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;
import "@openzeppelin/contracts/access/Ownable.sol";
import { TransferHelper } from "./libraries/TransferHelper.sol";

contract DiceGame is Ownable {
    using TransferHelper for address;

    struct GameRound {
        bool fulfilled; // whether the request has been successfully fulfilled
        address user;
        uint256 totalBet;
        uint256 totalWinnings;
        uint256[] betAmts;
        uint256[] diceRollResult;
    }
    
    uint256 public constant WIN69_MULTIPLIER = 10;
    uint256 public constant CALLBACK_GAS = 200000;
    uint256 public constant MAX_NUM_WORDS = 3;
    uint256 public constant DELIMITER = 1e18;
    uint8 public constant decimals = 18;
    string public constant name = "Banana Points";
    string public constant symbol = "BPT";

    uint256 public immutable gamePeriod;
    address public coin;
    address public immutable V3Deployer;
    address public immutable gameRngWallet;

    uint256 public sellCoinLimit = 1e24;
    /// @notice Timestamp when the geme ower
    uint256 public endTime;
    /// @notice Initial rate of tokens per coin
    uint256 public initialTokenRate;
    uint256 public sellTokenRate;

    uint256 public gameId;
    uint256 public lastFulfilledGameId;

    // The total supply of points in existence
    uint256 public totalSupply;
    // Maps an address to their current balance
    mapping(address => uint256) private userBalances;
    // Maps a game ID to its round information
    mapping(uint256 => GameRound) private gameRounds; /* gameId --> GameRound */
    // Maps an address to their game IDs
    mapping(address => uint256[]) public userGameIds;

    constructor(address _gameRngWalletAddress, uint _gamePeriod, address _V3Deployer) {
        gameRngWallet = _gameRngWalletAddress;
        if (_gameRngWalletAddress == address(0) || _V3Deployer == address(0)) revert ZeroValue();
        if (_gamePeriod < 2 hours || _gamePeriod > 180 days) revert GamePeriod();
        gamePeriod = _gamePeriod;

        V3Deployer = _V3Deployer;
        transferOwnership(_V3Deployer);
    }

    event MintPoints(address recipient, uint256 pointsAmount);
    event BurnPoints(address from, uint256 pointsAmount);
    event Redeem(address user, uint256 amount);
    event PurchasePoints(address user, uint256 paymentAmount);
    event SellPoints(address user, uint256 paymentAmount, uint256 pointsAmount);
    event Bet(uint256 gameId, address user, uint256 totalBetAmt);

    error AmountOfEthSentIsTooSmall(uint256 sent, uint256 minimum);
    error InvalidGameId(uint256 id);
    error InvaliddiceRollResult(uint256 id);
    error GamePeriod();
    error ZeroValue();
    error NotEnoughCoinBalance(uint256 want, uint256 have);
    error SellCoinLimitReached();
    error Forbidden();

    // Modifiers
    modifier shouldGameIsNotOver() {
        require(gameNotOver(), "game over");
        _;
    }

    modifier shouldGameIsOver() {
        require(gameOver(), "game is NOT over");
        _;
    }

    /// @notice Receive ETH and forward to `sponsorWallet`.
    receive() external payable {
        (bool success, ) = gameRngWallet.call{ value: msg.value }("");
        require(success);
    }

    /**
     * @notice Starts a new game with specific parameters Airnode details, initial token rate, etc.
     * non-zero initial token rate, and game not already started (initialTokenRate == 0).
     * @param _initialTokenRate The initial rate used within the game logic, set at the start and never changed afterward.
     * @param _coin address of Coin token for this Game
     * @custom:modifier onlyOwner Restricts the function's execution to the contract's owner.
     */
    function startGame(uint _initialTokenRate, address _coin) external payable onlyOwner {
        // Ensure the initial token rate is not already set
        require(initialTokenRate == 0, "o-o");
        if (_coin == address(0)) revert ZeroValue();
        // Initialize the initial token rate and calculate the end time based on the current timestamp
        initialTokenRate = _initialTokenRate;
        sellTokenRate = _initialTokenRate;
        coin = _coin;
        endTime = block.timestamp + gamePeriod;
        if (msg.value > 0) {
            (bool success, ) = gameRngWallet.call{ value: msg.value }("");
            require(success);
        }
    }

    /// @notice Retrieves the balance of a given account
    /// @dev Returns the current balance stored in `userBalances`
    /// @param account The address of the user whose balance we want to retrieve
    /// @return The balance of the user
    function balanceOf(address account) public view returns (uint256) {
        return userBalances[account];
    }

    /// @notice Retrieves info of particular game id
    /// @param _gameId game number/id
    /// @return gameInfo GameRound struct
    function getGameRoundInfo(uint256 _gameId) public view returns (GameRound memory gameInfo) {
        gameInfo = gameRounds[_gameId];
    }

    /// @notice Retrieves the list of game IDs associated with a given user
    /// @dev Fetches the array of game IDs from `userGameIds` using `.values()`
    /// @param user The address of the user whose game IDs we want to retrieve
    /// @return ids An array of game IDs that the user participated in
    function getUserGameIds(address user) public view returns (uint256[] memory ids) {
        ids = userGameIds[user];
    }

    /// @notice Retrieves the number of games a user has participated in
    /// @dev Calculates the length of the user's game IDs set
    /// @param user The address of the user whose number of games we want to know
    /// @return num The number of games the user has participated in
    function getUserGamesNumber(address user) public view returns (uint256 num) {
        num = userGameIds[user].length;
    }

    // @notice Retrieves the last game information for a given user
    /// @dev Fetches the last game ID and corresponding round info from `userGameIds` and `gameRounds`
    /// @param user The address of the user whose last game information we want to retrieve
    /// @return id The ID of the last game the user participated in
    /// @return round The GameRound struct containing the details of the game round
    function getUserLastGameInfo(
        address user
    ) public view returns (uint256 id, GameRound memory round) {
        uint256 length = userGameIds[user].length;
        if (length > 0) {
            id = userGameIds[user][length - 1];
            round = gameRounds[id];
        }
    }

    /// @notice Determines whether the game is still ongoing or not
    /// @dev Compares the current block timestamp against `endTime`; also ensures that the game has started by requiring `_endTime` to be non-zero
    /// @return Whether the current time is before the game's end time (`true`) or after (`false`)
    function gameNotOver() public view returns (bool) {
        uint256 _endTime = endTime;
        _checkZero(_endTime);
        return block.timestamp < _endTime;
    }

    /**
     * @notice Checks if the game has been concluded based on the time limit.
     * @dev Returns true if the current block timestamp exceeds the end time of the game by 10 minutes.
     *      This implies a grace period of 10 minutes after the official end time before declaring the game over.
     *      The function requires that `endTime` is set and the game has started, otherwise it reverts with an error message.
     *
     * @return A boolean value indicating whether the game is over (true) or not (false).
     */
    function gameOver() public view returns (bool) {
        uint256 _endTime = endTime;
        _checkZero(_endTime);
        return (block.timestamp > _endTime && gameId == lastFulfilledGameId);
    }

    struct GameState {
        uint256 gameId;
        uint256 betNumber;
    }

    /// @dev This function returns the state of games that have not yet been fulfilled.
    /// It constructs an array of `GameState` structures representing each unfulfilled game's
    /// ID and the count of bets placed in that game round.
    /// The function only includes games with IDs greater than `lastFulfilledGameId`.
    /// @return state An array of `GameState` structs for each unfulfilled game.
    function getGameState() public view returns (GameState[] memory state) {
        if (gameId > lastFulfilledGameId) {
            uint256 requests = gameId - lastFulfilledGameId;
            state = new GameState[](requests);
            uint256 index;
            while (lastFulfilledGameId + index < gameId) {
                uint256 id = lastFulfilledGameId + index + 1;
                state[index].gameId = id;
                state[index].betNumber = gameRounds[id].betAmts.length;
                index++;
            }
        }
    }

    /// @notice Allows a user to place a bet on a dice roll(s), record the bet details, and request randomness
    /// @dev Transfers the required ETH to sponsor wallet and creates a new game round with provided bets
    /// @param betAmts An array of amounts representing individual bets for each roll of the dice
    /// @return gameId A unique identifier generated for the game round
    function bet(uint256[] memory betAmts) external payable shouldGameIsNotOver returns (uint256) {
        {
            (uint256 id, GameRound memory round) = getUserLastGameInfo(msg.sender);
            require(round.fulfilled || id == 0, "last round not fulfilled");
        }
        // Check if the number of dice rolls is within the permitted range
        uint256 numWords = betAmts.length;
        require(numWords > 0 && numWords <= MAX_NUM_WORDS, "invalid betAmts");
        // Calculate the total bet amount from the array of bets
        uint256 totalBetAmt;
        for (uint i; i < numWords; ) {
            // Each bet amount must be greater than zero
            _checkZero(betAmts[i]);
            unchecked {
                totalBetAmt += betAmts[i];
                ++i;
            }
        }
        // Ensure the user has enough points to cover their total bet
        // It is possible to resend a bid for the same balance,
        // so this check is also added to the callback function
        require(totalBetAmt <= balanceOf(msg.sender), "points are not enough");
        // user needs to send ether with the transaction
        // user must send enough ether for the callback
        // otherwise the transaction will fail
        uint256 minimumSend = tx.gasprice * CALLBACK_GAS;
        if (msg.value < minimumSend) {
            revert AmountOfEthSentIsTooSmall(msg.value, minimumSend);
        }
        _burnPoints(msg.sender, totalBetAmt);

        unchecked {
            ++gameId;
        }
        uint256 _gameId = gameId;

        // Record the game round details in the contract state
        gameRounds[_gameId] = GameRound({
            fulfilled: false,
            user: msg.sender,
            totalBet: totalBetAmt,
            totalWinnings: 0,
            betAmts: betAmts,
            diceRollResult: new uint256[](betAmts.length)
        });

        // Associate the game ID with the user's address
        userGameIds[msg.sender].push(_gameId);

        emit Bet(_gameId, msg.sender, totalBetAmt);
        // Transfer the received Ether to the sponsor's wallet to cover the callback transaction costs
        (bool success, ) = gameRngWallet.call{ value: msg.value }("");
        require(success);
        return _gameId;
    }

    struct RandomData {
        uint256 id;
        uint256[] rn;
    }

    /**
     * @notice Fulfills the generation of random words if gas requirement is met
     * @dev Processes each `RandomData` entries until either all are processed or minimum remaining gas is not met
     * @param minRemainingGas The minimum amount of gas that must be left for the function to continue processing
     * @param randomData An array of `RandomData` structs containing the IDs and random number arrays to process
     * Requirements:
     * - Only callable by the `gameRngWallet`.
     * - Will stop processing if the remaining gas is less than `minRemainingGas`.
     * Emits a `RandomWordsFulfilled` event upon successful processing of an entry.
     * Uses the `_fulfillRandomWords` internal function to process each entry.
     */
    function fulfillRandomWords(uint256 minRemainingGas, RandomData[] memory randomData) external {
        require(msg.sender == gameRngWallet, "invalid caller");
        for (uint256 i; i < randomData.length; ) {
            if (gasleft() < minRemainingGas) {
                break;
            }
            _fulfillRandomWords(randomData[i].id, randomData[i].rn);
            unchecked {
                ++i;
            }
        }
    }

    /// @notice Records the result of dice rolls, updates the game round, and handles payouts
    /// @dev Requires the caller to be the designated AirnodeRrp address and checks if the round can be fulfilled
    /// @param _gameId The unique identifier of the game round that the dice roll results correspond to
    /// @param _randomWords The array of random numbers provided by off-chain QRNG service
    ///  Using the QRNG service is free, meaning there is no subscription fee to pay.
    /// There is a gas cost incurred on-chain when Airnode places the random number on-chain in response to a request,
    /// which the requester needs to pay for.
    function _fulfillRandomWords(uint256 _gameId, uint256[] memory _randomWords) private {
        unchecked {
            ++lastFulfilledGameId;
        }
        // Retrieve the game round using the _gameId
        GameRound storage round = gameRounds[_gameId];
        uint256 totalBet = round.totalBet;
        if (_gameId != lastFulfilledGameId || totalBet == 0) {
            revert InvalidGameId(_gameId);
        }

        uint256 length = _randomWords.length;
        if (length != round.diceRollResult.length) {
            revert InvaliddiceRollResult(_gameId);
        }
        // Mark the round as fulfilled
        round.fulfilled = true;
        uint256 totalWinnings;

        uint256 bitDice;
        bool double3;
        for (uint i; i < length; ) {
            // Get the dice number between 1 and 6
            uint256 num = (_randomWords[i] % 6) + 1;
            // Calculate winnings based on even dice numbers
            if (num % 2 == 0) {
                totalWinnings += round.betAmts[i] * 2;
            }
            // Special logic for determining 33
            if (num == 3 && !double3 && bitDice & (1 << num) == (1 << num)) {
                double3 = true;
            }
            bitDice |= (1 << num);
            round.diceRollResult[i] = num;
            unchecked {
                ++i;
            }
        }
        // Special logic for determining winnings if the special 69 condition is met
        // or if the special 666 condition is met
        // or if the special repdigit condition is met
        if (length == 3) {
            //Repdigit
            if ((bitDice & (bitDice - 1)) == 0) {
                totalWinnings = 0;
                if (bitDice == 64) {
                    // 666
                    uint256 balance = balanceOf(round.user);
                    totalBet += balance;
                    _burnPoints(round.user, balance);
                }
            } else if ((bitDice == 72 && !double3) || bitDice == 112) {
                // 69
                totalWinnings = totalBet * WIN69_MULTIPLIER;
            }
        }
        if (totalWinnings > 0) {
            round.totalWinnings = totalWinnings;
            _mintPoints(round.user, totalWinnings);
        }
    }

    /**
     * @notice Allows users to purchase a specified amount of points.
     * @param desiredAmountOut The exact amount of points the user wants to purchase.
     */
    function purchasePoints(uint256 desiredAmountOut) external shouldGameIsNotOver {
        uint256 paymentAmount = calculatePaymentAmount(desiredAmountOut, true);
        coin.safeTransferFrom(msg.sender, address(this), paymentAmount);
        _mintPoints(msg.sender, desiredAmountOut);
        emit PurchasePoints(msg.sender, paymentAmount);
    }
    /**
     * @notice Allows users to sell a specified amount of points.
     * @param _amount The exact amount of points the user wants to sell. _amount must be for example - 100 points  ( 100e18)
     */
    function sellPoints(uint256 _amount) external shouldGameIsNotOver {
        uint256 paymentAmount = calculatePaymentAmount(_amount, false);
        uint coinBalance = coin.getBalance();
        if (paymentAmount > coinBalance) revert NotEnoughCoinBalance(paymentAmount, coinBalance);
        if (coinBalance - paymentAmount < sellCoinLimit) revert SellCoinLimitReached();
        if (paymentAmount > 0) {
            _burnPoints(msg.sender, _amount);
            coin.safeTransfer(msg.sender, paymentAmount);
            emit SellPoints(msg.sender, paymentAmount, _amount);
        } else {
            revert ZeroValue();
        }
    }

    /**
     * @notice Calculates the payment amount required for purchasing a specific amount of points.
     * @param desiredPointsAmount The desired amount of points.
     * @return paymentAmount The corresponding amount of payment currency needed to purchase the points.
     */
    function calculatePaymentAmount(
        uint256 desiredPointsAmount,
        bool isBuy
    ) public view returns (uint256 paymentAmount) {
        uint256 tokenRate = isBuy ? initialTokenRate : sellTokenRate;
        if (tokenRate == 0) revert ZeroValue();
        uint256 intermediate = desiredPointsAmount * DELIMITER;
        paymentAmount = intermediate / tokenRate;
        // Round up only for buying
        if (isBuy && (paymentAmount == 0 || intermediate % tokenRate > 0)) {
            paymentAmount += 1;
        }
    }

    /**
     * @notice Calculates the points amount a user receives for a given payment.
     * @param paymentAmount Amount of the payment currency (e.g., ETH) used to purchase tokens.
     * @return purchaseAmount The resulting amount of tokens that can be purchased with the specified `paymentAmount`.
     */
    function calculatePointsAmount(
        uint256 paymentAmount
    ) public view returns (uint256 purchaseAmount) {
        if (initialTokenRate > 0) {
            purchaseAmount = (paymentAmount * initialTokenRate) / DELIMITER;
        }
    }

    function sendLiquidity()
        external
        shouldGameIsOver
        onlyOwner
        returns (uint amount, uint totalPTS)
    {
        amount = coin.getBalance();
        coin.safeTransfer(V3Deployer, amount);
        totalPTS = totalSupply;
    }

    function setSellTokenRate(uint256 _sellTokenRate, uint256 _sellCoinLimit) external onlyOwner {
        sellTokenRate = _sellTokenRate;
        sellCoinLimit = _sellCoinLimit;
    }

    /// @notice Redeem points for tokens.
    /// @dev Burns points from the redeemer's balance and mints equivalent tokens.
    ///      Emits a Redeem event upon success.
    ///      Requires the game to be over.
    ///      Requires the Token to have been set and the caller to have a non-zero point balance.
    function redeem() external shouldGameIsOver {
        uint256 amount = balanceOf(msg.sender);
        _checkZero(amount);
        _burnPoints(msg.sender, amount);
        (bool success, ) = V3Deployer.call(
            abi.encodeWithSignature("redeem(address,uint256)", msg.sender, amount)
        );
        require(success);
        emit Redeem(msg.sender, amount);
    }

    /// @notice Mints points and assigns them to a specified account
    /// @dev Increments `userBalances` and `totalSupply` by the given `amount`
    /// @param to The address of the recipient to whom points are to be minted
    /// @param amount The quantity of points to be minted
    function _mintPoints(address to, uint256 amount) private {
        _checkZero(amount);
        userBalances[to] += amount;
        totalSupply += amount;
        emit MintPoints(to, amount);
    }

    /// @notice Burns points from a specified account's balance
    /// @dev Decrements `userBalances` and `totalSupply` by the given `amount`
    /// @param from The address from which points are to be burned
    /// @param amount The quantity of points to be burned
    function _burnPoints(address from, uint256 amount) private {
        _checkZero(amount);
        userBalances[from] -= amount;
        totalSupply -= amount;
        emit BurnPoints(from, amount);
    }

    function _checkZero(uint256 amount) private pure {
        require(amount > 0, "is zero");
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev 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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 4 of 5 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

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

File 5 of 5 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
// https://github.com/Uniswap/v3-periphery/blob/main/contracts/libraries/TransferHelper.sol
pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(address token, address from, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BP-STF");
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(address token, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BP-ST");
    }

    function getBalance(address token) internal view returns (uint256 balance) {
        bytes memory callData = abi.encodeWithSelector(IERC20.balanceOf.selector, address(this));
        (bool success, bytes memory data) = token.staticcall(callData);
        require(success && data.length >= 32);
        balance = abi.decode(data, (uint256));
    }

    function getBalanceOf(address token, address target) internal view returns (uint256 balance) {
        bytes memory callData = abi.encodeWithSelector(IERC20.balanceOf.selector, target);
        (bool success, bytes memory data) = token.staticcall(callData);
        require(success && data.length >= 32);
        balance = abi.decode(data, (uint256));
    }

    function safeApprove(address token, address spender, uint256 amount) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, spender, amount)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BP-SA");
    }
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_gameRngWalletAddress","type":"address"},{"internalType":"uint256","name":"_gamePeriod","type":"uint256"},{"internalType":"address","name":"_V3Deployer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"sent","type":"uint256"},{"internalType":"uint256","name":"minimum","type":"uint256"}],"name":"AmountOfEthSentIsTooSmall","type":"error"},{"inputs":[],"name":"Forbidden","type":"error"},{"inputs":[],"name":"GamePeriod","type":"error"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"InvalidGameId","type":"error"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"InvaliddiceRollResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"want","type":"uint256"},{"internalType":"uint256","name":"have","type":"uint256"}],"name":"NotEnoughCoinBalance","type":"error"},{"inputs":[],"name":"SellCoinLimitReached","type":"error"},{"inputs":[],"name":"ZeroValue","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalBetAmt","type":"uint256"}],"name":"Bet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"pointsAmount","type":"uint256"}],"name":"BurnPoints","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"pointsAmount","type":"uint256"}],"name":"MintPoints","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"name":"PurchasePoints","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"paymentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pointsAmount","type":"uint256"}],"name":"SellPoints","type":"event"},{"inputs":[],"name":"CALLBACK_GAS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DELIMITER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NUM_WORDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"V3Deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WIN69_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"betAmts","type":"uint256[]"}],"name":"bet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"desiredPointsAmount","type":"uint256"},{"internalType":"bool","name":"isBuy","type":"bool"}],"name":"calculatePaymentAmount","outputs":[{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"name":"calculatePointsAmount","outputs":[{"internalType":"uint256","name":"purchaseAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minRemainingGas","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256[]","name":"rn","type":"uint256[]"}],"internalType":"struct DiceGame.RandomData[]","name":"randomData","type":"tuple[]"}],"name":"fulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gameId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameNotOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gamePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameRngWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"}],"name":"getGameRoundInfo","outputs":[{"components":[{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"totalBet","type":"uint256"},{"internalType":"uint256","name":"totalWinnings","type":"uint256"},{"internalType":"uint256[]","name":"betAmts","type":"uint256[]"},{"internalType":"uint256[]","name":"diceRollResult","type":"uint256[]"}],"internalType":"struct DiceGame.GameRound","name":"gameInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGameState","outputs":[{"components":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"uint256","name":"betNumber","type":"uint256"}],"internalType":"struct DiceGame.GameState[]","name":"state","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserGameIds","outputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserGamesNumber","outputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserLastGameInfo","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"totalBet","type":"uint256"},{"internalType":"uint256","name":"totalWinnings","type":"uint256"},{"internalType":"uint256[]","name":"betAmts","type":"uint256[]"},{"internalType":"uint256[]","name":"diceRollResult","type":"uint256[]"}],"internalType":"struct DiceGame.GameRound","name":"round","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialTokenRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastFulfilledGameId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"desiredAmountOut","type":"uint256"}],"name":"purchasePoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellCoinLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sellPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellTokenRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sendLiquidity","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"totalPTS","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sellTokenRate","type":"uint256"},{"internalType":"uint256","name":"_sellCoinLimit","type":"uint256"}],"name":"setSellTokenRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_initialTokenRate","type":"uint256"},{"internalType":"address","name":"_coin","type":"address"}],"name":"startGame","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userGameIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x608060408181526004908136101561005d575b505050361561002057600080fd5b600080808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af1610052611bf0565b501561005a57005b80fd5b600092833560e01c90816306fdde0314611948575080630a68ed3e146119255780630cbf20141461190657806311df9995146118dd5780631727f795146118be57806318160ddd1461189f57806325de60361461185b5780632fc92554146117e5578063313ce567146117c95780633197cbb6146117aa5780633c56256b1461176b57806340d6bb821461174f57806348ab7c9914611626578063621cc08d146115255780636ee3374b1461150657806370a08231146114c3578063715018a6146114695780637708d83714611440578063853892851461103a57806388704c751461101c5780638da5cb5b14610ff4578063937dfdc114610fcf57806395d89b4114610f945780639779ea4614610f76578063995f567914610f5a578063ae46631314610f1f578063b0a6330114610e89578063b548765f14610e1f578063b7d0628b14610cad578063bdb337d114610c87578063be040fb014610b9f578063c2884c0a14610b67578063c75a010314610989578063cbf99dd114610945578063d3be4fe3146108ef578063d7c81b55146108d0578063e9d0bade146107e2578063f2fde38b1461071f578063f6b0692a146106c95763fecb03b103610012576020928360031936011261005a5767ffffffffffffffff9280358481116106c55761024c9036908301611b0c565b61026260035461025b81611f69565b4210611df2565b61026b33611ce5565b5115908115916106bc575b5015610679578051918215158061066e575b1561063957839284905b80821061060d575050338452600987528484205483116105d25762030d40803a02903a8204143a1517156105bf578034106105a257506102d28333611f0e565b60018060065401968760065583516102e981611af4565b906102f6895192836119db565b808252610305601f1991611af4565b01368b8301378751610316816119bf565b878152898b808301338152600a8c8501928b845260608601948d8652608087019b8c5260a087019788528d52528b8b20935115159060ff855491610100600160a81b03905160081b169216906affffffffffffffffffffff60a81b161717835551858301555160028201556003810195519586519084821161058f57680100000000000000009788831161057c578d908b8484805492828255838310610549575b5050505090889493929101908b528d87818d20918d905b85821061052957505050505050019051805192831161051657858311610516578a9082548484558085106104ec575b500190875289872083885b8481106104da575050505050338552600b8852858520918254938410156104c7575086610461847fca49f418dd97ad76b84ed6fb8e915ecccb519c5379cf6a4a455c2be7618fda2f969461047a94606097018155611b6a565b90919082549060031b91821b91600019901b1916179055565b845190868252338883015285820152a180808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af16104ba611bf0565b501561005a575051908152f35b634e487b7160e01b865260419052602485fd5b8c845194019381840155018490610408565b838a528585848c2092830192015b8281106105085750506103fd565b8b81558e94508791016104fa565b634e487b7160e01b885260418552602488fd5b90919293809596975051940193818401550190878f928a969594936103ce565b808c93928792522092830192015b82811061056857505084848e6103b7565b90919293508d815501908f92918990610557565b634e487b7160e01b8b526041885260248bfd5b634e487b7160e01b8a526041875260248afd5b60449250855191633ce6d0ef60e21b835234908301526024820152fd5b634e487b7160e01b855260118252602485fd5b845162461bcd60e51b815290810187905260156024820152740e0ded2dce8e640c2e4ca40dcdee840cadcdeeaced605b1b6044820152606490fd5b909360019061062561061f8787611dde565b51611f69565b61062f8686611dde565b5101940190610292565b845162461bcd60e51b8152908101879052600f60248201526e696e76616c696420626574416d747360881b6044820152606490fd5b506003831115610288565b835162461bcd60e51b8152808301879052601860248201527f6c61737420726f756e64206e6f742066756c66696c6c656400000000000000006044820152606490fd5b90501538610276565b8280fd5b83823461071b57602036600319011261071b57610717916107049082906001600160a01b036106f6611a46565b168152600b60205220611c87565b9051918291602083526020830190611a61565b0390f35b5080fd5b5090346106c55760203660031901126106c55761073a611a46565b90610743611b98565b6001600160a01b0391821692831561079057505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b5082903461071b578060031936011261071b57823591602435801515810361071b5780156108c7578454935b84156108b757670de0b6b3a7640000908181029181830414901517156108a4576108388582611e4a565b948261087c575b5050610850575b6020838351908152f35b6001839293018092116108695750602092509083610846565b634e487b7160e01b815260118452602490fd5b85159250908215610891575b5050858061083f565b61089b9250611e2a565b15158580610888565b634e487b7160e01b835260118652602483fd5b8351637c946ed760e01b81528690fd5b6005549361080e565b83823461071b578160031936011261071b576020906006549051908152f35b83823461071b578060031936011261071b57610909611a46565b6001600160a01b03168252600b6020528082208054602435939084101561005a575060209261093791611b6a565b91905490519160031b1c8152f35b83823461071b578160031936011261071b57517f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c6001600160a01b03168152602090f35b50346106c55760203660031901126106c55781356109ac60035461025b81611f69565b8254928315610b5957670de0b6b3a7640000808302908382041483151715610b46576109d88582611e4a565b948515918215610b33575b5050610b0e575b60018060a01b0360015416835160208101906323b872dd60e01b82523360248201523060448201528660648201526064815260a0810181811067ffffffffffffffff821117610afb57865251879283929083905af1610a47611bf0565b81610acc575b5015610aa0575091610a9a91610a847fb68479619550fd129cc13fd5926e396b807828988fd8d73efebc02c26a4471869433611e93565b5133815260208101919091529081906040820190565b0390a180f35b606490602084519162461bcd60e51b83528201526006602482015265212816a9aa2360d11b6044820152fd5b8051801592508215610ae1575b505038610a4d565b610af49250602080918301019101611f9f565b3880610ad9565b634e487b7160e01b895260418552602489fd5b9260018101809111610b2057926109ea565b634e487b7160e01b855260118452602485fd5b610b3d9250611e2a565b151538806109e3565b634e487b7160e01b865260118252602486fd5b8251637c946ed760e01b8152fd5b83823461071b57602036600319011261071b5760209181906001600160a01b03610b8f611a46565b168152600b845220549051908152f35b83823461071b578160031936011261071b57610bc1610bbc611dbd565b611e54565b33825260096020528082205490610bd782611f69565b610be18233611f0e565b80516301e9a69560e41b60208201908152336024830152604482018490528491829190610c1b81606481015b03601f1981018352826119db565b5190827f000000000000000000000000bd3bcfd72a52e8dce5cdf2e38ad3ac0d7ca7ba235af1610c49611bf0565b50156106c5575133815260208101919091527f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6908060408101610a9a565b83823461071b578160031936011261071b57602090610ca4611dbd565b90519015158152f35b50346106c557826003193601126106c55760609160065490600754808311610d20575b5050815160208082528451818301819052919586958686019590830194505b838210610cfc5786860387f35b84518051875283015186840152879650948501949382019360019190910190610cef565b90919350610d318185969496611cd8565b90610d3b82611af4565b91610d48875193846119db565b808352610d57601f1991611af4565b01845b818110610dfd57505081845b86610d718285611c30565b1015610dee57610d818184611c30565b90600191828101809111610ddb5780610d9a8388611dde565b515287526020600a815260038a8920015490610db68388611dde565b5101526000198114610dc85701610d66565b634e487b7160e01b875260118652602487fd5b634e487b7160e01b885260118752602488fd5b50945050505091388080610cd0565b6020908851610e0b8161198d565b878152828881830152828701015201610d5a565b50346106c55760203660031901126106c557813592809280549485610e49575b6020858551908152f35b9091929350848102948186041490151715610e76575050670de0b6b3a76400006020920490388080610e3f565b634e487b7160e01b825260119052602490fd5b50346106c55760203660031901126106c557610f088161071794610eab611c53565b5084358152600a6020522092825193610ec3856119bf565b805460ff81161515865260081c6001600160a01b0316602086015260018101548486015260028101546060860152610efd60038201611c87565b608086015201611c87565b60a083015251918291602083526020830190611a95565b83823461071b578160031936011261071b57602090517f00000000000000000000000000000000000000000000000000000000000d2f008152f35b83823461071b578160031936011261071b5760209051600a8152f35b83823461071b578160031936011261071b576020905162030d408152f35b83823461071b578160031936011261071b57805161071791610fb58261198d565b600382526210941560ea1b602083015251918291826119fd565b50346106c55736600319011261071b57610fe7611b98565b3560055560243560025580f35b83823461071b578160031936011261071b57905490516001600160a01b039091168152602090f35b5090346106c557826003193601126106c55760209250549051908152f35b5091903461071b578260031936011261071b5780359160249384359167ffffffffffffffff9586841161071b573660238501121561071b57838501359361108085611af4565b9461108d855196876119db565b808652602098838a88019260051b8401019236841161143c57848101925b8484106113dc57506001600160a01b0396935050507f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c8516330390506113aa5782979695975b855181101561139e57865a1061139e5761110b8187611dde565b515190886111198289611dde565b51015191600192600784815401809155828852600a808d528689209386850154928114801590611396575b61138157908392918f945194860190815486036113675750855460ff1916881786558a9485948592835b838110611299575050509e9f9d9e6003146111b8575b50505050878161119c575b50505001969597966110f1565b828260026111b09501555460081c16611e93565b38808761118f565b92939192600019850185811161128757851661122357505050858892146111e5575b505b38808080611184565b61121d9089845460081c166112176112108260018060a01b0316600052600960205260406000205490565b8093611c30565b50611f0e565b386111da565b9092919360488114918261127e575b508115611273575b50611247575b50506111dc565b908092508102918183041490151715611261573880611240565b634e487b7160e01b875260118a528587fd5b60709150143861123a565b15915038611232565b634e487b7160e01b8c5260118f528a8cfd5b60066112a58285611dde565b5106978c89019889811161134e57908d80939260029182910815611312575b5060038a148061130a575b806112fd575b6112f3575b6112ed90838b1b17996104618386611b6a565b0161116e565b91955085916112da565b50828a1b808216146112d5565b5086156112cf565b91928c6113268560039e949e809301611b6a565b9054911b1c80911b92818404149015171561134e578d929161134791611c30565b99386112c4565b5050505050508f8b60118c92634e487b7160e01b835252fd5b90508f9150899250885191630b75137d60e41b8352820152fd5b8e899189519163e8302cbd60e01b8352820152fd5b508215611144565b50505094505050505080f35b600e606492898893519362461bcd60e51b85528401528201526d34b73b30b634b21031b0b63632b960911b6044820152fd5b8335838111611438578201886023198236030112611438578851906114008261198d565b878101358252604481013585811161143457916114258f94928a869536920101611b0c565b838201528152019301926110ab565b8980fd5b8780fd5b8580fd5b83823461071b578160031936011261071b5760035460209161146182611f69565b519042108152f35b833461005a578060031936011261005a57611482611b98565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b83823461071b57602036600319011261071b576020906114ff6114e4611a46565b6001600160a01b031660009081526009602052604090205490565b9051908152f35b83823461071b578160031936011261071b576020906005549051908152f35b5090816003193601126106c5576024356001600160a01b038116928235929184900361162257611553611b98565b81546115f95783156115ec57508190556005556bffffffffffffffffffffffff60a01b60015416176001556115a87f00000000000000000000000000000000000000000000000000000000000d2f0042611c30565b600355346115b35780f35b80808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af16115e3611bf0565b501561005a5780f35b51637c946ed760e01b8152fd5b906020606492519162461bcd60e51b835282015260036024820152626f2d6f60e81b6044820152fd5b8480fd5b50346106c55760203660031901126106c55781359061164a60035461025b81611f69565b600554801561173f57670de0b6b3a764000080840290848204148415171561172c579061167691611e4a565b60015490936001600160a01b039161168f90831661206c565b80861161170f57856116a091611cd8565b60025411611701578415610b5957509183916116ef7f717bbde5df09caa1ed568eaefec6a85e6c49cdc3491f44e0355d04b8a87597a3956060956116e48533611f0e565b339060015416611fb7565b8051923384526020840152820152a180f35b82516303968d2760e21b8152fd5b8351630b8d61af60e11b8152918201869052602482015260449150fd5b634e487b7160e01b865260118552602486fd5b8151637c946ed760e01b81528490fd5b83823461071b578160031936011261071b576020905160038152f35b50823461005a57602036600319011261005a575061071761179261178d611a46565b611ce5565b83929192519384938452806020850152830190611a95565b83823461071b578160031936011261071b576020906003549051908152f35b83823461071b578160031936011261071b576020905160128152f35b50823461005a578060031936011261005a5750611803610bbc611dbd565b61180b611b98565b6001546001600160a01b031661184c6118238261206c565b80927f000000000000000000000000bd3bcfd72a52e8dce5cdf2e38ad3ac0d7ca7ba2390611fb7565b60085482519182526020820152f35b83823461071b578160031936011261071b57517f000000000000000000000000bd3bcfd72a52e8dce5cdf2e38ad3ac0d7ca7ba236001600160a01b03168152602090f35b83823461071b578160031936011261071b576020906008549051908152f35b83823461071b578160031936011261071b576020906002549051908152f35b83823461071b578160031936011261071b5760015490516001600160a01b039091168152602090f35b83823461071b578160031936011261071b576020906007549051908152f35b83823461071b578160031936011261071b5760209051670de0b6b3a76400008152f35b925050346106c557826003193601126106c55761071792506119698261198d565b600d82526c42616e616e6120506f696e747360981b602083015251918291826119fd565b6040810190811067ffffffffffffffff8211176119a957604052565b634e487b7160e01b600052604160045260246000fd5b60c0810190811067ffffffffffffffff8211176119a957604052565b90601f8019910116810190811067ffffffffffffffff8211176119a957604052565b6020808252825181830181905290939260005b828110611a3257505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501611a10565b600435906001600160a01b0382168203611a5c57565b600080fd5b90815180825260208080930193019160005b828110611a81575050505090565b835185529381019392810192600101611a73565b611af19181511515815260018060a01b036020830151166020820152604082015160408201526060820151606082015260a0611ae0608084015160c0608085015260c0840190611a61565b9201519060a0818403910152611a61565b90565b67ffffffffffffffff81116119a95760051b60200190565b81601f82011215611a5c57803591611b2383611af4565b92611b3160405194856119db565b808452602092838086019260051b820101928311611a5c578301905b828210611b5b575050505090565b81358152908301908301611b4d565b8054821015611b825760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b6000546001600160a01b03163303611bac57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b3d15611c2b573d9067ffffffffffffffff82116119a95760405191611c1f601f8201601f1916602001846119db565b82523d6000602084013e565b606090565b91908201809211611c3d57565b634e487b7160e01b600052601160045260246000fd5b60405190611c60826119bf565b606060a0836000815260006020820152600060408201526000838201528260808201520152565b9060405191828154918282526020928383019160005283600020936000905b828210611cbe57505050611cbc925003836119db565b565b855484526001958601958895509381019390910190611ca6565b91908203918211611c3d57565b6000916000611cf2611c53565b6001600160a01b039384168252600b6020526040822080549194919081611d1a575b50505050565b919394509194506000198201918211611da9576040611d3e611d9a93600493611b6a565b90549060031b1c95868152600a6020522060405193611d5c856119bf565b815460ff81161515865260081c1660208501526001810154604085015260028101546060850152611d8f60038201611c87565b608085015201611c87565b60a08201529038808080611d14565b634e487b7160e01b85526011600452602485fd5b600354611dc981611f69565b421180611dd35790565b506006546007541490565b8051821015611b825760209160051b010190565b15611df957565b60405162461bcd60e51b815260206004820152600960248201526833b0b6b29037bb32b960b91b6044820152606490fd5b8115611e34570690565b634e487b7160e01b600052601260045260246000fd5b8115611e34570490565b15611e5b57565b60405162461bcd60e51b815260206004820152601060248201526f33b0b6b29034b9902727aa1037bb32b960811b6044820152606490fd5b907f6ff849a3868dd59429d6eeae1c7cd02119b80ab215230e999e9b927df856447091611ebf82611f69565b60018060a01b03811660005260096020526040600020611ee0838254611c30565b9055611eee82600854611c30565b600855604080516001600160a01b039290921682526020820192909252a1565b907fa813766a77a805e8fc44fa2d6436a1c6a84d38d443c1238f20ed0424bcd5878591611f3a82611f69565b60018060a01b03811660005260096020526040600020611f5b838254611cd8565b9055611eee82600854611cd8565b15611f7057565b60405162461bcd60e51b81526020600482015260076024820152666973207a65726f60c81b6044820152606490fd5b90816020910312611a5c57518015158103611a5c5790565b60405163a9059cbb60e01b602082019081526001600160a01b03909316602482015260448101939093526000928392908390611ff68160648101610c0d565b51925af1612002611bf0565b8161203d575b501561201057565b60405162461bcd60e51b815260206004820152600560248201526410940b54d560da1b6044820152606490fd5b8051801592508215612052575b505038612008565b6120659250602080918301019101611f9f565b388061204a565b60405160208101906370a0823160e01b8252306024820152602481526060810181811067ffffffffffffffff8211176119a9576040526000928392839251915afa906120b6611bf0565b91806120d7575b1561005a5760208280518101031261005a57506020015190565b506020825110156120bd56fea164736f6c6343000813000a

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.