Contract

0x51AEe26013e87f72b1Daae223F6D2c58dc3Cf3A6

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...5112382024-12-17 9:03:483 days ago1734426228IN
0x51AEe260...8dc3Cf3A6
0 S0.000271231
Bet5112352024-12-17 9:03:463 days ago1734426226IN
0x51AEe260...8dc3Cf3A6
0.000288 S0.00032871.11
Purchase Points5112232024-12-17 9:03:353 days ago1734426215IN
0x51AEe260...8dc3Cf3A6
0 S0.000125761.11

Latest 3 internal transactions

Parent Transaction Hash Block From To
5112352024-12-17 9:03:463 days ago1734426226
0x51AEe260...8dc3Cf3A6
0.000288 S
4845002024-12-16 15:33:074 days ago1734363187
0x51AEe260...8dc3Cf3A6
0.01 S
4845002024-12-16 15:33:074 days ago1734363187
0x51AEe260...8dc3Cf3A6
0.01 S
Loading...
Loading

Contract Source Code Verified (Exact Match)

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 SELL_POINTS_LIMIT = 1e24;
    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 immutable coin;
    address public immutable V3Deployer;
    address public immutable gameRngWallet;

    /// @notice Timestamp when the geme ower
    uint256 public endTime;
    /// @notice Initial rate of tokens per coin
    uint256 public initialTokenRate;

    uint256 public gameId;
    uint256 public lastFulfilledGameId;

    bool isSellPointsForbidden;

    // 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,
        address _coin
    ) {
        gameRngWallet = _gameRngWalletAddress;
        if (_gameRngWalletAddress == address(0) || _V3Deployer == address(0) || _coin == address(0))
            revert ZeroValue();
        if (_gamePeriod < 2 hours || _gamePeriod > 180 days) revert GamePeriod();
        gamePeriod = _gamePeriod;
        coin = _coin;
        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 SellPointsLimitReached();
    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.
     * @custom:modifier onlyOwner Restricts the function's execution to the contract's owner.
     */
    function startGame(uint _initialTokenRate) external payable onlyOwner {
        // Ensure the initial token rate is not already set
        require(initialTokenRate == 0, "o-o");
        // Initialize the initial token rate and calculate the end time based on the current timestamp
        initialTokenRate = _initialTokenRate;
        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 {
        if (isSellPointsForbidden) revert Forbidden();
        uint256 paymentAmount = calculatePaymentAmount(_amount, false);
        uint coinBalance = coin.getBalance();
        if (paymentAmount > coinBalance) revert NotEnoughCoinBalance(paymentAmount, coinBalance);
        if (coinBalance - paymentAmount < SELL_POINTS_LIMIT) revert SellPointsLimitReached();
        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 _initialTokenRate = initialTokenRate; // 1_000_000e18   1000 points for 0.001 Coin  2
        if (_initialTokenRate > 0) {
            uint256 intermediate = (desiredPointsAmount * DELIMITER); // 1000* 1e18
            paymentAmount = intermediate / _initialTokenRate; // 2
            //round up
            if (isBuy) {
                if (paymentAmount == 0 || intermediate % _initialTokenRate > 0) {
                    paymentAmount += 1;
                }
            }
        } else {
            revert ZeroValue();
        }
    }

    /**
     * @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 setSellPointsMode(bool _sellForbidden) external onlyOwner {
        isSellPointsForbidden = _sellForbidden;
    }

    /// @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"},{"internalType":"address","name":"_coin","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":"SellPointsLimitReached","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":"SELL_POINTS_LIMIT","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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sellPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendLiquidity","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"totalPTS","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_sellForbidden","type":"bool"}],"name":"setSellPointsMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_initialTokenRate","type":"uint256"}],"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"}]

610100346200023157601f6200223538819003918201601f191683019291906001600160401b0384118385101762000236578160809284926040968752833981010312620002315762000052816200024c565b60208201516200007260606200006a8686016200024c565b94016200024c565b906200007e3362000261565b60e08390526001600160a01b0392831615801562000226575b80156200021b575b6200020a57611c2081108015620001fd575b620001ec5760805260a0528160c05233816000541603620001a9578116156200015657620000df9062000261565b51611f8c9081620002a982396080518181816108870152610f47015260a051818181610a83015281816115000152818161169c01526117b1015260c051818181610c69015281816116cb0152611715015260e05181818160240152818161048c015281816108be015281816109a6015261109b0152f35b815162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6064835162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b845163c8e9ad0d60e01b8152600490fd5b5062ed4e008111620000b1565b8451637c946ed760e01b8152600490fd5b50828216156200009f565b508284161562000097565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200023157565b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6080806040526004361015610058575b50361561001b57600080fd5b600080808080347f00000000000000000000000000000000000000000000000000000000000000005af161004d611aad565b501561005557005b80fd5b60003560e01c90816306fdde0314611821575080630a68ed3e146117fe5780630cbf2014146117e057806311df99951461179b57806318160ddd1461177d5780631f8e31cd1461174457806325de6036146116ff5780632fc9255414611674578063313ce567146116585780633197cbb61461163a5780633c56256b146115fc57806340d6bb82146115e057806348ab7c99146114a557806370a0823114611464578063715018a61461140b5780637708d837146113e2578063853892851461102757806388704c75146110095780638da5cb5b14610fe057806395d89b4114610fa45780639779ea4614610f86578063995f567914610f6a578063ae46631314610f2f578063b0a6330114610e91578063b548765f14610e42578063b7d0628b14610cf8578063bdb337d114610cd3578063be040fb014610be5578063c2884c0a14610bab578063c5ff3c4d14610b86578063c75a0103146109d5578063cbf99dd114610990578063d3be4fe314610938578063d7c81b551461091a578063e5ed1d5914610861578063e9d0bade146107a2578063f2fde38b146106d9578063f6b0692a146106875763fecb03b114610212573861000f565b6020806003193601126104c35767ffffffffffffffff6004358181116104c3576102409036906004016119c9565b6001610257815461025081611e05565b4210611c8e565b61026033611b8c565b51159081159161067e575b50156106395781518015158061062e575b156105f7576000906000905b838183106105cd57505050336000526007855260406000205481116105905762030d40803a02903a8204143a15171561057a5780341061055c57506102cd8133611daa565b8160035401938460035583516102e2816119b1565b906102f0604051928361189d565b8082526102ff601f19916119b1565b01368883013760405161031181611881565b60008152878101338152604082018581526060830191600083526080840198895260a084019485528960005260088b526040600020935115159060ff855491610100600160a81b03905160081b169216906affffffffffffffffffffff60a81b16171783555186830155516002820155600381019551958651908482116104c85768010000000000000000978883116104c8578a90825484845580851061052f575b500190600052896000208760005b84811061051d575050505050600401905180519283116104c8578583116104c857879082548484558085106104f0575b500190600052866000208460005b8481106104de57505050505033600052600985526040600020928354908110156104c85784610459827fca49f418dd97ad76b84ed6fb8e915ecccb519c5379cf6a4a455c2be7618fda2f9660609661047295018155611a27565b90919082549060031b91821b91600019901b1916179055565b6040519084825233868301526040820152a16000808080347f00000000000000000000000000000000000000000000000000000000000000005af16104b5611aad565b50156104c357604051908152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b898451940193818401550185906103ff565b8360005286858460002092830192015b82811061050e5750506103f1565b600081558b9450889101610500565b8c8451940193818401550188906103c1565b8360005289858460002092830192015b82811061054d5750506103b3565b600081558e94508b910161053f565b60449060405190633ce6d0ef60e21b82523460048301526024820152fd5b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b81526004810186905260156024820152740e0ded2dce8e640c2e4ca40dcdee840cadcdeeaced605b1b6044820152606490fd5b9091926105e36105dd8588611c7a565b51611e05565b6105ed8487611c7a565b5101920190610288565b60405162461bcd60e51b815260048101869052600f60248201526e696e76616c696420626574416d747360881b6044820152606490fd5b50600381111561027c565b60405162461bcd60e51b815260048101859052601860248201527f6c61737420726f756e64206e6f742066756c66696c6c656400000000000000006044820152606490fd5b9050153861026b565b346104c35760203660031901126104c3576001600160a01b036106a8611908565b1660005260096020526106d56106c16040600020611b2e565b60405191829160208352602083019061191e565b0390f35b346104c35760203660031901126104c3576106f2611908565b6106fa611a55565b6001600160a01b0390811690811561074e57600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346104c35760403660031901126104c35760243560043581151582036104c357600254801561084f57670de0b6b3a76400009182810292818404149015171561057a576107ef8183611ce6565b92610802575b5050602090604051908152f35b821591821561083c575b505061081a575b81806107f5565b600181018091111561081357634e487b7160e01b600052601160045260246000fd5b6108469250611cc6565b1515828061080c565b604051637c946ed760e01b8152600490fd5b60203660031901126104c357610875611a55565b6002546108ef576004356002556108ac7f000000000000000000000000000000000000000000000000000000000000000042611aed565b600155346108b657005b6000808080347f00000000000000000000000000000000000000000000000000000000000000005af16108e7611aad565b50156104c357005b60405162461bcd60e51b81526020600482015260036024820152626f2d6f60e81b6044820152606490fd5b346104c35760003660031901126104c3576020600354604051908152f35b346104c35760403660031901126104c357610951611908565b6001600160a01b03166000908152600960205260409020805460243591908210156104c35760209161098291611a27565b90546040519160031b1c8152f35b346104c35760003660031901126104c3576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346104c35760203660031901126104c3576004356109f860015461025081611e05565b60025490811561084f57670de0b6b3a764000080820290828204148215171561057a57610a258382611ce6565b928315918215610b73575b5050610b61575b604051602081016323b872dd60e01b81523360248301523060448301528360648301526064825260a082019082821067ffffffffffffffff8311176104c85760009283926040525190827f00000000000000000000000000000000000000000000000000000000000000005af1610aac611aad565b81610b32575b5015610b04577fb68479619550fd129cc13fd5926e396b807828988fd8d73efebc02c26a44718691610ae7610aff9233611d2f565b60408051338152602081019290925290918291820190565b0390a1005b60405162461bcd60e51b8152602060048201526006602482015265212816a9aa2360d11b6044820152606490fd5b8051801592508215610b47575b505083610ab2565b610b5a9250602080918301019101611e3b565b8380610b3f565b906001810180911161057a5790610a37565b610b7d9250611cc6565b15158380610a30565b346104c35760003660031901126104c357602060405169d3c21bcecceda10000008152f35b346104c35760203660031901126104c3576001600160a01b03610bcc611908565b1660005260096020526020604060002054604051908152f35b346104c35760003660031901126104c357610c06610c01611c59565b611cf0565b336000526007602052604060002054610c1e81611e05565b610c288133611daa565b6040516301e9a69560e41b6020820190815233602483015260448201839052600091829190610c6481606481015b03601f19810183528261189d565b5190827f00000000000000000000000000000000000000000000000000000000000000005af1610c92611aad565b50156104c3576040805133815260208101929092527f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6919081908101610aff565b346104c35760003660031901126104c3576020610cee611c59565b6040519015158152f35b346104c35760003660031901126104c357606060038054600454808211610d65575b5050506040516020918282018383528151809152836040840192019360005b828110610d465784840385f35b8551805185528201518483015294810194604090930192600101610d39565b90919250610d738183611b7f565b90610d7d826119b1565b91610d8b604051938461189d565b808352610d9a601f19916119b1565b0160005b818110610e1d5750508160005b84610db68285611aed565b1015610e0f57610dc68184611aed565b9060019182810180911161057a5780610ddf8388611c7a565b5152600052602060088152876040600020015490610dfd8388611c7a565b510152600019811461057a5701610dab565b509350505050818080610d1a565b602090604051610e2c81611865565b6000815282600081830152828701015201610d9e565b346104c35760203660031901126104c357600254600060043582610e6c575b602082604051908152f35b905081810291818304149015171561057a57670de0b6b3a76400006020910482610e61565b346104c35760203660031901126104c357610eaa611afa565b5060043560005260086020526106d56040600020610f16600460405192610ed084611881565b805460ff81161515855260081c6001600160a01b031660208501526001810154604085015260028101546060850152610f0b60038201611b2e565b608085015201611b2e565b60a0820152604051918291602083526020830190611952565b346104c35760003660031901126104c35760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346104c35760003660031901126104c3576020604051600a8152f35b346104c35760003660031901126104c357602060405162030d408152f35b346104c35760003660031901126104c3576106d5604051610fc481611865565b600381526210941560ea1b6020820152604051918291826118bf565b346104c35760003660031901126104c3576000546040516001600160a01b039091168152602090f35b346104c35760003660031901126104c3576020600254604051908152f35b346104c35760403660031901126104c35760243567ffffffffffffffff8082116104c357366023830112156104c357816004013591611065836119b1565b92611073604051948561189d565b8084526024602085019160051b830101913683116104c35760248101915b83831061138557857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361134f5760005b815181101561134d576004355a1061134d576110e88183611c7a565b51519060206110f78285611c7a565b510151600160045401928360045580600052600891826020526040600020906001820154958314801590611345575b61132c578051926004830190815485036113145750825460ff1916600117835560009384928392835b83811061126257505050600314611198575b50506001945081611176575b505050016110cc565b61119092826002830155858060a01b039154901c16611d2f565b83808061116d565b8160009492941981011161057a576000198401841661120c5750506001946040600093146111ca575b505b8680611161565b61120690868060a01b038354861c166112006111f98260018060a01b0316600052600760205260406000205490565b8093611aed565b50611daa565b866111c1565b9092604881149182611259575b50811561124e575b50611230575b600194506111c3565b9050600a9384810294818604149015171561057a5760019390611227565b607091501487611221565b15915088611219565b600661126e8285611c7a565b510695600187019687811161057a57600190600291829108156112dd575b5060038714806112d5575b806112c7575b6112be575b906112b860019283891b17976104598386611a27565b0161114f565b600195506112a2565b506001871b8082161461129d565b508515611297565b60039991996112ee84828c01611a27565b9054911b1c8060011b91818304149015171561057a5761130d91611aed565b978d61128c565b60249060405190630b75137d60e41b82526004820152fd5b60405163e8302cbd60e01b815260048101849052602490fd5b508515611126565b005b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b0b63632b960911b6044820152606490fd5b82358581116104c3578201604060231982360301126104c357604051916113ab83611865565b602482013583526044820135928784116104c3576113d36020949360248695369201016119c9565b83820152815201920191611091565b346104c35760003660031901126104c357602060015461140181611e05565b6040519042108152f35b346104c35760003660031901126104c357611424611a55565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346104c35760203660031901126104c357602061149d611482611908565b6001600160a01b031660009081526007602052604090205490565b604051908152f35b346104c35760203660031901126104c3576004356114c860015461025081611e05565b60ff600554166115ce57600254801561084f57670de0b6b3a76400009081830291838304148315171561057a576114fe91611ce6565b7f00000000000000000000000000000000000000000000000000000000000000009061152982611f08565b8082116115b0576115458269d3c21bcecceda100000092611b7f565b1061159e57801561084f578261158a826060946115837f717bbde5df09caa1ed568eaefec6a85e6c49cdc3491f44e0355d04b8a87597a39733611daa565b3390611e53565b6040519133835260208301526040820152a1005b60405163294727bb60e01b8152600490fd5b6044925060405191630b8d61af60e11b835260048301526024820152fd5b604051631dd2188d60e31b8152600490fd5b346104c35760003660031901126104c357602060405160038152f35b346104c35760203660031901126104c35761161d611618611908565b611b8c565b906106d56040519283928352604060208401526040830190611952565b346104c35760003660031901126104c3576020600154604051908152f35b346104c35760003660031901126104c357602060405160128152f35b346104c35760003660031901126104c357611690610c01611c59565b611698611a55565b60407f00000000000000000000000000000000000000000000000000000000000000006116f06116c782611f08565b80927f000000000000000000000000000000000000000000000000000000000000000090611e53565b60065482519182526020820152f35b346104c35760003660031901126104c3576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346104c35760203660031901126104c3576004358015158091036104c35761176a611a55565b60ff801960055416911617600555600080f35b346104c35760003660031901126104c3576020600654604051908152f35b346104c35760003660031901126104c3576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346104c35760003660031901126104c3576020600454604051908152f35b346104c35760003660031901126104c3576020604051670de0b6b3a76400008152f35b346104c35760003660031901126104c3578061183f6106d592611865565b600d81526c42616e616e6120506f696e747360981b6020820152604051918291826118bf565b6040810190811067ffffffffffffffff8211176104c857604052565b60c0810190811067ffffffffffffffff8211176104c857604052565b90601f8019910116810190811067ffffffffffffffff8211176104c857604052565b6020808252825181830181905290939260005b8281106118f457505060409293506000838284010152601f8019910116010190565b8181018601518482016040015285016118d2565b600435906001600160a01b03821682036104c357565b90815180825260208080930193019160005b82811061193e575050505090565b835185529381019392810192600101611930565b6119ae9181511515815260018060a01b036020830151166020820152604082015160408201526060820151606082015260a061199d608084015160c0608085015260c084019061191e565b9201519060a081840391015261191e565b90565b67ffffffffffffffff81116104c85760051b60200190565b81601f820112156104c3578035916119e0836119b1565b926119ee604051948561189d565b808452602092838086019260051b8201019283116104c3578301905b828210611a18575050505090565b81358152908301908301611a0a565b8054821015611a3f5760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b6000546001600160a01b03163303611a6957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b3d15611ae8573d9067ffffffffffffffff82116104c85760405191611adc601f8201601f19166020018461189d565b82523d6000602084013e565b606090565b9190820180921161057a57565b60405190611b0782611881565b606060a0836000815260006020820152600060408201526000838201528260808201520152565b9060405191828154918282526020928383019160005283600020936000905b828210611b6557505050611b639250038361189d565b565b855484526001958601958895509381019390910190611b4d565b9190820391821161057a57565b6000916000611b99611afa565b6001600160a01b03938416825260096020526040822080549194919081611bc1575b50505050565b919394509194506000198201918211611c45576040611be5611c3693600493611a27565b90549060031b1c9586815260086020522060405193611c0385611881565b815460ff81161515865260081c1660208501526001810154604085015260028101546060850152610f0b60038201611b2e565b60a08201529038808080611bbb565b634e487b7160e01b85526011600452602485fd5b600154611c6581611e05565b421180611c6f5790565b506003546004541490565b8051821015611a3f5760209160051b010190565b15611c9557565b60405162461bcd60e51b815260206004820152600960248201526833b0b6b29037bb32b960b91b6044820152606490fd5b8115611cd0570690565b634e487b7160e01b600052601260045260246000fd5b8115611cd0570490565b15611cf757565b60405162461bcd60e51b815260206004820152601060248201526f33b0b6b29034b9902727aa1037bb32b960811b6044820152606490fd5b907f6ff849a3868dd59429d6eeae1c7cd02119b80ab215230e999e9b927df856447091611d5b82611e05565b60018060a01b03811660005260076020526040600020611d7c838254611aed565b9055611d8a82600654611aed565b600655604080516001600160a01b039290921682526020820192909252a1565b907fa813766a77a805e8fc44fa2d6436a1c6a84d38d443c1238f20ed0424bcd5878591611dd682611e05565b60018060a01b03811660005260076020526040600020611df7838254611b7f565b9055611d8a82600654611b7f565b15611e0c57565b60405162461bcd60e51b81526020600482015260076024820152666973207a65726f60c81b6044820152606490fd5b908160209103126104c3575180151581036104c35790565b60405163a9059cbb60e01b602082019081526001600160a01b03909316602482015260448101939093526000928392908390611e928160648101610c56565b51925af1611e9e611aad565b81611ed9575b5015611eac57565b60405162461bcd60e51b815260206004820152600560248201526410940b54d560da1b6044820152606490fd5b8051801592508215611eee575b505038611ea4565b611f019250602080918301019101611e3b565b3880611ee6565b60405160208101906370a0823160e01b8252306024820152602481526060810181811067ffffffffffffffff8211176104c8576040526000928392839251915afa90611f52611aad565b9180611f73575b156100555760208280518101031261005557506020015190565b50602082511015611f5956fea164736f6c6343000813000a00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c000000000000000000000000000000000000000000000000000000000003f480000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea1000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e2

Deployed Bytecode

0x6080806040526004361015610058575b50361561001b57600080fd5b600080808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af161004d611aad565b501561005557005b80fd5b60003560e01c90816306fdde0314611821575080630a68ed3e146117fe5780630cbf2014146117e057806311df99951461179b57806318160ddd1461177d5780631f8e31cd1461174457806325de6036146116ff5780632fc9255414611674578063313ce567146116585780633197cbb61461163a5780633c56256b146115fc57806340d6bb82146115e057806348ab7c99146114a557806370a0823114611464578063715018a61461140b5780637708d837146113e2578063853892851461102757806388704c75146110095780638da5cb5b14610fe057806395d89b4114610fa45780639779ea4614610f86578063995f567914610f6a578063ae46631314610f2f578063b0a6330114610e91578063b548765f14610e42578063b7d0628b14610cf8578063bdb337d114610cd3578063be040fb014610be5578063c2884c0a14610bab578063c5ff3c4d14610b86578063c75a0103146109d5578063cbf99dd114610990578063d3be4fe314610938578063d7c81b551461091a578063e5ed1d5914610861578063e9d0bade146107a2578063f2fde38b146106d9578063f6b0692a146106875763fecb03b114610212573861000f565b6020806003193601126104c35767ffffffffffffffff6004358181116104c3576102409036906004016119c9565b6001610257815461025081611e05565b4210611c8e565b61026033611b8c565b51159081159161067e575b50156106395781518015158061062e575b156105f7576000906000905b838183106105cd57505050336000526007855260406000205481116105905762030d40803a02903a8204143a15171561057a5780341061055c57506102cd8133611daa565b8160035401938460035583516102e2816119b1565b906102f0604051928361189d565b8082526102ff601f19916119b1565b01368883013760405161031181611881565b60008152878101338152604082018581526060830191600083526080840198895260a084019485528960005260088b526040600020935115159060ff855491610100600160a81b03905160081b169216906affffffffffffffffffffff60a81b16171783555186830155516002820155600381019551958651908482116104c85768010000000000000000978883116104c8578a90825484845580851061052f575b500190600052896000208760005b84811061051d575050505050600401905180519283116104c8578583116104c857879082548484558085106104f0575b500190600052866000208460005b8481106104de57505050505033600052600985526040600020928354908110156104c85784610459827fca49f418dd97ad76b84ed6fb8e915ecccb519c5379cf6a4a455c2be7618fda2f9660609661047295018155611a27565b90919082549060031b91821b91600019901b1916179055565b6040519084825233868301526040820152a16000808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af16104b5611aad565b50156104c357604051908152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b898451940193818401550185906103ff565b8360005286858460002092830192015b82811061050e5750506103f1565b600081558b9450889101610500565b8c8451940193818401550188906103c1565b8360005289858460002092830192015b82811061054d5750506103b3565b600081558e94508b910161053f565b60449060405190633ce6d0ef60e21b82523460048301526024820152fd5b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b81526004810186905260156024820152740e0ded2dce8e640c2e4ca40dcdee840cadcdeeaced605b1b6044820152606490fd5b9091926105e36105dd8588611c7a565b51611e05565b6105ed8487611c7a565b5101920190610288565b60405162461bcd60e51b815260048101869052600f60248201526e696e76616c696420626574416d747360881b6044820152606490fd5b50600381111561027c565b60405162461bcd60e51b815260048101859052601860248201527f6c61737420726f756e64206e6f742066756c66696c6c656400000000000000006044820152606490fd5b9050153861026b565b346104c35760203660031901126104c3576001600160a01b036106a8611908565b1660005260096020526106d56106c16040600020611b2e565b60405191829160208352602083019061191e565b0390f35b346104c35760203660031901126104c3576106f2611908565b6106fa611a55565b6001600160a01b0390811690811561074e57600054826bffffffffffffffffffffffff60a01b821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b346104c35760403660031901126104c35760243560043581151582036104c357600254801561084f57670de0b6b3a76400009182810292818404149015171561057a576107ef8183611ce6565b92610802575b5050602090604051908152f35b821591821561083c575b505061081a575b81806107f5565b600181018091111561081357634e487b7160e01b600052601160045260246000fd5b6108469250611cc6565b1515828061080c565b604051637c946ed760e01b8152600490fd5b60203660031901126104c357610875611a55565b6002546108ef576004356002556108ac7f000000000000000000000000000000000000000000000000000000000003f48042611aed565b600155346108b657005b6000808080347f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c5af16108e7611aad565b50156104c357005b60405162461bcd60e51b81526020600482015260036024820152626f2d6f60e81b6044820152606490fd5b346104c35760003660031901126104c3576020600354604051908152f35b346104c35760403660031901126104c357610951611908565b6001600160a01b03166000908152600960205260409020805460243591908210156104c35760209161098291611a27565b90546040519160031b1c8152f35b346104c35760003660031901126104c3576040517f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c6001600160a01b03168152602090f35b346104c35760203660031901126104c3576004356109f860015461025081611e05565b60025490811561084f57670de0b6b3a764000080820290828204148215171561057a57610a258382611ce6565b928315918215610b73575b5050610b61575b604051602081016323b872dd60e01b81523360248301523060448301528360648301526064825260a082019082821067ffffffffffffffff8311176104c85760009283926040525190827f000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e25af1610aac611aad565b81610b32575b5015610b04577fb68479619550fd129cc13fd5926e396b807828988fd8d73efebc02c26a44718691610ae7610aff9233611d2f565b60408051338152602081019290925290918291820190565b0390a1005b60405162461bcd60e51b8152602060048201526006602482015265212816a9aa2360d11b6044820152606490fd5b8051801592508215610b47575b505083610ab2565b610b5a9250602080918301019101611e3b565b8380610b3f565b906001810180911161057a5790610a37565b610b7d9250611cc6565b15158380610a30565b346104c35760003660031901126104c357602060405169d3c21bcecceda10000008152f35b346104c35760203660031901126104c3576001600160a01b03610bcc611908565b1660005260096020526020604060002054604051908152f35b346104c35760003660031901126104c357610c06610c01611c59565b611cf0565b336000526007602052604060002054610c1e81611e05565b610c288133611daa565b6040516301e9a69560e41b6020820190815233602483015260448201839052600091829190610c6481606481015b03601f19810183528261189d565b5190827f000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea15af1610c92611aad565b50156104c3576040805133815260208101929092527f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6919081908101610aff565b346104c35760003660031901126104c3576020610cee611c59565b6040519015158152f35b346104c35760003660031901126104c357606060038054600454808211610d65575b5050506040516020918282018383528151809152836040840192019360005b828110610d465784840385f35b8551805185528201518483015294810194604090930192600101610d39565b90919250610d738183611b7f565b90610d7d826119b1565b91610d8b604051938461189d565b808352610d9a601f19916119b1565b0160005b818110610e1d5750508160005b84610db68285611aed565b1015610e0f57610dc68184611aed565b9060019182810180911161057a5780610ddf8388611c7a565b5152600052602060088152876040600020015490610dfd8388611c7a565b510152600019811461057a5701610dab565b509350505050818080610d1a565b602090604051610e2c81611865565b6000815282600081830152828701015201610d9e565b346104c35760203660031901126104c357600254600060043582610e6c575b602082604051908152f35b905081810291818304149015171561057a57670de0b6b3a76400006020910482610e61565b346104c35760203660031901126104c357610eaa611afa565b5060043560005260086020526106d56040600020610f16600460405192610ed084611881565b805460ff81161515855260081c6001600160a01b031660208501526001810154604085015260028101546060850152610f0b60038201611b2e565b608085015201611b2e565b60a0820152604051918291602083526020830190611952565b346104c35760003660031901126104c35760206040517f000000000000000000000000000000000000000000000000000000000003f4808152f35b346104c35760003660031901126104c3576020604051600a8152f35b346104c35760003660031901126104c357602060405162030d408152f35b346104c35760003660031901126104c3576106d5604051610fc481611865565b600381526210941560ea1b6020820152604051918291826118bf565b346104c35760003660031901126104c3576000546040516001600160a01b039091168152602090f35b346104c35760003660031901126104c3576020600254604051908152f35b346104c35760403660031901126104c35760243567ffffffffffffffff8082116104c357366023830112156104c357816004013591611065836119b1565b92611073604051948561189d565b8084526024602085019160051b830101913683116104c35760248101915b83831061138557857f00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c6001600160a01b0316330361134f5760005b815181101561134d576004355a1061134d576110e88183611c7a565b51519060206110f78285611c7a565b510151600160045401928360045580600052600891826020526040600020906001820154958314801590611345575b61132c578051926004830190815485036113145750825460ff1916600117835560009384928392835b83811061126257505050600314611198575b50506001945081611176575b505050016110cc565b61119092826002830155858060a01b039154901c16611d2f565b83808061116d565b8160009492941981011161057a576000198401841661120c5750506001946040600093146111ca575b505b8680611161565b61120690868060a01b038354861c166112006111f98260018060a01b0316600052600760205260406000205490565b8093611aed565b50611daa565b866111c1565b9092604881149182611259575b50811561124e575b50611230575b600194506111c3565b9050600a9384810294818604149015171561057a5760019390611227565b607091501487611221565b15915088611219565b600661126e8285611c7a565b510695600187019687811161057a57600190600291829108156112dd575b5060038714806112d5575b806112c7575b6112be575b906112b860019283891b17976104598386611a27565b0161114f565b600195506112a2565b506001871b8082161461129d565b508515611297565b60039991996112ee84828c01611a27565b9054911b1c8060011b91818304149015171561057a5761130d91611aed565b978d61128c565b60249060405190630b75137d60e41b82526004820152fd5b60405163e8302cbd60e01b815260048101849052602490fd5b508515611126565b005b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21031b0b63632b960911b6044820152606490fd5b82358581116104c3578201604060231982360301126104c357604051916113ab83611865565b602482013583526044820135928784116104c3576113d36020949360248695369201016119c9565b83820152815201920191611091565b346104c35760003660031901126104c357602060015461140181611e05565b6040519042108152f35b346104c35760003660031901126104c357611424611a55565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346104c35760203660031901126104c357602061149d611482611908565b6001600160a01b031660009081526007602052604090205490565b604051908152f35b346104c35760203660031901126104c3576004356114c860015461025081611e05565b60ff600554166115ce57600254801561084f57670de0b6b3a76400009081830291838304148315171561057a576114fe91611ce6565b7f000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e29061152982611f08565b8082116115b0576115458269d3c21bcecceda100000092611b7f565b1061159e57801561084f578261158a826060946115837f717bbde5df09caa1ed568eaefec6a85e6c49cdc3491f44e0355d04b8a87597a39733611daa565b3390611e53565b6040519133835260208301526040820152a1005b60405163294727bb60e01b8152600490fd5b6044925060405191630b8d61af60e11b835260048301526024820152fd5b604051631dd2188d60e31b8152600490fd5b346104c35760003660031901126104c357602060405160038152f35b346104c35760203660031901126104c35761161d611618611908565b611b8c565b906106d56040519283928352604060208401526040830190611952565b346104c35760003660031901126104c3576020600154604051908152f35b346104c35760003660031901126104c357602060405160128152f35b346104c35760003660031901126104c357611690610c01611c59565b611698611a55565b60407f000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e26116f06116c782611f08565b80927f000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea190611e53565b60065482519182526020820152f35b346104c35760003660031901126104c3576040517f000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea16001600160a01b03168152602090f35b346104c35760203660031901126104c3576004358015158091036104c35761176a611a55565b60ff801960055416911617600555600080f35b346104c35760003660031901126104c3576020600654604051908152f35b346104c35760003660031901126104c3576040517f000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e26001600160a01b03168152602090f35b346104c35760003660031901126104c3576020600454604051908152f35b346104c35760003660031901126104c3576020604051670de0b6b3a76400008152f35b346104c35760003660031901126104c3578061183f6106d592611865565b600d81526c42616e616e6120506f696e747360981b6020820152604051918291826118bf565b6040810190811067ffffffffffffffff8211176104c857604052565b60c0810190811067ffffffffffffffff8211176104c857604052565b90601f8019910116810190811067ffffffffffffffff8211176104c857604052565b6020808252825181830181905290939260005b8281106118f457505060409293506000838284010152601f8019910116010190565b8181018601518482016040015285016118d2565b600435906001600160a01b03821682036104c357565b90815180825260208080930193019160005b82811061193e575050505090565b835185529381019392810192600101611930565b6119ae9181511515815260018060a01b036020830151166020820152604082015160408201526060820151606082015260a061199d608084015160c0608085015260c084019061191e565b9201519060a081840391015261191e565b90565b67ffffffffffffffff81116104c85760051b60200190565b81601f820112156104c3578035916119e0836119b1565b926119ee604051948561189d565b808452602092838086019260051b8201019283116104c3578301905b828210611a18575050505090565b81358152908301908301611a0a565b8054821015611a3f5760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b6000546001600160a01b03163303611a6957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b3d15611ae8573d9067ffffffffffffffff82116104c85760405191611adc601f8201601f19166020018461189d565b82523d6000602084013e565b606090565b9190820180921161057a57565b60405190611b0782611881565b606060a0836000815260006020820152600060408201526000838201528260808201520152565b9060405191828154918282526020928383019160005283600020936000905b828210611b6557505050611b639250038361189d565b565b855484526001958601958895509381019390910190611b4d565b9190820391821161057a57565b6000916000611b99611afa565b6001600160a01b03938416825260096020526040822080549194919081611bc1575b50505050565b919394509194506000198201918211611c45576040611be5611c3693600493611a27565b90549060031b1c9586815260086020522060405193611c0385611881565b815460ff81161515865260081c1660208501526001810154604085015260028101546060850152610f0b60038201611b2e565b60a08201529038808080611bbb565b634e487b7160e01b85526011600452602485fd5b600154611c6581611e05565b421180611c6f5790565b506003546004541490565b8051821015611a3f5760209160051b010190565b15611c9557565b60405162461bcd60e51b815260206004820152600960248201526833b0b6b29037bb32b960b91b6044820152606490fd5b8115611cd0570690565b634e487b7160e01b600052601260045260246000fd5b8115611cd0570490565b15611cf757565b60405162461bcd60e51b815260206004820152601060248201526f33b0b6b29034b9902727aa1037bb32b960811b6044820152606490fd5b907f6ff849a3868dd59429d6eeae1c7cd02119b80ab215230e999e9b927df856447091611d5b82611e05565b60018060a01b03811660005260076020526040600020611d7c838254611aed565b9055611d8a82600654611aed565b600655604080516001600160a01b039290921682526020820192909252a1565b907fa813766a77a805e8fc44fa2d6436a1c6a84d38d443c1238f20ed0424bcd5878591611dd682611e05565b60018060a01b03811660005260076020526040600020611df7838254611b7f565b9055611d8a82600654611b7f565b15611e0c57565b60405162461bcd60e51b81526020600482015260076024820152666973207a65726f60c81b6044820152606490fd5b908160209103126104c3575180151581036104c35790565b60405163a9059cbb60e01b602082019081526001600160a01b03909316602482015260448101939093526000928392908390611e928160648101610c56565b51925af1611e9e611aad565b81611ed9575b5015611eac57565b60405162461bcd60e51b815260206004820152600560248201526410940b54d560da1b6044820152606490fd5b8051801592508215611eee575b505038611ea4565b611f019250602080918301019101611e3b565b3880611ee6565b60405160208101906370a0823160e01b8252306024820152602481526060810181811067ffffffffffffffff8211176104c8576040526000928392839251915afa90611f52611aad565b9180611f73575b156100555760208280518101031261005557506020015190565b50602082511015611f5956fea164736f6c6343000813000a

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

00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c000000000000000000000000000000000000000000000000000000000003f480000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea1000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e2

-----Decoded View---------------
Arg [0] : _gameRngWalletAddress (address): 0x63795e0f9223Ec4BFeF5fBE3dbf9331F1C57cC5c
Arg [1] : _gamePeriod (uint256): 259200
Arg [2] : _V3Deployer (address): 0x772328227FbAA1aD6c0b7C2B2D8A4ddc73e8fEA1
Arg [3] : _coin (address): 0xfffff4d5c35B709809BBA92E76b421A246C7e7E2

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000063795e0f9223ec4bfef5fbe3dbf9331f1c57cc5c
Arg [1] : 000000000000000000000000000000000000000000000000000000000003f480
Arg [2] : 000000000000000000000000772328227fbaa1ad6c0b7c2b2d8a4ddc73e8fea1
Arg [3] : 000000000000000000000000fffff4d5c35b709809bba92e76b421a246c7e7e2


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.