Transaction Hash:
Block:
13824955 at Dec-17-2021 09:10:42 PM +UTC
Transaction Fee:
0.006562353154949163 ETH
$14.86
Gas Used:
106,821 Gas / 61.433174703 Gwei
Emitted Events:
82 |
0xc9ac0de0d917ceea31671961188ab06c75c9f1ed.0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5( 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5, 000000000000000000000000e432cf8858f80c63f73c24c554ea3c65dc6fb093, 000000000000000000000000000000000000000000000000004a777e71446a41 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0xC9aC0DE0...C75c9F1ED | 38.573062025997665528 Eth | 38.552101492771183287 Eth | 0.020960533226482241 | ||
0xE432Cf88...5DC6FB093 |
0.162472844822192357 Eth
Nonce: 145
|
0.176871024893725435 Eth
Nonce: 146
| 0.014398180071533078 | ||
0xEA674fdD...16B898ec8
Miner
| (Ethermine) | 3,289.178040654372649019 Eth | 3,289.178254296372649019 Eth | 0.000213642 |
Execution Trace
0xc9ac0de0d917ceea31671961188ab06c75c9f1ed.2e1a7d4d( )
-
ShunaInuverse.isExcludedFromRewards( wallet=0xE432Cf8858F80C63F73c24C554ea3C65DC6FB093 ) => ( False )
-
ShunaInuverse.balanceOf( account=0xE432Cf8858F80C63F73c24C554ea3C65DC6FB093 ) => ( 74739021000000000000 )
-
ShunaInuverse.STATICCALL( )
-
ShunaInuverse.balanceOf( account=0xE432Cf8858F80C63F73c24C554ea3C65DC6FB093 ) => ( 74739021000000000000 )
- ETH 0.020960533226482241
0xe432cf8858f80c63f73c24c554ea3c65dc6fb093.CALL( )
{"Address.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256(\u0027\u0027)`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash \u0026\u0026 codehash != 0x0);\n }\n\n /**\n * @dev Replacement for Solidity\u0027s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(\n address(this).balance \u003e= amount,\n \"Address: insufficient balance\"\n );\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(\n success,\n \"Address: unable to send value, recipient may have reverted\"\n );\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return\n functionCallWithValue(\n target,\n data,\n value,\n \"Address: low-level call with value failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(\n address(this).balance \u003e= value,\n \"Address: insufficient balance for call\"\n );\n return _functionCallWithValue(target, data, value, errorMessage);\n }\n\n function _functionCallWithValue(\n address target,\n bytes memory data,\n uint256 weiValue,\n string memory errorMessage\n ) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{value: weiValue}(\n data\n );\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length \u003e 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}"},"Context.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\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 memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}"},"ERC20.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\n\nimport \"./IERC20.sol\";\nimport \"./IERC20Metadata.sol\";\nimport \"./Context.sol\";\nimport \"./SafeMath.sol\";\nimport \"./Address.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn\u0027t required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n using SafeMath for uint256;\n using Address for address;\n\n mapping(address =\u003e uint256) internal _balances;\n\n mapping(address =\u003e mapping(address =\u003e uint256)) private _allowances;\n\n uint256 internal _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(address account) 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(address recipient, uint256 amount) 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(address owner, address spender) 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(address spender, uint256 amount) 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 updated 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``\u0027s 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 _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\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 updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\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 updated 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(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n /**\n * @dev Moves tokens `amount` from `sender` to `recipient`.\n *\n * This is 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 _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(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 = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(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 _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(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``\u0027s tokens\n * will be to transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``\u0027s 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"},"IERC20.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\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\u0027s account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) 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(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller\u0027s 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\u0027s 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\u0027s\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(address indexed owner, address indexed spender, uint256 value);\n}\n"},"IERC20Metadata.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\n\nimport \"./IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\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"},"IRewardsTracker.sol":{"content":"pragma solidity 0.8.4;\n\n// SPDX-License-Identifier: Apache-2.0\n\ninterface IRewardsTracker {\n \n function addAllocation(uint identifier) external payable;\n}"},"IUniswapV2Factory.sol":{"content":"pragma solidity 0.8.4;\n\n// SPDX-License-Identifier: MIT\n\ninterface IUniswapV2Factory {\n\n function createPair(address tokenA, address tokenB)\n external\n returns (address pair);\n}"},"IUniswapV2Router.sol":{"content":"pragma solidity 0.8.4;\n\n// SPDX-License-Identifier: MIT\n\ninterface IUniswapV2Router {\n \n function factory() external pure returns (address);\n \n function WETH() external pure returns (address);\n\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external;\n}"},"Ownable.sol":{"content":"pragma solidity 0.8.4;\n\n// SPDX-License-Identifier: MIT\n\nimport \"./Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract 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 address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view 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() external virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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) external virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}"},"RewardsToken.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: Apache-2.0\n\nimport \"./ERC20.sol\";\nimport \"./Ownable.sol\";\n\nabstract contract RewardsToken is ERC20, Ownable {\n\n address[] private excludedFromRewards;\n mapping(address =\u003e bool) private isAddressExcluded;\n \n event ExcludeFromRewards(address wallet);\n event IncludeInRewards(address wallet);\n \n function deleteExcluded(uint index) internal {\n require(index \u003c excludedFromRewards.length, \"Index is greater than array length\");\n excludedFromRewards[index] = excludedFromRewards[excludedFromRewards.length - 1];\n excludedFromRewards.pop();\n }\n \n function getExcludedBalances() internal view returns (uint256) {\n uint256 totalExcludedHoldings = 0;\n for (uint i = 0; i \u003c excludedFromRewards.length; i++) {\n totalExcludedHoldings += balanceOf(excludedFromRewards[i]);\n }\n return totalExcludedHoldings;\n }\n \n function excludeFromRewards(address wallet) public onlyOwner {\n require(!isAddressExcluded[wallet], \"Address is already excluded from rewards\");\n excludedFromRewards.push(wallet);\n isAddressExcluded[wallet] = true;\n emit ExcludeFromRewards(wallet);\n }\n \n function includeInRewards(address wallet) external onlyOwner {\n require(isAddressExcluded[wallet], \"Address is not excluded from rewards\");\n for (uint i = 0; i \u003c excludedFromRewards.length; i++) {\n if (excludedFromRewards[i] == wallet) {\n isAddressExcluded[wallet] = false;\n deleteExcluded(i);\n break;\n }\n }\n emit IncludeInRewards(wallet);\n }\n \n function isExcludedFromRewards(address wallet) external view returns (bool) {\n return isAddressExcluded[wallet];\n }\n \n function getAllExcludedFromRewards() external view returns (address[] memory) {\n return excludedFromRewards;\n }\n \n function getRewardsSupply() public view returns (uint256) {\n return _totalSupply - getExcludedBalances();\n }\n}"},"SafeMath.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: MIT\n\n/**\n * @dev Wrappers over Solidity\u0027s arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it\u0027s recommended to use it always.\n */\n\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c \u003e= a, \"SafeMath: addition overflow\");\n\n return c;\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\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\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 * Counterpart to Solidity\u0027s `-` 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 require(b \u003c= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n // benefit is lost if \u0027b\u0027 is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `/` 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(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `/` 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 require(b \u003e 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity\u0027s `%` 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 mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity\u0027s `%` 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 require(b != 0, errorMessage);\n return a % b;\n }\n}"},"ShunaInuverse.sol":{"content":"pragma solidity ^0.8.4;\n\n// SPDX-License-Identifier: Apache-2.0\n\nimport \"./SafeMath.sol\";\nimport \"./Address.sol\";\nimport \"./RewardsToken.sol\";\nimport \"./IUniswapV2Factory.sol\";\nimport \"./IUniswapV2Router.sol\";\nimport \"./IRewardsTracker.sol\";\n\ncontract ShunaInuverse is RewardsToken {\n using SafeMath for uint256;\n using Address for address;\n \n // Supply, limits and fees\n uint256 private constant REWARDS_TRACKER_IDENTIFIER = 1;\n uint256 private constant TOTAL_SUPPLY = 100000000000000 * (10**9);\n uint256 private constant PLATFORM_FEE = 75; // 0.75%\n\n uint256 public maxTxAmount = TOTAL_SUPPLY.mul(2).div(1000); // 2%\n\n uint256 public devFee = 700; // 7%\n uint256 private _previousDevFee = devFee;\n \n uint256 public rewardsFee = 300; // 3%\n uint256 private _previousRewardsFee = rewardsFee;\n\n uint256 public launchSellFee = 925; // 9.25%\n uint256 private _previousLaunchSellFee = launchSellFee;\n\n address payable private _platformWalletAddress =\n payable(0x037c98c77B450412cDB11EA2996630618224D018);\n address payable private _devWalletAddress =\n payable(0xb45989b2dCAb629C2e00ffAF8117243F17cFF8aB);\n\n uint256 public launchSellFeeDeadline = 0;\n\n IRewardsTracker private _rewardsTracker;\n \n // Exclusions\n mapping(address =\u003e bool) private _isExcludedFromFee;\n mapping(address =\u003e bool) private _isExcludedFromMaxTx;\n \n // Token -\u003e ETH swap support\n IUniswapV2Router public uniswapV2Router;\n address public uniswapV2Pair;\n\n bool currentlySwapping;\n bool public swapAndRedirectEthFeesEnabled = true;\n\n uint256 private minTokensBeforeSwap = 100000000000 * 10**9;\n\n // Events and modifiers\n event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);\n event SwapAndRedirectEthFeesUpdated(bool enabled);\n event OnSwapAndRedirectEthFees(\n uint256 tokensSwapped,\n uint256 ethToDevWallet\n );\n event MaxTxAmountUpdated(uint256 maxTxAmount);\n event ExcludeFromFees(address wallet);\n event IncludeInFees(address wallet);\n event DevWalletUpdated(address newDevWallet);\n event RewardsTrackerUpdated(address newRewardsTracker);\n event RouterUpdated(address newRouterAddress);\n event FeesChanged(uint256 newDevFee, uint256 newRewardsFee);\n event LaunchFeeUpdated(uint256 newLaunchSellFee);\n\n modifier lockTheSwap() {\n currentlySwapping = true;\n _;\n currentlySwapping = false;\n }\n\n constructor() ERC20(\"Shuna Inuverse\", \"SHUNAV\") {\n IUniswapV2Router _uniswapV2Router = IUniswapV2Router(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n // Create a uniswap pair for this new token\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n // set the rest of the contract variables\n uniswapV2Router = _uniswapV2Router;\n \n // mint supply\n _mint(owner(), TOTAL_SUPPLY);\n\n // exclude owner and this contract from fee\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[address(this)] = true;\n \n // internal exclude from max tx\n _isExcludedFromMaxTx[owner()] = true;\n _isExcludedFromMaxTx[address(this)] = true;\n \n // exclude from rewards\n excludeFromRewards(address(this));\n excludeFromRewards(address(0xdead));\n excludeFromRewards(uniswapV2Pair);\n\n // sell penalty for the first 24 hours\n launchSellFeeDeadline = block.timestamp + 1 days;\n\n emit Transfer(address(0), _msgSender(), TOTAL_SUPPLY);\n }\n \n function decimals() public view virtual override returns (uint8) {\n return 9;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n if (\n !_isExcludedFromMaxTx[from] \u0026\u0026\n !_isExcludedFromMaxTx[to] // by default false\n ) {\n require(\n amount \u003c= maxTxAmount,\n \"Transfer amount exceeds the maxTxAmount\"\n );\n }\n\n // sell penalty\n uint256 baseDevFee = devFee;\n if (launchSellFeeDeadline \u003e= block.timestamp \u0026\u0026 to == uniswapV2Pair) {\n devFee = devFee.add(launchSellFee);\n }\n\n // start swap to ETH\n uint256 contractTokenBalance = balanceOf(address(this));\n bool overMinTokenBalance = contractTokenBalance \u003e= minTokensBeforeSwap;\n if (\n overMinTokenBalance \u0026\u0026\n !currentlySwapping \u0026\u0026\n from != uniswapV2Pair \u0026\u0026\n swapAndRedirectEthFeesEnabled\n ) {\n // add dev fee\n swapAndRedirectEthFees(contractTokenBalance);\n }\n\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n removeAllFee();\n }\n\n (uint256 tTransferAmount, uint256 tFee) = _getValues(amount);\n _balances[from] = _balances[from].sub(amount);\n _balances[to] = _balances[to].add(tTransferAmount);\n\n _takeFee(tFee);\n\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n restoreAllFee();\n }\n\n // restore dev fee\n devFee = baseDevFee;\n\n emit Transfer(from, to, tTransferAmount);\n }\n\n //to recieve ETH from uniswapV2Router when swaping\n receive() external payable {}\n\n function _getValues(uint256 tAmount)\n private\n view\n returns (uint256, uint256)\n {\n uint256 tFee = calculateFee(tAmount);\n uint256 tTransferAmount = tAmount.sub(tFee);\n return (tTransferAmount, tFee);\n }\n\n function _takeFee(uint256 fee) private {\n _balances[address(this)] = _balances[address(this)].add(fee);\n }\n\n function calculateFee(uint256 _amount)\n private\n view\n returns (uint256)\n {\n uint256 totalFee = devFee.add(rewardsFee).add(PLATFORM_FEE);\n return _amount.mul(totalFee).div(10000);\n }\n\n function removeAllFee() private {\n if (devFee == 0 || rewardsFee == 0) return;\n\n _previousDevFee = devFee;\n _previousRewardsFee = rewardsFee;\n\n devFee = 0;\n rewardsFee = 0;\n }\n\n function restoreAllFee() private {\n devFee = _previousDevFee;\n rewardsFee = _previousRewardsFee;\n }\n\n function swapAndRedirectEthFees(uint256 contractTokenBalance)\n private\n lockTheSwap\n {\n uint256 totalRedirectFee = devFee.add(rewardsFee).add(PLATFORM_FEE);\n if (totalRedirectFee == 0) return;\n \n // capture the contract\u0027s current ETH balance.\n // this is so that we can capture exactly the amount of ETH that the\n // swap creates, and not make the fee events include any ETH that\n // has been manually sent to the contract\n uint256 initialBalance = address(this).balance;\n\n // swap tokens for ETH\n swapTokensForEth(contractTokenBalance);\n\n uint256 newBalance = address(this).balance.sub(initialBalance);\n\n if (newBalance \u003e 0) {\n // send to platform wallet\n uint256 platformBalance = newBalance.mul(PLATFORM_FEE).div(totalRedirectFee);\n sendEthToWallet(_platformWalletAddress, platformBalance);\n\n //\n // send to rewards wallet\n //\n uint256 rewardsBalance = newBalance.mul(rewardsFee).div(totalRedirectFee);\n if (rewardsBalance \u003e 0 \u0026\u0026 address(_rewardsTracker) != address(0)) {\n try _rewardsTracker.addAllocation{value: rewardsBalance}(REWARDS_TRACKER_IDENTIFIER) {} catch {}\n }\n \n //\n // send to dev wallet\n //\n uint256 devBalance = newBalance.mul(devFee).div(totalRedirectFee);\n sendEthToWallet(_devWalletAddress, devBalance);\n\n emit OnSwapAndRedirectEthFees(contractTokenBalance, newBalance);\n }\n }\n\n function sendEthToWallet(address wallet, uint256 amount) private {\n if (amount \u003e 0) {\n payable(wallet).transfer(amount);\n }\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n // generate the uniswap pair path of token -\u003e 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 }\n \n // for 0.5% input 5, for 1% input 10\n function setMaxTxPercent(uint256 newMaxTx) public onlyOwner {\n require(newMaxTx \u003e= 5, \"Max TX should be above 0.5%\");\n maxTxAmount = TOTAL_SUPPLY.mul(newMaxTx).div(1000);\n emit MaxTxAmountUpdated(maxTxAmount);\n }\n \n function isExcludedFromFee(address account) external view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function excludeFromFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = true;\n emit ExcludeFromFees(account);\n }\n\n function includeInFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = false;\n emit IncludeInFees(account);\n }\n\n function setFees(uint256 newDevFee, uint256 newRewardsFee) external onlyOwner {\n require(newDevFee \u003c= 10 \u0026\u0026 newRewardsFee \u003c= 10, \"Fees exceed maximum allowed value\");\n devFee = newDevFee;\n rewardsFee = newRewardsFee;\n emit FeesChanged(newDevFee, newRewardsFee);\n }\n\n function setLaunchSellFee(uint256 newLaunchSellFee) external onlyOwner {\n require(newLaunchSellFee \u003c= 25, \"Maximum launch sell fee is 25%\");\n launchSellFee = newLaunchSellFee;\n emit LaunchFeeUpdated(newLaunchSellFee);\n }\n\n function _setDevWallet(address payable newDevWallet)\n external\n onlyOwner\n {\n _devWalletAddress = newDevWallet;\n emit DevWalletUpdated(newDevWallet);\n }\n \n function _setRewardsTracker(address payable newRewardsTracker)\n external\n onlyOwner\n {\n _rewardsTracker = IRewardsTracker(newRewardsTracker);\n emit RewardsTrackerUpdated(newRewardsTracker);\n }\n\n function setRouterAddress(address newRouter) external onlyOwner {\n IUniswapV2Router _newUniswapRouter = IUniswapV2Router(newRouter);\n uniswapV2Pair = IUniswapV2Factory(_newUniswapRouter.factory())\n .createPair(address(this), _newUniswapRouter.WETH());\n uniswapV2Router = _newUniswapRouter;\n emit RouterUpdated(newRouter);\n }\n\n function setSwapAndRedirectEthFeesEnabled(bool enabled) external onlyOwner {\n swapAndRedirectEthFeesEnabled = enabled;\n emit SwapAndRedirectEthFeesUpdated(enabled);\n }\n\n function setMinTokensBeforeSwap(uint256 minTokens) external onlyOwner {\n minTokensBeforeSwap = minTokens * 10**9;\n emit MinTokensBeforeSwapUpdated(minTokens);\n }\n \n // emergency claim functions\n function manualSwap() external onlyOwner {\n uint256 contractBalance = balanceOf(address(this));\n swapTokensForEth(contractBalance);\n }\n\n function manualSend() external onlyOwner {\n uint256 contractEthBalance = address(this).balance;\n sendEthToWallet(_devWalletAddress, contractEthBalance);\n }\n}"}}