Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| 0x6101a060 | 19963228 | 643 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
LPToken
Compiler Version
v0.8.22+commit.4fc1097e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-07-17 */ // Sources flattened with hardhat v2.22.3 https://hardhat.org // SPDX-License-Identifier: BUSL-1.1 AND MIT // File @openzeppelin/contracts/token/ERC20/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @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); } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File @openzeppelin/contracts/token/ERC20/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @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 {} } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ 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]. * * CAUTION: See Security Considerations above. */ 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); } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @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; } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. 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); } } } // File @openzeppelin/contracts/utils/math/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @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); } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @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)); } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; /** * @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)); } } // File @openzeppelin/contracts/interfaces/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.0; 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 ); } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @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 } } } // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol) pragma solidity ^0.8.8; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | 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 using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * 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 { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @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 = byteLength(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 byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @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(_FALLBACK_SENTINEL); } } /** * @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 (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.8; /** * @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)"); // 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; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @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}. * * _Available since v4.9._ */ 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) ); } } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/ERC20Permit.sol) pragma solidity ^0.8.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") {} /** * @inheritdoc IERC20Permit */ 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); } /** * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @inheritdoc IERC20Permit */ // 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(); } } // File src/utils/LPToken.sol // Original license: SPDX_License_Identifier: BUSL-1.1 pragma solidity ^0.8.22; /// @title A contract representing an ERC20Permit used for representing liquidity pool ownership. contract LPToken is ERC20Permit { address public immutable stargate; uint8 internal immutable tokenDecimals; error LPToken_Unauthorized(); modifier onlyStargate() { if (msg.sender != stargate) revert LPToken_Unauthorized(); _; } /** * @notice Create a LP token to represent partial pool ownership. * @dev The sender of the message is set to the Stargate role. This is because it is expected that each * StargatePool will create its own LPToken. * @param _name The name of the ERC20 * @param _symbol The symbol for the ERC20 * @param _decimals How many decimals does the ERC20 has */ constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol) ERC20Permit(_name) { stargate = msg.sender; tokenDecimals = _decimals; } /// @notice Mint new LP tokens and transfer them to an account. /// @param _to The account to send the newly minted tokens to /// @param _amount How many tokens to mint function mint(address _to, uint256 _amount) external onlyStargate { _mint(_to, _amount); } /// @notice Burn tokens currently owned by an account. /// @param _from The account to burn the tokens from /// @param _amount How many tokens to burn function burnFrom(address _from, uint256 _amount) external onlyStargate { _burn(_from, _amount); } /// @notice How many decimals are used by this token. /// @return The amount of decimals function decimals() public view override returns (uint8) { return tokenDecimals; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"LPToken_Unauthorized","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","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":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"stargate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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
6101a06040523480156200001257600080fd5b5060405162001c0f38038062001c0f833981016040819052620000359162000292565b6040805180820190915260018152603160f81b60208201528390819081856003620000618382620003a8565b506004620000708282620003a8565b50620000829150839050600562000140565b610120526200009381600662000140565b61014052815160208084019190912060e052815190820120610100524660a0526200012160e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c05250336101605260ff166101805250620004ce9050565b60006020835110156200016057620001588362000179565b905062000173565b816200016d8482620003a8565b5060ff90505b92915050565b600080829050601f81511115620001b0578260405163305a27a960e01b8152600401620001a7919062000474565b60405180910390fd5b8051620001bd82620004a9565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001f8578181015183820152602001620001de565b50506000910152565b600082601f8301126200021357600080fd5b81516001600160401b0380821115620002305762000230620001c5565b604051601f8301601f19908116603f011681019082821181831017156200025b576200025b620001c5565b816040528381528660208588010111156200027557600080fd5b62000288846020830160208901620001db565b9695505050505050565b600080600060608486031215620002a857600080fd5b83516001600160401b0380821115620002c057600080fd5b620002ce8783880162000201565b94506020860151915080821115620002e557600080fd5b50620002f48682870162000201565b925050604084015160ff811681146200030c57600080fd5b809150509250925092565b600181811c908216806200032c57607f821691505b6020821081036200034d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a3576000816000526020600020601f850160051c810160208610156200037e5750805b601f850160051c820191505b818110156200039f578281556001016200038a565b5050505b505050565b81516001600160401b03811115620003c457620003c4620001c5565b620003dc81620003d5845462000317565b8462000353565b602080601f831160018114620004145760008415620003fb5750858301515b600019600386901b1c1916600185901b1785556200039f565b600085815260208120601f198616915b82811015620004455788860151825594840194600190910190840162000424565b5085821015620004645787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b602081526000825180602084015262000495816040850160208701620001db565b601f01601f19169190910160400192915050565b805160208083015191908110156200034d5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610180516116c26200054d60003960006101a80152600081816102070152818161044e01526104be015260006105760152600061054b01526000610ce201526000610cba01526000610c1501526000610c3f01526000610c6901526116c26000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c806370a08231116100b257806395d89b4111610081578063a9059cbb11610066578063a9059cbb146102c6578063d505accf146102d9578063dd62ed3e146102ec57600080fd5b806395d89b41146102ab578063a457c2d7146102b357600080fd5b806370a082311461024157806379cc67901461026a5780637ecebe001461027d57806384b0196e1461029057600080fd5b8063313ce5671161010957806339509351116100ee57806339509351146101da57806340c10f19146101ed5780636c099dee1461020257600080fd5b8063313ce567146101a15780633644e515146101d257600080fd5b806306fdde031461013b578063095ea7b31461015957806318160ddd1461017c57806323b872dd1461018e575b600080fd5b610143610325565b60405161015091906113c4565b60405180910390f35b61016c6101673660046113fa565b6103b7565b6040519015158152602001610150565b6002545b604051908152602001610150565b61016c61019c366004611424565b6103d1565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610150565b6101806103f5565b61016c6101e83660046113fa565b610404565b6102006101fb3660046113fa565b610443565b005b6102297f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610150565b61018061024f366004611460565b6001600160a01b031660009081526020819052604090205490565b6102006102783660046113fa565b6104b3565b61018061028b366004611460565b61051f565b61029861053d565b604051610150979695949392919061147b565b6101436105e2565b61016c6102c13660046113fa565b6105f1565b61016c6102d43660046113fa565b6106a0565b6102006102e7366004611530565b6106ae565b6101806102fa3660046115a3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b606060038054610334906115d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610360906115d6565b80156103ad5780601f10610382576101008083540402835291602001916103ad565b820191906000526020600020905b81548152906001019060200180831161039057829003601f168201915b5050505050905090565b6000336103c5818585610812565b60019150505b92915050565b6000336103df85828561096b565b6103ea858585610a1b565b506001949350505050565b60006103ff610c08565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906103c5908290869061043e908790611623565b610812565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104a5576040517fba06efeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af8282610d33565b5050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610515576040517fba06efeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af8282610df2565b6001600160a01b0381166000908152600760205260408120546103cb565b6000606080828080836105717f00000000000000000000000000000000000000000000000000000000000000006005610f53565b61059c7f00000000000000000000000000000000000000000000000000000000000000006006610f53565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b606060048054610334906115d6565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156106935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ea8286868403610812565b6000336103c5818585610a1b565b834211156106fe5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161068a565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861072d8c610ffe565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061078882611026565b905060006107988287878761106e565b9050896001600160a01b0316816001600160a01b0316146107fb5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161068a565b6108068a8a8a610812565b50505050505050505050565b6001600160a01b03831661088d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0382166109095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a155781811015610a085760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161068a565b610a158484848403610812565b50505050565b6001600160a01b038316610a975760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b038216610b135760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03831660009081526020819052604090205481811015610ba25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610a15565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610c6157507f000000000000000000000000000000000000000000000000000000000000000046145b15610c8b57507f000000000000000000000000000000000000000000000000000000000000000090565b6103ff604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216610d895760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161068a565b8060026000828254610d9b9190611623565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610e6e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03821660009081526020819052604090205481811015610efd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161095e565b606060ff8314610f6d57610f6683611096565b90506103cb565b818054610f79906115d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa5906115d6565b8015610ff25780601f10610fc757610100808354040283529160200191610ff2565b820191906000526020600020905b815481529060010190602001808311610fd557829003601f168201915b505050505090506103cb565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b60006103cb611033610c08565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061107f878787876110d5565b9150915061108c816111b7565b5095945050505050565b606060006110a38361131f565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561110c57506000905060036111ae565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611160573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166111a7576000600192509250506111ae565b9150600090505b94509492505050565b60008160048111156111cb576111cb61165d565b036111d35750565b60018160048111156111e7576111e761165d565b036112345760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161068a565b60028160048111156112485761124861165d565b036112955760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161068a565b60038160048111156112a9576112a961165d565b0361131c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b50565b600060ff8216601f8111156103cb576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815180845260005b818110156113865760208185018101518683018201520161136a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006113d76020830184611360565b9392505050565b80356001600160a01b03811681146113f557600080fd5b919050565b6000806040838503121561140d57600080fd5b611416836113de565b946020939093013593505050565b60008060006060848603121561143957600080fd5b611442846113de565b9250611450602085016113de565b9150604084013590509250925092565b60006020828403121561147257600080fd5b6113d7826113de565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e060208401526114b860e084018a611360565b83810360408501526114ca818a611360565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561151e57835183529284019291840191600101611502565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561154b57600080fd5b611554886113de565b9650611562602089016113de565b95506040880135945060608801359350608088013560ff8116811461158657600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156115b657600080fd5b6115bf836113de565b91506115cd602084016113de565b90509250929050565b600181811c908216806115ea57607f821691505b602082108103611020577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b808201808211156103cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220b01be794a387189911d440646b5ba0a63c9fb90dcea8cee9cb89be9b6970d81b64736f6c63430008160033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000076d4554482d4c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006532a6d4554480000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101365760003560e01c806370a08231116100b257806395d89b4111610081578063a9059cbb11610066578063a9059cbb146102c6578063d505accf146102d9578063dd62ed3e146102ec57600080fd5b806395d89b41146102ab578063a457c2d7146102b357600080fd5b806370a082311461024157806379cc67901461026a5780637ecebe001461027d57806384b0196e1461029057600080fd5b8063313ce5671161010957806339509351116100ee57806339509351146101da57806340c10f19146101ed5780636c099dee1461020257600080fd5b8063313ce567146101a15780633644e515146101d257600080fd5b806306fdde031461013b578063095ea7b31461015957806318160ddd1461017c57806323b872dd1461018e575b600080fd5b610143610325565b60405161015091906113c4565b60405180910390f35b61016c6101673660046113fa565b6103b7565b6040519015158152602001610150565b6002545b604051908152602001610150565b61016c61019c366004611424565b6103d1565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000012168152602001610150565b6101806103f5565b61016c6101e83660046113fa565b610404565b6102006101fb3660046113fa565b610443565b005b6102297f000000000000000000000000268ca24daeff1fac2ed883c598200ccbb79e931d81565b6040516001600160a01b039091168152602001610150565b61018061024f366004611460565b6001600160a01b031660009081526020819052604090205490565b6102006102783660046113fa565b6104b3565b61018061028b366004611460565b61051f565b61029861053d565b604051610150979695949392919061147b565b6101436105e2565b61016c6102c13660046113fa565b6105f1565b61016c6102d43660046113fa565b6106a0565b6102006102e7366004611530565b6106ae565b6101806102fa3660046115a3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b606060038054610334906115d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610360906115d6565b80156103ad5780601f10610382576101008083540402835291602001916103ad565b820191906000526020600020905b81548152906001019060200180831161039057829003601f168201915b5050505050905090565b6000336103c5818585610812565b60019150505b92915050565b6000336103df85828561096b565b6103ea858585610a1b565b506001949350505050565b60006103ff610c08565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906103c5908290869061043e908790611623565b610812565b336001600160a01b037f000000000000000000000000268ca24daeff1fac2ed883c598200ccbb79e931d16146104a5576040517fba06efeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af8282610d33565b5050565b336001600160a01b037f000000000000000000000000268ca24daeff1fac2ed883c598200ccbb79e931d1614610515576040517fba06efeb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af8282610df2565b6001600160a01b0381166000908152600760205260408120546103cb565b6000606080828080836105717f6d4554482d4c50000000000000000000000000000000000000000000000000076005610f53565b61059c7f31000000000000000000000000000000000000000000000000000000000000016006610f53565b604080516000808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b606060048054610334906115d6565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156106935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103ea8286868403610812565b6000336103c5818585610a1b565b834211156106fe5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161068a565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861072d8c610ffe565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061078882611026565b905060006107988287878761106e565b9050896001600160a01b0316816001600160a01b0316146107fb5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161068a565b6108068a8a8a610812565b50505050505050505050565b6001600160a01b03831661088d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0382166109095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a155781811015610a085760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161068a565b610a158484848403610812565b50505050565b6001600160a01b038316610a975760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b038216610b135760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03831660009081526020819052604090205481811015610ba25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610a15565b6000306001600160a01b037f000000000000000000000000d646cd9dff77097b454a5a148beae6615e3bc2e216148015610c6157507f000000000000000000000000000000000000000000000000000000000000000146145b15610c8b57507f21a23e123e1ba6120dc07f8cec8425a71da59bb8cff4d43cb6a58b1eb8d7e56c90565b6103ff604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f23cbc7b9fecc8b7437771cb49ffcb85c050fd01d6e016659cc3be0511bea9e1a918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6001600160a01b038216610d895760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161068a565b8060026000828254610d9b9190611623565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b038216610e6e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b03821660009081526020819052604090205481811015610efd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161095e565b606060ff8314610f6d57610f6683611096565b90506103cb565b818054610f79906115d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa5906115d6565b8015610ff25780601f10610fc757610100808354040283529160200191610ff2565b820191906000526020600020905b815481529060010190602001808311610fd557829003601f168201915b505050505090506103cb565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b60006103cb611033610c08565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b600080600061107f878787876110d5565b9150915061108c816111b7565b5095945050505050565b606060006110a38361131f565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561110c57506000905060036111ae565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611160573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166111a7576000600192509250506111ae565b9150600090505b94509492505050565b60008160048111156111cb576111cb61165d565b036111d35750565b60018160048111156111e7576111e761165d565b036112345760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161068a565b60028160048111156112485761124861165d565b036112955760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161068a565b60038160048111156112a9576112a961165d565b0361131c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161068a565b50565b600060ff8216601f8111156103cb576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815180845260005b818110156113865760208185018101518683018201520161136a565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006113d76020830184611360565b9392505050565b80356001600160a01b03811681146113f557600080fd5b919050565b6000806040838503121561140d57600080fd5b611416836113de565b946020939093013593505050565b60008060006060848603121561143957600080fd5b611442846113de565b9250611450602085016113de565b9150604084013590509250925092565b60006020828403121561147257600080fd5b6113d7826113de565b7fff00000000000000000000000000000000000000000000000000000000000000881681526000602060e060208401526114b860e084018a611360565b83810360408501526114ca818a611360565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b8181101561151e57835183529284019291840191600101611502565b50909c9b505050505050505050505050565b600080600080600080600060e0888a03121561154b57600080fd5b611554886113de565b9650611562602089016113de565b95506040880135945060608801359350608088013560ff8116811461158657600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156115b657600080fd5b6115bf836113de565b91506115cd602084016113de565b90509250929050565b600181811c908216806115ea57607f821691505b602082108103611020577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b808201808211156103cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220b01be794a387189911d440646b5ba0a63c9fb90dcea8cee9cb89be9b6970d81b64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000076d4554482d4c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006532a6d4554480000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): mETH-LP
Arg [1] : _symbol (string): S*mETH
Arg [2] : _decimals (uint8): 18
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [4] : 6d4554482d4c5000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [6] : 532a6d4554480000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
69457:1667:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7078:100;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;9438:201;;;;;;:::i;:::-;;:::i;:::-;;;1351:14:1;;1344:22;1326:41;;1314:2;1299:18;9438:201:0;1186:187:1;8207:108:0;8295:12;;8207:108;;;1524:25:1;;;1512:2;1497:18;8207:108:0;1378:177:1;10219:261:0;;;;;;:::i;:::-;;:::i;71025:96::-;;;2065:4:1;71100:13:0;2053:17:1;2035:36;;2023:2;2008:18;71025:96:0;1893:184:1;68772:115:0;;;:::i;10889:238::-;;;;;;:::i;:::-;;:::i;70528:104::-;;;;;;:::i;:::-;;:::i;:::-;;69496:33;;;;;;;;-1:-1:-1;;;;;2428:55:1;;;2410:74;;2398:2;2383:18;69496:33:0;2264:226:1;8378:127:0;;;;;;:::i;:::-;-1:-1:-1;;;;;8479:18:0;8452:7;8479:18;;;;;;;;;;;;8378:127;70806:112;;;;;;:::i;:::-;;:::i;68531:128::-;;;;;;:::i;:::-;;:::i;65277:657::-;;;:::i;:::-;;;;;;;;;;;;;:::i;7297:104::-;;;:::i;11630:436::-;;;;;;:::i;:::-;;:::i;8711:193::-;;;;;;:::i;:::-;;:::i;67827:645::-;;;;;;:::i;:::-;;:::i;8967:151::-;;;;;;:::i;:::-;-1:-1:-1;;;;;9083:18:0;;;9056:7;9083:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;8967:151;7078:100;7132:13;7165:5;7158:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7078:100;:::o;9438:201::-;9521:4;4634:10;9577:32;4634:10;9593:7;9602:6;9577:8;:32::i;:::-;9627:4;9620:11;;;9438:201;;;;;:::o;10219:261::-;10316:4;4634:10;10374:38;10390:4;4634:10;10405:6;10374:15;:38::i;:::-;10423:27;10433:4;10439:2;10443:6;10423:9;:27::i;:::-;-1:-1:-1;10468:4:0;;10219:261;-1:-1:-1;;;;10219:261:0:o;68772:115::-;68832:7;68859:20;:18;:20::i;:::-;68852:27;;68772:115;:::o;10889:238::-;4634:10;10977:4;9083:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;9083:27:0;;;;;;;;;;10977:4;;4634:10;11033:64;;4634:10;;9083:27;;11058:38;;11086:10;;11058:38;:::i;:::-;11033:8;:64::i;70528:104::-;69659:10;-1:-1:-1;;;;;69673:8:0;69659:22;;69655:57;;69690:22;;;;;;;;;;;;;;69655:57;70605:19:::1;70611:3;70616:7;70605:5;:19::i;:::-;70528:104:::0;;:::o;70806:112::-;69659:10;-1:-1:-1;;;;;69673:8:0;69659:22;;69655:57;;69690:22;;;;;;;;;;;;;;69655:57;70889:21:::1;70895:5;70902:7;70889:5;:21::i;68531:128::-:0;-1:-1:-1;;;;;68627:14:0;;68600:7;68627:14;;;:7;:14;;;;;23088;68627:24;22996:114;65277:657;65398:13;65426:18;;65398:13;;;65426:18;65700:41;:5;65727:13;65700:26;:41::i;:::-;65756:47;:8;65786:16;65756:29;:47::i;:::-;65899:16;;;65882:1;65899:16;;;;;;;;;65647:279;;;;-1:-1:-1;65647:279:0;;-1:-1:-1;65818:13:0;;-1:-1:-1;65854:4:0;;-1:-1:-1;65882:1:0;-1:-1:-1;65899:16:0;-1:-1:-1;65647:279:0;-1:-1:-1;65277:657:0:o;7297:104::-;7353:13;7386:7;7379:14;;;;;:::i;11630:436::-;4634:10;11723:4;9083:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;9083:27:0;;;;;;;;;;11723:4;;4634:10;11870:15;11850:16;:35;;11842:85;;;;-1:-1:-1;;;11842:85:0;;6106:2:1;11842:85:0;;;6088:21:1;6145:2;6125:18;;;6118:30;6184:34;6164:18;;;6157:62;6255:7;6235:18;;;6228:35;6280:19;;11842:85:0;;;;;;;;;11963:60;11972:5;11979:7;12007:15;11988:16;:34;11963:8;:60::i;8711:193::-;8790:4;4634:10;8846:28;4634:10;8863:2;8867:6;8846:9;:28::i;67827:645::-;68071:8;68052:15;:27;;68044:69;;;;-1:-1:-1;;;68044:69:0;;6512:2:1;68044:69:0;;;6494:21:1;6551:2;6531:18;;;6524:30;6590:31;6570:18;;;6563:59;6639:18;;68044:69:0;6310:353:1;68044:69:0;68126:18;67009:95;68186:5;68193:7;68202:5;68209:16;68219:5;68209:9;:16::i;:::-;68157:79;;;;;;6955:25:1;;;;-1:-1:-1;;;;;7077:15:1;;;7057:18;;;7050:43;7129:15;;;;7109:18;;;7102:43;7161:18;;;7154:34;7204:19;;;7197:35;7248:19;;;7241:35;;;6927:19;;68157:79:0;;;;;;;;;;;;68147:90;;;;;;68126:111;;68250:12;68265:28;68282:10;68265:16;:28::i;:::-;68250:43;;68306:14;68323:28;68337:4;68343:1;68346;68349;68323:13;:28::i;:::-;68306:45;;68380:5;-1:-1:-1;;;;;68370:15:0;:6;-1:-1:-1;;;;;68370:15:0;;68362:58;;;;-1:-1:-1;;;68362:58:0;;7489:2:1;68362:58:0;;;7471:21:1;7528:2;7508:18;;;7501:30;7567:32;7547:18;;;7540:60;7617:18;;68362:58:0;7287:354:1;68362:58:0;68433:31;68442:5;68449:7;68458:5;68433:8;:31::i;:::-;68033:439;;;67827:645;;;;;;;:::o;15623:346::-;-1:-1:-1;;;;;15725:19:0;;15717:68;;;;-1:-1:-1;;;15717:68:0;;7848:2:1;15717:68:0;;;7830:21:1;7887:2;7867:18;;;7860:30;7926:34;7906:18;;;7899:62;7997:6;7977:18;;;7970:34;8021:19;;15717:68:0;7646:400:1;15717:68:0;-1:-1:-1;;;;;15804:21:0;;15796:68;;;;-1:-1:-1;;;15796:68:0;;8253:2:1;15796:68:0;;;8235:21:1;8292:2;8272:18;;;8265:30;8331:34;8311:18;;;8304:62;8402:4;8382:18;;;8375:32;8424:19;;15796:68:0;8051:398:1;15796:68:0;-1:-1:-1;;;;;15877:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;15929:32;;1524:25:1;;;15929:32:0;;1497:18:1;15929:32:0;;;;;;;;15623:346;;;:::o;16260:419::-;-1:-1:-1;;;;;9083:18:0;;;16361:24;9083:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;16448:17;16428:37;;16424:248;;16510:6;16490:16;:26;;16482:68;;;;-1:-1:-1;;;16482:68:0;;8656:2:1;16482:68:0;;;8638:21:1;8695:2;8675:18;;;8668:30;8734:31;8714:18;;;8707:59;8783:18;;16482:68:0;8454:353:1;16482:68:0;16594:51;16603:5;16610:7;16638:6;16619:16;:25;16594:8;:51::i;:::-;16350:329;16260:419;;;:::o;12536:806::-;-1:-1:-1;;;;;12633:18:0;;12625:68;;;;-1:-1:-1;;;12625:68:0;;9014:2:1;12625:68:0;;;8996:21:1;9053:2;9033:18;;;9026:30;9092:34;9072:18;;;9065:62;9163:7;9143:18;;;9136:35;9188:19;;12625:68:0;8812:401:1;12625:68:0;-1:-1:-1;;;;;12712:16:0;;12704:64;;;;-1:-1:-1;;;12704:64:0;;9420:2:1;12704:64:0;;;9402:21:1;9459:2;9439:18;;;9432:30;9498:34;9478:18;;;9471:62;9569:5;9549:18;;;9542:33;9592:19;;12704:64:0;9218:399:1;12704:64:0;-1:-1:-1;;;;;12854:15:0;;12832:19;12854:15;;;;;;;;;;;12888:21;;;;12880:72;;;;-1:-1:-1;;;12880:72:0;;9824:2:1;12880:72:0;;;9806:21:1;9863:2;9843:18;;;9836:30;9902:34;9882:18;;;9875:62;9973:8;9953:18;;;9946:36;9999:19;;12880:72:0;9622:402:1;12880:72:0;-1:-1:-1;;;;;12988:15:0;;;:9;:15;;;;;;;;;;;13006:20;;;12988:38;;13206:13;;;;;;;;;;:23;;;;;;13258:26;;1524:25:1;;;13206:13:0;;13258:26;;1497:18:1;13258:26:0;;;;;;;13297:37;14510:675;63915:268;63968:7;64000:4;-1:-1:-1;;;;;64009:11:0;63992:28;;:63;;;;;64041:14;64024:13;:31;63992:63;63988:188;;;-1:-1:-1;64079:22:0;;63915:268::o;63988:188::-;64141:23;64283:81;;;62107:95;64283:81;;;11453:25:1;64306:11:0;11494:18:1;;;11487:34;;;;64319:14:0;11537:18:1;;;11530:34;64335:13:0;11580:18:1;;;11573:34;64358:4:0;11623:19:1;;;11616:84;64246:7:0;;11425:19:1;;64283:81:0;;;;;;;;;;;;64273:92;;;;;;64266:99;;64191:182;;13629:548;-1:-1:-1;;;;;13713:21:0;;13705:65;;;;-1:-1:-1;;;13705:65:0;;10231:2:1;13705:65:0;;;10213:21:1;10270:2;10250:18;;;10243:30;10309:33;10289:18;;;10282:61;10360:18;;13705:65:0;10029:355:1;13705:65:0;13861:6;13845:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;14016:18:0;;:9;:18;;;;;;;;;;;:28;;;;;;14071:37;1524:25:1;;;14071:37:0;;1497:18:1;14071:37:0;;;;;;;70528:104;;:::o;14510:675::-;-1:-1:-1;;;;;14594:21:0;;14586:67;;;;-1:-1:-1;;;14586:67:0;;10591:2:1;14586:67:0;;;10573:21:1;10630:2;10610:18;;;10603:30;10669:34;10649:18;;;10642:62;10740:3;10720:18;;;10713:31;10761:19;;14586:67:0;10389:397:1;14586:67:0;-1:-1:-1;;;;;14753:18:0;;14728:22;14753:18;;;;;;;;;;;14790:24;;;;14782:71;;;;-1:-1:-1;;;14782:71:0;;10993:2:1;14782:71:0;;;10975:21:1;11032:2;11012:18;;;11005:30;11071:34;11051:18;;;11044:62;11142:4;11122:18;;;11115:32;11164:19;;14782:71:0;10791:398:1;14782:71:0;-1:-1:-1;;;;;14889:18:0;;:9;:18;;;;;;;;;;;14910:23;;;14889:44;;15028:12;:22;;;;;;;15079:37;1524:25:1;;;14889:9:0;;:18;15079:37;;1497:18:1;15079:37:0;1378:177:1;59198:274:0;59292:13;57143:66;59322:47;;59318:147;;59393:15;59402:5;59393:8;:15::i;:::-;59386:22;;;;59318:147;59448:5;59441:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;69025:207;-1:-1:-1;;;;;69146:14:0;;69085:15;69146:14;;;:7;:14;;;;;23088;;23225:1;23207:19;;;;23088:14;69207:17;69102:130;69025:207;;;:::o;65015:167::-;65092:7;65119:55;65141:20;:18;:20::i;:::-;65163:10;49878:4;49872:11;49909:10;49897:23;;49950:4;49941:14;;49934:39;;;;50003:4;49994:14;;49987:34;50058:4;50043:20;;;49675:406;47891:236;47976:7;47997:17;48016:18;48038:25;48049:4;48055:1;48058;48061;48038:10;:25::i;:::-;47996:67;;;;48074:18;48086:5;48074:11;:18::i;:::-;-1:-1:-1;48110:9:0;47891:236;-1:-1:-1;;;;;47891:236:0:o;57852:415::-;57911:13;57937:11;57951:16;57962:4;57951:10;:16::i;:::-;58077:14;;;58088:2;58077:14;;;;;;;;;57937:30;;-1:-1:-1;58057:17:0;;58077:14;;;;;;;;;-1:-1:-1;;;58170:16:0;;;-1:-1:-1;58216:4:0;58207:14;;58200:28;;;;-1:-1:-1;58170:16:0;57852:415::o;46275:1477::-;46363:7;;47297:66;47284:79;;47280:163;;;-1:-1:-1;47396:1:0;;-1:-1:-1;47400:30:0;47380:51;;47280:163;47557:24;;;47540:14;47557:24;;;;;;;;;11938:25:1;;;12011:4;11999:17;;11979:18;;;11972:45;;;;12033:18;;;12026:34;;;12076:18;;;12069:34;;;47557:24:0;;11910:19:1;;47557:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;47557:24:0;;;;;;-1:-1:-1;;;;;;;47596:20:0;;47592:103;;47649:1;47653:29;47633:50;;;;;;;47592:103;47715:6;-1:-1:-1;47723:20:0;;-1:-1:-1;46275:1477:0;;;;;;;;:::o;41735:521::-;41813:20;41804:5;:29;;;;;;;;:::i;:::-;;41800:449;;41735:521;:::o;41800:449::-;41911:29;41902:5;:38;;;;;;;;:::i;:::-;;41898:351;;41957:34;;-1:-1:-1;;;41957:34:0;;12505:2:1;41957:34:0;;;12487:21:1;12544:2;12524:18;;;12517:30;12583:26;12563:18;;;12556:54;12627:18;;41957:34:0;12303:348:1;41898:351:0;42022:35;42013:5;:44;;;;;;;;:::i;:::-;;42009:240;;42074:41;;-1:-1:-1;;;42074:41:0;;12858:2:1;42074:41:0;;;12840:21:1;12897:2;12877:18;;;12870:30;12936:33;12916:18;;;12909:61;12987:18;;42074:41:0;12656:355:1;42009:240:0;42146:30;42137:5;:39;;;;;;;;:::i;:::-;;42133:116;;42193:44;;-1:-1:-1;;;42193:44:0;;13218:2:1;42193:44:0;;;13200:21:1;13257:2;13237:18;;;13230:30;13296:34;13276:18;;;13269:62;13367:4;13347:18;;;13340:32;13389:19;;42193:44:0;13016:398:1;42133:116:0;41735:521;:::o;58344:251::-;58405:7;58478:4;58442:40;;58506:2;58497:11;;58493:71;;;58532:20;;;;;;;;;;;;;;14:482: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;485:4;415:66;410:2;402:6;398:15;394:88;389:3;385:98;381:109;374:116;;;14:482;;;;:::o;501:220::-;650:2;639:9;632:21;613:4;670:45;711:2;700:9;696:18;688:6;670:45;:::i;:::-;662:53;501:220;-1:-1:-1;;;501:220:1:o;726:196::-;794:20;;-1:-1:-1;;;;;843:54:1;;833:65;;823:93;;912:1;909;902:12;823:93;726:196;;;:::o;927:254::-;995:6;1003;1056:2;1044:9;1035:7;1031:23;1027:32;1024:52;;;1072:1;1069;1062:12;1024:52;1095:29;1114:9;1095:29;:::i;:::-;1085:39;1171:2;1156:18;;;;1143:32;;-1:-1:-1;;;927:254:1:o;1560:328::-;1637:6;1645;1653;1706:2;1694:9;1685:7;1681:23;1677:32;1674:52;;;1722:1;1719;1712:12;1674:52;1745:29;1764:9;1745:29;:::i;:::-;1735:39;;1793:38;1827:2;1816:9;1812:18;1793:38;:::i;:::-;1783:48;;1878:2;1867:9;1863:18;1850:32;1840:42;;1560:328;;;;;:::o;2495:186::-;2554:6;2607:2;2595:9;2586:7;2582:23;2578:32;2575:52;;;2623:1;2620;2613:12;2575:52;2646:29;2665:9;2646:29;:::i;2686:1335::-;3083:66;3075:6;3071:79;3060:9;3053:98;3034:4;3170:2;3208:3;3203:2;3192:9;3188:18;3181:31;3235:46;3276:3;3265:9;3261:19;3253:6;3235:46;:::i;:::-;3329:9;3321:6;3317:22;3312:2;3301:9;3297:18;3290:50;3363:33;3389:6;3381;3363:33;:::i;:::-;3427:2;3412:18;;3405:34;;;-1:-1:-1;;;;;3476:55:1;;3470:3;3455:19;;3448:84;3563:3;3548:19;;3541:35;;;3613:22;;;3607:3;3592:19;;3585:51;3685:13;;3707:22;;;3757:2;3783:15;;;;-1:-1:-1;3745:15:1;;;;-1:-1:-1;3826:169:1;3840:6;3837:1;3834:13;3826:169;;;3901:13;;3889:26;;3970:15;;;;3935:12;;;;3862:1;3855:9;3826:169;;;-1:-1:-1;4012:3:1;;2686:1335;-1:-1:-1;;;;;;;;;;;;2686:1335:1:o;4026:693::-;4137:6;4145;4153;4161;4169;4177;4185;4238:3;4226:9;4217:7;4213:23;4209:33;4206:53;;;4255:1;4252;4245:12;4206:53;4278:29;4297:9;4278:29;:::i;:::-;4268:39;;4326:38;4360:2;4349:9;4345:18;4326:38;:::i;:::-;4316:48;;4411:2;4400:9;4396:18;4383:32;4373:42;;4462:2;4451:9;4447:18;4434:32;4424:42;;4516:3;4505:9;4501:19;4488:33;4561:4;4554:5;4550:16;4543:5;4540:27;4530:55;;4581:1;4578;4571:12;4530:55;4026:693;;;;-1:-1:-1;4026:693:1;;;;4604:5;4656:3;4641:19;;4628:33;;-1:-1:-1;4708:3:1;4693:19;;;4680:33;;4026:693;-1:-1:-1;;4026:693:1:o;4724:260::-;4792:6;4800;4853:2;4841:9;4832:7;4828:23;4824:32;4821:52;;;4869:1;4866;4859:12;4821:52;4892:29;4911:9;4892:29;:::i;:::-;4882:39;;4940:38;4974:2;4963:9;4959:18;4940:38;:::i;:::-;4930:48;;4724:260;;;;;:::o;4989:437::-;5068:1;5064:12;;;;5111;;;5132:61;;5186:4;5178:6;5174:17;5164:27;;5132:61;5239:2;5231:6;5228:14;5208:18;5205:38;5202:218;;5276:77;5273:1;5266:88;5377:4;5374:1;5367:15;5405:4;5402:1;5395:15;5431:279;5496:9;;;5517:10;;;5514:190;;;5560:77;5557:1;5550:88;5661:4;5658:1;5651:15;5689:4;5686:1;5679:15;12114:184;12166:77;12163:1;12156:88;12263:4;12260:1;12253:15;12287:4;12284:1;12277:15
Swarm Source
ipfs://b01be794a387189911d440646b5ba0a63c9fb90dcea8cee9cb89be9b6970d81b
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.