creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/RBRIDGE.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.19;\n\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(\n        uint256 a,\n        uint256 b\n    ) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(\n        uint256 a,\n        uint256 b\n    ) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(\n        uint256 a,\n        uint256 b\n    ) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(\n        uint256 a,\n        uint256 b\n    ) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(\n        uint256 a,\n        uint256 b\n    ) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a + b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a * b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator.\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b <= a, errorMessage);\n            return a - b;\n        }\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a / b;\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(\n        uint256 a,\n        uint256 b,\n        string memory errorMessage\n    ) internal pure returns (uint256) {\n        unchecked {\n            require(b > 0, errorMessage);\n            return a % b;\n        }\n    }\n}\n\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(\n        address owner,\n        address spender\n    ) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(\n        address indexed owner,\n        address indexed spender,\n        uint256 value\n    );\n}\n\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n    mapping(address => uint256) private _balances;\n\n    mapping(address => mapping(address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * The default value of {decimals} is 18. To select a different value for\n     * {decimals} you should overload it.\n     *\n     * All two of these values are immutable: they can only be set once during\n     * construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless this function is\n     * overridden;\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual override returns (uint8) {\n        return 18;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(\n        address account\n    ) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(\n        address owner,\n        address spender\n    ) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(\n        address spender,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the upd allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n\n        uint256 currentAllowance = _allowances[sender][_msgSender()];\n        require(\n            currentAllowance >= amount,\n            \"ERC20: transfer amount exceeds allowance\"\n        );\n        unchecked {\n            _approve(sender, _msgSender(), currentAllowance - amount);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the upd allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(\n        address spender,\n        uint256 addedValue\n    ) public virtual returns (bool) {\n        _approve(\n            _msgSender(),\n            spender,\n            _allowances[_msgSender()][spender] + addedValue\n        );\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the upd allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(\n        address spender,\n        uint256 subtractedValue\n    ) public virtual returns (bool) {\n        uint256 currentAllowance = _allowances[_msgSender()][spender];\n        require(\n            currentAllowance >= subtractedValue,\n            \"ERC20: decreased allowance below zero\"\n        );\n        unchecked {\n            _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n        }\n\n        return true;\n    }\n\n    /**\n     * @dev Moves `amount` of tokens from `sender` to `recipient`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        uint256 senderBalance = _balances[sender];\n        require(\n            senderBalance >= amount,\n            \"ERC20: transfer amount exceeds balance\"\n        );\n        unchecked {\n            _balances[sender] = senderBalance - amount;\n        }\n        _balances[recipient] += amount;\n\n        emit Transfer(sender, recipient, amount);\n\n        _afterTokenTransfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply += amount;\n        _balances[account] += amount;\n        emit Transfer(address(0), account, amount);\n\n        _afterTokenTransfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        uint256 accountBalance = _balances[account];\n        require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n        unchecked {\n            _balances[account] = accountBalance - amount;\n        }\n        _totalSupply -= amount;\n\n        emit Transfer(account, address(0), amount);\n\n        _afterTokenTransfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(\n        address owner,\n        address spender,\n        uint256 amount\n    ) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * has been transferred to `to`.\n     * - when `from` is zero, `amount` tokens have been minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _afterTokenTransfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal virtual {}\n}\n\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(\n        address indexed previousOwner,\n        address indexed newOwner\n    );\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(\n            newOwner != address(0),\n            \"Ownable: new owner is the zero address\"\n        );\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n\ninterface IDexFactory {\n    event PairCreated(\n        address indexed token0,\n        address indexed token1,\n        address pair,\n        uint256\n    );\n\n    function feeTo() external view returns (address);\n\n    function feeToSetter() external view returns (address);\n\n    function getPair(\n        address tokenA,\n        address tokenB\n    ) external view returns (address pair);\n\n    function allPairs(uint256) external view returns (address pair);\n\n    function allPairsLength() external view returns (uint256);\n\n    function createPair(\n        address tokenA,\n        address tokenB\n    ) external returns (address pair);\n\n    function setFeeTo(address) external;\n\n    function setFeeToSetter(address) external;\n}\n\ninterface IDexRouter {\n    function factory() external pure returns (address);\n\n    function WETH() external pure returns (address);\n\n    function addLiquidity(\n        address tokenA,\n        address tokenB,\n        uint256 amountADesired,\n        uint256 amountBDesired,\n        uint256 amountAMin,\n        uint256 amountBMin,\n        address to,\n        uint256 deadline\n    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);\n\n    function addLiquidityETH(\n        address token,\n        uint256 amountTokenDesired,\n        uint256 amountTokenMin,\n        uint256 amountETHMin,\n        address to,\n        uint256 deadline\n    )\n        external\n        payable\n        returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);\n\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n        uint256 amountIn,\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to,\n        uint256 deadline\n    ) external;\n\n    function swapExactETHForTokensSupportingFeeOnTransferTokens(\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to,\n        uint256 deadline\n    ) external payable;\n\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\n        uint256 amountIn,\n        uint256 amountOutMin,\n        address[] calldata path,\n        address to,\n        uint256 deadline\n    ) external;\n}\n\ncontract RBRIDGE is ERC20, Ownable {\n    using SafeMath for uint256;\n\n    IDexRouter public immutable uniswapV2Router;\n    address public immutable uniswapV2Pair;\n\n    // Swap back\n    bool private swapping;\n\n    bool private swapbackEnabled = false;\n    uint256 private swapBackValueMin;\n    uint256 private swapBackValueMax;\n\n    //Anti-whale\n    bool private limitsEnabled = true;\n    bool private transferDelayEnabled = false;\n    uint256 public maxWallet;\n    uint256 public maxTx;\n    mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch\n\n    bool public tradingEnabled = false;\n\n    // Fee receivers\n    address private marketingWallet;\n    address private projectWallet;\n\n    uint256 private buyTaxTotal;\n    uint256 private buyMarketingTax;\n    uint256 private buyProjectTax;\n\n    uint256 private sellTaxTotal;\n    uint256 private sellMarketingTax;\n    uint256 private sellProjectTax;\n\n    uint256 private tokensForMarketing;\n    uint256 private tokensForProject;\n\n    /******************/\n\n    // exclude from fees and max transaction amount\n    mapping(address => bool) private transferTaxExempt;\n    mapping(address => bool) private transferLimitExempt;\n    mapping(address => bool) private automatedMarketMakerPairs;\n\n    // store addresses that a automatic market maker pairs. Any transfer *to* these addresses\n    // could be subject to a maximum transfer amount\n\n    event UpdateUniswapV2Router(\n        address indexed newAddress,\n        address indexed oldAddress\n    );\n\n    event ExcludeFromFees(address indexed account, bool isExcluded);\n    event ExcludeFromLimits(address indexed account, bool isExcluded);\n    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\n    event TradingEnabled(uint256 indexed timestamp);\n    event LimitsRemoved(uint256 indexed timestamp);\n    event DisabledTransferDelay(uint256 indexed timestamp);\n\n    event SwapbackSettingsUpdated(\n        bool enabled,\n        uint256 swapBackValueMin,\n        uint256 swapBackValueMax\n    );\n    event MaxTxUpdated(uint256 maxTx);\n    event MaxWalletUpdated(uint256 maxWallet);\n\n    event MarketingWalletUpdated(\n        address indexed newWallet,\n        address indexed oldWallet\n    );\n\n    event ProjectWalletUpdated(\n        address indexed newWallet,\n        address indexed oldWallet\n    );\n\n    event BuyFeeUpdated(\n        uint256 buyTaxTotal,\n        uint256 buyMarketingTax,\n        uint256 buyProjectTax\n    );\n\n    event SellFeeUpdated(\n        uint256 sellTaxTotal,\n        uint256 sellMarketingTax,\n        uint256 sellProjectTax\n    );\n\n    constructor() ERC20(\"RuneBridge\",\"RBRIDGE\") {\n        \n        IDexRouter _dexRouter;\n        \n        if (block.chainid == 1 || block.chainid == 5) {\n            _dexRouter = IDexRouter(\n                0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n            );\n        } else if (block.chainid == 11155111) {\n            _dexRouter = IDexRouter(\n                0xC532a74256D3Db42D0Bf7a0400fEFDbad7694008\n            );\n        } else if (block.chainid == 8453) {\n            _dexRouter = IDexRouter(\n                0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24\n            );\n        } else if (block.chainid == 56) {\n            _dexRouter = IDexRouter(\n                0x10ED43C718714eb63d5aA57B78B54704E256024E\n            );\n        }\n\n        exemptFromLimits(address(_dexRouter), true);\n        uniswapV2Router = _dexRouter;\n\n        uniswapV2Pair = IDexFactory(_dexRouter.factory()).createPair(\n            address(this),\n            _dexRouter.WETH()\n        );\n        exemptFromLimits(address(uniswapV2Pair), true);\n        _setMarketPair(address(uniswapV2Pair), true);\n\n        uint256 _buyMarketingTax = 13;\n        uint256 _buyProjectTax = 1;\n\n        uint256 _sellMarketingTax = 23;\n        uint256 _sellProjectTax = 20;\n\n        uint256 _totalSupply = 100_000_000 * 10 ** decimals();\n\n        maxTx = (_totalSupply * 20) / 1000;\n        maxWallet = (_totalSupply * 20) / 1000;\n\n        swapBackValueMin = (_totalSupply * 1) / 1000;\n        swapBackValueMax = (_totalSupply * 3) / 1000;\n\n        buyMarketingTax = _buyMarketingTax;\n        buyProjectTax = _buyProjectTax;\n        buyTaxTotal = buyMarketingTax + buyProjectTax;\n\n        sellMarketingTax = _sellMarketingTax;\n        sellProjectTax = _sellProjectTax;\n        sellTaxTotal = sellMarketingTax + sellProjectTax;\n\n        marketingWallet = address(msg.sender);\n        projectWallet = address(msg.sender);\n\n        // exclude from paying fees or having max transaction amount\n        exemptFromFees(msg.sender, true);\n        exemptFromFees(address(this), true);\n        exemptFromFees(address(0xdead), true);\n        exemptFromFees(marketingWallet, true);\n\n        exemptFromLimits(msg.sender, true);\n        exemptFromLimits(address(this), true);\n        exemptFromLimits(address(0xdead), true);\n        exemptFromLimits(marketingWallet, true);\n\n        transferOwnership(msg.sender);\n\n        /*\n            _mint is an internal function in ERC20.sol that is only called here,\n            and CANNOT be called ever again\n        */\n        _mint(msg.sender, _totalSupply);\n    }\n\n    \n\n    /**\n     * @notice  Opens public trading for the token\n     * @dev     onlyOwner.\n     */\n    function enableTrading() external onlyOwner {\n        tradingEnabled = true;\n        swapbackEnabled = true;\n        emit TradingEnabled(block.timestamp);\n    }\n\n    /**\n     * @notice Removes the max wallet and max transaction limits\n     * @dev onlyOwner.\n     * Emits an {LimitsRemoved} event\n     */\n    function removeAllLimits() external onlyOwner {\n        limitsEnabled = false;\n        emit LimitsRemoved(block.timestamp);\n    }\n\n    /**\n     * @notice Removes the transfer delay\n     * @dev onlyOwner.\n     * Emits an {DisabledTransferDelay} event\n     */\n    function disableTransferDelayiie() external onlyOwner {\n        transferDelayEnabled = false;\n        emit DisabledTransferDelay(block.timestamp);\n    }\n\n    /**\n     * @notice sets if swapback is enabled and sets the minimum and maximum amounts\n     * @dev onlyOwner.\n     * Emits an {SwapbackSettingsUpdated} event\n     * @param _enabled If swapback is enabled\n     * @param _min The minimum amount of tokens the contract must have before swapping tokens for ETH. Base 10000, so 1% = 100.\n     * @param _max The maximum amount of tokens the contract can swap for ETH. Base 10000, so 1% = 100.\n     */\n    function setSwapBackSettingsiie(\n        bool _enabled,\n        uint256 _min,\n        uint256 _max\n    ) external onlyOwner {\n        require(\n            _min >= 1,\n            \"Swap amount cannot be lower than 0.01% total supply.\"\n        );\n        require(_max >= _min, \"maximum amount cant be higher than minimum\");\n\n        swapbackEnabled = _enabled;\n        swapBackValueMin = (totalSupply() * _min) / 10000;\n        swapBackValueMax = (totalSupply() * _max) / 10000;\n        emit SwapbackSettingsUpdated(_enabled, _min, _max);\n    }\n\n    /**\n     * @notice Changes the maximum amount of tokens that can be bought or sold in a single transaction\n     * @dev onlyOwner.\n     * Emits an {MaxTxUpdated} event\n     * @param newNum Base 1000, so 1% = 10\n     */\n    function setTheMaxTxiie(uint256 newNum) external onlyOwner {\n        require(newNum >= 2, \"Cannot set maxTx lower than 0.2%\");\n        maxTx = (newNum * totalSupply()) / 1000;\n        emit MaxTxUpdated(maxTx);\n    }\n\n    /**\n     * @notice Changes the maximum amount of tokens a wallet can hold\n     * @dev onlyOwner.\n     * Emits an {MaxWalletUpdated} event\n     * @param newNum Base 1000, so 1% = 10\n     */\n    function setTheMaxWalletiie(uint256 newNum) external onlyOwner {\n        require(newNum >= 5, \"Cannot set maxWallet lower than 0.5%\");\n        maxWallet = (newNum * totalSupply()) / 1000;\n        emit MaxWalletUpdated(maxWallet);\n    }\n\n    /**\n     * @notice Sets if a wallet is excluded from the max wallet and tx limits\n     * @dev onlyOwner.\n     * Emits an {ExcludeFromLimits} event\n     * @param updAds The wallet to update\n     * @param isEx If the wallet is excluded or not\n     */\n    function exemptFromLimits(\n        address updAds,\n        bool isEx\n    ) public onlyOwner {\n        transferLimitExempt[updAds] = isEx;\n        emit ExcludeFromLimits(updAds, isEx);\n    }\n\n    /**\n     * @notice Sets the fees for buys\n     * @dev onlyOwner.\n     * Emits a {BuyFeeUpdated} event\n     * All fees added up must be less than 100\n     * @param _marketingFee The fee for the marketing wallet\n     * @param _devFee The fee for the dev wallet\n     */\n    function updateBuyFees(\n        uint256 _marketingFee,\n        uint256 _devFee\n    ) external onlyOwner {\n        buyMarketingTax = _marketingFee;\n        buyProjectTax = _devFee;\n        buyTaxTotal = buyMarketingTax + buyProjectTax;\n        require(buyTaxTotal <= 100, \"Total buy fee cannot be higher than 100%\");\n        emit BuyFeeUpdated(buyTaxTotal, buyMarketingTax, buyProjectTax);\n    }\n\n    /**\n     * @notice Sets the fees for sells\n     * @dev onlyOwner.\n     * Emits a {SellFeeUpdated} event\n     * All fees added up must be less than 100\n     * @param _marketingFee The fee for the marketing wallet\n     * @param _devFee The fee for the dev wallet\n     */\n    function updateSellFees(\n        uint256 _marketingFee,\n        uint256 _devFee\n    ) external onlyOwner {\n        sellMarketingTax = _marketingFee;\n        sellProjectTax = _devFee;\n        sellTaxTotal = sellMarketingTax + sellProjectTax;\n        require(\n            sellTaxTotal <= 100,\n            \"Total sell fee cannot be higher than 100%\"\n        );\n        emit SellFeeUpdated(sellTaxTotal, sellMarketingTax, sellProjectTax);\n    }\n\n    /**\n     * @notice Sets if an address is excluded from fees\n     * @dev onlyOwner.\n     * Emits an {ExcludeFromFees} event\n     * @param account The wallet to update\n     * @param excluded If the wallet is excluded or not\n     */\n    function exemptFromFees(address account, bool excluded) public onlyOwner {\n        transferTaxExempt[account] = excluded;\n        emit ExcludeFromFees(account, excluded);\n    }\n\n    /**\n     * @notice Sets an address as a new liquidity pair. You probably dont want to do this.\n     * @dev onlyOwner.\n     * Emits a {SetAutomatedMarketMakerPair} event\n     * @param pair the address of the pair\n     * @param value If the pair is a automated market maker pair or not\n     */\n    function setMarketPair(\n        address pair,\n        bool value\n    ) public onlyOwner returns (bool){\n        require(\n            pair != uniswapV2Pair,\n            \"The pair cannot be removed from automatedMarketMakerPairs\"\n        );\n\n        _setMarketPair(pair, value);\n        return true;\n    }\n\n    function _setMarketPair(address pair, bool value) private {\n        automatedMarketMakerPairs[pair] = value;\n\n        emit SetAutomatedMarketMakerPair(pair, value);\n    }\n\n    /**\n     * @notice Sets the marketing wallet\n     * @dev onlyOwner.\n     * Emits an {MarketingWalletUpdated} event\n     * @param newWallet The new marketing wallet\n     */\n    function changeMarketingWalletiie(address newWallet) external onlyOwner {\n        emit MarketingWalletUpdated(newWallet, marketingWallet);\n        marketingWallet = newWallet;\n    }\n\n    /**\n     * @notice Sets the project wallet\n     * @dev onlyOwner.\n     * Emits an {ProjectWalletUpdated} event\n     * @param newWallet The new dev wallet\n     */\n    function changeProjectWalletiie(address newWallet) external onlyOwner {\n        emit ProjectWalletUpdated(newWallet, projectWallet);\n        projectWallet = newWallet;\n    }\n\n\n    /**\n     * @notice  Information about the anti whale parameters\n     * @return  _limitsEnabled  if the wallet limits are in effect\n     * @return  _transferDelayEnabled  if the transfer delay is enabled\n     * @return  _maxWallet  The maximum amount of tokens that can be held by a wallet\n     * @return  _maxTx  The maximum amount of tokens that can be bought or sold in a single transaction\n     */\n    function maxTxValuesiie()\n        external\n        view\n        returns (\n            bool _limitsEnabled,\n            bool _transferDelayEnabled,\n            uint256 _maxWallet,\n            uint256 _maxTx\n        )\n    {\n        _limitsEnabled = limitsEnabled;\n        _transferDelayEnabled = transferDelayEnabled;\n        _maxWallet = maxWallet;\n        _maxTx = maxTx;\n    }\n\n    /**\n     * @notice The wallets that receive the collected fees\n     * @return _marketingWallet The wallet that receives the marketing fees\n     * @return _projectWallet The wallet that receives the dev fees\n     */\n    function receiverwalletsiie()\n        external\n        view\n        returns (address _marketingWallet, address _projectWallet)\n    {\n        return (marketingWallet, projectWallet);\n    }\n\n    /**\n     * @notice Fees for buys, sells, and transfers\n     * @return _buyTaxTotal The total fee for buys\n     * @return _buyMarketingTax The fee for buys that gets sent to marketing\n     * @return _buyProjectTax The fee for buys that gets sent to dev\n     * @return _sellTaxTotal The total fee for sells\n     * @return _sellMarketingTax The fee for sells that gets sent to marketing\n     * @return _sellProjectTax The fee for sells that gets sent to dev\n     */\n    function taxValuesiie()\n        external\n        view\n        returns (\n            uint256 _buyTaxTotal,\n            uint256 _buyMarketingTax,\n            uint256 _buyProjectTax,\n            uint256 _sellTaxTotal,\n            uint256 _sellMarketingTax,\n            uint256 _sellProjectTax\n        )\n    {\n        _buyTaxTotal = buyTaxTotal;\n        _buyMarketingTax = buyMarketingTax;\n        _buyProjectTax = buyProjectTax;\n        _sellTaxTotal = sellTaxTotal;\n        _sellMarketingTax = sellMarketingTax;\n        _sellProjectTax = sellProjectTax;\n    }\n\n    /**\n     * @notice  If the wallet is excluded from fees and max transaction amount and if the wallet is a automated market maker pair\n     * @param   _target  The wallet to check\n     * @return  _transferTaxExempt  If the wallet is excluded from fees\n     * @return  _transferLimitExempt  If the wallet is excluded from max transaction amount\n     * @return  _automatedMarketMakerPairs If the wallet is a automated market maker pair\n     */\n    function checkMappingsiie(\n        address _target\n    )\n        external\n        view\n        returns (\n            bool _transferTaxExempt,\n            bool _transferLimitExempt,\n            bool _automatedMarketMakerPairs\n        )\n    {\n        _transferTaxExempt = transferTaxExempt[_target];\n        _transferLimitExempt = transferLimitExempt[_target];\n        _automatedMarketMakerPairs = automatedMarketMakerPairs[_target];\n    }\n\n    function _transfer(\n        address from,\n        address to,\n        uint256 amount\n    ) internal override {\n        require(from != address(0), \"ERC20: transfer from the zero address\");\n        require(to != address(0), \"ERC20: transfer to the zero address\");\n\n        if (amount == 0) {\n            super._transfer(from, to, 0);\n            return;\n        }\n\n        if (limitsEnabled) {\n            if (\n                from != owner() &&\n                to != owner() &&\n                to != address(0) &&\n                to != address(0xdead) &&\n                !swapping\n            ) {\n                if (!tradingEnabled) {\n                    require(\n                        transferTaxExempt[from] || transferTaxExempt[to],\n                        \"_transfer:: Trading is not active.\"\n                    );\n                }\n\n                // at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.\n                if (transferDelayEnabled) {\n                    if (\n                        to != owner() &&\n                        to != address(uniswapV2Router) &&\n                        to != address(uniswapV2Pair)\n                    ) {\n                        require(\n                            _holderLastTransferTimestamp[tx.origin] <\n                                block.number,\n                            \"_transfer:: Transfer Delay enabled.  Only one purchase per block allowed.\"\n                        );\n                        _holderLastTransferTimestamp[tx.origin] = block.number;\n                    }\n                }\n\n                //when buy\n                if (\n                    automatedMarketMakerPairs[from] && !transferLimitExempt[to]\n                ) {\n                    require(\n                        amount <= maxTx,\n                        \"Buy transfer amount exceeds the maxTx.\"\n                    );\n                    require(\n                        amount + balanceOf(to) <= maxWallet,\n                        \"Max wallet exceeded\"\n                    );\n                }\n                //when sell\n                else if (\n                    automatedMarketMakerPairs[to] && !transferLimitExempt[from]\n                ) {\n                    require(\n                        amount <= maxTx,\n                        \"Sell transfer amount exceeds the maxTx.\"\n                    );\n                } else if (!transferLimitExempt[to]) {\n                    require(\n                        amount + balanceOf(to) <= maxWallet,\n                        \"Max wallet exceeded\"\n                    );\n                }\n            }\n        }\n\n        uint256 contractTokenBalance = balanceOf(address(this));\n\n        bool canSwap = contractTokenBalance >= swapBackValueMin;\n\n        if (\n            canSwap &&\n            swapbackEnabled &&\n            !swapping &&\n            !automatedMarketMakerPairs[from] &&\n            !transferTaxExempt[from] &&\n            !transferTaxExempt[to]\n        ) {\n            swapping = true;\n\n            swapBack();\n\n            swapping = false;\n        }\n\n        bool takeFee = !swapping;\n\n        // if any account belongs to _isExcludedFromFee account then remove the fee\n        if (transferTaxExempt[from] || transferTaxExempt[to]) {\n            takeFee = false;\n        }\n\n        uint256 fees = 0;\n        // only take fees on buys/sells, do not take on wallet transfers\n        if (takeFee) {\n            // on sell\n            if (automatedMarketMakerPairs[to] && sellTaxTotal > 0) {\n                fees = amount.mul(sellTaxTotal).div(100);\n                tokensForProject += (fees * sellProjectTax) / sellTaxTotal;\n                tokensForMarketing += (fees * sellMarketingTax) / sellTaxTotal;\n            }\n            // on buy\n            else if (automatedMarketMakerPairs[from] && buyTaxTotal > 0) {\n                fees = amount.mul(buyTaxTotal).div(100);\n                tokensForProject += (fees * buyProjectTax) / buyTaxTotal;\n                tokensForMarketing += (fees * buyMarketingTax) / buyTaxTotal;\n            }\n\n            if (fees > 0) {\n                super._transfer(from, address(this), fees);\n            }\n\n            amount -= fees;\n        }\n\n        super._transfer(from, to, amount);\n    }\n\n    function swapTokensForEth(uint256 tokenAmount) private returns(bool) {\n        // generate the uniswap pair path of token -> weth\n        address[] memory path = new address[](2);\n        path[0] = address(this);\n        path[1] = uniswapV2Router.WETH();\n\n        _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n        // make the swap\n        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n            tokenAmount,\n            0, // accept any amount of ETH\n            path,\n            address(this),\n            block.timestamp\n        );\n        return true;\n    }\n\n\n\n    function swapBack() private {\n        uint256 contractBalance = balanceOf(address(this));\n        uint256 totalTokensToSwap = contractBalance;\n        bool success;\n\n        if (contractBalance == 0) {\n            return;\n        }\n\n        if (contractBalance > swapBackValueMax) {\n            contractBalance = swapBackValueMax;\n        }\n\n        uint256 amountToSwapForETH = contractBalance;\n\n        uint256 initialETHBalance = address(this).balance;\n\n        swapTokensForEth(amountToSwapForETH);\n\n        uint256 ethBalance = address(this).balance.sub(initialETHBalance);\n\n        uint256 ethForDev = ethBalance.mul(tokensForProject).div(\n            totalTokensToSwap\n        );\n\n        tokensForMarketing = 0;\n        tokensForProject = 0;\n\n        (success, ) = address(projectWallet).call{value: ethForDev}(\"\");\n\n        (success, ) = address(marketingWallet).call{\n            value: address(this).balance\n        }(\"\");\n    }\n\n    receive() external payable {}\n}"
      }
    },
    "settings": {
      "evmVersion": "paris",
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}