- Contract name:
- Ant3Token
- Optimization enabled
- true
- Compiler version
- v0.8.12+commit.f00d7308
- Optimization runs
- 200
- Verified at
- 2023-05-12 07:38:24.958678Z
project:/contracts/token/Ant3Token.sol
// SPDX-License-Identifier: MITpragma solidity ^0.8.7;import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/utils/Math/SafeMathUpgradeable.sol";import "./interfaces/IAnt3.sol";contract Ant3Token is ContextUpgradeable, IERC20Upgradeable, OwnableUpgradeable, IAnt3{ using SafeMathUpgradeable for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal; uint256 private _rTotal; uint256 private _tFeeTotal; string private _name; string private _symbol; uint256 private _decimals; uint256 private _taxFee; uint256 private _previousTaxFee; uint256 public totalBurned; uint256 public holderTaxFeePercentage; uint256 public teamTaxFeePercentage; uint256 public burnTaxFeePercentage; address private _teamAddress; address[] private _signers; address nodeControllerContract; address stackingControllerContract; mapping(address => bool) private _mapSigners; mapping(uint256 => bool) public uniqueIdExists; mapping(address => uint256) public userTotalBurned; event TransferToBurn(uint256 indexed amt); event TransferToTeam(uint256 indexed amt); address private _team2Address; address private _gameChangerAddress; address private _farmingPoolAddress; modifier onlyController() { require( msg.sender == nodeControllerContract, "Only callable from nodeControllerContract" ); _; } function initialize( string memory _NAME, string memory _SYMBOL, uint256 _DECIMALS, uint256 _supply, uint256 _txFee ) public initializer { __Ownable_init(); _name = _NAME; _symbol = _SYMBOL; _decimals = _DECIMALS; _tTotal = _supply * 10 ** _decimals; _rTotal = (MAX - (MAX % _tTotal)); _taxFee = _txFee; _previousTaxFee = _txFee; _rOwned[address(this)] = _rTotal; holderTaxFeePercentage = 10; teamTaxFeePercentage = 10; burnTaxFeePercentage = 80; _teamAddress = 0x3ea2d29A2B41722979EdE1F01C5B9058005088AE; _team2Address = 0xC3B85d0460e55b4257628962ADfaDDDb960c840A; _gameChangerAddress = 0xf4C5dFB03F8866ECa830d9539fbE4DBaCbC6DFfb; _farmingPoolAddress = 0x0d65cedb0b101948964990Fb7f689DA8Da042C3d; //exclude team and this contract from fee _isExcludedFromFee[address(this)] = true; excludeFromReward(address(this)); _isExcludedFromFee[_teamAddress] = true; excludeFromReward(_teamAddress); emit Transfer(address(0), address(this), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint256) { return _decimals; } function version() public pure virtual returns (string memory) { return "1"; } function totalSupply() public view override returns (uint256) { return _tTotal; } function getTaxFee() public view returns (uint256) { return _taxFee; } function setTaxFee(uint256 _newTaxFee) external onlyOwner { _taxFee = _newTaxFee; } function setHolderTaxFee(uint256 _newTaxFee) external onlyOwner { holderTaxFeePercentage = _newTaxFee; } function setBurnTaxFee(uint256 _newTaxFee) external onlyOwner { burnTaxFeePercentage = _newTaxFee; } function setTeamTaxFee(uint256 _newTaxFee) external onlyOwner { teamTaxFeePercentage = _newTaxFee; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer( address recipient, uint256 amount ) public override(IAnt3, IERC20Upgradeable) returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance( address owner, address spender ) public view override returns (uint256) { return _allowances[owner][spender]; } function approve( address spender, uint256 amount ) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function increaseAllowance( address spender, uint256 addedValue ) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue) ); return true; } function decreaseAllowance( address spender, uint256 subtractedValue ) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender].sub( subtractedValue, "ERC20: decreased allowance below zero" ) ); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require( !_isExcluded[sender], "Excluded addresses cannot call this function" ); (uint256 rAmount, , , , ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken( uint256 tAmount, bool deductTransferFee ) public view returns (uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount, , , , ) = _getValues(tAmount); return rAmount; } else { (, uint256 rTransferAmount, , , ) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection( uint256 rAmount ) public view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner { require(!_isExcluded[account], "Account is already excluded"); if (_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function _updateBurned(uint256 rAmount, uint256 tAmount) private { totalBurned += rAmount; _rOwned[address(0)] += rAmount; if (_isExcluded[address(0)]) { _tOwned[address(0)] += tAmount; } } function _updateTeam(uint256 rAmount, uint256 tAmount) private { _rOwned[_teamAddress] += rAmount; if (_isExcluded[_teamAddress]) { _tOwned[_teamAddress] += tAmount; } } function _reflectFee(uint256 rFee, uint256 tFee) private { uint256 rBurnAmt = (rFee * burnTaxFeePercentage) / 100; //80% of totalTaxed burned uint256 tBurnAmt = (tFee * burnTaxFeePercentage) / 100; //80% of totalTaxed burned _updateBurned(rBurnAmt, tBurnAmt); uint256 rTeamAmt = (rFee * teamTaxFeePercentage) / 100; //10% of totalTaxed to team uint256 tTeamAmt = (tFee * teamTaxFeePercentage) / 100; //10% of totalTaxed to team _updateTeam(rTeamAmt, tTeamAmt); uint256 holderAmt = rFee - (rBurnAmt + rTeamAmt); //10% of totalTaxed to holder _rTotal = _rTotal.sub(holderAmt); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues( uint256 tAmount ) private view returns (uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, _getRate() ); return ( rAmount, rTransferAmount, rFee, tTransferAmount, tFee //tLiquidity ); } function _getTValues( uint256 tAmount ) private view returns ( uint256, uint256 //uint256 ) { uint256 tFee = calculateTaxFee(tAmount); //uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee); //.sub(tLiquidity); return (tTransferAmount, tFee); //, tLiquidity); } function _getRValues( uint256 tAmount, uint256 tFee, //uint256 tLiquidity, uint256 currentRate ) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); //uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee); //.sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if ( _rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply ) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function claimTokens() public onlyOwner { payable(owner()).transfer(address(this).balance); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div(10 ** 2); } function removeAllFee() private { if (_taxFee == 0) return; _previousTaxFee = _taxFee; _taxFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; } function isExcludedFromFee(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from, to, amount, takeFee); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee ) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee ) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function signers() external view returns (address[] memory) { return _signers; } function setSigners(address[] memory signers_) external virtual onlyOwner { _updateMap(_signers, false, _mapSigners); delete _signers; _signers = signers_; _updateMap(signers_, true, _mapSigners); } function mapSigner(address signer) external view returns (bool) { return _mapSigners[signer]; } function _updateMap( address[] memory arr, bool status, mapping(address => bool) storage map ) internal { for (uint64 i = 0; i < arr.length; i++) { map[arr[i]] = status; } } function mint(uint256 amount) public virtual onlyController { //multiple transfers to different node contracts uint256 pools = (amount * 90) / 100; uint256 teamFees = amount - pools; uint256 nodesAmt = (pools * 30) / 100; uint256 stackAmt = (pools * 40) / 100; uint256 gameChangerAmt = (pools * 20) / 100; uint256 farmingPoolAmt = pools - nodesAmt - stackAmt - gameChangerAmt; _transfer(address(this), _team2Address, teamFees); _transfer(address(this), address(nodeControllerContract), nodesAmt); _afterTokenTransfer(address(nodeControllerContract), nodesAmt); _transfer(address(this), address(stackingControllerContract), stackAmt); _afterTokenTransfer(address(stackingControllerContract), stackAmt); _transfer(address(this), _gameChangerAddress, gameChangerAmt); _transfer(address(this), _farmingPoolAddress, farmingPoolAmt); } function _afterTokenTransfer(address to, uint256 amount) internal { if (to.code.length > 0) { // token recipient is a contract, notify them try IERC20Receiver(to).onERC20Receive(address(this), amount) { // the recipient returned a bool, TODO validate if they returned true } catch { // the notification failed (maybe they don't implement the `IERC20Receiver` interface?) } } } function setNodeControllerContract( address _nodeControllerContract ) external onlyOwner { nodeControllerContract = _nodeControllerContract; } function setStackingControllerContract( address _stackingControllerContract ) external onlyOwner { stackingControllerContract = _stackingControllerContract; } function setFarmingPoolContract( address _farmingPoolContract ) external onlyOwner { _farmingPoolAddress = _farmingPoolContract; }}
@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)pragma solidity ^0.8.0;import "../utils/ContextUpgradeable.sol";import "../proxy/utils/Initializable.sol";/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap;}
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.2;import "../../utils/AddressUpgradeable.sol";/** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } }}
@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/** * @dev Interface of the ERC20 standard as defined in the EIP. */interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool);}
@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)pragma solidity ^0.8.1;/** * @dev Collection of functions related to the address type */library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }}
@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)pragma solidity ^0.8.0;import "../proxy/utils/Initializable.sol";/** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap;}
@openzeppelin/contracts-upgradeable/utils/Math/SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)pragma solidity ^0.8.0;// CAUTION// This version of SafeMath should only be used with Solidity 0.8 or later,// because it relies on the compiler's built in overflow checks./** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }}
project:/contracts/token/interfaces/IAnt3.sol
// SPDX-License-Identifier: MITpragma solidity ^0.8.7;interface IERC20Receiver { function onERC20Receive(address from, uint256 amount) external returns (bool);}interface IAnt3 { function transfer(address recipient, uint256 amount) external returns (bool); function mint(uint256 amount) external;}
Contract ABI
[{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TransferToBurn","inputs":[{"type":"uint256","name":"amt","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"TransferToTeam","inputs":[{"type":"uint256","name":"amt","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burnTaxFeePercentage","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deliver","inputs":[{"type":"uint256","name":"tAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"excludeFromReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTaxFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"holderTaxFeePercentage","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"includeInFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"includeInReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"_NAME","internalType":"string"},{"type":"string","name":"_SYMBOL","internalType":"string"},{"type":"uint256","name":"_DECIMALS","internalType":"uint256"},{"type":"uint256","name":"_supply","internalType":"uint256"},{"type":"uint256","name":"_txFee","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromFee","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isExcludedFromReward","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"mapSigner","inputs":[{"type":"address","name":"signer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reflectionFromToken","inputs":[{"type":"uint256","name":"tAmount","internalType":"uint256"},{"type":"bool","name":"deductTransferFee","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBurnTaxFee","inputs":[{"type":"uint256","name":"_newTaxFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFarmingPoolContract","inputs":[{"type":"address","name":"_farmingPoolContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHolderTaxFee","inputs":[{"type":"uint256","name":"_newTaxFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNodeControllerContract","inputs":[{"type":"address","name":"_nodeControllerContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSigners","inputs":[{"type":"address[]","name":"signers_","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStackingControllerContract","inputs":[{"type":"address","name":"_stackingControllerContract","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTaxFee","inputs":[{"type":"uint256","name":"_newTaxFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTeamTaxFee","inputs":[{"type":"uint256","name":"_newTaxFee","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"signers","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"teamTaxFeePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenFromReflection","inputs":[{"type":"uint256","name":"rAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalBurned","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalFees","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"uniqueIdExists","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userTotalBurned","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"version","inputs":[]}]
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061027f5760003560e01c806365610ea11161015c578063a3772662116100ce578063dd62ed3e11610087578063dd62ed3e14610592578063ea2f0b37146105cb578063ebd05600146105de578063f2fde38b146105f1578063f66608fe14610604578063f93422851461060c57600080fd5b8063a377266214610534578063a457c2d714610547578063a9059cbb1461055a578063a92ffc9b1461056d578063c4081a4c14610576578063d89135cd1461058957600080fd5b806388f820201161012057806388f82020146104ac5780638da5cb5b146104d857806390e8d713146104f357806394e0a90a1461050657806395d89b4114610519578063a0712d681461052157600080fd5b806365610ea11461045857806368409a4b1461046b57806370a082311461047e578063715018a6146104915780637544e6b31461049957600080fd5b806339509351116101f557806346f0975a116101b957806346f0975a146103cc57806348c54b9d146103e15780634cdbab5b146103e957806352390c02146103fc5780635342acb41461040f57806354fd4d501461043b57600080fd5b806339509351146103775780633bd5d1731461038a578063437823ec1461039d57806344de2fad146103b05780634549b039146103b957600080fd5b806318160ddd1161024757806318160ddd1461030c5780631e0d4ce91461031457806323b872dd146103345780632d83811914610347578063313ce5671461035a5780633685d4191461036257600080fd5b806306fdde031461028457806307c351dd146102a2578063095ea7b3146102de57806313114a9d146102f15780631433c10514610303575b600080fd5b61028c61062f565b60405161029991906122df565b60405180910390f35b6102ce6102b0366004612350565b6001600160a01b03166000908152607b602052604090205460ff1690565b6040519015158152602001610299565b6102ce6102ec36600461236b565b6106c1565b606d545b604051908152602001610299565b6102f560765481565b606b546102f5565b6102f5610322366004612350565b607d6020526000908152604090205481565b6102ce610342366004612395565b6106d8565b6102f56103553660046123d1565b610741565b6070546102f5565b610375610370366004612350565b6107ca565b005b6102ce61038536600461236b565b61095f565b6103756103983660046123d1565b610995565b6103756103ab366004612350565b610a7d565b6102f560745481565b6102f56103c73660046123f8565b610aa9565b6103d4610b34565b6040516102999190612428565b610375610b95565b6103756103f7366004612350565b610bd9565b61037561040a366004612350565b610c03565b6102ce61041d366004612350565b6001600160a01b031660009081526068602052604090205460ff1690565b6040805180820190915260018152603160f81b602082015261028c565b6103756104663660046123d1565b610d34565b610375610479366004612350565b610d41565b6102f561048c366004612350565b610d6b565b610375610dca565b6103756104a736600461252c565b610dde565b6102ce6104ba366004612350565b6001600160a01b031660009081526069602052604090205460ff1690565b6033546040516001600160a01b039091168152602001610299565b6103756105013660046123d1565b611096565b6103756105143660046123d1565b6110a3565b61028c6110b0565b61037561052f3660046123d1565b6110bf565b6103756105423660046125ab565b611277565b6102ce61055536600461236b565b611313565b6102ce61056836600461236b565b611362565b6102f560755481565b6103756105843660046123d1565b61136f565b6102f560735481565b6102f56105a0366004612658565b6001600160a01b03918216600090815260676020908152604080832093909416825291909152205490565b6103756105d9366004612350565b61137c565b6103756105ec366004612350565b6113a5565b6103756105ff366004612350565b6113cf565b6071546102f5565b6102ce61061a3660046123d1565b607c6020526000908152604090205460ff1681565b6060606e805461063e9061268b565b80601f016020809104026020016040519081016040528092919081815260200182805461066a9061268b565b80156106b75780601f1061068c576101008083540402835291602001916106b7565b820191906000526020600020905b81548152906001019060200180831161069a57829003601f168201915b5050505050905090565b60006106ce338484611445565b5060015b92915050565b60006106e5848484611569565b610737843361073285604051806060016040528060288152602001612930602891396001600160a01b038a16600090815260676020908152604080832033845290915290205491906116ee565b611445565b5060019392505050565b6000606c548211156107ad5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084015b60405180910390fd5b60006107b761171a565b90506107c3838261173d565b9392505050565b6107d2611749565b6001600160a01b03811660009081526069602052604090205460ff1661083a5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016107a4565b60005b606a5481101561095b57816001600160a01b0316606a8281548110610864576108646126c6565b6000918252602090912001546001600160a01b0316141561094957606a805461088f906001906126f2565b8154811061089f5761089f6126c6565b600091825260209091200154606a80546001600160a01b0390921691839081106108cb576108cb6126c6565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152606682526040808220829055606990925220805460ff19169055606a80548061092357610923612709565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b806109538161271f565b91505061083d565b5050565b3360008181526067602090815260408083206001600160a01b038716845290915281205490916106ce91859061073290866117a3565b3360008181526069602052604090205460ff1615610a0a5760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016107a4565b6000610a15836117af565b505050506001600160a01b038316600090815260656020526040902054909150610a3f90826117f5565b6001600160a01b038316600090815260656020526040902055606c54610a6590826117f5565b606c55606d54610a7590846117a3565b606d55505050565b610a85611749565b6001600160a01b03166000908152606860205260409020805460ff19166001179055565b6000606b54831115610afd5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016107a4565b81610b1b576000610b0d846117af565b509294506106d29350505050565b6000610b26846117af565b509194506106d29350505050565b606060788054806020026020016040519081016040528092919081815260200182805480156106b757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b6e575050505050905090565b610b9d611749565b6033546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bd6573d6000803e3d6000fd5b50565b610be1611749565b607980546001600160a01b0319166001600160a01b0392909216919091179055565b610c0b611749565b6001600160a01b03811660009081526069602052604090205460ff1615610c745760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016107a4565b6001600160a01b03811660009081526065602052604090205415610cce576001600160a01b038116600090815260656020526040902054610cb490610741565b6001600160a01b0382166000908152606660205260409020555b6001600160a01b03166000818152606960205260408120805460ff19166001908117909155606a805491820181559091527f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a510180546001600160a01b0319169091179055565b610d3c611749565b607655565b610d49611749565b607a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526069602052604081205460ff1615610da857506001600160a01b031660009081526066602052604090205490565b6001600160a01b0382166000908152606560205260409020546106d290610741565b610dd2611749565b610ddc6000611801565b565b600054610100900460ff1615808015610dfe5750600054600160ff909116105b80610e185750303b158015610e18575060005460ff166001145b610e7b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107a4565b6000805460ff191660011790558015610e9e576000805461ff0019166101001790555b610ea6611853565b8551610eb990606e9060208901906121d3565b508451610ecd90606f9060208801906121d3565b506070849055610ede84600a61281e565b610ee8908461282a565b606b819055610ef99060001961285f565b610f05906000196126f2565b606c8190556071839055607283905530600081815260656020908152604080832094909455600a60748190556075556050607655607780546001600160a01b0319908116733ea2d29a2b41722979ede1f01c5b9058005088ae17909155607e8054821673c3b85d0460e55b4257628962adfadddb960c840a179055607f8054821673f4c5dfb03f8866eca830d9539fbe4dbacbc6dffb17905560808054909116730d65cedb0b101948964990fb7f689da8da042c3d1790556068905291909120805460ff19166001179055610fd990610c03565b607780546001600160a01b039081166000908152606860205260409020805460ff19166001179055905461100d9116610c03565b606b5460405190815230906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3801561108e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b61109e611749565b607555565b6110ab611749565b607455565b6060606f805461063e9061268b565b6079546001600160a01b0316331461112b5760405162461bcd60e51b815260206004820152602960248201527f4f6e6c792063616c6c61626c652066726f6d206e6f6465436f6e74726f6c6c656044820152681c90dbdb9d1c9858dd60ba1b60648201526084016107a4565b6000606461113a83605a61282a565b6111449190612873565b9050600061115282846126f2565b90506000606461116384601e61282a565b61116d9190612873565b90506000606461117e85602861282a565b6111889190612873565b90506000606461119986601461282a565b6111a39190612873565b9050600081836111b386896126f2565b6111bd91906126f2565b6111c791906126f2565b607e549091506111e29030906001600160a01b031687611569565b6079546111fa9030906001600160a01b031686611569565b607954611210906001600160a01b031685611882565b607a546112289030906001600160a01b031685611569565b607a5461123e906001600160a01b031684611882565b607f546112569030906001600160a01b031684611569565b60805461126e9030906001600160a01b031683611569565b50505050505050565b61127f611749565b6112e660788054806020026020016040519081016040528092919081815260200182805480156112d857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116112ba575b50505050506000607b611907565b6112f260786000612257565b8051611305906078906020840190612275565b50610bd6816001607b611907565b60006106ce338461073285604051806060016040528060258152602001612958602591393360009081526067602090815260408083206001600160a01b038d16845290915290205491906116ee565b60006106ce338484611569565b611377611749565b607155565b611384611749565b6001600160a01b03166000908152606860205260409020805460ff19169055565b6113ad611749565b608080546001600160a01b0319166001600160a01b0392909216919091179055565b6113d7611749565b6001600160a01b03811661143c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107a4565b610bd681611801565b6001600160a01b0383166114a75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107a4565b6001600160a01b0382166115085760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107a4565b6001600160a01b0383811660008181526067602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166115cd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107a4565b6001600160a01b03821661162f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107a4565b600081116116915760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107a4565b6001600160a01b03831660009081526068602052604090205460019060ff16806116d357506001600160a01b03831660009081526068602052604090205460ff165b156116dc575060005b6116e884848484611981565b50505050565b600081848411156117125760405162461bcd60e51b81526004016107a491906122df565b505050900390565b6000806000611727611af2565b9092509050611736828261173d565b9250505090565b60006107c38284612873565b6033546001600160a01b03163314610ddc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107a4565b60006107c38284612887565b60008060008060008060006117c388611c74565b9150915060008060006117de8b856117d961171a565b611c9b565b919d909c50909a5094985092965092945050505050565b60006107c382846126f2565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661187a5760405162461bcd60e51b81526004016107a49061289f565b610ddc611cd7565b6001600160a01b0382163b1561095b57604051627b270560e31b8152306004820152602481018290526001600160a01b038316906303d93828906044016020604051808303816000875af19250505080156118fa575060408051601f3d908101601f191682019092526118f7918101906128ea565b60015b611902575050565b505050565b60005b83518167ffffffffffffffff1610156116e85782826000868467ffffffffffffffff168151811061193d5761193d6126c6565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061197981612907565b91505061190a565b8061198e5761198e611d07565b6001600160a01b03841660009081526069602052604090205460ff1680156119cf57506001600160a01b03831660009081526069602052604090205460ff16155b156119e4576119df848484611d1d565b611ae2565b6001600160a01b03841660009081526069602052604090205460ff16158015611a2557506001600160a01b03831660009081526069602052604090205460ff165b15611a35576119df848484611e36565b6001600160a01b03841660009081526069602052604090205460ff16158015611a7757506001600160a01b03831660009081526069602052604090205460ff16155b15611a87576119df848484611edc565b6001600160a01b03841660009081526069602052604090205460ff168015611ac757506001600160a01b03831660009081526069602052604090205460ff165b15611ad7576119df848484611f1d565b611ae2848484611edc565b806116e8576116e8607254607155565b606c54606b546000918291825b606a54811015611c44578260656000606a8481548110611b2157611b216126c6565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611b8c57508160666000606a8481548110611b6557611b656126c6565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611ba257606c54606b54945094505050509091565b611be860656000606a8481548110611bbc57611bbc6126c6565b60009182526020808320909101546001600160a01b0316835282019290925260400190205484906117f5565b9250611c3060666000606a8481548110611c0457611c046126c6565b60009182526020808320909101546001600160a01b0316835282019290925260400190205483906117f5565b915080611c3c8161271f565b915050611aff565b50606b54606c54611c549161173d565b821015611c6b57606c54606b549350935050509091565b90939092509050565b6000806000611c8284611f8d565b90506000611c9085836117f5565b959194509092505050565b6000808080611caa8786611faf565b90506000611cb88787611faf565b90506000611cc683836117f5565b929992985090965090945050505050565b600054610100900460ff16611cfe5760405162461bcd60e51b81526004016107a49061289f565b610ddc33611801565b607154611d1057565b6071805460725560009055565b6000806000806000611d2e866117af565b6001600160a01b038d1660009081526066602052604090205494995092975090955093509150611d5e90876117f5565b6001600160a01b038916600090815260666020908152604080832093909355606590522054611d8d90866117f5565b6001600160a01b03808a166000908152606560205260408082209390935590891681522054611dbc90856117a3565b6001600160a01b038816600090815260656020526040902055611ddf8382611fbb565b866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611e2491815260200190565b60405180910390a35050505050505050565b6000806000806000611e47866117af565b6001600160a01b038d1660009081526065602052604090205494995092975090955093509150611e7790866117f5565b6001600160a01b03808a16600090815260656020908152604080832094909455918a16815260669091522054611ead90836117a3565b6001600160a01b038816600090815260666020908152604080832093909355606590522054611dbc90856117a3565b6000806000806000611eed866117af565b6001600160a01b038d1660009081526065602052604090205494995092975090955093509150611d8d90866117f5565b6000806000806000611f2e866117af565b6001600160a01b038d1660009081526066602052604090205494995092975090955093509150611f5e90876117f5565b6001600160a01b038916600090815260666020908152604080832093909355606590522054611e7790866117f5565b60006106d26064611fa960715485611faf90919063ffffffff16565b9061173d565b60006107c3828461282a565b6000606460765484611fcd919061282a565b611fd79190612873565b90506000606460765484611feb919061282a565b611ff59190612873565b90506120018282612089565b6000606460755486612013919061282a565b61201d9190612873565b90506000606460755486612031919061282a565b61203b9190612873565b90506120478282612157565b60006120538386612887565b61205d90886126f2565b606c5490915061206d90826117f5565b606c55606d5461207d90876117a3565b606d5550505050505050565b816073600082825461209b9190612887565b9091555050600080805260656020527fffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b80548492906120db908490612887565b90915550506000805260696020527f5843af22e99e7c98370145a5056245c244ce8ee852f4ef5e6d6a8e410a18cf415460ff161561095b57600080805260666020527f6f48904484b35701cf1f41ad9068b394adf7e2f8a59d2309a04d10a155eaa72b805483929061214e908490612887565b90915550505050565b6077546001600160a01b031660009081526065602052604081208054849290612181908490612887565b90915550506077546001600160a01b031660009081526069602052604090205460ff161561095b576077546001600160a01b03166000908152606660205260408120805483929061214e908490612887565b8280546121df9061268b565b90600052602060002090601f0160209004810192826122015760008555612247565b82601f1061221a57805160ff1916838001178555612247565b82800160010185558215612247579182015b8281111561224757825182559160200191906001019061222c565b506122539291506122ca565b5090565b5080546000825590600052602060002090810190610bd691906122ca565b828054828255906000526020600020908101928215612247579160200282015b8281111561224757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612295565b5b8082111561225357600081556001016122cb565b600060208083528351808285015260005b8181101561230c578581018301518582016040015282016122f0565b8181111561231e576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461234b57600080fd5b919050565b60006020828403121561236257600080fd5b6107c382612334565b6000806040838503121561237e57600080fd5b61238783612334565b946020939093013593505050565b6000806000606084860312156123aa57600080fd5b6123b384612334565b92506123c160208501612334565b9150604084013590509250925092565b6000602082840312156123e357600080fd5b5035919050565b8015158114610bd657600080fd5b6000806040838503121561240b57600080fd5b82359150602083013561241d816123ea565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156124695783516001600160a01b031683529284019291840191600101612444565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156124b4576124b4612475565b604052919050565b600082601f8301126124cd57600080fd5b813567ffffffffffffffff8111156124e7576124e7612475565b6124fa601f8201601f191660200161248b565b81815284602083860101111561250f57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561254457600080fd5b853567ffffffffffffffff8082111561255c57600080fd5b61256889838a016124bc565b9650602088013591508082111561257e57600080fd5b5061258b888289016124bc565b959895975050505060408401359360608101359360809091013592509050565b600060208083850312156125be57600080fd5b823567ffffffffffffffff808211156125d657600080fd5b818501915085601f8301126125ea57600080fd5b8135818111156125fc576125fc612475565b8060051b915061260d84830161248b565b818152918301840191848101908884111561262757600080fd5b938501935b8385101561264c5761263d85612334565b8252938501939085019061262c565b98975050505050505050565b6000806040838503121561266b57600080fd5b61267483612334565b915061268260208401612334565b90509250929050565b600181811c9082168061269f57607f821691505b602082108114156126c057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015612704576127046126dc565b500390565b634e487b7160e01b600052603160045260246000fd5b6000600019821415612733576127336126dc565b5060010190565b600181815b8085111561277557816000190482111561275b5761275b6126dc565b8085161561276857918102915b93841c939080029061273f565b509250929050565b60008261278c575060016106d2565b81612799575060006106d2565b81600181146127af57600281146127b9576127d5565b60019150506106d2565b60ff8411156127ca576127ca6126dc565b50506001821b6106d2565b5060208310610133831016604e8410600b84101617156127f8575081810a6106d2565b612802838361273a565b8060001904821115612816576128166126dc565b029392505050565b60006107c3838361277d565b6000816000190483118215151615612844576128446126dc565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261286e5761286e612849565b500690565b60008261288257612882612849565b500490565b6000821982111561289a5761289a6126dc565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156128fc57600080fd5b81516107c3816123ea565b600067ffffffffffffffff80831681811415612925576129256126dc565b600101939250505056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212208388434a917d6c86789e578ef80e4d84c0b0fc0952ba89454a5f217d81aa483e64736f6c634300080c0033