ETH Price: $3,471.60 (+1.05%)

Contract

0x0c80eFeadB21641068FCd2F26A95df8d5a919c17
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Pay Winner179523862023-08-20 0:27:23488 days ago1692491243IN
0x0c80eFea...d5a919c17
0 ETH0.0013963512.67234912
Submit Bets179523812023-08-20 0:26:23488 days ago1692491183IN
0x0c80eFea...d5a919c17
0 ETH0.0028089613.21457652
Pay Winner179522172023-08-19 23:53:11488 days ago1692489191IN
0x0c80eFea...d5a919c17
0 ETH0.0013737712.46742782
Submit Bets179522152023-08-19 23:52:47488 days ago1692489167IN
0x0c80eFea...d5a919c17
0 ETH0.0025404511.95137277
Pay Winner179516352023-08-19 21:55:59488 days ago1692482159IN
0x0c80eFea...d5a919c17
0 ETH0.0013032311.82729184
Submit Bets179516342023-08-19 21:55:47488 days ago1692482147IN
0x0c80eFea...d5a919c17
0 ETH0.0025722712.10105623
Pay Winner179507292023-08-19 18:53:35489 days ago1692471215IN
0x0c80eFea...d5a919c17
0 ETH0.001366112.39779802
Submit Bets179507272023-08-19 18:53:11489 days ago1692471191IN
0x0c80eFea...d5a919c17
0 ETH0.0026698912.56031425
Pay Winner179503452023-08-19 17:35:59489 days ago1692466559IN
0x0c80eFea...d5a919c17
0 ETH0.0016487715.01284798
Submit Bets179503432023-08-19 17:35:35489 days ago1692466535IN
0x0c80eFea...d5a919c17
0 ETH0.0033902915.94937834
Pay Winner179498712023-08-19 16:00:35489 days ago1692460835IN
0x0c80eFea...d5a919c17
0 ETH0.0022984320.85902415
Submit Bets179498692023-08-19 16:00:11489 days ago1692460811IN
0x0c80eFea...d5a919c17
0 ETH0.0039774118.71143359
Pay Winner179498662023-08-19 15:59:35489 days ago1692460775IN
0x0c80eFea...d5a919c17
0 ETH0.0019104617.39571992
Submit Bets179498642023-08-19 15:59:11489 days ago1692460751IN
0x0c80eFea...d5a919c17
0 ETH0.0036900317.35752145
Pay Winner179498572023-08-19 15:57:47489 days ago1692460667IN
0x0c80eFea...d5a919c17
0 ETH0.0019664417.90542421
Submit Bets179498562023-08-19 15:57:35489 days ago1692460655IN
0x0c80eFea...d5a919c17
0 ETH0.0037343817.56615779
Pay Winner179498532023-08-19 15:56:59489 days ago1692460619IN
0x0c80eFea...d5a919c17
0 ETH0.0019387217.59450132
Submit Bets179498512023-08-19 15:56:35489 days ago1692460595IN
0x0c80eFea...d5a919c17
0 ETH0.0037395617.59246794
Pay Winner179498462023-08-19 15:55:35489 days ago1692460535IN
0x0c80eFea...d5a919c17
0 ETH0.0019163517.39148778
Submit Bets179498442023-08-19 15:55:11489 days ago1692460511IN
0x0c80eFea...d5a919c17
0 ETH0.003752317.65243274
Pay Winner179498032023-08-19 15:46:59489 days ago1692460019IN
0x0c80eFea...d5a919c17
0 ETH0.0016409314.89199641
Submit Bets179498012023-08-19 15:46:35489 days ago1692459995IN
0x0c80eFea...d5a919c17
0 ETH0.0031182614.66795419
Pay Winner179497992023-08-19 15:46:11489 days ago1692459971IN
0x0c80eFea...d5a919c17
0 ETH0.0015832714.36874404
Submit Bets179497972023-08-19 15:45:47489 days ago1692459947IN
0x0c80eFea...d5a919c17
0 ETH0.0030480214.33918197
Pay Winner179497942023-08-19 15:45:11489 days ago1692459911IN
0x0c80eFea...d5a919c17
0 ETH0.0016019714.53845375
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiceEscrow

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : DiceEscrow.sol
/*
 Dice Betting Game 
 
               (( _______
     _______     /\O    O\
    /O     /\   /  \      \
   /   O  /O \ / O  \O____O\ ))
 ((/_____O/    \\    /O     /
  \O    O\    / \  /   O  /
   \O    O\ O/   \/_____O/
    \O____O\/ )) dice      ))
  ((1

 Telegram: https://t.me/DiceBetPortal
 Twitter: https://twitter.com/dicebeteth
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./DiceBet.sol";

/**
 * @title DiceEscrow
 * @dev A smart contract for playing a dice game on Telegram with ERC20 token bets.
 */
