Overview [ERC-20]
Price
$0.00 @ 0.000000 Eth
Fully Diluted Market Cap
Max Total Supply:
976,848,216.249803518902122571 AERO
Holders:
48,341
Transfers:
-
Contract:
Decimals:
18
Official Site:
[ Download CSV Export ]
[ Download CSV Export ]
OVERVIEW
Aerodrome Finance is a next-generation AMM designed to serve as Base's central liquidity hub, combining a powerful liquidity incentive engine, vote-lock governance model, and friendly user experience.# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Aero
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity)
/** *Submitted for verification at basescan.org on 2023-08-28 */ // SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.19; // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) /** * @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); } interface IAero is IERC20 { error NotMinter(); error NotOwner(); /// @notice Mint an amount of tokens to an account /// Only callable by Minter.sol /// @return True if success function mint(address account, uint256 amount) external returns (bool); /// @notice Address of Minter.sol function minter() external view returns (address); } // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.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); } // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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}. * * 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 default value returned by this function, unless * it's 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; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _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; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _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; // Overflow not possible: amount <= accountBalance <= totalSupply. _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 {} } // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/ERC20Permit.sol) // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol) /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) /** * @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, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 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. If 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)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 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) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } } // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } } /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } } /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } } // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } } type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * Strings of arbitrary length can be optimized if they are short enough by * the addition of a storage variable used as fallback. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { error StringTooLong(string str); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = length(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function length(ShortString sstr) internal pure returns (uint256) { return uint256(ShortString.unwrap(sstr)) & 0xFF; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(0); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (length(value) > 0) { return toString(value); } else { return store; } } } interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); } /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * _Available since v3.4._ * * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {EIP-5267}. */ function eip712Domain() public view virtual override returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _name.toStringWithFallback(_nameFallback), _version.toStringWithFallback(_versionFallback), block.chainid, address(this), bytes32(0), new uint256[](0) ); } } // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } } /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * _Available since v3.4._ */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. * However, to ensure consistency with the upgradeable transpiler, we will continue * to reserve a slot. * @custom:oz-renamed-from _PERMIT_TYPEHASH */ // solhint-disable-next-line var-name-mixedcase bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { Counters.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } } /// @title Aero /// @author velodrome.finance /// @notice The native token in the Protocol ecosystem /// @dev Emitted by the Minter contract Aero is IAero, ERC20Permit { address public minter; address private owner; constructor() ERC20("Aerodrome", "AERO") ERC20Permit("Aerodrome") { minter = msg.sender; owner = msg.sender; } /// @dev No checks as its meant to be once off to set minting rights to BaseV1 Minter function setMinter(address _minter) external { if (msg.sender != minter) revert NotMinter(); minter = _minter; } function mint(address account, uint256 amount) external returns (bool) { if (msg.sender != minter) revert NotMinter(); _mint(account, amount); return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotMinter","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"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":[],"name":"EIP712DomainChanged","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":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","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":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","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":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101606040523480156200001257600080fd5b50604051806040016040528060098152602001684165726f64726f6d6560b81b81525080604051806040016040528060018152602001603160f81b815250604051806040016040528060098152602001684165726f64726f6d6560b81b815250604051806040016040528060048152602001634145524f60e01b8152508160039081620000a09190620002bd565b506004620000af8282620002bd565b50620000c19150839050600562000193565b60e052620000d181600662000193565b61010052815160208084019190912061012052815190820120610140524660a052620001616101205161014051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0525060098054336001600160a01b03199182168117909255600a80549091169091179055620003fe565b6000602083511015620001b357620001ab83620001cc565b9050620001c6565b81620001c08482620002bd565b50600090505b92915050565b600080829050601f8151111562000203578260405163305a27a960e01b8152600401620001fa919062000389565b60405180910390fd5b80516200021082620003d9565b179392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200024357607f821691505b6020821081036200026457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002b857600081815260208120601f850160051c81016020861015620002935750805b601f850160051c820191505b81811015620002b4578281556001016200029f565b5050505b505050565b81516001600160401b03811115620002d957620002d962000218565b620002f181620002ea84546200022e565b846200026a565b602080601f831160018114620003295760008415620003105750858301515b600019600386901b1c1916600185901b178555620002b4565b600085815260208120601f198616915b828110156200035a5788860151825594840194600190910190840162000339565b5085821015620003795787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b81811015620003b8578581018301518582016040015282016200039a565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620002645760001960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051611280620004596000396000610b2701526000610aff015260006104420152600061041701526000610a5a01526000610a8401526000610aae01526112806000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806370a08231116100a2578063a457c2d711610071578063a457c2d714610248578063a9059cbb1461025b578063d505accf1461026e578063dd62ed3e14610283578063fca3b5aa1461029657600080fd5b806370a08231146101e95780637ecebe001461021257806384b0196e1461022557806395d89b411461024057600080fd5b806323b872dd116100e957806323b872dd14610199578063313ce567146101ac5780633644e515146101bb57806339509351146101c357806340c10f19146101d657600080fd5b806306fdde031461011b5780630754617214610139578063095ea7b31461016457806318160ddd14610187575b600080fd5b6101236102a9565b6040516101309190610fec565b60405180910390f35b60095461014c906001600160a01b031681565b6040516001600160a01b039091168152602001610130565b610177610172366004611022565b61033b565b6040519015158152602001610130565b6002545b604051908152602001610130565b6101776101a736600461104c565b610355565b60405160128152602001610130565b61018b610379565b6101776101d1366004611022565b610388565b6101776101e4366004611022565b6103aa565b61018b6101f7366004611088565b6001600160a01b031660009081526020819052604090205490565b61018b610220366004611088565b6103eb565b61022d610409565b60405161013097969594939291906110a3565b610123610492565b610177610256366004611022565b6104a1565b610177610269366004611022565b610521565b61028161027c366004611139565b61052f565b005b61018b6102913660046111ac565b610693565b6102816102a4366004611088565b6106be565b6060600380546102b8906111df565b80601f01602080910402602001604051908101604052809291908181526020018280546102e4906111df565b80156103315780601f1061030657610100808354040283529160200191610331565b820191906000526020600020905b81548152906001019060200180831161031457829003601f168201915b5050505050905090565b60003361034981858561070b565b60019150505b92915050565b60003361036385828561082f565b61036e8585856108a9565b506001949350505050565b6000610383610a4d565b905090565b60003361034981858561039b8383610693565b6103a59190611213565b61070b565b6009546000906001600160a01b031633146103d857604051633e34a41b60e21b815260040160405180910390fd5b6103e28383610b78565b50600192915050565b6001600160a01b03811660009081526007602052604081205461034f565b60006060808280808361043d7f00000000000000000000000000000000000000000000000000000000000000006005610c37565b6104687f00000000000000000000000000000000000000000000000000000000000000006006610c37565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6060600480546102b8906111df565b600033816104af8286610693565b9050838110156105145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61036e828686840361070b565b6000336103498185856108a9565b8342111561057f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161050b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886105ae8c610ce3565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061060982610d0b565b9050600061061982878787610d38565b9050896001600160a01b0316816001600160a01b03161461067c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161050b565b6106878a8a8a61070b565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6009546001600160a01b031633146106e957604051633e34a41b60e21b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661076d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161050b565b6001600160a01b0382166107ce5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161050b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061083b8484610693565b905060001981146108a357818110156108965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161050b565b6108a3848484840361070b565b50505050565b6001600160a01b03831661090d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161050b565b6001600160a01b03821661096f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161050b565b6001600160a01b038316600090815260208190526040902054818110156109e75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161050b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36108a3565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610aa657507f000000000000000000000000000000000000000000000000000000000000000046145b15610ad057507f000000000000000000000000000000000000000000000000000000000000000090565b610383604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216610bce5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161050b565b8060026000828254610be09190611213565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b606060ff831615610c5257610c4b83610d60565b905061034f565b818054610c5e906111df565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8a906111df565b8015610cd75780601f10610cac57610100808354040283529160200191610cd7565b820191906000526020600020905b815481529060010190602001808311610cba57829003601f168201915b5050505050905061034f565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b600061034f610d18610a4d565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610d4987878787610d95565b91509150610d5681610e59565b5095945050505050565b60408051602080825281830190925260609160ff84169160009180820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dcc5750600090506003610e50565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e20573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e4957600060019250925050610e50565b9150600090505b94509492505050565b6000816004811115610e6d57610e6d611234565b03610e755750565b6001816004811115610e8957610e89611234565b03610ed65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161050b565b6002816004811115610eea57610eea611234565b03610f375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161050b565b6003816004811115610f4b57610f4b611234565b03610fa35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161050b565b50565b6000815180845260005b81811015610fcc57602081850181015186830182015201610fb0565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610fff6020830184610fa6565b9392505050565b80356001600160a01b038116811461101d57600080fd5b919050565b6000806040838503121561103557600080fd5b61103e83611006565b946020939093013593505050565b60008060006060848603121561106157600080fd5b61106a84611006565b925061107860208501611006565b9150604084013590509250925092565b60006020828403121561109a57600080fd5b610fff82611006565b60ff60f81b881681526000602060e0818401526110c360e084018a610fa6565b83810360408501526110d5818a610fa6565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156111275783518352928401929184019160010161110b565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561115457600080fd5b61115d88611006565b965061116b60208901611006565b95506040880135945060608801359350608088013560ff8116811461118f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156111bf57600080fd5b6111c883611006565b91506111d660208401611006565b90509250929050565b600181811c908216806111f357607f821691505b602082108103610d0557634e487b7160e01b600052602260045260246000fd5b8082018082111561034f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220a692786301f8fc5753982d52f4f683566b0e99f55fb78794411a18a8b3b09cb564736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c806370a08231116100a2578063a457c2d711610071578063a457c2d714610248578063a9059cbb1461025b578063d505accf1461026e578063dd62ed3e14610283578063fca3b5aa1461029657600080fd5b806370a08231146101e95780637ecebe001461021257806384b0196e1461022557806395d89b411461024057600080fd5b806323b872dd116100e957806323b872dd14610199578063313ce567146101ac5780633644e515146101bb57806339509351146101c357806340c10f19146101d657600080fd5b806306fdde031461011b5780630754617214610139578063095ea7b31461016457806318160ddd14610187575b600080fd5b6101236102a9565b6040516101309190610fec565b60405180910390f35b60095461014c906001600160a01b031681565b6040516001600160a01b039091168152602001610130565b610177610172366004611022565b61033b565b6040519015158152602001610130565b6002545b604051908152602001610130565b6101776101a736600461104c565b610355565b60405160128152602001610130565b61018b610379565b6101776101d1366004611022565b610388565b6101776101e4366004611022565b6103aa565b61018b6101f7366004611088565b6001600160a01b031660009081526020819052604090205490565b61018b610220366004611088565b6103eb565b61022d610409565b60405161013097969594939291906110a3565b610123610492565b610177610256366004611022565b6104a1565b610177610269366004611022565b610521565b61028161027c366004611139565b61052f565b005b61018b6102913660046111ac565b610693565b6102816102a4366004611088565b6106be565b6060600380546102b8906111df565b80601f01602080910402602001604051908101604052809291908181526020018280546102e4906111df565b80156103315780601f1061030657610100808354040283529160200191610331565b820191906000526020600020905b81548152906001019060200180831161031457829003601f168201915b5050505050905090565b60003361034981858561070b565b60019150505b92915050565b60003361036385828561082f565b61036e8585856108a9565b506001949350505050565b6000610383610a4d565b905090565b60003361034981858561039b8383610693565b6103a59190611213565b61070b565b6009546000906001600160a01b031633146103d857604051633e34a41b60e21b815260040160405180910390fd5b6103e28383610b78565b50600192915050565b6001600160a01b03811660009081526007602052604081205461034f565b60006060808280808361043d7f4165726f64726f6d6500000000000000000000000000000000000000000000096005610c37565b6104687f31000000000000000000000000000000000000000000000000000000000000016006610c37565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6060600480546102b8906111df565b600033816104af8286610693565b9050838110156105145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61036e828686840361070b565b6000336103498185856108a9565b8342111561057f5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161050b565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886105ae8c610ce3565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061060982610d0b565b9050600061061982878787610d38565b9050896001600160a01b0316816001600160a01b03161461067c5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161050b565b6106878a8a8a61070b565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6009546001600160a01b031633146106e957604051633e34a41b60e21b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661076d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161050b565b6001600160a01b0382166107ce5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161050b565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061083b8484610693565b905060001981146108a357818110156108965760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161050b565b6108a3848484840361070b565b50505050565b6001600160a01b03831661090d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161050b565b6001600160a01b03821661096f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161050b565b6001600160a01b038316600090815260208190526040902054818110156109e75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161050b565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36108a3565b6000306001600160a01b037f000000000000000000000000940181a94a35a4569e4529a3cdfb74e38fd9863116148015610aa657507f000000000000000000000000000000000000000000000000000000000000210546145b15610ad057507f853ee41882d37496b330318f7075c95307704538c45e32745f9e8135cb14228390565b610383604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fd87dbe76a11fe7b72e4984abb63246d3236d610c5c314c5c757b35aa11fd3040918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216610bce5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161050b565b8060026000828254610be09190611213565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b606060ff831615610c5257610c4b83610d60565b905061034f565b818054610c5e906111df565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8a906111df565b8015610cd75780601f10610cac57610100808354040283529160200191610cd7565b820191906000526020600020905b815481529060010190602001808311610cba57829003601f168201915b5050505050905061034f565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b600061034f610d18610a4d565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806000610d4987878787610d95565b91509150610d5681610e59565b5095945050505050565b60408051602080825281830190925260609160ff84169160009180820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dcc5750600090506003610e50565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e20573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610e4957600060019250925050610e50565b9150600090505b94509492505050565b6000816004811115610e6d57610e6d611234565b03610e755750565b6001816004811115610e8957610e89611234565b03610ed65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161050b565b6002816004811115610eea57610eea611234565b03610f375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161050b565b6003816004811115610f4b57610f4b611234565b03610fa35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161050b565b50565b6000815180845260005b81811015610fcc57602081850181015186830182015201610fb0565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610fff6020830184610fa6565b9392505050565b80356001600160a01b038116811461101d57600080fd5b919050565b6000806040838503121561103557600080fd5b61103e83611006565b946020939093013593505050565b60008060006060848603121561106157600080fd5b61106a84611006565b925061107860208501611006565b9150604084013590509250925092565b60006020828403121561109a57600080fd5b610fff82611006565b60ff60f81b881681526000602060e0818401526110c360e084018a610fa6565b83810360408501526110d5818a610fa6565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b818110156111275783518352928401929184019160010161110b565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561115457600080fd5b61115d88611006565b965061116b60208901611006565b95506040880135945060608801359350608088013560ff8116811461118f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156111bf57600080fd5b6111c883611006565b91506111d660208401611006565b90509250929050565b600181811c908216806111f357607f821691505b602082108103610d0557634e487b7160e01b600052602260045260246000fd5b8082018082111561034f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220a692786301f8fc5753982d52f4f683566b0e99f55fb78794411a18a8b3b09cb564736f6c63430008130033
Deployed ByteCode Sourcemap
64055:668:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6712:100;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;64098:21;;;;;-1:-1:-1;;;;;64098:21:0;;;;;;-1:-1:-1;;;;;831:32:1;;;813:51;;801:2;786:18;64098:21:0;667:203:1;9072:201:0;;;;;;:::i;:::-;;:::i;:::-;;;1477:14:1;;1470:22;1452:41;;1440:2;1425:18;9072:201:0;1312:187:1;7841:108:0;7929:12;;7841:108;;;1650:25:1;;;1638:2;1623:18;7841:108:0;1504:177:1;9853:261:0;;;;;;:::i;:::-;;:::i;7683:93::-;;;7766:2;2161:36:1;;2149:2;2134:18;7683:93:0;2019:184:1;63452:115:0;;;:::i;10523:238::-;;;;;;:::i;:::-;;:::i;64531:189::-;;;;;;:::i;:::-;;:::i;8012:127::-;;;;;;:::i;:::-;-1:-1:-1;;;;;8113:18:0;8086:7;8113:18;;;;;;;;;;;;8012:127;63194:128;;;;;;:::i;:::-;;:::i;58806:657::-;;;:::i;:::-;;;;;;;;;;;;;:::i;6931:104::-;;;:::i;11264:436::-;;;;;;:::i;:::-;;:::i;8345:193::-;;;;;;:::i;:::-;;:::i;62483:645::-;;;;;;:::i;:::-;;:::i;:::-;;8601:151;;;;;;:::i;:::-;;:::i;64388:135::-;;;;;;:::i;:::-;;:::i;6712:100::-;6766:13;6799:5;6792:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6712:100;:::o;9072:201::-;9155:4;4598:10;9211:32;4598:10;9227:7;9236:6;9211:8;:32::i;:::-;9261:4;9254:11;;;9072:201;;;;;:::o;9853:261::-;9950:4;4598:10;10008:38;10024:4;4598:10;10039:6;10008:15;:38::i;:::-;10057:27;10067:4;10073:2;10077:6;10057:9;:27::i;:::-;-1:-1:-1;10102:4:0;;9853:261;-1:-1:-1;;;;9853:261:0:o;63452:115::-;63512:7;63539:20;:18;:20::i;:::-;63532:27;;63452:115;:::o;10523:238::-;10611:4;4598:10;10667:64;4598:10;10683:7;10720:10;10692:25;4598:10;10683:7;10692:9;:25::i;:::-;:38;;;;:::i;:::-;10667:8;:64::i;64531:189::-;64631:6;;64596:4;;-1:-1:-1;;;;;64631:6:0;64617:10;:20;64613:44;;64646:11;;-1:-1:-1;;;64646:11:0;;;;;;;;;;;64613:44;64668:22;64674:7;64683:6;64668:5;:22::i;:::-;-1:-1:-1;64708:4:0;64531:189;;;;:::o;63194:128::-;-1:-1:-1;;;;;63290:14:0;;63263:7;63290:14;;;:7;:14;;;;;60350;63290:24;60258:114;58806:657;58927:13;58955:18;;58927:13;;;58955:18;59229:41;:5;59256:13;59229:26;:41::i;:::-;59285:47;:8;59315:16;59285:29;:47::i;:::-;59428:16;;;59411:1;59428:16;;;;;;;;;-1:-1:-1;;;59176:279:0;;;-1:-1:-1;59176:279:0;;-1:-1:-1;59347:13:0;;-1:-1:-1;59383:4:0;;-1:-1:-1;59411:1:0;-1:-1:-1;59428:16:0;-1:-1:-1;59176:279:0;-1:-1:-1;58806:657:0:o;6931:104::-;6987:13;7020:7;7013:14;;;;;:::i;11264:436::-;11357:4;4598:10;11357:4;11440:25;4598:10;11457:7;11440:9;:25::i;:::-;11413:52;;11504:15;11484:16;:35;;11476:85;;;;-1:-1:-1;;;11476:85:0;;5754:2:1;11476:85:0;;;5736:21:1;5793:2;5773:18;;;5766:30;5832:34;5812:18;;;5805:62;-1:-1:-1;;;5883:18:1;;;5876:35;5928:19;;11476:85:0;;;;;;;;;11597:60;11606:5;11613:7;11641:15;11622:16;:34;11597:8;:60::i;8345:193::-;8424:4;4598:10;8480:28;4598:10;8497:2;8501:6;8480:9;:28::i;62483:645::-;62727:8;62708:15;:27;;62700:69;;;;-1:-1:-1;;;62700:69:0;;6160:2:1;62700:69:0;;;6142:21:1;6199:2;6179:18;;;6172:30;6238:31;6218:18;;;6211:59;6287:18;;62700:69:0;5958:353:1;62700:69:0;62782:18;61658:95;62842:5;62849:7;62858:5;62865:16;62875:5;62865:9;:16::i;:::-;62813:79;;;;;;6603:25:1;;;;-1:-1:-1;;;;;6702:15:1;;;6682:18;;;6675:43;6754:15;;;;6734:18;;;6727:43;6786:18;;;6779:34;6829:19;;;6822:35;6873:19;;;6866:35;;;6575:19;;62813:79:0;;;;;;;;;;;;62803:90;;;;;;62782:111;;62906:12;62921:28;62938:10;62921:16;:28::i;:::-;62906:43;;62962:14;62979:28;62993:4;62999:1;63002;63005;62979:13;:28::i;:::-;62962:45;;63036:5;-1:-1:-1;;;;;63026:15:0;:6;-1:-1:-1;;;;;63026:15:0;;63018:58;;;;-1:-1:-1;;;63018:58:0;;7114:2:1;63018:58:0;;;7096:21:1;7153:2;7133:18;;;7126:30;7192:32;7172:18;;;7165:60;7242:18;;63018:58:0;6912:354:1;63018:58:0;63089:31;63098:5;63105:7;63114:5;63089:8;:31::i;:::-;62689:439;;;62483:645;;;;;;;:::o;8601:151::-;-1:-1:-1;;;;;8717:18:0;;;8690:7;8717:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;8601:151::o;64388:135::-;64462:6;;-1:-1:-1;;;;;64462:6:0;64448:10;:20;64444:44;;64477:11;;-1:-1:-1;;;64477:11:0;;;;;;;;;;;64444:44;64499:6;:16;;-1:-1:-1;;;;;;64499:16:0;-1:-1:-1;;;;;64499:16:0;;;;;;;;;;64388:135::o;15257:346::-;-1:-1:-1;;;;;15359:19:0;;15351:68;;;;-1:-1:-1;;;15351:68:0;;7473:2:1;15351:68:0;;;7455:21:1;7512:2;7492:18;;;7485:30;7551:34;7531:18;;;7524:62;-1:-1:-1;;;7602:18:1;;;7595:34;7646:19;;15351:68:0;7271:400:1;15351:68:0;-1:-1:-1;;;;;15438:21:0;;15430:68;;;;-1:-1:-1;;;15430:68:0;;7878:2:1;15430:68:0;;;7860:21:1;7917:2;7897:18;;;7890:30;7956:34;7936:18;;;7929:62;-1:-1:-1;;;8007:18:1;;;8000:32;8049:19;;15430:68:0;7676:398:1;15430:68:0;-1:-1:-1;;;;;15511:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;15563:32;;1650:25:1;;;15563:32:0;;1623:18:1;15563:32:0;;;;;;;15257:346;;;:::o;15894:419::-;15995:24;16022:25;16032:5;16039:7;16022:9;:25::i;:::-;15995:52;;-1:-1:-1;;16062:16:0;:37;16058:248;;16144:6;16124:16;:26;;16116:68;;;;-1:-1:-1;;;16116:68:0;;8281:2:1;16116:68:0;;;8263:21:1;8320:2;8300:18;;;8293:30;8359:31;8339:18;;;8332:59;8408:18;;16116:68:0;8079:353:1;16116:68:0;16228:51;16237:5;16244:7;16272:6;16253:16;:25;16228:8;:51::i;:::-;15984:329;15894:419;;;:::o;12170:806::-;-1:-1:-1;;;;;12267:18:0;;12259:68;;;;-1:-1:-1;;;12259:68:0;;8639:2:1;12259:68:0;;;8621:21:1;8678:2;8658:18;;;8651:30;8717:34;8697:18;;;8690:62;-1:-1:-1;;;8768:18:1;;;8761:35;8813:19;;12259:68:0;8437:401:1;12259:68:0;-1:-1:-1;;;;;12346:16:0;;12338:64;;;;-1:-1:-1;;;12338:64:0;;9045:2:1;12338:64:0;;;9027:21:1;9084:2;9064:18;;;9057:30;9123:34;9103:18;;;9096:62;-1:-1:-1;;;9174:18:1;;;9167:33;9217:19;;12338:64:0;8843:399:1;12338:64:0;-1:-1:-1;;;;;12488:15:0;;12466:19;12488:15;;;;;;;;;;;12522:21;;;;12514:72;;;;-1:-1:-1;;;12514:72:0;;9449:2:1;12514:72:0;;;9431:21:1;9488:2;9468:18;;;9461:30;9527:34;9507:18;;;9500:62;-1:-1:-1;;;9578:18:1;;;9571:36;9624:19;;12514:72:0;9247:402:1;12514:72:0;-1:-1:-1;;;;;12622:15:0;;;:9;:15;;;;;;;;;;;12640:20;;;12622:38;;12840:13;;;;;;;;;;:23;;;;;;12892:26;;1650:25:1;;;12840:13:0;;12892:26;;1623:18:1;12892:26:0;;;;;;;12931:37;16913:91;57484:268;57537:7;57569:4;-1:-1:-1;;;;;57578:11:0;57561:28;;:63;;;;;57610:14;57593:13;:31;57561:63;57557:188;;;-1:-1:-1;57648:22:0;;57484:268::o;57557:188::-;57710:23;57852:81;;;55583:95;57852:81;;;10273:25:1;57875:11:0;10314:18:1;;;10307:34;;;;57888:14:0;10357:18:1;;;10350:34;57904:13:0;10400:18:1;;;10393:34;57927:4:0;10443:19:1;;;10436:61;57815:7:0;;10245:19:1;;57852:81:0;;;;;;;;;;;;57842:92;;;;;;57835:99;;57760:182;;13263:548;-1:-1:-1;;;;;13347:21:0;;13339:65;;;;-1:-1:-1;;;13339:65:0;;9856:2:1;13339:65:0;;;9838:21:1;9895:2;9875:18;;;9868:30;9934:33;9914:18;;;9907:61;9985:18;;13339:65:0;9654:355:1;13339:65:0;13495:6;13479:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;13650:18:0;;:9;:18;;;;;;;;;;;:28;;;;;;13705:37;1650:25:1;;;13705:37:0;;1623:18:1;13705:37:0;;;;;;;13263:548;;:::o;52974:244::-;53068:13;52376:4;52340:40;;53098:17;53094:117;;53139:15;53148:5;53139:8;:15::i;:::-;53132:22;;;;53094:117;53194:5;53187:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63705:207;-1:-1:-1;;;;;63826:14:0;;63765:15;63826:14;;;:7;:14;;;;;60350;;60487:1;60469:19;;;;60350:14;63887:17;63782:130;63705:207;;;:::o;58584:167::-;58661:7;58688:55;58710:20;:18;:20::i;:::-;58732:10;45455:4;45449:11;-1:-1:-1;;;45474:23:0;;45527:4;45518:14;;45511:39;;;;45580:4;45571:14;;45564:34;45635:4;45620:20;;;45252:406;43468:236;43553:7;43574:17;43593:18;43615:25;43626:4;43632:1;43635;43638;43615:10;:25::i;:::-;43573:67;;;;43651:18;43663:5;43651:11;:18::i;:::-;-1:-1:-1;43687:9:0;43468:236;-1:-1:-1;;;;;43468:236:0:o;51768:411::-;51989:14;;;52000:2;51989:14;;;;;;;;;51827:13;;52376:4;52340:40;;;51853:11;;51989:14;;;52000:2;;51989:14;;;-1:-1:-1;;;52082:16:0;;;-1:-1:-1;52128:4:0;52119:14;;52112:28;;;;-1:-1:-1;52082:16:0;51768:411::o;41852:1477::-;41940:7;;42874:66;42861:79;;42857:163;;;-1:-1:-1;42973:1:0;;-1:-1:-1;42977:30:0;42957:51;;42857:163;43134:24;;;43117:14;43134:24;;;;;;;;;10735:25:1;;;10808:4;10796:17;;10776:18;;;10769:45;;;;10830:18;;;10823:34;;;10873:18;;;10866:34;;;43134:24:0;;10707:19:1;;43134:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;43134:24:0;;-1:-1:-1;;43134:24:0;;;-1:-1:-1;;;;;;;43173:20:0;;43169:103;;43226:1;43230:29;43210:50;;;;;;;43169:103;43292:6;-1:-1:-1;43300:20:0;;-1:-1:-1;41852:1477:0;;;;;;;;:::o;37312:521::-;37390:20;37381:5;:29;;;;;;;;:::i;:::-;;37377:449;;37312:521;:::o;37377:449::-;37488:29;37479:5;:38;;;;;;;;:::i;:::-;;37475:351;;37534:34;;-1:-1:-1;;;37534:34:0;;11245:2:1;37534:34:0;;;11227:21:1;11284:2;11264:18;;;11257:30;11323:26;11303:18;;;11296:54;11367:18;;37534:34:0;11043:348:1;37475:351:0;37599:35;37590:5;:44;;;;;;;;:::i;:::-;;37586:240;;37651:41;;-1:-1:-1;;;37651:41:0;;11598:2:1;37651:41:0;;;11580:21:1;11637:2;11617:18;;;11610:30;11676:33;11656:18;;;11649:61;11727:18;;37651:41:0;11396:355:1;37586:240:0;37723:30;37714:5;:39;;;;;;;;:::i;:::-;;37710:116;;37770:44;;-1:-1:-1;;;37770:44:0;;11958:2:1;37770:44:0;;;11940:21:1;11997:2;11977:18;;;11970:30;12036:34;12016:18;;;12009:62;-1:-1:-1;;;12087:18:1;;;12080:32;12129:19;;37770:44:0;11756:398:1;37710:116:0;37312:521;:::o;14:423:1:-;56:3;94:5;88:12;121:6;116:3;109:19;146:1;156:162;170:6;167:1;164:13;156:162;;;232:4;288:13;;;284:22;;278:29;260:11;;;256:20;;249:59;185:12;156:162;;;160:3;363:1;356:4;347:6;342:3;338:16;334:27;327:38;426:4;419:2;415:7;410:2;402:6;398:15;394:29;389:3;385:39;381:50;374:57;;;14:423;;;;:::o;442:220::-;591:2;580:9;573:21;554:4;611:45;652:2;641:9;637:18;629:6;611:45;:::i;:::-;603:53;442:220;-1:-1:-1;;;442:220:1:o;875:173::-;943:20;;-1:-1:-1;;;;;992:31:1;;982:42;;972:70;;1038:1;1035;1028:12;972:70;875:173;;;:::o;1053:254::-;1121:6;1129;1182:2;1170:9;1161:7;1157:23;1153:32;1150:52;;;1198:1;1195;1188:12;1150:52;1221:29;1240:9;1221:29;:::i;:::-;1211:39;1297:2;1282:18;;;;1269:32;;-1:-1:-1;;;1053:254:1:o;1686:328::-;1763:6;1771;1779;1832:2;1820:9;1811:7;1807:23;1803:32;1800:52;;;1848:1;1845;1838:12;1800:52;1871:29;1890:9;1871:29;:::i;:::-;1861:39;;1919:38;1953:2;1942:9;1938:18;1919:38;:::i;:::-;1909:48;;2004:2;1993:9;1989:18;1976:32;1966:42;;1686:328;;;;;:::o;2390:186::-;2449:6;2502:2;2490:9;2481:7;2477:23;2473:32;2470:52;;;2518:1;2515;2508:12;2470:52;2541:29;2560:9;2541:29;:::i;2581:1259::-;2987:3;2982;2978:13;2970:6;2966:26;2955:9;2948:45;2929:4;3012:2;3050:3;3045:2;3034:9;3030:18;3023:31;3077:46;3118:3;3107:9;3103:19;3095:6;3077:46;:::i;:::-;3171:9;3163:6;3159:22;3154:2;3143:9;3139:18;3132:50;3205:33;3231:6;3223;3205:33;:::i;:::-;3269:2;3254:18;;3247:34;;;-1:-1:-1;;;;;3318:32:1;;3312:3;3297:19;;3290:61;3338:3;3367:19;;3360:35;;;3432:22;;;3426:3;3411:19;;3404:51;3504:13;;3526:22;;;3602:15;;;;-1:-1:-1;3564:15:1;;;;-1:-1:-1;3645:169:1;3659:6;3656:1;3653:13;3645:169;;;3720:13;;3708:26;;3789:15;;;;3754:12;;;;3681:1;3674:9;3645:169;;;-1:-1:-1;3831:3:1;;2581:1259;-1:-1:-1;;;;;;;;;;;;2581:1259:1:o;3845:693::-;3956:6;3964;3972;3980;3988;3996;4004;4057:3;4045:9;4036:7;4032:23;4028:33;4025:53;;;4074:1;4071;4064:12;4025:53;4097:29;4116:9;4097:29;:::i;:::-;4087:39;;4145:38;4179:2;4168:9;4164:18;4145:38;:::i;:::-;4135:48;;4230:2;4219:9;4215:18;4202:32;4192:42;;4281:2;4270:9;4266:18;4253:32;4243:42;;4335:3;4324:9;4320:19;4307:33;4380:4;4373:5;4369:16;4362:5;4359:27;4349:55;;4400:1;4397;4390:12;4349:55;3845:693;;;;-1:-1:-1;3845:693:1;;;;4423:5;4475:3;4460:19;;4447:33;;-1:-1:-1;4527:3:1;4512:19;;;4499:33;;3845:693;-1:-1:-1;;3845:693:1:o;4543:260::-;4611:6;4619;4672:2;4660:9;4651:7;4647:23;4643:32;4640:52;;;4688:1;4685;4678:12;4640:52;4711:29;4730:9;4711:29;:::i;:::-;4701:39;;4759:38;4793:2;4782:9;4778:18;4759:38;:::i;:::-;4749:48;;4543:260;;;;;:::o;4808:380::-;4887:1;4883:12;;;;4930;;;4951:61;;5005:4;4997:6;4993:17;4983:27;;4951:61;5058:2;5050:6;5047:14;5027:18;5024:38;5021:161;;5104:10;5099:3;5095:20;5092:1;5085:31;5139:4;5136:1;5129:15;5167:4;5164:1;5157:15;5193:222;5258:9;;;5279:10;;;5276:133;;;5331:10;5326:3;5322:20;5319:1;5312:31;5366:4;5363:1;5356:15;5394:4;5391:1;5384:15;10911:127;10972:10;10967:3;10963:20;10960:1;10953:31;11003:4;11000:1;10993:15;11027:4;11024:1;11017:15
Swarm Source
ipfs://a692786301f8fc5753982d52f4f683566b0e99f55fb78794411a18a8b3b09cb5