Token Weather Tomb
Overview ERC20
Price
$0.00 @ 0.000000 ETH
Fully Diluted Market Cap
Total Supply:
42,001 WEATHER
Holders:
15 addresses
Contract:
Decimals:
18
Balance
47.219905118264348398 WEATHERValue
$0.00
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Weather
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../lib/SafeMath8.sol"; import "../owner/Operator.sol"; import "../interfaces/IOracle.sol"; contract Weather is ERC20Burnable, Operator { using SafeMath8 for uint8; using SafeMath for uint256; // Initial distribution for the genesis pool & airdrop uint256 public constant INITIAL_WEATHER_GENESIS_POOL = 40000 ether; uint256 public constant INITIAL_WEATHER_AIRDROP = 2000 ether; // Have the rewards been distributed to the pools bool public rewardPoolDistributed = false; address public weatherOracle; // Address of the Tax Office address public taxOffice; // Current tax rate uint256 public taxRate; // Price threshold below which taxes will get burned uint256 public burnThreshold = 1.10e18; // Address of the tax collector wallet address public taxCollectorAddress; // Should the taxes be calculated using the tax tiers bool public autoCalculateTax; // Tax Tiers uint256[] public taxTiersTwaps = [0, 5e17, 6e17, 7e17, 8e17, 9e17, 9.5e17, 1e18, 1.05e18, 1.10e18, 1.20e18, 1.30e18, 1.40e18, 1.50e18]; uint256[] public taxTiersRates = [2000, 1900, 1800, 1700, 1600, 1500, 1500, 1500, 1500, 1400, 900, 400, 200, 100]; // Sender addresses excluded from Tax mapping(address => bool) public excludedAddresses; event TaxOfficeTransferred(address oldAddress, address newAddress); modifier onlyTaxOffice() { require(taxOffice == msg.sender, "Caller is not the tax office"); _; } modifier onlyOperatorOrTaxOffice() { require(isOperator() || taxOffice == msg.sender, "Caller is not the operator or the tax office"); _; } /** * @notice Constructs the WEATHER ERC-20 contract. */ constructor(uint256 _taxRate, address _taxCollectorAddress) public ERC20("Weather Tomb", "WEATHER") { // Mints 1 WEATHER to contract creator for initial pool setup require(_taxRate < 10000, "tax equal or bigger to 100%"); require(_taxCollectorAddress != address(0), "tax collector address must be non-zero address"); excludeAddress(address(this)); _mint(msg.sender, 1 ether); taxRate = _taxRate; taxCollectorAddress = _taxCollectorAddress; } /* ============= Taxation ============= */ function getTaxTiersTwapsCount() public view returns (uint256 count) { return taxTiersTwaps.length; } function getTaxTiersRatesCount() public view returns (uint256 count) { return taxTiersRates.length; } function isAddressExcluded(address _address) public view returns (bool) { return excludedAddresses[_address]; } function setTaxTiersTwap(uint8 _index, uint256 _value) public onlyTaxOffice returns (bool) { require(_index >= 0, "Index has to be higher than 0"); require(_index < getTaxTiersTwapsCount(), "Index has to lower than count of tax tiers"); if (_index > 0) { require(_value > taxTiersTwaps[_index - 1]); } if (_index < getTaxTiersTwapsCount().sub(1)) { require(_value < taxTiersTwaps[_index + 1]); } taxTiersTwaps[_index] = _value; return true; } function setTaxTiersRate(uint8 _index, uint256 _value) public onlyTaxOffice returns (bool) { require(_index >= 0, "Index has to be higher than 0"); require(_index < getTaxTiersRatesCount(), "Index has to lower than count of tax tiers"); taxTiersRates[_index] = _value; return true; } function setBurnThreshold(uint256 _burnThreshold) public onlyTaxOffice returns (bool) { burnThreshold = _burnThreshold; } function _getWeatherPrice() internal view returns (uint256 _weatherPrice) { try IOracle(weatherOracle).consult(address(this), 1e18) returns ( uint144 _price ) { return uint256(_price); } catch { revert("Weather: failed to fetch WEATHER price from Oracle"); } } function _updateTaxRate(uint256 _WeatherPrice) internal returns (uint256) { if (autoCalculateTax) { for (uint8 tierId = uint8(getTaxTiersTwapsCount()).sub(1); tierId >= 0; --tierId) { if (_WeatherPrice >= taxTiersTwaps[tierId]) { require(taxTiersRates[tierId] < 10000, "tax equal or bigger to 100%"); taxRate = taxTiersRates[tierId]; return taxTiersRates[tierId]; } } } } function enableAutoCalculateTax() public onlyTaxOffice { autoCalculateTax = true; } function disableAutoCalculateTax() public onlyTaxOffice { autoCalculateTax = false; } function setWeatherOracle(address _weatherOracle) public onlyOperatorOrTaxOffice { require(_weatherOracle != address(0), "oracle address cannot be 0 address"); weatherOracle = _weatherOracle; } function setTaxOffice(address _taxOffice) public onlyOperatorOrTaxOffice { require(_taxOffice != address(0), "tax office address cannot be 0 address"); emit TaxOfficeTransferred(taxOffice, _taxOffice); taxOffice = _taxOffice; } function setTaxCollectorAddress(address _taxCollectorAddress) public onlyTaxOffice { require(_taxCollectorAddress != address(0), "tax collector address must be non-zero address"); taxCollectorAddress = _taxCollectorAddress; } function setTaxRate(uint256 _taxRate) public onlyTaxOffice { require(!autoCalculateTax, "auto calculate tax cannot be enabled"); require(_taxRate < 10000, "tax equal or bigger to 100%"); taxRate = _taxRate; } function excludeAddress(address _address) public onlyOperatorOrTaxOffice returns (bool) { require(!excludedAddresses[_address], "address can't be excluded"); excludedAddresses[_address] = true; return true; } function includeAddress(address _address) public onlyOperatorOrTaxOffice returns (bool) { require(excludedAddresses[_address], "address can't be included"); excludedAddresses[_address] = false; return true; } /** * @notice Operator mints WEATHER to a recipient * @param recipient_ The address of recipient * @param amount_ The amount of WEATHER to mint to * @return whether the process has been done */ function mint(address recipient_, uint256 amount_) public onlyOperator returns (bool) { uint256 balanceBefore = balanceOf(recipient_); _mint(recipient_, amount_); uint256 balanceAfter = balanceOf(recipient_); return balanceAfter > balanceBefore; } function burn(uint256 amount) public override { super.burn(amount); } function burnFrom(address account, uint256 amount) public override onlyOperator { super.burnFrom(account, amount); } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { uint256 currentTaxRate = 0; bool burnTax = false; if (autoCalculateTax) { uint256 currentWeatherPrice = _getWeatherPrice(); currentTaxRate = _updateTaxRate(currentWeatherPrice); if (currentWeatherPrice < burnThreshold) { burnTax = true; } } if (currentTaxRate == 0 || excludedAddresses[sender]) { _transfer(sender, recipient, amount); } else { _transferWithTax(sender, recipient, amount, burnTax); } _approve(sender, _msgSender(), allowance(sender, _msgSender()).sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _transferWithTax( address sender, address recipient, uint256 amount, bool burnTax ) internal returns (bool) { uint256 taxAmount = amount.mul(taxRate).div(10000); uint256 amountAfterTax = amount.sub(taxAmount); if (burnTax) { // Burn tax super.burnFrom(sender, taxAmount); } else { // Transfer tax to tax collector _transfer(sender, taxCollectorAddress, taxAmount); } // Transfer amount after tax to recipient _transfer(sender, recipient, amountAfterTax); return true; } /** * @notice distribute to reward pool (only once) */ function distributeReward( address _weatherGenesis, address _airdropReceiver ) external onlyOperator { require(!rewardPoolDistributed, "only can distribute once"); require(_weatherGenesis != address(0), "!_weatherGenesis"); require(_airdropReceiver != address(0), "!_airdropReceiver"); rewardPoolDistributed = true; _mint(_weatherGenesis, INITIAL_WEATHER_GENESIS_POOL); _mint(_airdropReceiver, INITIAL_WEATHER_AIRDROP); } function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external onlyOperator { _token.transfer(_to, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath8 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint8 a, uint8 b) internal pure returns (uint8) { uint8 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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(uint8 a, uint8 b) internal pure returns (uint8) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint8 a, uint8 b, string memory errorMessage ) internal pure returns (uint8) { require(b <= a, errorMessage); uint8 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint8 a, uint8 b) internal pure returns (uint8) { // 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 0; } uint8 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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(uint8 a, uint8 b) internal pure returns (uint8) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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( uint8 a, uint8 b, string memory errorMessage ) internal pure returns (uint8) { require(b > 0, errorMessage); uint8 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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(uint8 a, uint8 b) internal pure returns (uint8) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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( uint8 a, uint8 b, string memory errorMessage ) internal pure returns (uint8) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IOracle { function update() external; function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut); function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Operator is Context, Ownable { address private _operator; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() { _operator = _msgSender(); emit OperatorTransferred(address(0), _operator); } function operator() public view returns (address) { return _operator; } modifier onlyOperator() { require( _operator == msg.sender, "operator: caller is not the operator" ); _; } function isOperator() public view returns (bool) { return _msgSender() == _operator; } function transferOperator(address newOperator_) public onlyOwner { _transferOperator(newOperator_); } function _transferOperator(address newOperator_) internal { require( newOperator_ != address(0), "operator: zero address given for new operator" ); emit OperatorTransferred(address(0), newOperator_); _operator = newOperator_; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// 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 SafeMath { /** * @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; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`. // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`. // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a // good first aproximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1; uint256 x = a; if (x >> 128 > 0) { x >>= 128; result <<= 64; } if (x >> 64 > 0) { x >>= 64; result <<= 32; } if (x >> 32 > 0) { x >>= 32; result <<= 16; } if (x >> 16 > 0) { x >>= 16; result <<= 8; } if (x >> 8 > 0) { x >>= 8; result <<= 4; } if (x >> 4 > 0) { x >>= 4; result <<= 2; } if (x >> 2 > 0) { result <<= 1; } // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { uint256 result = sqrt(a); if (rounding == Rounding.Up && result * result < a) { result += 1; } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// 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 IERC20 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_taxRate","type":"uint256"},{"internalType":"address","name":"_taxCollectorAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOperator","type":"address"},{"indexed":true,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"TaxOfficeTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"INITIAL_WEATHER_AIRDROP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_WEATHER_GENESIS_POOL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoCalculateTax","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weatherGenesis","type":"address"},{"internalType":"address","name":"_airdropReceiver","type":"address"}],"name":"distributeReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableAutoCalculateTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"excludeAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"excludedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaxTiersRatesCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTaxTiersTwapsCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"includeAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAddressExcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPoolDistributed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_burnThreshold","type":"uint256"}],"name":"setBurnThreshold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxCollectorAddress","type":"address"}],"name":"setTaxCollectorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_taxOffice","type":"address"}],"name":"setTaxOffice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxRate","type":"uint256"}],"name":"setTaxRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTaxTiersRate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_index","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTaxTiersTwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weatherOracle","type":"address"}],"name":"setWeatherOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxOffice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"taxTiersRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"taxTiersTwaps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weatherOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6006805460ff60a01b19169055670f43fc2c04ee0000600a819055610240604052600060809081526706f05b59d3b2000060a052670853a0d2313c000060c0526709b6e64a8ec6000060e052670b1a2bc2ec50000061010052670c7d713b49da000061012052670d2f13f7789f000061014052670de0b6b3a764000061016052670e92596fd6290000610180526101a0919091526710a741a4627800006101c05267120a871cc00200006101e05267136dcc951d8c0000610200526714d1120d7b16000061022052620000d790600c90600e620005c4565b50604080516101c0810182526107d0815261076c6020820152610708918101919091526106a4606082015261064060808201526105dc60a0820181905260c0820181905260e0820181905261010082015261057861012082015261038461014082015261019061016082015260c861018082015260646101a08201526200016390600d90600e6200061f565b503480156200017157600080fd5b5060405162002a5638038062002a568339810160408190526200019491620006f7565b604080518082018252600c81526b2bb2b0ba3432b9102a37b6b160a11b6020808301918252835180850190945260078452662ba2a0aa2422a960c91b908401528151919291620001e79160039162000663565b508051620001fd90600490602084019062000663565b5050506200021a620002146200036b60201b60201c565b6200036f565b600680546001600160a01b031916339081179091556040516000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a36127108210620002b15760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f2031303025000000000060448201526064015b60405180910390fd5b6001600160a01b038116620003205760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b6064820152608401620002a8565b6200032b30620003c1565b506200034033670de0b6b3a7640000620004df565b600991909155600b80546001600160a01b0319166001600160a01b039092169190911790556200079a565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6006546000906001600160a01b0316331480620003e857506008546001600160a01b031633145b6200044b5760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206973206e6f7420746865206f70657261746f72206f7220746860448201526b6520746178206f666669636560a01b6064820152608401620002a8565b6001600160a01b0382166000908152600e602052604090205460ff1615620004b65760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e2774206265206578636c75646564000000000000006044820152606401620002a8565b506001600160a01b03166000908152600e60205260409020805460ff1916600190811790915590565b6001600160a01b038216620005375760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620002a8565b80600260008282546200054b919062000736565b90915550506001600160a01b038216600090815260208190526040812080548392906200057a90849062000736565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b8280548282559060005260206000209081019282156200060d579160200282015b828111156200060d57825182906001600160401b0316905591602001919060010190620005e5565b506200061b929150620006e0565b5090565b8280548282559060005260206000209081019282156200060d579160200282015b828111156200060d578251829061ffff1690559160200191906001019062000640565b82805462000671906200075d565b90600052602060002090601f0160209004810192826200069557600085556200060d565b82601f10620006b057805160ff19168380011785556200060d565b828001600101855582156200060d579182015b828111156200060d578251825591602001919060010190620006c3565b5b808211156200061b5760008155600101620006e1565b600080604083850312156200070b57600080fd5b825160208401519092506001600160a01b03811681146200072b57600080fd5b809150509250929050565b600082198211156200075857634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200077257607f821691505b602082108114156200079457634e487b7160e01b600052602260045260246000fd5b50919050565b6122ac80620007aa6000396000f3fe608060405234801561001057600080fd5b50600436106102a05760003560e01c8063715018a611610167578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e146105d2578063ebca1bd9146105e5578063ee2a953514610611578063f2fde38b14610619578063f4fd47cf1461062c578063ff87fc7c1461063f57600080fd5b8063a9059cbb14610552578063b87c5a4a14610565578063c3bdf61314610578578063c6d69a301461058b578063cf011b261461059e578063d8cca645146105c157600080fd5b806393995d4b1161012057806393995d4b146104f557806395d89b41146105085780639662676c146105105780639d6b5f2114610524578063a457c2d714610537578063a6431bba1461054a57600080fd5b8063715018a614610499578063771a3a1d146104a157806379cc6790146104aa5780637ee94ef1146104bd5780638d3cc818146104d05780638da5cb5b146104e457600080fd5b806340c10f191161020b578063570ca735116101c4578063570ca7351461041e5780635c29908d1461042f57806365bbacd91461044257806366206ce91461044a57806369356d471461045d57806370a082311461047057600080fd5b806340c10f19146103b657806342966c68146103c957806342c6b4f1146103dc5780634456eda2146103ef5780634f6d38d01461040257806354575af41461040b57600080fd5b806329605e771161025d57806329605e7714610330578063313ce567146103435780633758e6ce1461035257806339509351146103655780633e5f13d4146103785780633f07d76a146103a357600080fd5b806306fdde03146102a5578063095ea7b3146102c357806318160ddd146102e657806318b09f26146102f857806323b872dd1461030d5780632615535d14610320575b600080fd5b6102ad610647565b6040516102ba9190611f9d565b60405180910390f35b6102d66102d1366004611ea7565b6106d9565b60405190151581526020016102ba565b6002545b6040519081526020016102ba565b61030b610306366004611e10565b6106f1565b005b6102d661031b366004611e66565b6107bc565b6102ea686c6b935b8bbd40000081565b61030b61033e366004611e10565b610889565b604051601281526020016102ba565b6102d6610360366004611e10565b61089d565b6102d6610373366004611ea7565b610975565b60085461038b906001600160a01b031681565b6040516001600160a01b0390911681526020016102ba565b61030b6103b1366004611e10565b610992565b6102d66103c4366004611ea7565b610a9f565b61030b6103d7366004611f60565b610b14565b6102ea6103ea366004611f60565b610b1d565b6006546001600160a01b031633146102d6565b6102ea600a5481565b61030b610419366004611ef5565b610b3e565b6006546001600160a01b031661038b565b6102ea61043d366004611f60565b610bf0565b61030b610c00565b6102d6610458366004611f79565b610c39565b61030b61046b366004611e10565b610d49565b6102ea61047e366004611e10565b6001600160a01b031660009081526020819052604090205490565b61030b610e02565b6102ea60095481565b61030b6104b8366004611ea7565b610e16565b60075461038b906001600160a01b031681565b600b546102d690600160a01b900460ff1681565b6005546001600160a01b031661038b565b6102d6610503366004611e10565b610e4e565b6102ad610f1d565b6006546102d690600160a01b900460ff1681565b6102d6610532366004611f60565b610f2c565b6102d6610545366004611ea7565b610f62565b600c546102ea565b6102d6610560366004611ea7565b610fe8565b6102d6610573366004611f79565b610ff6565b600b5461038b906001600160a01b031681565b61030b610599366004611f60565b61105e565b6102d66105ac366004611e10565b600e6020526000908152604090205460ff1681565b6102ea690878678326eac900000081565b6102ea6105e0366004611e2d565b611144565b6102d66105f3366004611e10565b6001600160a01b03166000908152600e602052604090205460ff1690565b600d546102ea565b61030b610627366004611e10565b61116f565b61030b61063a366004611e2d565b6111e5565b61030b611336565b606060038054610656906121d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610682906121d8565b80156106cf5780601f106106a4576101008083540402835291602001916106cf565b820191906000526020600020905b8154815290600101906020018083116106b257829003601f168201915b5050505050905090565b6000336106e7818585611375565b5060019392505050565b6006546001600160a01b031633148061071457506008546001600160a01b031633145b6107395760405162461bcd60e51b8152600401610730906120b7565b60405180910390fd5b6001600160a01b03811661079a5760405162461bcd60e51b815260206004820152602260248201527f6f7261636c6520616464726573732063616e6e6f742062652030206164647265604482015261737360f01b6064820152608401610730565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b600b5460009081908190600160a01b900460ff16156107fd5760006107df611499565b90506107ea81611590565b9250600a548110156107fb57600191505b505b81158061082257506001600160a01b0386166000908152600e602052604090205460ff165b15610837576108328686866116bf565b610845565b6108438686868461188d565b505b61087d86336108788760405180606001604052806028815260200161224f602891396108718c33611144565b9190611906565b611375565b50600195945050505050565b610891611932565b61089a8161198c565b50565b6006546000906001600160a01b03163314806108c357506008546001600160a01b031633145b6108df5760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b0382166000908152600e602052604090205460ff16156109485760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e2774206265206578636c75646564000000000000006044820152606401610730565b506001600160a01b0381166000908152600e60205260409020805460ff191660019081179091555b919050565b6000336106e78185856109888383611144565b6108789190612103565b6006546001600160a01b03163314806109b557506008546001600160a01b031633145b6109d15760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b038116610a365760405162461bcd60e51b815260206004820152602660248201527f746178206f666669636520616464726573732063616e6e6f742062652030206160448201526564647265737360d01b6064820152608401610730565b600854604080516001600160a01b03928316815291831660208301527f75237613d1cfb394eb7979839ecbeacaca4592ef0cf96791979625803948a601910160405180910390a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546000906001600160a01b03163314610acc5760405162461bcd60e51b815260040161073090612029565b6001600160a01b038316600090815260208190526040902054610aef8484611a50565b6001600160a01b03841660009081526020819052604081205491909111949350505050565b61089a81611b2f565b600c8181548110610b2d57600080fd5b600091825260209091200154905081565b6006546001600160a01b03163314610b685760405162461bcd60e51b815260040161073090612029565b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b158015610bb257600080fd5b505af1158015610bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bea9190611ed3565b50505050565b600d8181548110610b2d57600080fd5b6008546001600160a01b03163314610c2a5760405162461bcd60e51b815260040161073090611ff2565b600b805460ff60a01b19169055565b6008546000906001600160a01b03163314610c665760405162461bcd60e51b815260040161073090611ff2565b600c548360ff1610610c8a5760405162461bcd60e51b81526004016107309061206d565b60ff831615610cc957600c610ca0600185612198565b60ff1681548110610cb357610cb3612223565b90600052602060002001548211610cc957600080fd5b610cdd6001610cd7600c5490565b90611b39565b8360ff161015610d1d57600c610cf484600161211b565b60ff1681548110610d0757610d07612223565b90600052602060002001548210610d1d57600080fd5b81600c8460ff1681548110610d3457610d34612223565b60009182526020909120015550600192915050565b6008546001600160a01b03163314610d735760405162461bcd60e51b815260040161073090611ff2565b6001600160a01b038116610de05760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b6064820152608401610730565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b610e0a611932565b610e146000611b4c565b565b6006546001600160a01b03163314610e405760405162461bcd60e51b815260040161073090612029565b610e4a8282611b9e565b5050565b6006546000906001600160a01b0316331480610e7457506008546001600160a01b031633145b610e905760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b0382166000908152600e602052604090205460ff16610ef85760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e277420626520696e636c75646564000000000000006044820152606401610730565b506001600160a01b03166000908152600e60205260409020805460ff19169055600190565b606060048054610656906121d8565b6008546000906001600160a01b03163314610f595760405162461bcd60e51b815260040161073090611ff2565b600a9190915590565b60003381610f708286611144565b905083811015610fd05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610730565b610fdd8286868403611375565b506001949350505050565b6000336106e78185856116bf565b6008546000906001600160a01b031633146110235760405162461bcd60e51b815260040161073090611ff2565b600d548360ff16106110475760405162461bcd60e51b81526004016107309061206d565b81600d8460ff1681548110610d3457610d34612223565b6008546001600160a01b031633146110885760405162461bcd60e51b815260040161073090611ff2565b600b54600160a01b900460ff16156110ee5760405162461bcd60e51b8152602060048201526024808201527f6175746f2063616c63756c617465207461782063616e6e6f7420626520656e61604482015263189b195960e21b6064820152608401610730565b612710811061113f5760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f203130302500000000006044820152606401610730565b600955565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611177611932565b6001600160a01b0381166111dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610730565b61089a81611b4c565b6006546001600160a01b0316331461120f5760405162461bcd60e51b815260040161073090612029565b600654600160a01b900460ff16156112695760405162461bcd60e51b815260206004820152601860248201527f6f6e6c792063616e2064697374726962757465206f6e636500000000000000006044820152606401610730565b6001600160a01b0382166112b25760405162461bcd60e51b815260206004820152601060248201526f215f7765617468657247656e6573697360801b6044820152606401610730565b6001600160a01b0381166112fc5760405162461bcd60e51b815260206004820152601160248201527010afb0b4b9323937b82932b1b2b4bb32b960791b6044820152606401610730565b6006805460ff60a01b1916600160a01b17905561132382690878678326eac9000000611a50565b610e4a81686c6b935b8bbd400000611a50565b6008546001600160a01b031633146113605760405162461bcd60e51b815260040161073090611ff2565b600b805460ff60a01b1916600160a01b179055565b6001600160a01b0383166113d75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610730565b6001600160a01b0382166114385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610730565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600754604051633ddac95360e01b8152306004820152670de0b6b3a764000060248201526000916001600160a01b031690633ddac9539060440160206040518083038186803b1580156114eb57600080fd5b505afa92505050801561151b575060408051601f3d908101601f1916820190925261151891810190611f37565b60015b6115825760405162461bcd60e51b815260206004820152603260248201527f576561746865723a206661696c656420746f20666574636820574541544845526044820152712070726963652066726f6d204f7261636c6560701b6064820152608401610730565b6001600160901b0316919050565b600b54600090600160a01b900460ff16156109705760006115be60016115b5600c5490565b60ff1690611bb3565b90505b600c8160ff16815481106115d7576115d7612223565b906000526020600020015483106116a957612710600d8260ff168154811061160157611601612223565b9060005260206000200154106116595760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f203130302500000000006044820152606401610730565b600d8160ff168154811061166f5761166f612223565b9060005260206000200154600981905550600d8160ff168154811061169657611696612223565b9060005260206000200154915050919050565b6116b2816121bb565b90506115c1565b50919050565b6001600160a01b0383166117235760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610730565b6001600160a01b0382166117855760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610730565b6001600160a01b038316600090815260208190526040902054818110156117fd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610730565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611834908490612103565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161188091815260200190565b60405180910390a3610bea565b6000806118b16127106118ab60095487611bf590919063ffffffff16565b90611c01565b905060006118bf8583611b39565b905083156118d6576118d18783611b9e565b6118ee565b600b546118ee9088906001600160a01b0316846116bf565b6118f98787836116bf565b5060019695505050505050565b6000818484111561192a5760405162461bcd60e51b81526004016107309190611f9d565b505050900390565b6005546001600160a01b03163314610e145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610730565b6001600160a01b0381166119f85760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b6064820152608401610730565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216611aa65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610730565b8060026000828254611ab89190612103565b90915550506001600160a01b03821660009081526020819052604081208054839290611ae5908490612103565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b61089a3382611c0d565b6000611b458284612181565b9392505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611ba9823383611d5b565b610e4a8282611c0d565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611dcf565b6000611b458284612162565b6000611b458284612140565b6001600160a01b038216611c6d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610730565b6001600160a01b03821660009081526020819052604090205481811015611ce15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610730565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611d10908490612181565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611d678484611144565b90506000198114610bea5781811015611dc25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610730565b610bea8484848403611375565b60008360ff168360ff1611158290611dfa5760405162461bcd60e51b81526004016107309190611f9d565b506000611e078486612198565b95945050505050565b600060208284031215611e2257600080fd5b8135611b4581612239565b60008060408385031215611e4057600080fd5b8235611e4b81612239565b91506020830135611e5b81612239565b809150509250929050565b600080600060608486031215611e7b57600080fd5b8335611e8681612239565b92506020840135611e9681612239565b929592945050506040919091013590565b60008060408385031215611eba57600080fd5b8235611ec581612239565b946020939093013593505050565b600060208284031215611ee557600080fd5b81518015158114611b4557600080fd5b600080600060608486031215611f0a57600080fd5b8335611f1581612239565b9250602084013591506040840135611f2c81612239565b809150509250925092565b600060208284031215611f4957600080fd5b81516001600160901b0381168114611b4557600080fd5b600060208284031215611f7257600080fd5b5035919050565b60008060408385031215611f8c57600080fd5b823560ff81168114611ec557600080fd5b600060208083528351808285015260005b81811015611fca57858101830151858201604001528201611fae565b81811115611fdc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252601c908201527f43616c6c6572206973206e6f742074686520746178206f666669636500000000604082015260600190565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b6020808252602a908201527f496e6465782068617320746f206c6f776572207468616e20636f756e74206f666040820152692074617820746965727360b01b606082015260800190565b6020808252602c908201527f43616c6c6572206973206e6f7420746865206f70657261746f72206f7220746860408201526b6520746178206f666669636560a01b606082015260800190565b600082198211156121165761211661220d565b500190565b600060ff821660ff84168060ff038211156121385761213861220d565b019392505050565b60008261215d57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561217c5761217c61220d565b500290565b6000828210156121935761219361220d565b500390565b600060ff821660ff8416808210156121b2576121b261220d565b90039392505050565b600060ff8216806121ce576121ce61220d565b6000190192915050565b600181811c908216806121ec57607f821691505b602082108114156116b957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461089a57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200c72fdd78bd3cbde0abc82c3142d117eb82e833a621efbfc85bc83a467a82d2264736f6c63430008070033000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026d01425ee588b4bef48654cb33d7a069d337066
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102a05760003560e01c8063715018a611610167578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e146105d2578063ebca1bd9146105e5578063ee2a953514610611578063f2fde38b14610619578063f4fd47cf1461062c578063ff87fc7c1461063f57600080fd5b8063a9059cbb14610552578063b87c5a4a14610565578063c3bdf61314610578578063c6d69a301461058b578063cf011b261461059e578063d8cca645146105c157600080fd5b806393995d4b1161012057806393995d4b146104f557806395d89b41146105085780639662676c146105105780639d6b5f2114610524578063a457c2d714610537578063a6431bba1461054a57600080fd5b8063715018a614610499578063771a3a1d146104a157806379cc6790146104aa5780637ee94ef1146104bd5780638d3cc818146104d05780638da5cb5b146104e457600080fd5b806340c10f191161020b578063570ca735116101c4578063570ca7351461041e5780635c29908d1461042f57806365bbacd91461044257806366206ce91461044a57806369356d471461045d57806370a082311461047057600080fd5b806340c10f19146103b657806342966c68146103c957806342c6b4f1146103dc5780634456eda2146103ef5780634f6d38d01461040257806354575af41461040b57600080fd5b806329605e771161025d57806329605e7714610330578063313ce567146103435780633758e6ce1461035257806339509351146103655780633e5f13d4146103785780633f07d76a146103a357600080fd5b806306fdde03146102a5578063095ea7b3146102c357806318160ddd146102e657806318b09f26146102f857806323b872dd1461030d5780632615535d14610320575b600080fd5b6102ad610647565b6040516102ba9190611f9d565b60405180910390f35b6102d66102d1366004611ea7565b6106d9565b60405190151581526020016102ba565b6002545b6040519081526020016102ba565b61030b610306366004611e10565b6106f1565b005b6102d661031b366004611e66565b6107bc565b6102ea686c6b935b8bbd40000081565b61030b61033e366004611e10565b610889565b604051601281526020016102ba565b6102d6610360366004611e10565b61089d565b6102d6610373366004611ea7565b610975565b60085461038b906001600160a01b031681565b6040516001600160a01b0390911681526020016102ba565b61030b6103b1366004611e10565b610992565b6102d66103c4366004611ea7565b610a9f565b61030b6103d7366004611f60565b610b14565b6102ea6103ea366004611f60565b610b1d565b6006546001600160a01b031633146102d6565b6102ea600a5481565b61030b610419366004611ef5565b610b3e565b6006546001600160a01b031661038b565b6102ea61043d366004611f60565b610bf0565b61030b610c00565b6102d6610458366004611f79565b610c39565b61030b61046b366004611e10565b610d49565b6102ea61047e366004611e10565b6001600160a01b031660009081526020819052604090205490565b61030b610e02565b6102ea60095481565b61030b6104b8366004611ea7565b610e16565b60075461038b906001600160a01b031681565b600b546102d690600160a01b900460ff1681565b6005546001600160a01b031661038b565b6102d6610503366004611e10565b610e4e565b6102ad610f1d565b6006546102d690600160a01b900460ff1681565b6102d6610532366004611f60565b610f2c565b6102d6610545366004611ea7565b610f62565b600c546102ea565b6102d6610560366004611ea7565b610fe8565b6102d6610573366004611f79565b610ff6565b600b5461038b906001600160a01b031681565b61030b610599366004611f60565b61105e565b6102d66105ac366004611e10565b600e6020526000908152604090205460ff1681565b6102ea690878678326eac900000081565b6102ea6105e0366004611e2d565b611144565b6102d66105f3366004611e10565b6001600160a01b03166000908152600e602052604090205460ff1690565b600d546102ea565b61030b610627366004611e10565b61116f565b61030b61063a366004611e2d565b6111e5565b61030b611336565b606060038054610656906121d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610682906121d8565b80156106cf5780601f106106a4576101008083540402835291602001916106cf565b820191906000526020600020905b8154815290600101906020018083116106b257829003601f168201915b5050505050905090565b6000336106e7818585611375565b5060019392505050565b6006546001600160a01b031633148061071457506008546001600160a01b031633145b6107395760405162461bcd60e51b8152600401610730906120b7565b60405180910390fd5b6001600160a01b03811661079a5760405162461bcd60e51b815260206004820152602260248201527f6f7261636c6520616464726573732063616e6e6f742062652030206164647265604482015261737360f01b6064820152608401610730565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b600b5460009081908190600160a01b900460ff16156107fd5760006107df611499565b90506107ea81611590565b9250600a548110156107fb57600191505b505b81158061082257506001600160a01b0386166000908152600e602052604090205460ff165b15610837576108328686866116bf565b610845565b6108438686868461188d565b505b61087d86336108788760405180606001604052806028815260200161224f602891396108718c33611144565b9190611906565b611375565b50600195945050505050565b610891611932565b61089a8161198c565b50565b6006546000906001600160a01b03163314806108c357506008546001600160a01b031633145b6108df5760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b0382166000908152600e602052604090205460ff16156109485760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e2774206265206578636c75646564000000000000006044820152606401610730565b506001600160a01b0381166000908152600e60205260409020805460ff191660019081179091555b919050565b6000336106e78185856109888383611144565b6108789190612103565b6006546001600160a01b03163314806109b557506008546001600160a01b031633145b6109d15760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b038116610a365760405162461bcd60e51b815260206004820152602660248201527f746178206f666669636520616464726573732063616e6e6f742062652030206160448201526564647265737360d01b6064820152608401610730565b600854604080516001600160a01b03928316815291831660208301527f75237613d1cfb394eb7979839ecbeacaca4592ef0cf96791979625803948a601910160405180910390a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b6006546000906001600160a01b03163314610acc5760405162461bcd60e51b815260040161073090612029565b6001600160a01b038316600090815260208190526040902054610aef8484611a50565b6001600160a01b03841660009081526020819052604081205491909111949350505050565b61089a81611b2f565b600c8181548110610b2d57600080fd5b600091825260209091200154905081565b6006546001600160a01b03163314610b685760405162461bcd60e51b815260040161073090612029565b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b158015610bb257600080fd5b505af1158015610bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bea9190611ed3565b50505050565b600d8181548110610b2d57600080fd5b6008546001600160a01b03163314610c2a5760405162461bcd60e51b815260040161073090611ff2565b600b805460ff60a01b19169055565b6008546000906001600160a01b03163314610c665760405162461bcd60e51b815260040161073090611ff2565b600c548360ff1610610c8a5760405162461bcd60e51b81526004016107309061206d565b60ff831615610cc957600c610ca0600185612198565b60ff1681548110610cb357610cb3612223565b90600052602060002001548211610cc957600080fd5b610cdd6001610cd7600c5490565b90611b39565b8360ff161015610d1d57600c610cf484600161211b565b60ff1681548110610d0757610d07612223565b90600052602060002001548210610d1d57600080fd5b81600c8460ff1681548110610d3457610d34612223565b60009182526020909120015550600192915050565b6008546001600160a01b03163314610d735760405162461bcd60e51b815260040161073090611ff2565b6001600160a01b038116610de05760405162461bcd60e51b815260206004820152602e60248201527f74617820636f6c6c6563746f722061646472657373206d757374206265206e6f60448201526d6e2d7a65726f206164647265737360901b6064820152608401610730565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b610e0a611932565b610e146000611b4c565b565b6006546001600160a01b03163314610e405760405162461bcd60e51b815260040161073090612029565b610e4a8282611b9e565b5050565b6006546000906001600160a01b0316331480610e7457506008546001600160a01b031633145b610e905760405162461bcd60e51b8152600401610730906120b7565b6001600160a01b0382166000908152600e602052604090205460ff16610ef85760405162461bcd60e51b815260206004820152601960248201527f616464726573732063616e277420626520696e636c75646564000000000000006044820152606401610730565b506001600160a01b03166000908152600e60205260409020805460ff19169055600190565b606060048054610656906121d8565b6008546000906001600160a01b03163314610f595760405162461bcd60e51b815260040161073090611ff2565b600a9190915590565b60003381610f708286611144565b905083811015610fd05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610730565b610fdd8286868403611375565b506001949350505050565b6000336106e78185856116bf565b6008546000906001600160a01b031633146110235760405162461bcd60e51b815260040161073090611ff2565b600d548360ff16106110475760405162461bcd60e51b81526004016107309061206d565b81600d8460ff1681548110610d3457610d34612223565b6008546001600160a01b031633146110885760405162461bcd60e51b815260040161073090611ff2565b600b54600160a01b900460ff16156110ee5760405162461bcd60e51b8152602060048201526024808201527f6175746f2063616c63756c617465207461782063616e6e6f7420626520656e61604482015263189b195960e21b6064820152608401610730565b612710811061113f5760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f203130302500000000006044820152606401610730565b600955565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611177611932565b6001600160a01b0381166111dc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610730565b61089a81611b4c565b6006546001600160a01b0316331461120f5760405162461bcd60e51b815260040161073090612029565b600654600160a01b900460ff16156112695760405162461bcd60e51b815260206004820152601860248201527f6f6e6c792063616e2064697374726962757465206f6e636500000000000000006044820152606401610730565b6001600160a01b0382166112b25760405162461bcd60e51b815260206004820152601060248201526f215f7765617468657247656e6573697360801b6044820152606401610730565b6001600160a01b0381166112fc5760405162461bcd60e51b815260206004820152601160248201527010afb0b4b9323937b82932b1b2b4bb32b960791b6044820152606401610730565b6006805460ff60a01b1916600160a01b17905561132382690878678326eac9000000611a50565b610e4a81686c6b935b8bbd400000611a50565b6008546001600160a01b031633146113605760405162461bcd60e51b815260040161073090611ff2565b600b805460ff60a01b1916600160a01b179055565b6001600160a01b0383166113d75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610730565b6001600160a01b0382166114385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610730565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600754604051633ddac95360e01b8152306004820152670de0b6b3a764000060248201526000916001600160a01b031690633ddac9539060440160206040518083038186803b1580156114eb57600080fd5b505afa92505050801561151b575060408051601f3d908101601f1916820190925261151891810190611f37565b60015b6115825760405162461bcd60e51b815260206004820152603260248201527f576561746865723a206661696c656420746f20666574636820574541544845526044820152712070726963652066726f6d204f7261636c6560701b6064820152608401610730565b6001600160901b0316919050565b600b54600090600160a01b900460ff16156109705760006115be60016115b5600c5490565b60ff1690611bb3565b90505b600c8160ff16815481106115d7576115d7612223565b906000526020600020015483106116a957612710600d8260ff168154811061160157611601612223565b9060005260206000200154106116595760405162461bcd60e51b815260206004820152601b60248201527f74617820657175616c206f722062696767657220746f203130302500000000006044820152606401610730565b600d8160ff168154811061166f5761166f612223565b9060005260206000200154600981905550600d8160ff168154811061169657611696612223565b9060005260206000200154915050919050565b6116b2816121bb565b90506115c1565b50919050565b6001600160a01b0383166117235760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610730565b6001600160a01b0382166117855760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610730565b6001600160a01b038316600090815260208190526040902054818110156117fd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610730565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611834908490612103565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161188091815260200190565b60405180910390a3610bea565b6000806118b16127106118ab60095487611bf590919063ffffffff16565b90611c01565b905060006118bf8583611b39565b905083156118d6576118d18783611b9e565b6118ee565b600b546118ee9088906001600160a01b0316846116bf565b6118f98787836116bf565b5060019695505050505050565b6000818484111561192a5760405162461bcd60e51b81526004016107309190611f9d565b505050900390565b6005546001600160a01b03163314610e145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610730565b6001600160a01b0381166119f85760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b6064820152608401610730565b6040516001600160a01b038216906000907f74da04524d50c64947f5dd5381ef1a4dca5cba8ed1d816243f9e48aa0b5617ed908290a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038216611aa65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610730565b8060026000828254611ab89190612103565b90915550506001600160a01b03821660009081526020819052604081208054839290611ae5908490612103565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b61089a3382611c0d565b6000611b458284612181565b9392505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611ba9823383611d5b565b610e4a8282611c0d565b6000611b4583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611dcf565b6000611b458284612162565b6000611b458284612140565b6001600160a01b038216611c6d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610730565b6001600160a01b03821660009081526020819052604090205481811015611ce15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610730565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611d10908490612181565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611d678484611144565b90506000198114610bea5781811015611dc25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610730565b610bea8484848403611375565b60008360ff168360ff1611158290611dfa5760405162461bcd60e51b81526004016107309190611f9d565b506000611e078486612198565b95945050505050565b600060208284031215611e2257600080fd5b8135611b4581612239565b60008060408385031215611e4057600080fd5b8235611e4b81612239565b91506020830135611e5b81612239565b809150509250929050565b600080600060608486031215611e7b57600080fd5b8335611e8681612239565b92506020840135611e9681612239565b929592945050506040919091013590565b60008060408385031215611eba57600080fd5b8235611ec581612239565b946020939093013593505050565b600060208284031215611ee557600080fd5b81518015158114611b4557600080fd5b600080600060608486031215611f0a57600080fd5b8335611f1581612239565b9250602084013591506040840135611f2c81612239565b809150509250925092565b600060208284031215611f4957600080fd5b81516001600160901b0381168114611b4557600080fd5b600060208284031215611f7257600080fd5b5035919050565b60008060408385031215611f8c57600080fd5b823560ff81168114611ec557600080fd5b600060208083528351808285015260005b81811015611fca57858101830151858201604001528201611fae565b81811115611fdc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252601c908201527f43616c6c6572206973206e6f742074686520746178206f666669636500000000604082015260600190565b60208082526024908201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260408201526330ba37b960e11b606082015260800190565b6020808252602a908201527f496e6465782068617320746f206c6f776572207468616e20636f756e74206f666040820152692074617820746965727360b01b606082015260800190565b6020808252602c908201527f43616c6c6572206973206e6f7420746865206f70657261746f72206f7220746860408201526b6520746178206f666669636560a01b606082015260800190565b600082198211156121165761211661220d565b500190565b600060ff821660ff84168060ff038211156121385761213861220d565b019392505050565b60008261215d57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561217c5761217c61220d565b500290565b6000828210156121935761219361220d565b500390565b600060ff821660ff8416808210156121b2576121b261220d565b90039392505050565b600060ff8216806121ce576121ce61220d565b6000190192915050565b600181811c908216806121ec57607f821691505b602082108114156116b957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461089a57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200c72fdd78bd3cbde0abc82c3142d117eb82e833a621efbfc85bc83a467a82d2264736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026d01425ee588b4bef48654cb33d7a069d337066
-----Decoded View---------------
Arg [0] : _taxRate (uint256): 0
Arg [1] : _taxCollectorAddress (address): 0x26D01425EE588b4BeF48654Cb33d7a069D337066
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 00000000000000000000000026d01425ee588b4bef48654cb33d7a069d337066