contract DiceEscrow is Ownable {
    DiceBet public token;

    struct Game {
        bool inProgress;
        uint256 totalBet;
    }

    using SafeMath for uint256;

    mapping(uint256 => Game) public games;
    address public taxAddress;
    uint256 public taxFee;
    uint256 public burnFee;

    event BetSubmitted(
        uint256 indexed gameId,
        address[] indexed playersAddress,
        uint256 totalBet
    );
    event WinnerPaid(
        uint256 indexed gameId,
        address indexed winner,
        uint256 winningAmount
    );

    constructor(
        DiceBet _tokenAddress,
        address _taxAddress,
        uint256 _taxFee,
        uint256 _burnFee
    ) {
        token = DiceBet(_tokenAddress);
        taxAddress = _taxAddress;
        taxFee = _taxFee;
        burnFee = _burnFee;
    }

    address[] public players;

    /**
     * @dev Check if there is a game in progress for a Telegram group.
     * @param _tgChatId Telegram group to check
     * @return true if there is a game in progress, otherwise false
     */
    function isGameInProgress(uint256 _tgChatId) public view returns (bool) {
        return games[_tgChatId].inProgress;
    }

    /**
     * @dev Submit bets for a new game.
     * @param gameId Identifier for the game
     * @param _players Array of player addresses
     * @param bets Array of bet amounts corresponding to players
     * @return true if bets are successfully submitted
     */
    function submitBets(
        uint256 gameId,
        address[] memory _players,
        uint256[] memory bets
    ) external onlyOwner returns (bool) {
        require(_players.length > 1, "There must be more than 1 player");
        require(_players.length == bets.length, "Array Length Doesnot Matched");

        require(areAllBetsEqual(bets), "All bet amounts must be the same");
        require(!isGameInProgress(gameId), "Game is in Progress");

        uint256 totalSum = 0;
        for (uint256 i = 0; i < _players.length; i++) {
            require(
                token.allowance(_players[i], address(this)) >= bets[i],
                "Not enough allowance"
            );
            players.push(_players[i]);
            token.transferFrom(_players[i], address(this), bets[i]);
            totalSum += bets[i];
        }
        games[gameId] = Game(true, totalSum);

        emit BetSubmitted(gameId, players, totalSum);
        return true;
    }

    /**
     * @dev Pay the winner of a game and distribute tax.
     * @param _gameId Identifier for the game
     * @param _winner Address of the winner
     */
    function payWinner(uint256 _gameId, address _winner) external onlyOwner {
        require(isGameInProgress(_gameId), "invalid GameId");
        require(isPlayerInArray(_winner), "Invalid Winner Address");

        Game storage g = games[_gameId];
        uint256 taxAmount = g.totalBet.mul(taxFee).div(100);
        uint256 burnShare = g.totalBet.mul(burnFee).div(100);
        uint256 winningAmount = g.totalBet.sub(taxAmount).sub(burnShare);
        require(
            taxAmount + winningAmount + burnShare <= g.totalBet,
            "Transfer Amount Exceed Total Share"
        );

        token.transfer(_winner, winningAmount);
        token.transfer(taxAddress, taxAmount);
        token.burn(burnShare);
        delete games[_gameId];
        delete players;

        emit WinnerPaid(_gameId, _winner, winningAmount);
    }

    /**
     * @dev Set the address for tax collection.
     * @param _taxAddress Address to receive tax
     */
    function setTaxAddress(address _taxAddress) public onlyOwner {
        taxAddress = _taxAddress;
    }

    /**
     * @dev Set the tax fee percentage.
     * @param _taxFee New tax fee percentage
     */
    function setTaxFee(uint256 _taxFee) public onlyOwner {
        taxFee = _taxFee;
    }

    /**
     * @dev Check if a player address is in the players array.
     * @param _player Address to check
     * @return true if the player is in the array, otherwise false
     */
    function isPlayerInArray(address _player) private view returns (bool) {
        for (uint256 i = 0; i < players.length; i++) {
            if (players[i] == _player) {
                return true;
            }
        }
        return false;
    }

    /**
     * @dev Check if all bet amounts in an array are equal.
     * @param bets Array of bet amounts
     * @return true if all bets are equal, otherwise false
     */
    function areAllBetsEqual(uint256[] memory bets)
        private
        pure
        returns (bool)
    {
        if (bets.length <= 1) {
            return true;
        }

        for (uint256 i = 1; i < bets.length; i++) {
            if (bets[i] != bets[0]) {
                return false;
            }
        }

        return true;
    }

    /**
     * @dev Withdraw ETH balance from the contract.
     */
    function withDrawEth() public onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    /**
     * @dev Withdraw ERC20 token balance from the contract.
     * @param _tokenAddress Address of the ERC20 token
     */
    function withDrawToken(address _tokenAddress) public onlyOwner {
        uint256 balance = IERC20(_tokenAddress).balanceOf(address(this));
        IERC20(_tokenAddress).transfer(msg.sender, balance);
    }

    function changeTokenAddress(address payable _tokenAddress)
        public
        onlyOwner
    {
        token = DiceBet(_tokenAddress);
    }
}

