Token 10X: Africa's First Cryptocurrency Hub
Ancestry Token
%uD83D%uDE80 FortressArt High Potential Metaverse Token %uD83D%uDE80
%uD83C%uDFF3%uFE0F Join our social networks to stay tuned for the website launch and publication date for the ANC token whitelist
%uD83D%uDEA8First whitelist maximum token 2.249.000 price $0.06
%uD83D%uDEA8Sale...
About Ancestry
%uD83D%uDE80 FortressArt High Potential Metaverse Token %uD83D%uDE80
%uD83C%uDFF3%uFE0F Join our social networks to stay tuned for the website launch and publication date for the ANC token whitelist
%uD83D%uDEA8First whitelist maximum token 2.249.000 price $0.06
%uD83D%uDEA8Sale of chests 1500 units white list
Join the fastest growing community.
%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014
%uD83D%uDD30 Xx WHITELIST TOKEN ANC xX %uD83D%uDD30
https://gleam.io/C2tym/whitelistfortressart
%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014
%uD83C%uDF10 Web site %uD83C%uDF10: https://www.fortressartonline.com/es
SOCIAL MEDIA
%uD83D%uDCEDTelegram advertisements: https://t.me/fortressartoficial
%uD83D%uDCEDJoin Telegram Spanish: https://t.me/joinchat/JvLrkWBovFg2NDQ5
%uD83D%uDCEDJoin Telegram English: https://t.me/ lpK_Gv-qnsI3MGMx
%uD83D%uDCEDTwitter: https://twitter.com/artfortressFOR
%u2B50%uFE0FDiscord: https://discord.gg/sUWsTNCDrB
%uD83C%uDF8A TOKENOMICS %uD83C%uDF8A
%u2705 Our token's TOTAL SUPPLY: 26M
%u2705 Self injection of liquidity 50% by swap
%u2705 Pancakeswap Listing: 2.249M Locked For 5 months 96% (LP)
%u27053% Buy and sell tax
%u27052% 2% DISTRIBUTED IN HOLDERS
%u27051% DEVS
%uD83C%uDFF3%uFE0F Join our social networks to stay tuned for the website launch and publication date for the ANC token whitelist
%uD83D%uDEA8First whitelist maximum token 2.249.000 price $0.06
%uD83D%uDEA8Sale of chests 1500 units white list
Join the fastest growing community.
%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014
%uD83D%uDD30 Xx WHITELIST TOKEN ANC xX %uD83D%uDD30
https://gleam.io/C2tym/whitelistfortressart
%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014%u2014
%uD83C%uDF10 Web site %uD83C%uDF10: https://www.fortressartonline.com/es
SOCIAL MEDIA
%uD83D%uDCEDTelegram advertisements: https://t.me/fortressartoficial
%uD83D%uDCEDJoin Telegram Spanish: https://t.me/joinchat/JvLrkWBovFg2NDQ5
%uD83D%uDCEDJoin Telegram English: https://t.me/ lpK_Gv-qnsI3MGMx
%uD83D%uDCEDTwitter: https://twitter.com/artfortressFOR
%u2B50%uFE0FDiscord: https://discord.gg/sUWsTNCDrB
%uD83C%uDF8A TOKENOMICS %uD83C%uDF8A
%u2705 Our token's TOTAL SUPPLY: 26M
%u2705 Self injection of liquidity 50% by swap
%u2705 Pancakeswap Listing: 2.249M Locked For 5 months 96% (LP)
%u27053% Buy and sell tax
%u27052% 2% DISTRIBUTED IN HOLDERS
%u27051% DEVS
607 total visits
Token information and links
Circulating Supply
26000000000000000000000000
Token Contract (BSC Chain)
0X17430ED8044E7DC18A400586F422224858748A53
Contract license:
Launch Date
In 7 Days
KYC Information
No
Audit Information
None
Team Information
Team leader: None
Team leader contact: None
Contract source code
{{
"language": "Solidity",
"sources": {
"contracts/Ancestry.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n\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'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(address recipient, uint256 amount)\n external\n 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)\n external\n view\n 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// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity 0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity 0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\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// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity 0.8.0;\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 // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `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 >= amount,\n \"Address: insufficient balance\"\n );\n\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 >= value,\n \"Address: insufficient balance for call\"\n );\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(\n data\n );\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data)\n internal\n view\n returns (bytes memory)\n {\n return\n functionStaticCall(\n target,\n data,\n \"Address: low-level static call failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n {\n return\n functionDelegateCall(\n target,\n data,\n \"Address: low-level delegate call failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\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}\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity 0.8.0;\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 */\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() external 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\ncontract Ancestry is Context, IERC20, Ownable, ReentrancyGuard {\n using SafeMath for uint256;\n using Address for address;\n\n /* events section */\n\n event NewTaxFeePercent(uint256 oldTaxFee, uint256 newTaxFee);\n event NewTeamFeePercent(uint256 oldTeamFee, uint256 newTeamFee);\n event NewMaxTxAmount(uint256 oldMaxTxAmount, uint256 newMaxTxAmount);\n\n event AncToCoinmita(address account, uint256 amount, uint256 allowance);\n event CoinmitaToAnc(address account, uint256 amount, uint256 allowance);\n event PayWithCoinmita(address account, uint256 amount, uint256 allowance);\n event ClaimCoinmita(address account, uint256 amount);\n event UpdateCoinmitaFee(uint256 oldFee, uint256 newFee);\n\n /*\n Contract designed based on reflected.finance reflections between holders\n system by @0xDoctorCrypto for Fortress ART NFT Game 18/01/2021\n\n Total supply of token is fully fixed. Only 26000000 ANC will be fairly\n distributed following announced tokenomics scheme provided on gitDocs\n\n No one from the team during the development phase has received a dollar. \n This is the biggest signal of our trust in this project. That's the \n reason the contract will be deployed with the next fees in order to cover\n big spending we've made during this phase.\n\n 2% Fee to be distributed between hodlers on each transaction\n 3% Fee of transacion to be distributed to development team\n\n Anyway, we will always will do our best to keep the project alive and\n we'll rennounce to our fee when needed keeping this finality.\n That's why this contract have both fees adjustables by methods below.\n\n We'll keep this small fees for some time from launch and will announce\n on official channels how do they evolve over time in order to protect\n user experience and token price. Injection liquidity plans are always\n dynamic based on the evolution from project launch.\n\n But development team also needs to keep evolving. Keep this in mind,\n and always trust us as we've trusted you before knowing each other.\n\n Our first priority is FortressART NFT Game and to be able to continue\n developing more project for BSC and further Blockchains.\n\n This is just the beginning...\n\n Stay tuned.\n\n\n */\n\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private _isExcluded;\n\n // Struct for saving Game information mapped to each address\n struct Player {\n uint256 timesBlacklisted;\n bool isBlacklisted;\n string reason;\n uint256 coinmitaBalance;\n }\n\n uint256 private _coinmitaToANCFee = 3;\n\n // For tracking players\n mapping(address => Player) public _playerTrack;\n\n address[] private _excluded;\n\n uint256 private constant MAX = ~uint256(0);\n uint256 private constant _tTotal = 26000000 ether;\n uint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n\n string private constant _name = \"Ancestry\";\n string private constant _symbol = \"ANC\";\n uint8 private constant _decimals = 18;\n /* \n Token Launch conditions: \n 2% of each transaction distributed between holders\n 3% of each transaction distributed between dev team\n */\n uint256 public _taxFee = 2;\n uint256 private _previousTaxFee = _taxFee;\n\n uint256 public _teamFee = 3;\n uint256 private _previousteamFee = _teamFee;\n\n /*\n Max tokens per transaction for users in order to prevent\n whale behavior and protect token price & community\n 0.146% from _tTotal = 38000\n\n */\n uint256 public _maxTxAmount = 25000 ether;\n\n address private dev1;\n address private dev2;\n address private dev3;\n address private dev4;\n address private dev5;\n address private dev6;\n address private dev7;\n address private rewBag;\n address private teamRw;\n\n /* first quantity must remain on deployer wallet for promo */\n uint256 constant PUBLIC_AND_PRIVATE_SALE_TOKENS = 6929000 ether;\n uint256 constant REWARD_BAG_TOKENS = 18811000 ether;\n uint256 PER_MEMBER_TOKENS = SafeMath.div(260000 ether, 7);\n\n constructor(\n address _dev1,\n address _dev2,\n address _dev3,\n address _dev4,\n address _dev5,\n address _dev6,\n address _dev7,\n address _rewBag,\n address _teamRw\n ) {\n require(\n address(_msgSender()) != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(_dev1 != address(0), \"ERC20: construct from the zero address\");\n require(_dev2 != address(0), \"ERC20: construct from the zero address\");\n require(_dev3 != address(0), \"ERC20: construct from the zero address\");\n require(_dev4 != address(0), \"ERC20: construct from the zero address\");\n require(_dev5 != address(0), \"ERC20: construct from the zero address\");\n require(_dev6 != address(0), \"ERC20: construct from the zero address\");\n require(_dev7 != address(0), \"ERC20: construct from the zero address\");\n require(\n _rewBag != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(\n _teamRw != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(\n _rewBag != address(0),\n \"ERC20: construct from the zero address\"\n );\n\n dev1 = _dev1;\n dev2 = _dev2;\n dev3 = _dev3;\n dev4 = _dev4;\n dev5 = _dev5;\n dev6 = _dev6;\n dev7 = _dev7;\n rewBag = _rewBag;\n teamRw = _teamRw;\n\n _rOwned[_msgSender()] = _rTotal;\n\n //exclude owner, devs, and this contract from fee\n _isExcludedFromFee[address(0)] = true;\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[_msgSender()] = true;\n _isExcludedFromFee[rewBag] = true;\n\n _isExcludedFromFee[dev1] = true;\n _isExcludedFromFee[dev2] = true;\n _isExcludedFromFee[dev3] = true;\n _isExcludedFromFee[dev4] = true;\n _isExcludedFromFee[dev5] = true;\n _isExcludedFromFee[dev6] = true;\n _isExcludedFromFee[dev7] = true;\n _isExcludedFromFee[teamRw] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n\n transfer(rewBag, REWARD_BAG_TOKENS);\n transfer(dev1, PER_MEMBER_TOKENS);\n transfer(dev2, PER_MEMBER_TOKENS);\n transfer(dev3, PER_MEMBER_TOKENS);\n transfer(dev4, PER_MEMBER_TOKENS);\n transfer(dev5, PER_MEMBER_TOKENS);\n transfer(dev6, PER_MEMBER_TOKENS);\n transfer(dev7, PER_MEMBER_TOKENS);\n }\n\n function name() external pure returns (string memory) {\n return _name;\n }\n\n function symbol() external pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() external pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() external pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[account]);\n }\n\n function transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount)\n external\n override\n returns (bool)\n {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n external nonReentrant\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external nonReentrant\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account)\n external\n view\n returns (bool)\n {\n return _isExcluded[account];\n }\n\n function totalFees() external view returns (uint256) {\n return _tFeeTotal;\n }\n\n /* \n For further information about reflected tokens contracts (math explained)\n https://reflect-contract-doc.netlify.app/ \n */\n\n function tokenFromReflection(uint256 rAmount)\n public\n view\n returns (uint256)\n {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already excluded\");\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function excludeFromFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = true;\n }\n\n function setTaxFeePercent(uint256 taxFee) external onlyOwner {\n uint256 oldTaxFee = _taxFee;\n _taxFee = taxFee;\n emit NewTaxFeePercent(oldTaxFee, taxFee);\n }\n\n function setTeamFeePercent(uint256 teamFee) external onlyOwner {\n uint256 oldTeamFeePercent = _teamFee;\n _teamFee = teamFee;\n emit NewTeamFeePercent(oldTeamFeePercent, teamFee);\n }\n\n function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner {\n uint256 oldMaxTxAmount = _maxTxAmount;\n _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2);\n emit NewMaxTxAmount(oldMaxTxAmount, _maxTxAmount);\n }\n\n function addToBlacklist(address addr, string calldata reason)\n external\n onlyOwner\n {\n assert(address(addr) != address(0));\n _playerTrack[addr].isBlacklisted = true;\n _playerTrack[addr].reason = reason;\n _playerTrack[addr].timesBlacklisted ;\n excludeFromReward(addr);\n }\n\n function removeFromBlacklist(address addr) external onlyOwner {\n assert(address(addr) != address(0));\n _playerTrack[addr].isBlacklisted = false;\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n (uint256 tTransferAmount, uint256 tFee, uint256 tTeamFee) = _getTValues(\n tAmount\n );\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tTeamFee,\n _getRate()\n );\n return (\n rAmount,\n rTransferAmount,\n rFee,\n tTransferAmount,\n tFee,\n tTeamFee\n );\n }\n\n function _getTValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 tFee = calculateTaxFee(tAmount);\n uint256 tTeamFee = calculateTeamFee(tAmount);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeamFee);\n return (tTransferAmount, tFee, tTeamFee);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tTeamFee,\n uint256 currentRate\n )\n private\n pure\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rTeamFee = tTeamFee.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeamFee);\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n\n function _takeTeamFee(uint256 tAmount) private {\n uint256 currentRate = _getRate();\n uint256 rAmount = tAmount.mul(currentRate);\n _rOwned[teamRw] = _rOwned[teamRw].add(rAmount);\n if (_isExcluded[teamRw]) _tOwned[teamRw] = _tOwned[teamRw].add(tAmount);\n }\n\n function calculateTaxFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_taxFee).div(10**2);\n }\n\n function calculateTeamFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_teamFee).div(10**2);\n }\n\n function removeAllFee() private {\n if (_taxFee == 0 && _teamFee == 0) return;\n\n _previousTaxFee = _taxFee;\n _previousteamFee = _teamFee;\n\n _taxFee = 0;\n _teamFee = 0;\n }\n\n function restoreAllFee() private {\n _taxFee = _previousTaxFee;\n _teamFee = _previousteamFee;\n }\n\n function isExcludedFromFee(address account) external view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) private {\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 function _transfer(\n address from,\n address to,\n uint256 amount\n ) private nonReentrant {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n //if any account belongs to _isExcludedFromFee then remove the maxTxAmount\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to])\n require(\n amount <= _maxTxAmount,\n \"Transfer amount exceeds the maxTxAmount.\"\n );\n\n //indicates if fee should be deducted from transfer\n bool takeFee = true;\n\n //if any account belongs to _isExcludedFromFee account then remove the fee\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n }\n\n //transfer amount, it will take tax, burn, liquidity fee\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n //this method is responsible for taking all fee, if takeFee is true\n function _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n ) private {\n if (!takeFee) removeAllFee();\n\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\n if (!takeFee) restoreAllFee();\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n // coinmita functions\n\n /* \n dev: transfer 'amount' of ANC to game wallet and increases\n coinmita balance 'amount' quantity.\n @amount: quantity of ANC to be converted to coinmita\n */\n\n function ancToCoinmita(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // require user's ANC balance is GE than amount requested\n require(balanceOf(_msgSender()) >= amount, \"Not enough balance\");\n // transfer to rewBag ANC amount to convert\n transfer(rewBag, amount);\n uint256 coinmitaAmount = amount - amount.mul(5).div(100);\n // update user Coinmita balance\n _playerTrack[_msgSender()].coinmitaBalance = coinmitaAmount;\n // appprove for later conversion that amount of ANC to be spent from game Wallet\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].add(coinmitaAmount)\n );\n emit AncToCoinmita(\n _msgSender(),\n coinmitaAmount,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n /*\n dev: allows an user to transform their conmita balance back\n to ANC Token. \n @amount: quantity of Coinmita to be converted to ANC\n */\n\n function coinmitaToAnc(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // requiere user's Coinmita balance is GE than amount requested\n require(\n _playerTrack[_msgSender()].coinmitaBalance >= amount,\n \"Not enough balance. Re-connect your wallet in order to update it.\"\n );\n uint256 coinmitaAmountToDeliver = amount -\n (amount * _coinmitaToANCFee) /\n 100;\n // update user's coinmita balance substracting requested amount\n _playerTrack[_msgSender()].coinmitaBalance = _playerTrack[_msgSender()]\n .coinmitaBalance\n .sub(amount, \"ERC20: decreased balance below zero\");\n // update user allowance substracting the fee\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].sub(\n amount.mul(_coinmitaToANCFee).div(100)\n )\n );\n // transfer from rewBag requested amount to user\n transferFrom(rewBag, _msgSender(), coinmitaAmountToDeliver);\n emit CoinmitaToAnc(\n _msgSender(),\n coinmitaAmountToDeliver,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n /*\n dev: allows user to transact a payment on Fortress Art Game with Coinmita\n @amount: quantity of Coinmita to be deducted from allowance and balance\n */\n\n function payWithCoinmita(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // requiere user's Coinmita balance is GE than amount requested\n require(\n _playerTrack[_msgSender()].coinmitaBalance >= amount,\n \"Not enough balance\"\n );\n // update coinmita Balance\n _playerTrack[_msgSender()].coinmitaBalance = _playerTrack[_msgSender()]\n .coinmitaBalance\n .sub(amount, \"ERC20: decreased balance below zero\");\n // Decrease Allowance for later ANC conversion\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].sub(\n amount,\n \"ERC20: decreased allowance below zero\"\n )\n );\n emit PayWithCoinmita(\n _msgSender(),\n amount,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n function getCoinmitaBalance(address account)\n external\n view\n returns (uint256)\n {\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n return _playerTrack[account].coinmitaBalance;\n }\n\n function getCoinmitaAllowance(address account)\n external\n view\n returns (uint256)\n {\n return _allowances[rewBag][account];\n }\n\n /*\n dev: Increase the balance of coinmita on the blockchain user account, able to be claimed\n as a higher quantity has been earned on the game. This function is called\n for us when connecting to DAPP checking if Coinmita balance from Fortress Art Game \n is higher than value received from getCoinmitaBalance, allowing us to update it and\n leting an user to claim their earned funds. \n @account: acount to be checked\n @amount: total coinmita amount on our BBDD from the game\n */\n\n function claimCoinmita(address account, uint256 amount)\n external\n nonReentrant\n onlyOwner\n returns (bool)\n {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[account].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // require new Allowance is GE Current Allowance\n require(\n _allowances[rewBag][account] < amount,\n \"You can't increase allowance to a smaller value\"\n );\n // update coinmita Balance\n _playerTrack[account].coinmitaBalance = amount;\n // increase allowance\n _approve(rewBag, account, _playerTrack[account].coinmitaBalance);\n emit ClaimCoinmita(account, _playerTrack[account].coinmitaBalance);\n return true;\n }\n\n function updateCoinmitaFee(uint256 newFee)\n external\n onlyOwner\n returns (bool)\n {\n uint256 oldFee = _coinmitaToANCFee;\n _coinmitaToANCFee = newFee;\n emit UpdateCoinmitaFee(oldFee, newFee);\n return true;\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}
"language": "Solidity",
"sources": {
"contracts/Ancestry.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n\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'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(address recipient, uint256 amount)\n external\n 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)\n external\n view\n 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// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\n\npragma solidity 0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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(uint256 a, uint256 b)\n internal\n pure\n returns (bool, uint256)\n {\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// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity 0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\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// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity 0.8.0;\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 // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `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 >= amount,\n \"Address: insufficient balance\"\n );\n\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 >= value,\n \"Address: insufficient balance for call\"\n );\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(\n data\n );\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data)\n internal\n view\n returns (bytes memory)\n {\n return\n functionStaticCall(\n target,\n data,\n \"Address: low-level static call failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data)\n internal\n returns (bytes memory)\n {\n return\n functionDelegateCall(\n target,\n data,\n \"Address: low-level delegate call failed\"\n );\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\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}\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity 0.8.0;\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 */\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() external 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\ncontract Ancestry is Context, IERC20, Ownable, ReentrancyGuard {\n using SafeMath for uint256;\n using Address for address;\n\n /* events section */\n\n event NewTaxFeePercent(uint256 oldTaxFee, uint256 newTaxFee);\n event NewTeamFeePercent(uint256 oldTeamFee, uint256 newTeamFee);\n event NewMaxTxAmount(uint256 oldMaxTxAmount, uint256 newMaxTxAmount);\n\n event AncToCoinmita(address account, uint256 amount, uint256 allowance);\n event CoinmitaToAnc(address account, uint256 amount, uint256 allowance);\n event PayWithCoinmita(address account, uint256 amount, uint256 allowance);\n event ClaimCoinmita(address account, uint256 amount);\n event UpdateCoinmitaFee(uint256 oldFee, uint256 newFee);\n\n /*\n Contract designed based on reflected.finance reflections between holders\n system by @0xDoctorCrypto for Fortress ART NFT Game 18/01/2021\n\n Total supply of token is fully fixed. Only 26000000 ANC will be fairly\n distributed following announced tokenomics scheme provided on gitDocs\n\n No one from the team during the development phase has received a dollar. \n This is the biggest signal of our trust in this project. That's the \n reason the contract will be deployed with the next fees in order to cover\n big spending we've made during this phase.\n\n 2% Fee to be distributed between hodlers on each transaction\n 3% Fee of transacion to be distributed to development team\n\n Anyway, we will always will do our best to keep the project alive and\n we'll rennounce to our fee when needed keeping this finality.\n That's why this contract have both fees adjustables by methods below.\n\n We'll keep this small fees for some time from launch and will announce\n on official channels how do they evolve over time in order to protect\n user experience and token price. Injection liquidity plans are always\n dynamic based on the evolution from project launch.\n\n But development team also needs to keep evolving. Keep this in mind,\n and always trust us as we've trusted you before knowing each other.\n\n Our first priority is FortressART NFT Game and to be able to continue\n developing more project for BSC and further Blockchains.\n\n This is just the beginning...\n\n Stay tuned.\n\n\n */\n\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n mapping(address => bool) private _isExcluded;\n\n // Struct for saving Game information mapped to each address\n struct Player {\n uint256 timesBlacklisted;\n bool isBlacklisted;\n string reason;\n uint256 coinmitaBalance;\n }\n\n uint256 private _coinmitaToANCFee = 3;\n\n // For tracking players\n mapping(address => Player) public _playerTrack;\n\n address[] private _excluded;\n\n uint256 private constant MAX = ~uint256(0);\n uint256 private constant _tTotal = 26000000 ether;\n uint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n\n string private constant _name = \"Ancestry\";\n string private constant _symbol = \"ANC\";\n uint8 private constant _decimals = 18;\n /* \n Token Launch conditions: \n 2% of each transaction distributed between holders\n 3% of each transaction distributed between dev team\n */\n uint256 public _taxFee = 2;\n uint256 private _previousTaxFee = _taxFee;\n\n uint256 public _teamFee = 3;\n uint256 private _previousteamFee = _teamFee;\n\n /*\n Max tokens per transaction for users in order to prevent\n whale behavior and protect token price & community\n 0.146% from _tTotal = 38000\n\n */\n uint256 public _maxTxAmount = 25000 ether;\n\n address private dev1;\n address private dev2;\n address private dev3;\n address private dev4;\n address private dev5;\n address private dev6;\n address private dev7;\n address private rewBag;\n address private teamRw;\n\n /* first quantity must remain on deployer wallet for promo */\n uint256 constant PUBLIC_AND_PRIVATE_SALE_TOKENS = 6929000 ether;\n uint256 constant REWARD_BAG_TOKENS = 18811000 ether;\n uint256 PER_MEMBER_TOKENS = SafeMath.div(260000 ether, 7);\n\n constructor(\n address _dev1,\n address _dev2,\n address _dev3,\n address _dev4,\n address _dev5,\n address _dev6,\n address _dev7,\n address _rewBag,\n address _teamRw\n ) {\n require(\n address(_msgSender()) != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(_dev1 != address(0), \"ERC20: construct from the zero address\");\n require(_dev2 != address(0), \"ERC20: construct from the zero address\");\n require(_dev3 != address(0), \"ERC20: construct from the zero address\");\n require(_dev4 != address(0), \"ERC20: construct from the zero address\");\n require(_dev5 != address(0), \"ERC20: construct from the zero address\");\n require(_dev6 != address(0), \"ERC20: construct from the zero address\");\n require(_dev7 != address(0), \"ERC20: construct from the zero address\");\n require(\n _rewBag != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(\n _teamRw != address(0),\n \"ERC20: construct from the zero address\"\n );\n require(\n _rewBag != address(0),\n \"ERC20: construct from the zero address\"\n );\n\n dev1 = _dev1;\n dev2 = _dev2;\n dev3 = _dev3;\n dev4 = _dev4;\n dev5 = _dev5;\n dev6 = _dev6;\n dev7 = _dev7;\n rewBag = _rewBag;\n teamRw = _teamRw;\n\n _rOwned[_msgSender()] = _rTotal;\n\n //exclude owner, devs, and this contract from fee\n _isExcludedFromFee[address(0)] = true;\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[_msgSender()] = true;\n _isExcludedFromFee[rewBag] = true;\n\n _isExcludedFromFee[dev1] = true;\n _isExcludedFromFee[dev2] = true;\n _isExcludedFromFee[dev3] = true;\n _isExcludedFromFee[dev4] = true;\n _isExcludedFromFee[dev5] = true;\n _isExcludedFromFee[dev6] = true;\n _isExcludedFromFee[dev7] = true;\n _isExcludedFromFee[teamRw] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n\n transfer(rewBag, REWARD_BAG_TOKENS);\n transfer(dev1, PER_MEMBER_TOKENS);\n transfer(dev2, PER_MEMBER_TOKENS);\n transfer(dev3, PER_MEMBER_TOKENS);\n transfer(dev4, PER_MEMBER_TOKENS);\n transfer(dev5, PER_MEMBER_TOKENS);\n transfer(dev6, PER_MEMBER_TOKENS);\n transfer(dev7, PER_MEMBER_TOKENS);\n }\n\n function name() external pure returns (string memory) {\n return _name;\n }\n\n function symbol() external pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() external pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() external pure override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[account]);\n }\n\n function transfer(address recipient, uint256 amount)\n public\n override\n returns (bool)\n {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender)\n external\n view\n override\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount)\n external\n override\n returns (bool)\n {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue)\n external nonReentrant\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue)\n external nonReentrant\n returns (bool)\n {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account)\n external\n view\n returns (bool)\n {\n return _isExcluded[account];\n }\n\n function totalFees() external view returns (uint256) {\n return _tFeeTotal;\n }\n\n /* \n For further information about reflected tokens contracts (math explained)\n https://reflect-contract-doc.netlify.app/ \n */\n\n function tokenFromReflection(uint256 rAmount)\n public\n view\n returns (uint256)\n {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already excluded\");\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function excludeFromFee(address account) external onlyOwner {\n _isExcludedFromFee[account] = true;\n }\n\n function setTaxFeePercent(uint256 taxFee) external onlyOwner {\n uint256 oldTaxFee = _taxFee;\n _taxFee = taxFee;\n emit NewTaxFeePercent(oldTaxFee, taxFee);\n }\n\n function setTeamFeePercent(uint256 teamFee) external onlyOwner {\n uint256 oldTeamFeePercent = _teamFee;\n _teamFee = teamFee;\n emit NewTeamFeePercent(oldTeamFeePercent, teamFee);\n }\n\n function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner {\n uint256 oldMaxTxAmount = _maxTxAmount;\n _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2);\n emit NewMaxTxAmount(oldMaxTxAmount, _maxTxAmount);\n }\n\n function addToBlacklist(address addr, string calldata reason)\n external\n onlyOwner\n {\n assert(address(addr) != address(0));\n _playerTrack[addr].isBlacklisted = true;\n _playerTrack[addr].reason = reason;\n _playerTrack[addr].timesBlacklisted ;\n excludeFromReward(addr);\n }\n\n function removeFromBlacklist(address addr) external onlyOwner {\n assert(address(addr) != address(0));\n _playerTrack[addr].isBlacklisted = false;\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n (uint256 tTransferAmount, uint256 tFee, uint256 tTeamFee) = _getTValues(\n tAmount\n );\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tTeamFee,\n _getRate()\n );\n return (\n rAmount,\n rTransferAmount,\n rFee,\n tTransferAmount,\n tFee,\n tTeamFee\n );\n }\n\n function _getTValues(uint256 tAmount)\n private\n view\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 tFee = calculateTaxFee(tAmount);\n uint256 tTeamFee = calculateTeamFee(tAmount);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeamFee);\n return (tTransferAmount, tFee, tTeamFee);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tTeamFee,\n uint256 currentRate\n )\n private\n pure\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rTeamFee = tTeamFee.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeamFee);\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n for (uint256 i = 0; i < _excluded.length; i ) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n\n function _takeTeamFee(uint256 tAmount) private {\n uint256 currentRate = _getRate();\n uint256 rAmount = tAmount.mul(currentRate);\n _rOwned[teamRw] = _rOwned[teamRw].add(rAmount);\n if (_isExcluded[teamRw]) _tOwned[teamRw] = _tOwned[teamRw].add(tAmount);\n }\n\n function calculateTaxFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_taxFee).div(10**2);\n }\n\n function calculateTeamFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_teamFee).div(10**2);\n }\n\n function removeAllFee() private {\n if (_taxFee == 0 && _teamFee == 0) return;\n\n _previousTaxFee = _taxFee;\n _previousteamFee = _teamFee;\n\n _taxFee = 0;\n _teamFee = 0;\n }\n\n function restoreAllFee() private {\n _taxFee = _previousTaxFee;\n _teamFee = _previousteamFee;\n }\n\n function isExcludedFromFee(address account) external view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) private {\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 function _transfer(\n address from,\n address to,\n uint256 amount\n ) private nonReentrant {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n //if any account belongs to _isExcludedFromFee then remove the maxTxAmount\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to])\n require(\n amount <= _maxTxAmount,\n \"Transfer amount exceeds the maxTxAmount.\"\n );\n\n //indicates if fee should be deducted from transfer\n bool takeFee = true;\n\n //if any account belongs to _isExcludedFromFee account then remove the fee\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n }\n\n //transfer amount, it will take tax, burn, liquidity fee\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n //this method is responsible for taking all fee, if takeFee is true\n function _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n ) private {\n if (!takeFee) removeAllFee();\n\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\n if (!takeFee) restoreAllFee();\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tTeamFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeTeamFee(tTeamFee);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n // coinmita functions\n\n /* \n dev: transfer 'amount' of ANC to game wallet and increases\n coinmita balance 'amount' quantity.\n @amount: quantity of ANC to be converted to coinmita\n */\n\n function ancToCoinmita(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // require user's ANC balance is GE than amount requested\n require(balanceOf(_msgSender()) >= amount, \"Not enough balance\");\n // transfer to rewBag ANC amount to convert\n transfer(rewBag, amount);\n uint256 coinmitaAmount = amount - amount.mul(5).div(100);\n // update user Coinmita balance\n _playerTrack[_msgSender()].coinmitaBalance = coinmitaAmount;\n // appprove for later conversion that amount of ANC to be spent from game Wallet\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].add(coinmitaAmount)\n );\n emit AncToCoinmita(\n _msgSender(),\n coinmitaAmount,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n /*\n dev: allows an user to transform their conmita balance back\n to ANC Token. \n @amount: quantity of Coinmita to be converted to ANC\n */\n\n function coinmitaToAnc(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // requiere user's Coinmita balance is GE than amount requested\n require(\n _playerTrack[_msgSender()].coinmitaBalance >= amount,\n \"Not enough balance. Re-connect your wallet in order to update it.\"\n );\n uint256 coinmitaAmountToDeliver = amount -\n (amount * _coinmitaToANCFee) /\n 100;\n // update user's coinmita balance substracting requested amount\n _playerTrack[_msgSender()].coinmitaBalance = _playerTrack[_msgSender()]\n .coinmitaBalance\n .sub(amount, \"ERC20: decreased balance below zero\");\n // update user allowance substracting the fee\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].sub(\n amount.mul(_coinmitaToANCFee).div(100)\n )\n );\n // transfer from rewBag requested amount to user\n transferFrom(rewBag, _msgSender(), coinmitaAmountToDeliver);\n emit CoinmitaToAnc(\n _msgSender(),\n coinmitaAmountToDeliver,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n /*\n dev: allows user to transact a payment on Fortress Art Game with Coinmita\n @amount: quantity of Coinmita to be deducted from allowance and balance\n */\n\n function payWithCoinmita(uint256 amount) external nonReentrant returns (bool) {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // requiere user's Coinmita balance is GE than amount requested\n require(\n _playerTrack[_msgSender()].coinmitaBalance >= amount,\n \"Not enough balance\"\n );\n // update coinmita Balance\n _playerTrack[_msgSender()].coinmitaBalance = _playerTrack[_msgSender()]\n .coinmitaBalance\n .sub(amount, \"ERC20: decreased balance below zero\");\n // Decrease Allowance for later ANC conversion\n _approve(\n rewBag,\n _msgSender(),\n _allowances[rewBag][_msgSender()].sub(\n amount,\n \"ERC20: decreased allowance below zero\"\n )\n );\n emit PayWithCoinmita(\n _msgSender(),\n amount,\n _allowances[rewBag][_msgSender()]\n );\n return true;\n }\n\n function getCoinmitaBalance(address account)\n external\n view\n returns (uint256)\n {\n require(\n !_playerTrack[_msgSender()].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n return _playerTrack[account].coinmitaBalance;\n }\n\n function getCoinmitaAllowance(address account)\n external\n view\n returns (uint256)\n {\n return _allowances[rewBag][account];\n }\n\n /*\n dev: Increase the balance of coinmita on the blockchain user account, able to be claimed\n as a higher quantity has been earned on the game. This function is called\n for us when connecting to DAPP checking if Coinmita balance from Fortress Art Game \n is higher than value received from getCoinmitaBalance, allowing us to update it and\n leting an user to claim their earned funds. \n @account: acount to be checked\n @amount: total coinmita amount on our BBDD from the game\n */\n\n function claimCoinmita(address account, uint256 amount)\n external\n nonReentrant\n onlyOwner\n returns (bool)\n {\n require(\n !Address.isContract(msg.sender),\n \"Not by now, not EOA users are not allowed\"\n );\n // require user is not blacklisted\n require(\n !_playerTrack[account].isBlacklisted,\n \"Sorry game ended for you: You're blacklisted\"\n );\n // require new Allowance is GE Current Allowance\n require(\n _allowances[rewBag][account] < amount,\n \"You can't increase allowance to a smaller value\"\n );\n // update coinmita Balance\n _playerTrack[account].coinmitaBalance = amount;\n // increase allowance\n _approve(rewBag, account, _playerTrack[account].coinmitaBalance);\n emit ClaimCoinmita(account, _playerTrack[account].coinmitaBalance);\n return true;\n }\n\n function updateCoinmitaFee(uint256 newFee)\n external\n onlyOwner\n returns (bool)\n {\n uint256 oldFee = _coinmitaToANCFee;\n _coinmitaToANCFee = newFee;\n emit UpdateCoinmitaFee(oldFee, newFee);\n return true;\n }\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}
}}