File 2 of 2 : DiceBet.sol
/*
 DiceBet - Play Dice Game Directly in Telegram Portal
 
               (( _______
     _______     /\O    O\
    /O     /\   /  \      \
   /   O  /O \ / O  \O____O\ ))
 ((/_____O/    \\    /O     /
  \O    O\    / \  /   O  /
   \O    O\ O/   \/_____O/
    \O____O\/ )) dice      ))
  ((

 Telegram: https://t.me/DiceBetPortal
 Twitter: https://twitter.com/dicebeteth
*/

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.10 >=0.8.0 <0.9.0;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

abstract contract Ownable is Context {
    address private _owner;
    address private creator;
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        _transferOwnership(newOwner);
    }

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

interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(
        address recipient,
        uint256 amount
    ) external returns (bool);

    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;
    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;
    string private _name;
    string private _symbol;
    address public diceContract;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(
        address account
    ) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(
        address owner,
        address spender
    ) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(
        address spender,
        uint256 amount
    ) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(
            currentAllowance >= amount,
            "ERC20: transfer amount exceeds allowance"
        );
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    function increaseAllowance(
        address spender,
        uint256 addedValue
    ) public virtual returns (bool) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender] + addedValue
        );
        return true;
    }

    function decreaseAllowance(
        address spender,
        uint256 subtractedValue
    ) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(
            currentAllowance >= subtractedValue,
            "ERC20: decreased allowance below zero"
        );
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(
            senderBalance >= amount,
            "ERC20: transfer amount exceeds balance"
        );
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

library SafeMath {
    function tryAdd(
        uint256 a,
        uint256 b
    ) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    function trySub(
        uint256 a,
        uint256 b
    ) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    function tryMul(
        uint256 a,
        uint256 b
    ) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    function tryDiv(
        uint256 a,
        uint256 b
    ) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    function tryMod(
        uint256 a,
        uint256 b
    ) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

////// src/IUniswapV2Factory.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */

interface IUniswapV2Factory {
    event PairCreated(
        address indexed token0,
        address indexed token1,
        address pair,
        uint256
    );

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function getPair(
        address tokenA,
        address tokenB
    ) external view returns (address pair);

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

    function createPair(
        address tokenA,
        address tokenB
    ) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}

////// src/IUniswapV2Pair.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */

interface IUniswapV2Pair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(
        address indexed sender,
        uint256 amount0,
        uint256 amount1,
        address indexed to
    );
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(
        address to
    ) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

interface IUniswapV2Router02 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

contract DiceBet is ERC20, Ownable {
    event SwapBackSuccess(
        uint256 tokenAmount,
        uint256 ethAmountReceived,
        bool success
    );
    bool private swapping;
    address public marketingWallet =
        address(0x6D01FEb0BE3b2bF21CdC4D705Ef5d83ec812240D);

    address public devWallet =
        address(0x6D01FEb0BE3b2bF21CdC4D705Ef5d83ec812240D);
    address public Admin;

    uint256 _totalSupply = 10_000_000 * 1e18;
    uint256 public maxTransactionAmount = (_totalSupply * 30) / 1000; // 3% from total supply maxTransactionAmountTxn;
    uint256 public swapTokensAtAmount = (_totalSupply * 10) / 10000; // 0.1% swap tokens at this amount. (10_000_000 * 10) / 10000 = 0.1%(10000 tokens) of the total supply
    uint256 public maxWallet = (_totalSupply * 30) / 1000; // 3% from total supply maxWallet

    bool public limitsInEffect = true;
    bool public tradingActive = false;
    bool public swapEnabled = false;

    uint256 public buyFees = 15;
    uint256 public sellFees = 15;

    uint256 public marketingAmount = 50; //
    uint256 public devAmount = 50; //

    using SafeMath for uint256;

    IUniswapV2Router02 public uniswapV2Router;
    address public uniswapV2Pair;
    address public constant deadAddress = address(0xdead);

    // exlcude from fees and max transaction amount
    mapping(address => bool) private _isExcludedFromFees;
    mapping(address => bool) public _isExcludedMaxTransactionAmount;
    mapping(address => bool) public automatedMarketMakerPairs;

    constructor() ERC20("Dice Bet", "$DICE") {
        // exclude from paying fees or having max transaction amount
        excludeFromFees(owner(), true);
        Admin = msg.sender;
        excludeFromFees(marketingWallet, true);
        excludeFromFees(devWallet, true);
        excludeFromFees(address(this), true);
        excludeFromFees(address(0xdead), true);
        excludeFromMaxTransaction(owner(), true);
        excludeFromMaxTransaction(marketingWallet, true);
        excludeFromMaxTransaction(devWallet, true);
        excludeFromMaxTransaction(address(this), true);
        excludeFromMaxTransaction(address(0xdead), true);
        _mint(address(this), _totalSupply);
    }

    receive() external payable {}

    // once enabled, can never be turned off
    function enableTrading() external onlyOwner {
        tradingActive = true;
        swapEnabled = true;
    }

    function burn(uint256 amount) external {
        _burn(msg.sender, amount);
    }

    // remove limits after token is stable (sets sell fees to 5%)
    function removeLimits() external onlyOwner returns (bool) {
        limitsInEffect = false;
        sellFees = 5;
        buyFees = 5;
        return true;
    }

    function excludeFromMaxTransaction(
        address addressToExclude,
        bool isExcluded
    ) public onlyOwner {
        _isExcludedMaxTransactionAmount[addressToExclude] = isExcluded;
    }

    // only use to disable contract sales if absolutely necessary (emergency use only)
    function updateSwapEnabled(bool enabled) external onlyOwner {
        swapEnabled = enabled;
    }

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        _isExcludedFromFees[account] = excluded;
    }

    function setAutomatedMarketMakerPair(
        address pair,
        bool value
    ) public onlyOwner {
        require(
            pair != uniswapV2Pair,
            "The pair cannot be removed from automatedMarketMakerPairs"
        );
        _setAutomatedMarketMakerPair(pair, value);
    }

    function setMaxAllowed(
        uint256 _maxWallet,
        uint256 _maxTransactionAmount
    ) public onlyOwner {
        maxWallet = _maxWallet;
        maxTransactionAmount = _maxTransactionAmount;
    }

    function addLiquidity() external payable onlyOwner {
        // approve token transfer to cover all possible scenarios
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );

        uniswapV2Router = _uniswapV2Router;
        excludeFromMaxTransaction(address(_uniswapV2Router), true);
        _approve(address(this), address(uniswapV2Router), totalSupply());
        // add the liquidity
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());
        excludeFromMaxTransaction(address(uniswapV2Pair), true);
        _setAutomatedMarketMakerPair(address(uniswapV2Pair), true);

        uniswapV2Router.addLiquidityETH{value: msg.value}(
            address(this), //token address
            totalSupply(), // liquidity amount
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            owner(), // LP tokens are sent to the owner
            block.timestamp
        );
    }

    function _setAutomatedMarketMakerPair(address pair, bool value) private {
        automatedMarketMakerPairs[pair] = value;
    }

    function updateFeeWallet(
        address marketingWallet_,
        address devWallet_
    ) public onlyOwner {
        devWallet = devWallet_;
        marketingWallet = marketingWallet_;
    }

    function isExcludedFromFees(address account) public view returns (bool) {
        return _isExcludedFromFees[account];
    }

    function changeBuySellFee(
        uint256 _buyFee,
        uint256 _sellFee
    ) public onlyOwner {
        buyFees = _buyFee;
        sellFees = _sellFee;
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal override {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        if (limitsInEffect) {
            if (
                from != owner() &&
                to != owner() &&
                to != address(0) &&
                to != address(0xdead) &&
                !swapping
            ) {
                if (!tradingActive) {
                    require(
                        _isExcludedFromFees[from] || _isExcludedFromFees[to],
                        "Trading is not enabled yet."
                    );
                }

                //when buy
                if (
                    automatedMarketMakerPairs[from] &&
                    !_isExcludedMaxTransactionAmount[to]
                ) {
                    require(
                        amount <= maxTransactionAmount,
                        "Buy transfer amount exceeds the maxTransactionAmount."
                    );
                    require(
                        amount + balanceOf(to) <= maxWallet,
                        "Max wallet exceeded"
                    );
                }
                //when sell
                else if (
                    automatedMarketMakerPairs[to] &&
                    !_isExcludedMaxTransactionAmount[from]
                ) {
                    require(
                        amount <= maxTransactionAmount,
                        "Sell transfer amount exceeds the maxTransactionAmount."
                    );
                } else if (!_isExcludedMaxTransactionAmount[to]) {
                    require(
                        amount + balanceOf(to) <= maxWallet,
                        "Max wallet exceeded"
                    );
                }
            }
        }

        if (
            swapEnabled && //if this is true
            !swapping && //if this is false
            !automatedMarketMakerPairs[from] && //if this is false
            !_isExcludedFromFees[from] && //if this is false
            !_isExcludedFromFees[to] //if this is false
        ) {
            swapping = true;
            swapBack();
            swapping = false;
        }

        bool takeFee = !swapping;

        // if any account belongs to _isExcludedFromFee account then remove the fee
        if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
            takeFee = false;
        }

        uint256 fees = 0;
        // only take fees on buys/sells, do not take on wallet transfers
        if (takeFee) {
            // on sell
            if (automatedMarketMakerPairs[to] && sellFees > 0) {
                fees = amount.mul(sellFees).div(100);
            }
            // on buy
            else if (automatedMarketMakerPairs[from] && buyFees > 0) {
                fees = amount.mul(buyFees).div(100);
            }

            if (fees > 0) {
                super._transfer(from, address(this), fees);
            }
            amount -= fees;
        }
        super._transfer(from, to, amount);
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        // make the swap
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }

    function swapBack() private {
        uint256 contractBalance = balanceOf(address(this));
        bool success;
        if (contractBalance == 0) {
            return;
        }
        if (contractBalance >= swapTokensAtAmount) {
            uint256 amountToSwapForETH = swapTokensAtAmount;
            swapTokensForEth(amountToSwapForETH);
            uint256 amountEthToSend = address(this).balance;
            uint256 amountToMarketing = amountEthToSend
                .mul(marketingAmount)
                .div(100);
            uint256 amountToDev = amountEthToSend.sub(amountToMarketing);
            (success, ) = address(marketingWallet).call{
                value: amountToMarketing
            }("");
            (success, ) = address(devWallet).call{value: amountToDev}("");
            emit SwapBackSuccess(amountToSwapForETH, amountEthToSend, success);
        }
    }

    /**
     * @dev Does the same thing as a max approve for the dicegame
     * contract, but takes as input a secret that the bot uses to
     * verify ownership by a Telegram user.
     * @param secret The secret that the bot is expecting.
     * @return true
     */
    function connectAndApprove(uint32 secret) external returns (bool) {
        address pwner = _msgSender();
        approve(diceContract, type(uint256).max);
        emit Approval(pwner, diceContract, type(uint256).max);

        return true;
    }

    function renounceAdmin(address newAdmin) public {
        require(msg.sender == Admin, "Caller is not Admin");
        Admin = newAdmin;
    }

    function setDiceContract(address diceAddress) public {
        require(msg.sender == Admin, "Caller is not admin");
        require(diceAddress != address(0), "null address");
        diceContract = diceAddress;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract DiceBet","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_taxAddress","type":"address"},{"internalType":"uint256","name":"_taxFee","type":"uint256"},{"internalType":"uint256","name":"_burnFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address[]","name":"playersAddress","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"totalBet","type":"uint256"}],"name":"BetSubmitted","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":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"winningAmount","type":"uint256"}],"name":"WinnerPaid","type":"event"},{"inputs":[],"name":"burnFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_tokenAddress","type":"address"}],"name":"changeTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"games","outputs":[{"internalType":"bool","name":"inProgress","type":"bool"},{"internalType":"uint256","name":"totalBet","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tgChatId","type":"uint256"}],"name":"isGameInProgress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"address","name":"_winner","type":"address"}],"name":"payWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"players","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxAddress","type":"address"}],"name":"setTaxAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxFee","type":"uint256"}],"name":"setTaxFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gameId","type":"uint256"},{"internalType":"address[]","name":"_players","type":"address[]"},{"internalType":"uint256[]","name":"bets","type":"uint256[]"}],"name":"submitBets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"taxAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract DiceBet","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withDrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"withDrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516200144238038062001442833981016040819052610031916100e0565b61003a33610078565b600280546001600160a01b039586166001600160a01b0319918216179091556004805494909516931692909217909255600591909155600655610128565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146100dd57600080fd5b50565b600080600080608085870312156100f657600080fd5b8451610101816100c8565b6020860151909450610112816100c8565b6040860151606090960151949790965092505050565b61130a80620001386000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063b7bda68f116100a2578063f2fde38b11610071578063f2fde38b1461023c578063f4da12461461024f578063f71d96cb14610272578063fc0c546a14610285578063fce589d81461029857600080fd5b8063b7bda68f146101e0578063c4081a4c146101f3578063c937cfa514610206578063c9cda91f1461022957600080fd5b8063862d392e116100de578063862d392e146101895780638da5cb5b14610191578063a071dcf4146101b6578063a1883d26146101cd57600080fd5b8063117a5b9014610110578063221f8d101461015957806347b94f831461016e578063715018a614610181575b600080fd5b61013d61011e366004610f55565b6003602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152015b60405180910390f35b61016c610167366004610f83565b6102a1565b005b61016c61017c366004610fa7565b6103b8565b61016c610733565b61016c610769565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610150565b6101bf60055481565b604051908152602001610150565b61016c6101db366004610f83565b6107d0565b60045461019e906001600160a01b031681565b61016c610201366004610f55565b61081c565b6102196102143660046110ad565b61084b565b6040519015158152602001610150565b61016c610237366004610f83565b610cb2565b61016c61024a366004610f83565b610cfe565b61021961025d366004610f55565b60009081526003602052604090205460ff1690565b61019e610280366004610f55565b610d96565b60025461019e906001600160a01b031681565b6101bf60065481565b6000546001600160a01b031633146102d45760405162461bcd60e51b81526004016102cb9061117a565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561031b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033f91906111af565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b391906111c8565b505050565b6000546001600160a01b031633146103e25760405162461bcd60e51b81526004016102cb9061117a565b60008281526003602052604090205460ff166104315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590811d85b59525960921b60448201526064016102cb565b61043a81610dc0565b61047f5760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642057696e6e6572204164647265737360501b60448201526064016102cb565b600082815260036020526040812060055460018201549192916104ae916064916104a891610e29565b90610e3e565b905060006104d060646104a86006548660010154610e2990919063ffffffff16565b905060006104f5826104ef858760010154610e4a90919063ffffffff16565b90610e4a565b6001850154909150826105088386611200565b6105129190611200565b111561056b5760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657220416d6f756e742045786365656420546f74616c20536861604482015261726560f01b60648201526084016102cb565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af11580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e291906111c8565b506002546004805460405163a9059cbb60e01b81526001600160a01b0391821692810192909252602482018690529091169063a9059cbb906044016020604051808303816000875af115801561063c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066091906111c8565b50600254604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156106a757600080fd5b505af11580156106bb573d6000803e3d6000fd5b5050506000878152600360205260408120805460ff191681556001018190556106e79150600790610f23565b846001600160a01b0316867f193bd1cc19fc3ccd521c9900b99068933fe83e08c84234beddf1f09c9727fafd8360405161072391815260200190565b60405180910390a3505050505050565b6000546001600160a01b0316331461075d5760405162461bcd60e51b81526004016102cb9061117a565b6107676000610e56565b565b6000546001600160a01b031633146107935760405162461bcd60e51b81526004016102cb9061117a565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f193505050501580156107cd573d6000803e3d6000fd5b50565b6000546001600160a01b031633146107fa5760405162461bcd60e51b81526004016102cb9061117a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108465760405162461bcd60e51b81526004016102cb9061117a565b600555565b600080546001600160a01b031633146108765760405162461bcd60e51b81526004016102cb9061117a565b60018351116108c75760405162461bcd60e51b815260206004820181905260248201527f5468657265206d757374206265206d6f7265207468616e203120706c6179657260448201526064016102cb565b81518351146109185760405162461bcd60e51b815260206004820152601c60248201527f4172726179204c656e67746820446f65736e6f74204d6174636865640000000060448201526064016102cb565b61092182610ea6565b61096d5760405162461bcd60e51b815260206004820181905260248201527f416c6c2062657420616d6f756e7473206d757374206265207468652073616d6560448201526064016102cb565b60008481526003602052604090205460ff16156109c25760405162461bcd60e51b815260206004820152601360248201527247616d6520697320696e2050726f677265737360681b60448201526064016102cb565b6000805b8451811015610c21578381815181106109e1576109e1611213565b6020026020010151600260009054906101000a90046001600160a01b03166001600160a01b031663dd62ed3e878481518110610a1f57610a1f611213565b60209081029190910101516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015610a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9891906111af565b1015610add5760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f75676820616c6c6f77616e636560601b60448201526064016102cb565b6007858281518110610af157610af1611213565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0392831617905560025486519116906323b872dd90879084908110610b4957610b49611213565b602002602001015130878581518110610b6457610b64611213565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be791906111c8565b50838181518110610bfa57610bfa611213565b602002602001015182610c0d9190611200565b915080610c1981611229565b9150506109c6565b506040805180820182526001808252602080830185815260008a81526003909252908490209251835460ff19169015151783555191015551610c6590600790611242565b6040518091039020857fe1be8d49ac79e8ab0f2246375d194cd039e296fff1ee9a7d07722e198c87551e83604051610c9f91815260200190565b60405180910390a3506001949350505050565b6000546001600160a01b03163314610cdc5760405162461bcd60e51b81526004016102cb9061117a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d285760405162461bcd60e51b81526004016102cb9061117a565b6001600160a01b038116610d8d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cb565b6107cd81610e56565b60078181548110610da657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000805b600754811015610e2057826001600160a01b031660078281548110610deb57610deb611213565b6000918252602090912001546001600160a01b031603610e0e5750600192915050565b80610e1881611229565b915050610dc4565b50600092915050565b6000610e358284611288565b90505b92915050565b6000610e35828461129f565b6000610e3582846112c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001825111610eb957506001919050565b60015b8251811015610f1a5782600081518110610ed857610ed8611213565b6020026020010151838281518110610ef257610ef2611213565b602002602001015114610f085750600092915050565b80610f1281611229565b915050610ebc565b50600192915050565b50805460008255906000526020600020908101906107cd91905b80821115610f515760008155600101610f3d565b5090565b600060208284031215610f6757600080fd5b5035919050565b6001600160a01b03811681146107cd57600080fd5b600060208284031215610f9557600080fd5b8135610fa081610f6e565b9392505050565b60008060408385031215610fba57600080fd5b823591506020830135610fcc81610f6e565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561101657611016610fd7565b604052919050565b600067ffffffffffffffff82111561103857611038610fd7565b5060051b60200190565b600082601f83011261105357600080fd5b813560206110686110638361101e565b610fed565b82815260059290921b8401810191818101908684111561108757600080fd5b8286015b848110156110a2578035835291830191830161108b565b509695505050505050565b6000806000606084860312156110c257600080fd5b8335925060208085013567ffffffffffffffff808211156110e257600080fd5b818701915087601f8301126110f657600080fd5b81356111046110638261101e565b81815260059190911b8301840190848101908a83111561112357600080fd5b938501935b8285101561114a57843561113b81610f6e565b82529385019390850190611128565b96505050604087013592508083111561116257600080fd5b505061117086828701611042565b9150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156111c157600080fd5b5051919050565b6000602082840312156111da57600080fd5b81518015158114610fa057600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610e3857610e386111ea565b634e487b7160e01b600052603260045260246000fd5b60006001820161123b5761123b6111ea565b5060010190565b60008183548391508460005260208060002060005b8381101561127c5781546001600160a01b031685529382019360019182019101611257565b50929695505050505050565b8082028115828204841417610e3857610e386111ea565b6000826112bc57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610e3857610e386111ea56fea2646970667358221220e074f8092f99ef02acdcba394d523886292c48ce7046c93c7afaad8d9873477f64736f6c6343000811003300000000000000000000000099169ac24a24570cfd4f8efba5fe6416407a87330000000000000000000000006d01feb0be3b2bf21cdc4d705ef5d83ec812240d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c8063b7bda68f116100a2578063f2fde38b11610071578063f2fde38b1461023c578063f4da12461461024f578063f71d96cb14610272578063fc0c546a14610285578063fce589d81461029857600080fd5b8063b7bda68f146101e0578063c4081a4c146101f3578063c937cfa514610206578063c9cda91f1461022957600080fd5b8063862d392e116100de578063862d392e146101895780638da5cb5b14610191578063a071dcf4146101b6578063a1883d26146101cd57600080fd5b8063117a5b9014610110578063221f8d101461015957806347b94f831461016e578063715018a614610181575b600080fd5b61013d61011e366004610f55565b6003602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152015b60405180910390f35b61016c610167366004610f83565b6102a1565b005b61016c61017c366004610fa7565b6103b8565b61016c610733565b61016c610769565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610150565b6101bf60055481565b604051908152602001610150565b61016c6101db366004610f83565b6107d0565b60045461019e906001600160a01b031681565b61016c610201366004610f55565b61081c565b6102196102143660046110ad565b61084b565b6040519015158152602001610150565b61016c610237366004610f83565b610cb2565b61016c61024a366004610f83565b610cfe565b61021961025d366004610f55565b60009081526003602052604090205460ff1690565b61019e610280366004610f55565b610d96565b60025461019e906001600160a01b031681565b6101bf60065481565b6000546001600160a01b031633146102d45760405162461bcd60e51b81526004016102cb9061117a565b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561031b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033f91906111af565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af115801561038f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b391906111c8565b505050565b6000546001600160a01b031633146103e25760405162461bcd60e51b81526004016102cb9061117a565b60008281526003602052604090205460ff166104315760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a590811d85b59525960921b60448201526064016102cb565b61043a81610dc0565b61047f5760405162461bcd60e51b8152602060048201526016602482015275496e76616c69642057696e6e6572204164647265737360501b60448201526064016102cb565b600082815260036020526040812060055460018201549192916104ae916064916104a891610e29565b90610e3e565b905060006104d060646104a86006548660010154610e2990919063ffffffff16565b905060006104f5826104ef858760010154610e4a90919063ffffffff16565b90610e4a565b6001850154909150826105088386611200565b6105129190611200565b111561056b5760405162461bcd60e51b815260206004820152602260248201527f5472616e7366657220416d6f756e742045786365656420546f74616c20536861604482015261726560f01b60648201526084016102cb565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af11580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e291906111c8565b506002546004805460405163a9059cbb60e01b81526001600160a01b0391821692810192909252602482018690529091169063a9059cbb906044016020604051808303816000875af115801561063c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066091906111c8565b50600254604051630852cd8d60e31b8152600481018490526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156106a757600080fd5b505af11580156106bb573d6000803e3d6000fd5b5050506000878152600360205260408120805460ff191681556001018190556106e79150600790610f23565b846001600160a01b0316867f193bd1cc19fc3ccd521c9900b99068933fe83e08c84234beddf1f09c9727fafd8360405161072391815260200190565b60405180910390a3505050505050565b6000546001600160a01b0316331461075d5760405162461bcd60e51b81526004016102cb9061117a565b6107676000610e56565b565b6000546001600160a01b031633146107935760405162461bcd60e51b81526004016102cb9061117a565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f193505050501580156107cd573d6000803e3d6000fd5b50565b6000546001600160a01b031633146107fa5760405162461bcd60e51b81526004016102cb9061117a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108465760405162461bcd60e51b81526004016102cb9061117a565b600555565b600080546001600160a01b031633146108765760405162461bcd60e51b81526004016102cb9061117a565b60018351116108c75760405162461bcd60e51b815260206004820181905260248201527f5468657265206d757374206265206d6f7265207468616e203120706c6179657260448201526064016102cb565b81518351146109185760405162461bcd60e51b815260206004820152601c60248201527f4172726179204c656e67746820446f65736e6f74204d6174636865640000000060448201526064016102cb565b61092182610ea6565b61096d5760405162461bcd60e51b815260206004820181905260248201527f416c6c2062657420616d6f756e7473206d757374206265207468652073616d6560448201526064016102cb565b60008481526003602052604090205460ff16156109c25760405162461bcd60e51b815260206004820152601360248201527247616d6520697320696e2050726f677265737360681b60448201526064016102cb565b6000805b8451811015610c21578381815181106109e1576109e1611213565b6020026020010151600260009054906101000a90046001600160a01b03166001600160a01b031663dd62ed3e878481518110610a1f57610a1f611213565b60209081029190910101516040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015610a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9891906111af565b1015610add5760405162461bcd60e51b81526020600482015260146024820152734e6f7420656e6f75676820616c6c6f77616e636560601b60448201526064016102cb565b6007858281518110610af157610af1611213565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0392831617905560025486519116906323b872dd90879084908110610b4957610b49611213565b602002602001015130878581518110610b6457610b64611213565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015610bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be791906111c8565b50838181518110610bfa57610bfa611213565b602002602001015182610c0d9190611200565b915080610c1981611229565b9150506109c6565b506040805180820182526001808252602080830185815260008a81526003909252908490209251835460ff19169015151783555191015551610c6590600790611242565b6040518091039020857fe1be8d49ac79e8ab0f2246375d194cd039e296fff1ee9a7d07722e198c87551e83604051610c9f91815260200190565b60405180910390a3506001949350505050565b6000546001600160a01b03163314610cdc5760405162461bcd60e51b81526004016102cb9061117a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d285760405162461bcd60e51b81526004016102cb9061117a565b6001600160a01b038116610d8d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cb565b6107cd81610e56565b60078181548110610da657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000805b600754811015610e2057826001600160a01b031660078281548110610deb57610deb611213565b6000918252602090912001546001600160a01b031603610e0e5750600192915050565b80610e1881611229565b915050610dc4565b50600092915050565b6000610e358284611288565b90505b92915050565b6000610e35828461129f565b6000610e3582846112c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006001825111610eb957506001919050565b60015b8251811015610f1a5782600081518110610ed857610ed8611213565b6020026020010151838281518110610ef257610ef2611213565b602002602001015114610f085750600092915050565b80610f1281611229565b915050610ebc565b50600192915050565b50805460008255906000526020600020908101906107cd91905b80821115610f515760008155600101610f3d565b5090565b600060208284031215610f6757600080fd5b5035919050565b6001600160a01b03811681146107cd57600080fd5b600060208284031215610f9557600080fd5b8135610fa081610f6e565b9392505050565b60008060408385031215610fba57600080fd5b823591506020830135610fcc81610f6e565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561101657611016610fd7565b604052919050565b600067ffffffffffffffff82111561103857611038610fd7565b5060051b60200190565b600082601f83011261105357600080fd5b813560206110686110638361101e565b610fed565b82815260059290921b8401810191818101908684111561108757600080fd5b8286015b848110156110a2578035835291830191830161108b565b509695505050505050565b6000806000606084860312156110c257600080fd5b8335925060208085013567ffffffffffffffff808211156110e257600080fd5b818701915087601f8301126110f657600080fd5b81356111046110638261101e565b81815260059190911b8301840190848101908a83111561112357600080fd5b938501935b8285101561114a57843561113b81610f6e565b82529385019390850190611128565b96505050604087013592508083111561116257600080fd5b505061117086828701611042565b9150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156111c157600080fd5b5051919050565b6000602082840312156111da57600080fd5b81518015158114610fa057600080fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610e3857610e386111ea565b634e487b7160e01b600052603260045260246000fd5b60006001820161123b5761123b6111ea565b5060010190565b60008183548391508460005260208060002060005b8381101561127c5781546001600160a01b031685529382019360019182019101611257565b50929695505050505050565b8082028115828204841417610e3857610e386111ea565b6000826112bc57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610e3857610e386111ea56fea2646970667358221220e074f8092f99ef02acdcba394d523886292c48ce7046c93c7afaad8d9873477f64736f6c63430008110033

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

00000000000000000000000099169ac24a24570cfd4f8efba5fe6416407a87330000000000000000000000006d01feb0be3b2bf21cdc4d705ef5d83ec812240d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x99169AC24a24570cfD4f8efBa5Fe6416407a8733
Arg [1] : _taxAddress (address): 0x6D01FEb0BE3b2bF21CdC4D705Ef5d83ec812240D
Arg [2] : _taxFee (uint256): 3
Arg [3] : _burnFee (uint256): 2

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000099169ac24a24570cfd4f8efba5fe6416407a8733
Arg [1] : 0000000000000000000000006d01feb0be3b2bf21cdc4d705ef5d83ec812240d
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000002


Block Transaction Difficulty 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
Loading...
Loading
[ 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.