Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SAMA
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-06-23
*/
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
/**
* @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);
}
}
}
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
*/
interface IAccessControlEnumerable is IAccessControl {
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) external view returns (address);
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) external view returns (uint256);
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```solidity
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.
*/
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
using EnumerableSet for EnumerableSet.AddressSet;
mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns one of the accounts that have `role`. `index` must be a
* value between 0 and {getRoleMemberCount}, non-inclusive.
*
* Role bearers are not sorted in any particular way, and their ordering may
* change at any point.
*
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
* you perform all queries on the same block. See the following
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
* for more information.
*/
function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
return _roleMembers[role].at(index);
}
/**
* @dev Returns the number of accounts that have `role`. Can be used
* together with {getRoleMember} to enumerate all bearers of a role.
*/
function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
return _roleMembers[role].length();
}
/**
* @dev Overload {_grantRole} to track enumerable memberships
*/
function _grantRole(bytes32 role, address account) internal virtual override {
super._grantRole(role, account);
_roleMembers[role].add(account);
}
/**
* @dev Overload {_revokeRole} to track enumerable memberships
*/
function _revokeRole(bytes32 role, address account) internal virtual override {
super._revokeRole(role, account);
_roleMembers[role].remove(account);
}
}
/**
* @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);
}
/**
* @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);
}
/**
* @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 {}
}
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
/**
* @dev 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));
}
}
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}
/**
* @dev 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
}
}
}
// | 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;
}
}
}
/**
* @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)
);
}
}
/**
* @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* _Available since v3.4._
*/
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
// solhint-disable-next-line var-name-mixedcase
bytes32 private constant _PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
/**
* @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
* However, to ensure consistency with the upgradeable transpiler, we will continue
* to reserve a slot.
* @custom:oz-renamed-from _PERMIT_TYPEHASH
*/
// solhint-disable-next-line var-name-mixedcase
bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;
/**
* @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
*
* It's a good idea to use the same `name` that is defined as the ERC20 token name.
*/
constructor(string memory name) EIP712(name, "1") {}
/**
* @dev See {IERC20Permit-permit}.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, v, r, s);
require(signer == owner, "ERC20Permit: invalid signature");
_approve(owner, spender, value);
}
/**
* @dev See {IERC20Permit-nonces}.
*/
function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}
/**
* @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view override returns (bytes32) {
return _domainSeparatorV4();
}
/**
* @dev "Consume a nonce": return the current value and increment.
*
* _Available since v4.1._
*/
function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}
}
// WARNING!!!
// Combining BoringBatchable with msg.value can cause double spending issues
// https://www.paradigm.xyz/2021/08/two-rights-might-make-a-wrong/
contract BoringBatchable {
error BatchError(bytes innerError);
/// @dev Helper function to extract a useful revert message from a failed call.
/// If the returned data is malformed or not correctly abi encoded then this call can fail itself.
function _getRevertMsg(bytes memory _returnData) internal pure {
// If the _res length is less than 68, then
// the transaction failed with custom error or silently (without a revert message)
if (_returnData.length < 68) revert BatchError(_returnData);
assembly {
// Slice the sighash.
_returnData := add(_returnData, 0x04)
}
revert(abi.decode(_returnData, (string))); // All that remains is the revert string
}
/// @notice Allows batched call to self (this contract).
/// @param calls An array of inputs for each call.
/// @param revertOnFail If True then reverts after a failed call and stops doing further calls.
// F1: External is ok here because this is the batch function, adding it to a batch makes no sense
// F2: Calls in the batch may be payable, delegatecall operates in the same context, so each call in the batch has access to msg.value
// C3: The length of the loop is fully under user control, so can't be exploited
// C7: Delegatecall is only used on the same contract, so it's safe
function batch(bytes[] calldata calls, bool revertOnFail) external payable {
for (uint256 i = 0; i < calls.length; i++) {
(bool success, bytes memory result) = address(this).delegatecall(
calls[i]
);
if (!success && revertOnFail) {
_getRevertMsg(result);
}
}
}
}
interface IBridgeMintable {
function proxyMintBatch(
address _minter,
address _account,
uint256[] calldata _ids,
uint256[] calldata _amounts,
bytes memory _data
) external;
}
interface ITransferListener {
function onTransfer(
address operator,
address src,
address dst,
uint256 amount
) external;
}
contract SAMA is
Context,
BoringBatchable,
AccessControlEnumerable,
ERC20Permit,
IBridgeMintable
{
bytes32 public constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE");
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
// ice king can freeze accounts or pause the contract
bytes32 public constant ICE_KING_ROLE = keccak256("ICE_KING_ROLE");
// ice queen can mint, burn or transfer from frozen accounts
bytes32 public constant ICE_QUEEN_ROLE = keccak256("ICE_QUEEN_ROLE");
mapping(address => bool) private _frozenAccount;
uint256 private _cap;
address private _transferListener;
bool private _paused;
bool private _locked;
event TransferListenerSet(address transferListener);
event Locked(uint256 cap);
event Frozen(address account);
event Thawed(address account);
event Paused();
event Unpaused();
constructor(
string memory name,
string memory symbol,
uint256 cap_,
address _governance,
address _admin,
address _minter
) ERC20(name, symbol) ERC20Permit(name) {
_setRoleAdmin(GOVERNANCE_ROLE, GOVERNANCE_ROLE);
_setRoleAdmin(MINTER_ROLE, GOVERNANCE_ROLE);
_setRoleAdmin(ADMIN_ROLE, GOVERNANCE_ROLE);
_setRoleAdmin(ICE_KING_ROLE, GOVERNANCE_ROLE);
_setRoleAdmin(ICE_QUEEN_ROLE, GOVERNANCE_ROLE);
_setupRole(GOVERNANCE_ROLE, _governance);
if (cap_ == 0) {
_cap = type(uint256).max;
} else {
_cap = cap_;
}
if (_admin != address(0)) {
_setupRole(ADMIN_ROLE, _admin);
}
if (_minter != address(0)) {
_setupRole(MINTER_ROLE, _minter);
}
}
function cap() public view virtual returns (uint256) {
return _cap;
}
// alias for cap()
function maxSupply() public view virtual returns (uint256) {
return _cap;
}
function owner() public view returns (address) {
if (getRoleMemberCount(GOVERNANCE_ROLE) == 0) {
return address(0);
}
return getRoleMember(GOVERNANCE_ROLE, 0);
}
// Alias for owner()
function getOwner() public view returns (address) {
return owner();
}
// returns true if individual account is frozen
function isFrozen(address _account) public view returns (bool) {
return _frozenAccount[_account];
}
function paused() public view returns (bool) {
return _paused;
}
function transferListener() public view returns (address) {
return _transferListener;
}
function lock(uint256 newCap) external {
require(
hasRole(GOVERNANCE_ROLE, _msgSender()),
"SAMA::lock: forbidden"
);
require(!_locked, "SAMA::lock: already");
require(newCap >= ERC20.totalSupply(), "SAMA::lock: invalid");
_locked = true;
_cap = newCap;
emit Locked(newCap);
}
function governanceChange(address _newGovernance) external {
address oldGov = _msgSender();
require(hasRole(GOVERNANCE_ROLE, oldGov), "SAMA::govChange: forbidden");
_revokeRole(GOVERNANCE_ROLE, oldGov);
_grantRole(GOVERNANCE_ROLE, _newGovernance);
}
function setTransferListener(address _transferListener_) public virtual {
require(hasRole(ADMIN_ROLE, _msgSender()), "SAMA::setTL: forbidden");
_transferListener = _transferListener_;
emit TransferListenerSet(_transferListener_);
}
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
require(!isFrozen(_msgSender()), "SAMA::tx: frozen");
return super.transfer(to, amount);
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
require(!isFrozen(from), "SAMA::txFrom: frozen");
return super.transferFrom(from, to, amount);
}
function mint(address to, uint256 amount) public virtual {
require(hasRole(MINTER_ROLE, _msgSender()), "SAMA::mint: forbidden");
_mint(to, amount);
}
function burn(uint256 amount) public virtual {
address from = _msgSender();
require(!isFrozen(from), "SAMA::burn: frozen");
_burn(from, amount);
}
function burnFrom(address account, uint256 amount) public virtual {
require(!isFrozen(account), "SAMA::burnFrom: frozen");
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
// multiverse portal mint interface
function proxyMintBatch(
address /*_minter */,
address _account,
uint256[] calldata /* _ids */,
uint256[] calldata _amounts,
bytes memory /* _data */
) external {
require(hasRole(MINTER_ROLE, _msgSender()), "SAMA::mint: forbidden");
_mint(_account, _amounts[0]);
}
function pause() public virtual {
require(hasRole(ICE_KING_ROLE, _msgSender()), "SAMA::pause: forbidden");
require(!_paused, "SAMA::pause: already");
_paused = true;
emit Paused();
}
function unpause() public virtual {
require(
hasRole(ICE_KING_ROLE, _msgSender()),
"SAMA::unpause: forbidden"
);
require(_paused, "SAMA::unpause: not paused");
_paused = false;
emit Unpaused();
}
function freeze(address account) public virtual {
require(
hasRole(ICE_KING_ROLE, _msgSender()),
"SAMA::freeze: forbidden"
);
_frozenAccount[account] = true;
emit Frozen(account);
}
function thaw(address account) public virtual {
require(hasRole(ICE_KING_ROLE, _msgSender()), "SAMA::thaw: forbidden");
_frozenAccount[account] = false;
emit Thawed(account);
}
// mints to a frozen account or
// when the whole contract is paused
function frozenMintTo(address account, uint256 amount) public virtual {
require(hasRole(ICE_QUEEN_ROLE, _msgSender()), "SAMA::fmt: forbidden");
require(_paused || isFrozen(account), "SAMA::fmt: not frozen");
_mint(account, amount);
}
// burns from a frozen account
function frozenBurnFrom(address account, uint256 amount) public virtual {
require(hasRole(ICE_QUEEN_ROLE, _msgSender()), "SAMA::fbf: forbidden");
require(isFrozen(account), "SAMA::fbf: not frozen");
_burn(account, amount);
}
// transfer only from a specifically frozen account
function frozenTransferFrom(
address from,
address to,
uint256 amount
) public virtual {
require(hasRole(ICE_QUEEN_ROLE, _msgSender()), "SAMA::ftf: forbidden");
require(isFrozen(from), "SAMA::ftf: not frozen");
_transfer(from, to, amount);
}
function _mint(address account, uint256 amount) internal virtual override {
require(ERC20.totalSupply() + amount <= cap(), "SAMA: cap exceeded");
super._mint(account, amount);
}
function _grantRole(
bytes32 role,
address account
) internal virtual override {
if (role == GOVERNANCE_ROLE) {
require(
getRoleMemberCount(GOVERNANCE_ROLE) == 0,
"SAMA::grantR: gov already exists"
);
}
super._grantRole(role, account);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20) {
super._beforeTokenTransfer(from, to, amount);
address _sender = _msgSender();
require(
!_paused || hasRole(ICE_QUEEN_ROLE, _sender),
"SAMA::tx: frozen"
);
}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override(ERC20) {
super._afterTokenTransfer(from, to, amount);
if (_transferListener != address(0)) {
try
ITransferListener(_transferListener).onTransfer(
_msgSender(),
from,
to,
amount
)
{} catch {}
}
}
}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":"uint256","name":"cap_","type":"uint256"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_minter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"innerError","type":"bytes"}],"name":"BatchError","type":"error"},{"inputs":[],"name":"InvalidShortString","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Thawed","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"transferListener","type":"address"}],"name":"TransferListenerSet","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GOVERNANCE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ICE_KING_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ICE_QUEEN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","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":"bytes[]","name":"calls","type":"bytes[]"},{"internalType":"bool","name":"revertOnFail","type":"bool"}],"name":"batch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"frozenBurnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"frozenMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"frozenTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newGovernance","type":"address"}],"name":"governanceChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"proxyMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_transferListener_","type":"address"}],"name":"setTransferListener","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"thaw","outputs":[],"stateMutability":"nonpayable","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"},{"inputs":[],"name":"transferListener","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6101606040523480156200001257600080fd5b5060405162003cb838038062003cb883398101604081905262000035916200065d565b6040805180820190915260018152603160f81b6020820152869081908188600562000061838262000795565b50600662000070828262000795565b506200008291508390506007620002a8565b6101205262000093816008620002a8565b61014052815160208084019190912060e052815190820120610100524660a0526200012160e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200014660008051602062003c5883398151915280620002e1565b6200017060008051602062003c7883398151915260008051602062003c58833981519152620002e1565b6200019a60008051602062003c9883398151915260008051602062003c58833981519152620002e1565b620001d57fbb92eab1ca3c67bc0dc88c778861afee62b67dcedea70454cb7d81131f472ef060008051602062003c58833981519152620002e1565b620002107f2caf2a45785e5e236d02aef43cf5c418eb8efbb7c865a0042c3a49873586e9b760008051602062003c58833981519152620002e1565b6200022b60008051602062003c58833981519152846200032c565b836000036200024057600019600c5562000246565b600c8490555b6001600160a01b0382161562000271576200027160008051602062003c98833981519152836200032c565b6001600160a01b038116156200029c576200029c60008051602062003c78833981519152826200032c565b505050505050620008bb565b6000602083511015620002c857620002c0836200033c565b9050620002db565b81620002d5848262000795565b5060ff90505b92915050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000338828262000388565b5050565b600080829050601f8151111562000373578260405163305a27a960e01b81526004016200036a919062000861565b60405180910390fd5b8051620003808262000896565b179392505050565b60008051602062003c5883398151915282036200040857620003b960008051602062003c5883398151915262000414565b15620004085760405162461bcd60e51b815260206004820181905260248201527f53414d413a3a6772616e74523a20676f7620616c72656164792065786973747360448201526064016200036a565b6200033882826200042d565b6000818152600160205260408120620002db9062000458565b62000439828262000463565b600082815260016020526040902062000453908262000503565b505050565b6000620002db825490565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000338576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620004bf3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200051a836001600160a01b03841662000521565b9392505050565b60008181526001830160205260408120546200056a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002db565b506000620002db565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005a65781810151838201526020016200058c565b50506000910152565b600082601f830112620005c157600080fd5b81516001600160401b0380821115620005de57620005de62000573565b604051601f8301601f19908116603f0116810190828211818310171562000609576200060962000573565b816040528381528660208588010111156200062357600080fd5b6200063684602083016020890162000589565b9695505050505050565b80516001600160a01b03811681146200065857600080fd5b919050565b60008060008060008060c087890312156200067757600080fd5b86516001600160401b03808211156200068f57600080fd5b6200069d8a838b01620005af565b97506020890151915080821115620006b457600080fd5b50620006c389828a01620005af565b95505060408701519350620006db6060880162000640565b9250620006eb6080880162000640565b9150620006fb60a0880162000640565b90509295509295509295565b600181811c908216806200071c57607f821691505b6020821081036200073d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200045357600081815260208120601f850160051c810160208610156200076c5750805b601f850160051c820191505b818110156200078d5782815560010162000778565b505050505050565b81516001600160401b03811115620007b157620007b162000573565b620007c981620007c2845462000707565b8462000743565b602080601f831160018114620008015760008415620007e85750858301515b600019600386901b1c1916600185901b1785556200078d565b600085815260208120601f198616915b82811015620008325788860151825594840194600190910190840162000811565b5085821015620008515787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600082518060208401526200088281604085016020870162000589565b601f01601f19169190910160400192915050565b805160208083015191908110156200073d5760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516133426200091660003960006112c70152600061129c01526000611d1a01526000611cf201526000611c4d01526000611c7701526000611ca101526133426000f3fe6080604052600436106102e45760003560e01c806379cc679011610190578063ca15c873116100dc578063d83a1b9c11610095578063e58398361161006f578063e5839836146108c1578063e7d2350f146108e1578063f36c8f5c14610901578063f52d26711461092357600080fd5b8063d83a1b9c1461085f578063dd46706414610881578063dd62ed3e146108a157600080fd5b8063ca15c873146107b8578063d2423b51146107d8578063d505accf146107eb578063d53913931461080b578063d547741f1461083f578063d5abeb011461044d57600080fd5b80638da5cb5b1161014957806395d89b411161012357806395d89b411461074e578063a217fddf14610763578063a457c2d714610778578063a9059cbb1461079857600080fd5b80638da5cb5b146106f95780639010d07c1461070e57806391d148541461072e57600080fd5b806379cc6790146106475780637ecebe00146106675780638456cb591461068757806384b0196e1461069c578063893d20e8146106c45780638d1fdf2f146106d957600080fd5b806336568abe1161024f57806342966c68116102085780635c975abb116101e25780635c975abb1461059e5780635ea20216146105bd57806370a08231146105dd57806375b238fc1461061357600080fd5b806342966c681461052c5780634e68a16f1461054c578063538ee0071461056c57600080fd5b806336568abe1461047757806339509351146104975780633f4ba83a146104b757806340c10f19146104cc578063417518c8146104ec578063427bae4c1461050c57600080fd5b806323b872dd116102a157806323b872dd146103c1578063248a9ca3146103e15780632f2ff15d14610411578063313ce56714610431578063355274ea1461044d5780633644e5151461046257600080fd5b806301ffc9a7146102e957806306fdde031461031e578063095ea7b31461034057806318160ddd146103605780631e2b10db1461037f5780632376bf3f146103a1575b600080fd5b3480156102f557600080fd5b50610309610304366004612b9d565b610945565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b50610333610970565b6040516103159190612c17565b34801561034c57600080fd5b5061030961035b366004612c46565b610a02565b34801561036c57600080fd5b506004545b604051908152602001610315565b34801561038b57600080fd5b5061039f61039a366004612d2b565b610a1a565b005b3480156103ad57600080fd5b5061039f6103bc366004612e23565b610ab9565b3480156103cd57600080fd5b506103096103dc366004612e3e565b610b7d565b3480156103ed57600080fd5b506103716103fc366004612e7a565b60009081526020819052604090206001015490565b34801561041d57600080fd5b5061039f61042c366004612e93565b610bdf565b34801561043d57600080fd5b5060405160128152602001610315565b34801561045957600080fd5b50600c54610371565b34801561046e57600080fd5b50610371610c09565b34801561048357600080fd5b5061039f610492366004612e93565b610c18565b3480156104a357600080fd5b506103096104b2366004612c46565b610c96565b3480156104c357600080fd5b5061039f610cb8565b3480156104d857600080fd5b5061039f6104e7366004612c46565b610dad565b3480156104f857600080fd5b5061039f610507366004612c46565b610e25565b34801561051857600080fd5b5061039f610527366004612e23565b610ee0565b34801561053857600080fd5b5061039f610547366004612e7a565b610f75565b34801561055857600080fd5b5061039f610567366004612c46565b610fcb565b34801561057857600080fd5b50600d546001600160a01b03165b6040516001600160a01b039091168152602001610315565b3480156105aa57600080fd5b50600d54600160a01b900460ff16610309565b3480156105c957600080fd5b5061039f6105d8366004612e23565b61107d565b3480156105e957600080fd5b506103716105f8366004612e23565b6001600160a01b031660009081526002602052604090205490565b34801561061f57600080fd5b506103717fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561065357600080fd5b5061039f610662366004612c46565b61112a565b34801561067357600080fd5b50610371610682366004612e23565b611184565b34801561069357600080fd5b5061039f6111a2565b3480156106a857600080fd5b506106b161128e565b6040516103159796959493929190612ebf565b3480156106d057600080fd5b50610586611317565b3480156106e557600080fd5b5061039f6106f4366004612e23565b611321565b34801561070557600080fd5b506105866113d9565b34801561071a57600080fd5b50610586610729366004612f55565b611414565b34801561073a57600080fd5b50610309610749366004612e93565b611433565b34801561075a57600080fd5b5061033361145c565b34801561076f57600080fd5b50610371600081565b34801561078457600080fd5b50610309610793366004612c46565b61146b565b3480156107a457600080fd5b506103096107b3366004612c46565b6114f1565b3480156107c457600080fd5b506103716107d3366004612e7a565b611546565b61039f6107e6366004612f77565b61155d565b3480156107f757600080fd5b5061039f610806366004612fd3565b611617565b34801561081757600080fd5b506103717f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561084b57600080fd5b5061039f61085a366004612e93565b61177b565b34801561086b57600080fd5b506103716000805160206132ed83398151915281565b34801561088d57600080fd5b5061039f61089c366004612e7a565b6117a0565b3480156108ad57600080fd5b506103716108bc366004613046565b6118de565b3480156108cd57600080fd5b506103096108dc366004612e23565b611909565b3480156108ed57600080fd5b5061039f6108fc366004612e3e565b611927565b34801561090d57600080fd5b506103716000805160206132ad83398151915281565b34801561092f57600080fd5b506103716000805160206132cd83398151915281565b60006001600160e01b03198216635a05180f60e01b148061096a575061096a826119da565b92915050565b60606005805461097f90613070565b80601f01602080910402602001604051908101604052809291908181526020018280546109ab90613070565b80156109f85780601f106109cd576101008083540402835291602001916109f8565b820191906000526020600020905b8154815290600101906020018083116109db57829003601f168201915b5050505050905090565b600033610a10818585611a0f565b5060019392505050565b610a447f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611433565b610a8d5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d36b4b73a1d103337b93134b23232b760591b60448201526064015b60405180910390fd5b610ab08684846000818110610aa457610aa46130a4565b90506020020135611b33565b50505050505050565b610ae37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611433565b610b285760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d39b2ba2a261d103337b93134b23232b760511b6044820152606401610a84565b600d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f07ffdf1fcb4599bf7f2c226435209af2bf5d6da04e0d8afe0f302d88580f14c4906020015b60405180910390a150565b6000610b8884611909565b15610bcc5760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3a3c233937b69d10333937bd32b760611b6044820152606401610a84565b610bd7848484611b97565b949350505050565b600082815260208190526040902060010154610bfa81611bb0565b610c048383611bbd565b505050565b6000610c13611c40565b905090565b6001600160a01b0381163314610c885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a84565b610c928282611d6b565b5050565b600033610a10818585610ca983836118de565b610cb391906130d0565b611a0f565b610cd06000805160206132ed83398151915233611433565b610d1c5760405162461bcd60e51b815260206004820152601860248201527f53414d413a3a756e70617573653a20666f7262696464656e00000000000000006044820152606401610a84565b600d54600160a01b900460ff16610d755760405162461bcd60e51b815260206004820152601960248201527f53414d413a3a756e70617573653a206e6f7420706175736564000000000000006044820152606401610a84565b600d805460ff60a01b191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b610dd77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611433565b610e1b5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d36b4b73a1d103337b93134b23232b760591b6044820152606401610a84565b610c928282611b33565b610e3d6000805160206132cd83398151915233611433565b610e805760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3336ba1d103337b93134b23232b760611b6044820152606401610a84565b600d54600160a01b900460ff1680610e9c5750610e9c82611909565b610e1b5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3336ba1d103737ba10333937bd32b760591b6044820152606401610a84565b33610ef96000805160206132ad83398151915282611433565b610f455760405162461bcd60e51b815260206004820152601a60248201527f53414d413a3a676f764368616e67653a20666f7262696464656e0000000000006044820152606401610a84565b610f5d6000805160206132ad83398151915282611d6b565b610c926000805160206132ad83398151915283611bbd565b33610f7f81611909565b15610fc15760405162461bcd60e51b815260206004820152601260248201527129a0a6a09d1d313ab9371d10333937bd32b760711b6044820152606401610a84565b610c928183611d8d565b610fe36000805160206132cd83398151915233611433565b6110265760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3331331d103337b93134b23232b760611b6044820152606401610a84565b61102f82611909565b6110735760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3331331d103737ba10333937bd32b760591b6044820152606401610a84565b610c928282611d8d565b6110956000805160206132ed83398151915233611433565b6110d95760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3a3430bb9d103337b93134b23232b760591b6044820152606401610a84565b6001600160a01b0381166000818152600b6020908152604091829020805460ff1916905590519182527f6fda897d48d5c966a4c6312d6d9776784d44f0aa4d9954a453d4a5a14bf65e8e9101610b72565b61113382611909565b156111795760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d313ab937233937b69d10333937bd32b760511b6044820152606401610a84565b611073823383611ed4565b6001600160a01b03811660009081526009602052604081205461096a565b6111ba6000805160206132ed83398151915233611433565b6111ff5760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d3830bab9b29d103337b93134b23232b760511b6044820152606401610a84565b600d54600160a01b900460ff16156112505760405162461bcd60e51b815260206004820152601460248201527353414d413a3a70617573653a20616c726561647960601b6044820152606401610a84565b600d805460ff60a01b1916600160a01b1790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000606080828080836112c27f00000000000000000000000000000000000000000000000000000000000000006007611f48565b6112ed7f00000000000000000000000000000000000000000000000000000000000000006008611f48565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610c136113d9565b6113396000805160206132ed83398151915233611433565b6113855760405162461bcd60e51b815260206004820152601760248201527f53414d413a3a667265657a653a20666f7262696464656e0000000000000000006044820152606401610a84565b6001600160a01b0381166000818152600b6020908152604091829020805460ff1916600117905590519182527f8a5c4736a33c7b7f29a2c34ea9ff9608afc5718d56f6fd6dcbd2d3711a1a49139101610b72565b60006113f26000805160206132ad833981519152611546565b6000036113ff5750600090565b610c136000805160206132ad83398151915260005b600082815260016020526040812061142c9083611ff3565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461097f90613070565b6000338161147982866118de565b9050838110156114d95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a84565b6114e68286868403611a0f565b506001949350505050565b60006114fc33611909565b1561153c5760405162461bcd60e51b815260206004820152601060248201526f29a0a6a09d1d3a3c1d10333937bd32b760811b6044820152606401610a84565b61142c8383611fff565b600081815260016020526040812061096a9061200d565b60005b82811015611611576000803086868581811061157e5761157e6130a4565b905060200281019061159091906130e3565b60405161159e92919061312a565b600060405180830381855af49150503d80600081146115d9576040519150601f19603f3d011682016040523d82523d6000602084013e6115de565b606091505b5091509150811580156115ee5750835b156115fc576115fc81612017565b505080806116099061313a565b915050611560565b50505050565b834211156116675760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610a84565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886116968c61206f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006116f182612097565b90506000611701828787876120c4565b9050896001600160a01b0316816001600160a01b0316146117645760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610a84565b61176f8a8a8a611a0f565b50505050505050505050565b60008281526020819052604090206001015461179681611bb0565b610c048383611d6b565b6117b86000805160206132ad83398151915233611433565b6117fc5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3637b1b59d103337b93134b23232b760591b6044820152606401610a84565b600d54600160a81b900460ff161561184c5760405162461bcd60e51b815260206004820152601360248201527253414d413a3a6c6f636b3a20616c726561647960681b6044820152606401610a84565b6004548110156118945760405162461bcd60e51b815260206004820152601360248201527214d053504e8e9b1bd8dace881a5b9d985b1a59606a1b6044820152606401610a84565b600d805460ff60a81b1916600160a81b179055600c8190556040517f032bc66be43dbccb7487781d168eb7bda224628a3b2c3388bdf69b532a3a161190610b729083815260200190565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6001600160a01b03166000908152600b602052604090205460ff1690565b61193f6000805160206132cd83398151915233611433565b6119825760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d333a331d103337b93134b23232b760611b6044820152606401610a84565b61198b83611909565b6119cf5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d333a331d103737ba10333937bd32b760591b6044820152606401610a84565b610c048383836120ec565b60006001600160e01b03198216637965db0b60e01b148061096a57506301ffc9a760e01b6001600160e01b031983161461096a565b6001600160a01b038316611a715760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a84565b6001600160a01b038216611ad25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a84565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600c5481611b4060045490565b611b4a91906130d0565b1115611b8d5760405162461bcd60e51b815260206004820152601260248201527114d053504e8818d85c08195e18d95959195960721b6044820152606401610a84565b610c9282826122a8565b600033611ba5858285611ed4565b6114e68585856120ec565b611bba813361237d565b50565b6000805160206132ad8339815191528203611c3657611be96000805160206132ad833981519152611546565b15611c365760405162461bcd60e51b815260206004820181905260248201527f53414d413a3a6772616e74523a20676f7620616c7265616479206578697374736044820152606401610a84565b610c9282826123d6565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611c9957507f000000000000000000000000000000000000000000000000000000000000000046145b15611cc357507f000000000000000000000000000000000000000000000000000000000000000090565b610c13604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611d7582826123f8565b6000828152600160205260409020610c04908261245d565b6001600160a01b038216611ded5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a84565b611df982600083612472565b6001600160a01b03821660009081526002602052604090205481811015611e6d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a84565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610c04836000846124df565b6000611ee084846118de565b905060001981146116115781811015611f3b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610a84565b6116118484848403611a0f565b606060ff8314611f6257611f5b83612575565b905061096a565b818054611f6e90613070565b80601f0160208091040260200160405190810160405280929190818152602001828054611f9a90613070565b8015611fe75780601f10611fbc57610100808354040283529160200191611fe7565b820191906000526020600020905b815481529060010190602001808311611fca57829003601f168201915b5050505050905061096a565b600061142c83836125b4565b600033610a108185856120ec565b600061096a825490565b60448151101561203c578060405163d935448560e01b8152600401610a849190612c17565b600481019050808060200190518101906120569190613153565b60405162461bcd60e51b8152600401610a849190612c17565b6001600160a01b03811660009081526009602052604090208054600181018255905b50919050565b600061096a6120a4611c40565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006120d5878787876125de565b915091506120e2816126a2565b5095945050505050565b6001600160a01b0383166121505760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a84565b6001600160a01b0382166121b25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a84565b6121bd838383612472565b6001600160a01b038316600090815260026020526040902054818110156122355760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a84565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906122959086815260200190565b60405180910390a36116118484846124df565b6001600160a01b0382166122fe5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a84565b61230a60008383612472565b806004600082825461231c91906130d0565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610c92600083836124df565b6123878282611433565b610c9257612394816127ec565b61239f8360206127fe565b6040516020016123b09291906131ca565b60408051601f198184030181529082905262461bcd60e51b8252610a8491600401612c17565b6123e0828261299a565b6000828152600160205260409020610c049082612a1e565b6124028282611433565b15610c92576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061142c836001600160a01b038416612a33565b600d543390600160a01b900460ff1615806124a057506124a06000805160206132cd83398151915282611433565b6116115760405162461bcd60e51b815260206004820152601060248201526f29a0a6a09d1d3a3c1d10333937bd32b760811b6044820152606401610a84565b600d546001600160a01b031615610c0457600d546001600160a01b0316630987df03336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201528187166024820152908516604482015260648101849052608401600060405180830381600087803b15801561255a57600080fd5b505af192505050801561256b575060015b15610c0457505050565b6060600061258283612b26565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60008260000182815481106125cb576125cb6130a4565b9060005260206000200154905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126155750600090506003612699565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612669573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661269257600060019250925050612699565b9150600090505b94509492505050565b60008160048111156126b6576126b661323f565b036126be5750565b60018160048111156126d2576126d261323f565b0361271f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a84565b60028160048111156127335761273361323f565b036127805760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a84565b60038160048111156127945761279461323f565b03611bba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a84565b606061096a6001600160a01b03831660145b6060600061280d836002613255565b6128189060026130d0565b67ffffffffffffffff81111561283057612830612cbc565b6040519080825280601f01601f19166020018201604052801561285a576020820181803683370190505b509050600360fc1b81600081518110612875576128756130a4565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106128a4576128a46130a4565b60200101906001600160f81b031916908160001a90535060006128c8846002613255565b6128d39060016130d0565b90505b600181111561294b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612907576129076130a4565b1a60f81b82828151811061291d5761291d6130a4565b60200101906001600160f81b031916908160001a90535060049490941c936129448161326c565b90506128d6565b50831561142c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a84565b6129a48282611433565b610c92576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556129da3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061142c836001600160a01b038416612b4e565b60008181526001830160205260408120548015612b1c576000612a57600183613283565b8554909150600090612a6b90600190613283565b9050818114612ad0576000866000018281548110612a8b57612a8b6130a4565b9060005260206000200154905080876000018481548110612aae57612aae6130a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ae157612ae1613296565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061096a565b600091505061096a565b600060ff8216601f81111561096a57604051632cd44ac360e21b815260040160405180910390fd5b6000818152600183016020526040812054612b955750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561096a565b50600061096a565b600060208284031215612baf57600080fd5b81356001600160e01b03198116811461142c57600080fd5b60005b83811015612be2578181015183820152602001612bca565b50506000910152565b60008151808452612c03816020860160208601612bc7565b601f01601f19169290920160200192915050565b60208152600061142c6020830184612beb565b80356001600160a01b0381168114612c4157600080fd5b919050565b60008060408385031215612c5957600080fd5b612c6283612c2a565b946020939093013593505050565b60008083601f840112612c8257600080fd5b50813567ffffffffffffffff811115612c9a57600080fd5b6020830191508360208260051b8501011115612cb557600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612cfb57612cfb612cbc565b604052919050565b600067ffffffffffffffff821115612d1d57612d1d612cbc565b50601f01601f191660200190565b600080600080600080600060a0888a031215612d4657600080fd5b612d4f88612c2a565b9650612d5d60208901612c2a565b9550604088013567ffffffffffffffff80821115612d7a57600080fd5b612d868b838c01612c70565b909750955060608a0135915080821115612d9f57600080fd5b612dab8b838c01612c70565b909550935060808a0135915080821115612dc457600080fd5b508801601f81018a13612dd657600080fd5b8035612de9612de482612d03565b612cd2565b8181528b6020838501011115612dfe57600080fd5b8160208401602083013760006020838301015280935050505092959891949750929550565b600060208284031215612e3557600080fd5b61142c82612c2a565b600080600060608486031215612e5357600080fd5b612e5c84612c2a565b9250612e6a60208501612c2a565b9150604084013590509250925092565b600060208284031215612e8c57600080fd5b5035919050565b60008060408385031215612ea657600080fd5b82359150612eb660208401612c2a565b90509250929050565b60ff60f81b881681526000602060e081840152612edf60e084018a612beb565b8381036040850152612ef1818a612beb565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612f4357835183529284019291840191600101612f27565b50909c9b505050505050505050505050565b60008060408385031215612f6857600080fd5b50508035926020909101359150565b600080600060408486031215612f8c57600080fd5b833567ffffffffffffffff811115612fa357600080fd5b612faf86828701612c70565b90945092505060208401358015158114612fc857600080fd5b809150509250925092565b600080600080600080600060e0888a031215612fee57600080fd5b612ff788612c2a565b965061300560208901612c2a565b95506040880135945060608801359350608088013560ff8116811461302957600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561305957600080fd5b61306283612c2a565b9150612eb660208401612c2a565b600181811c9082168061308457607f821691505b60208210810361209157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561096a5761096a6130ba565b6000808335601e198436030181126130fa57600080fd5b83018035915067ffffffffffffffff82111561311557600080fd5b602001915036819003821315612cb557600080fd5b8183823760009101908152919050565b60006001820161314c5761314c6130ba565b5060010190565b60006020828403121561316557600080fd5b815167ffffffffffffffff81111561317c57600080fd5b8201601f8101841361318d57600080fd5b805161319b612de482612d03565b8181528560208385010111156131b057600080fd5b6131c1826020830160208601612bc7565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613202816017850160208801612bc7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613233816028840160208801612bc7565b01602801949350505050565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761096a5761096a6130ba565b60008161327b5761327b6130ba565b506000190190565b8181038181111561096a5761096a6130ba565b634e487b7160e01b600052603160045260246000fdfe71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb12caf2a45785e5e236d02aef43cf5c418eb8efbb7c865a0042c3a49873586e9b7bb92eab1ca3c67bc0dc88c778861afee62b67dcedea70454cb7d81131f472ef0a2646970667358221220b7b5759bbf1c3c6b5069727e581b9b556166ce96c367c096953915e699987df764736f6c6343000814003371840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb19f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000000000000000000000000000000000000000000453414d4100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000453414d4100000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102e45760003560e01c806379cc679011610190578063ca15c873116100dc578063d83a1b9c11610095578063e58398361161006f578063e5839836146108c1578063e7d2350f146108e1578063f36c8f5c14610901578063f52d26711461092357600080fd5b8063d83a1b9c1461085f578063dd46706414610881578063dd62ed3e146108a157600080fd5b8063ca15c873146107b8578063d2423b51146107d8578063d505accf146107eb578063d53913931461080b578063d547741f1461083f578063d5abeb011461044d57600080fd5b80638da5cb5b1161014957806395d89b411161012357806395d89b411461074e578063a217fddf14610763578063a457c2d714610778578063a9059cbb1461079857600080fd5b80638da5cb5b146106f95780639010d07c1461070e57806391d148541461072e57600080fd5b806379cc6790146106475780637ecebe00146106675780638456cb591461068757806384b0196e1461069c578063893d20e8146106c45780638d1fdf2f146106d957600080fd5b806336568abe1161024f57806342966c68116102085780635c975abb116101e25780635c975abb1461059e5780635ea20216146105bd57806370a08231146105dd57806375b238fc1461061357600080fd5b806342966c681461052c5780634e68a16f1461054c578063538ee0071461056c57600080fd5b806336568abe1461047757806339509351146104975780633f4ba83a146104b757806340c10f19146104cc578063417518c8146104ec578063427bae4c1461050c57600080fd5b806323b872dd116102a157806323b872dd146103c1578063248a9ca3146103e15780632f2ff15d14610411578063313ce56714610431578063355274ea1461044d5780633644e5151461046257600080fd5b806301ffc9a7146102e957806306fdde031461031e578063095ea7b31461034057806318160ddd146103605780631e2b10db1461037f5780632376bf3f146103a1575b600080fd5b3480156102f557600080fd5b50610309610304366004612b9d565b610945565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b50610333610970565b6040516103159190612c17565b34801561034c57600080fd5b5061030961035b366004612c46565b610a02565b34801561036c57600080fd5b506004545b604051908152602001610315565b34801561038b57600080fd5b5061039f61039a366004612d2b565b610a1a565b005b3480156103ad57600080fd5b5061039f6103bc366004612e23565b610ab9565b3480156103cd57600080fd5b506103096103dc366004612e3e565b610b7d565b3480156103ed57600080fd5b506103716103fc366004612e7a565b60009081526020819052604090206001015490565b34801561041d57600080fd5b5061039f61042c366004612e93565b610bdf565b34801561043d57600080fd5b5060405160128152602001610315565b34801561045957600080fd5b50600c54610371565b34801561046e57600080fd5b50610371610c09565b34801561048357600080fd5b5061039f610492366004612e93565b610c18565b3480156104a357600080fd5b506103096104b2366004612c46565b610c96565b3480156104c357600080fd5b5061039f610cb8565b3480156104d857600080fd5b5061039f6104e7366004612c46565b610dad565b3480156104f857600080fd5b5061039f610507366004612c46565b610e25565b34801561051857600080fd5b5061039f610527366004612e23565b610ee0565b34801561053857600080fd5b5061039f610547366004612e7a565b610f75565b34801561055857600080fd5b5061039f610567366004612c46565b610fcb565b34801561057857600080fd5b50600d546001600160a01b03165b6040516001600160a01b039091168152602001610315565b3480156105aa57600080fd5b50600d54600160a01b900460ff16610309565b3480156105c957600080fd5b5061039f6105d8366004612e23565b61107d565b3480156105e957600080fd5b506103716105f8366004612e23565b6001600160a01b031660009081526002602052604090205490565b34801561061f57600080fd5b506103717fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561065357600080fd5b5061039f610662366004612c46565b61112a565b34801561067357600080fd5b50610371610682366004612e23565b611184565b34801561069357600080fd5b5061039f6111a2565b3480156106a857600080fd5b506106b161128e565b6040516103159796959493929190612ebf565b3480156106d057600080fd5b50610586611317565b3480156106e557600080fd5b5061039f6106f4366004612e23565b611321565b34801561070557600080fd5b506105866113d9565b34801561071a57600080fd5b50610586610729366004612f55565b611414565b34801561073a57600080fd5b50610309610749366004612e93565b611433565b34801561075a57600080fd5b5061033361145c565b34801561076f57600080fd5b50610371600081565b34801561078457600080fd5b50610309610793366004612c46565b61146b565b3480156107a457600080fd5b506103096107b3366004612c46565b6114f1565b3480156107c457600080fd5b506103716107d3366004612e7a565b611546565b61039f6107e6366004612f77565b61155d565b3480156107f757600080fd5b5061039f610806366004612fd3565b611617565b34801561081757600080fd5b506103717f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561084b57600080fd5b5061039f61085a366004612e93565b61177b565b34801561086b57600080fd5b506103716000805160206132ed83398151915281565b34801561088d57600080fd5b5061039f61089c366004612e7a565b6117a0565b3480156108ad57600080fd5b506103716108bc366004613046565b6118de565b3480156108cd57600080fd5b506103096108dc366004612e23565b611909565b3480156108ed57600080fd5b5061039f6108fc366004612e3e565b611927565b34801561090d57600080fd5b506103716000805160206132ad83398151915281565b34801561092f57600080fd5b506103716000805160206132cd83398151915281565b60006001600160e01b03198216635a05180f60e01b148061096a575061096a826119da565b92915050565b60606005805461097f90613070565b80601f01602080910402602001604051908101604052809291908181526020018280546109ab90613070565b80156109f85780601f106109cd576101008083540402835291602001916109f8565b820191906000526020600020905b8154815290600101906020018083116109db57829003601f168201915b5050505050905090565b600033610a10818585611a0f565b5060019392505050565b610a447f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611433565b610a8d5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d36b4b73a1d103337b93134b23232b760591b60448201526064015b60405180910390fd5b610ab08684846000818110610aa457610aa46130a4565b90506020020135611b33565b50505050505050565b610ae37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533611433565b610b285760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d39b2ba2a261d103337b93134b23232b760511b6044820152606401610a84565b600d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f07ffdf1fcb4599bf7f2c226435209af2bf5d6da04e0d8afe0f302d88580f14c4906020015b60405180910390a150565b6000610b8884611909565b15610bcc5760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3a3c233937b69d10333937bd32b760611b6044820152606401610a84565b610bd7848484611b97565b949350505050565b600082815260208190526040902060010154610bfa81611bb0565b610c048383611bbd565b505050565b6000610c13611c40565b905090565b6001600160a01b0381163314610c885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a84565b610c928282611d6b565b5050565b600033610a10818585610ca983836118de565b610cb391906130d0565b611a0f565b610cd06000805160206132ed83398151915233611433565b610d1c5760405162461bcd60e51b815260206004820152601860248201527f53414d413a3a756e70617573653a20666f7262696464656e00000000000000006044820152606401610a84565b600d54600160a01b900460ff16610d755760405162461bcd60e51b815260206004820152601960248201527f53414d413a3a756e70617573653a206e6f7420706175736564000000000000006044820152606401610a84565b600d805460ff60a01b191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b610dd77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611433565b610e1b5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d36b4b73a1d103337b93134b23232b760591b6044820152606401610a84565b610c928282611b33565b610e3d6000805160206132cd83398151915233611433565b610e805760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3336ba1d103337b93134b23232b760611b6044820152606401610a84565b600d54600160a01b900460ff1680610e9c5750610e9c82611909565b610e1b5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3336ba1d103737ba10333937bd32b760591b6044820152606401610a84565b33610ef96000805160206132ad83398151915282611433565b610f455760405162461bcd60e51b815260206004820152601a60248201527f53414d413a3a676f764368616e67653a20666f7262696464656e0000000000006044820152606401610a84565b610f5d6000805160206132ad83398151915282611d6b565b610c926000805160206132ad83398151915283611bbd565b33610f7f81611909565b15610fc15760405162461bcd60e51b815260206004820152601260248201527129a0a6a09d1d313ab9371d10333937bd32b760711b6044820152606401610a84565b610c928183611d8d565b610fe36000805160206132cd83398151915233611433565b6110265760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d3331331d103337b93134b23232b760611b6044820152606401610a84565b61102f82611909565b6110735760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3331331d103737ba10333937bd32b760591b6044820152606401610a84565b610c928282611d8d565b6110956000805160206132ed83398151915233611433565b6110d95760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3a3430bb9d103337b93134b23232b760591b6044820152606401610a84565b6001600160a01b0381166000818152600b6020908152604091829020805460ff1916905590519182527f6fda897d48d5c966a4c6312d6d9776784d44f0aa4d9954a453d4a5a14bf65e8e9101610b72565b61113382611909565b156111795760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d313ab937233937b69d10333937bd32b760511b6044820152606401610a84565b611073823383611ed4565b6001600160a01b03811660009081526009602052604081205461096a565b6111ba6000805160206132ed83398151915233611433565b6111ff5760405162461bcd60e51b815260206004820152601660248201527529a0a6a09d1d3830bab9b29d103337b93134b23232b760511b6044820152606401610a84565b600d54600160a01b900460ff16156112505760405162461bcd60e51b815260206004820152601460248201527353414d413a3a70617573653a20616c726561647960601b6044820152606401610a84565b600d805460ff60a01b1916600160a01b1790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6000606080828080836112c27f53414d41000000000000000000000000000000000000000000000000000000046007611f48565b6112ed7f31000000000000000000000000000000000000000000000000000000000000016008611f48565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610c136113d9565b6113396000805160206132ed83398151915233611433565b6113855760405162461bcd60e51b815260206004820152601760248201527f53414d413a3a667265657a653a20666f7262696464656e0000000000000000006044820152606401610a84565b6001600160a01b0381166000818152600b6020908152604091829020805460ff1916600117905590519182527f8a5c4736a33c7b7f29a2c34ea9ff9608afc5718d56f6fd6dcbd2d3711a1a49139101610b72565b60006113f26000805160206132ad833981519152611546565b6000036113ff5750600090565b610c136000805160206132ad83398151915260005b600082815260016020526040812061142c9083611ff3565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60606006805461097f90613070565b6000338161147982866118de565b9050838110156114d95760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a84565b6114e68286868403611a0f565b506001949350505050565b60006114fc33611909565b1561153c5760405162461bcd60e51b815260206004820152601060248201526f29a0a6a09d1d3a3c1d10333937bd32b760811b6044820152606401610a84565b61142c8383611fff565b600081815260016020526040812061096a9061200d565b60005b82811015611611576000803086868581811061157e5761157e6130a4565b905060200281019061159091906130e3565b60405161159e92919061312a565b600060405180830381855af49150503d80600081146115d9576040519150601f19603f3d011682016040523d82523d6000602084013e6115de565b606091505b5091509150811580156115ee5750835b156115fc576115fc81612017565b505080806116099061313a565b915050611560565b50505050565b834211156116675760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610a84565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98888886116968c61206f565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006116f182612097565b90506000611701828787876120c4565b9050896001600160a01b0316816001600160a01b0316146117645760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610a84565b61176f8a8a8a611a0f565b50505050505050505050565b60008281526020819052604090206001015461179681611bb0565b610c048383611d6b565b6117b86000805160206132ad83398151915233611433565b6117fc5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d3637b1b59d103337b93134b23232b760591b6044820152606401610a84565b600d54600160a81b900460ff161561184c5760405162461bcd60e51b815260206004820152601360248201527253414d413a3a6c6f636b3a20616c726561647960681b6044820152606401610a84565b6004548110156118945760405162461bcd60e51b815260206004820152601360248201527214d053504e8e9b1bd8dace881a5b9d985b1a59606a1b6044820152606401610a84565b600d805460ff60a81b1916600160a81b179055600c8190556040517f032bc66be43dbccb7487781d168eb7bda224628a3b2c3388bdf69b532a3a161190610b729083815260200190565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6001600160a01b03166000908152600b602052604090205460ff1690565b61193f6000805160206132cd83398151915233611433565b6119825760405162461bcd60e51b815260206004820152601460248201527329a0a6a09d1d333a331d103337b93134b23232b760611b6044820152606401610a84565b61198b83611909565b6119cf5760405162461bcd60e51b815260206004820152601560248201527429a0a6a09d1d333a331d103737ba10333937bd32b760591b6044820152606401610a84565b610c048383836120ec565b60006001600160e01b03198216637965db0b60e01b148061096a57506301ffc9a760e01b6001600160e01b031983161461096a565b6001600160a01b038316611a715760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a84565b6001600160a01b038216611ad25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a84565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600c5481611b4060045490565b611b4a91906130d0565b1115611b8d5760405162461bcd60e51b815260206004820152601260248201527114d053504e8818d85c08195e18d95959195960721b6044820152606401610a84565b610c9282826122a8565b600033611ba5858285611ed4565b6114e68585856120ec565b611bba813361237d565b50565b6000805160206132ad8339815191528203611c3657611be96000805160206132ad833981519152611546565b15611c365760405162461bcd60e51b815260206004820181905260248201527f53414d413a3a6772616e74523a20676f7620616c7265616479206578697374736044820152606401610a84565b610c9282826123d6565b6000306001600160a01b037f0000000000000000000000007a264a85adfa105e3a4e5b8ce294c902b63bcb0d16148015611c9957507f000000000000000000000000000000000000000000000000000000000000000146145b15611cc357507f6b2fe3bae3d306da452ddd8e5a53042701d0c993eaaf75151e248c73c6ccbd7490565b610c13604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f83b1122d6ce183074730bb7878242ec2636eb2e0e4bfcf8bd05c41a8f17ecfdd918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611d7582826123f8565b6000828152600160205260409020610c04908261245d565b6001600160a01b038216611ded5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a84565b611df982600083612472565b6001600160a01b03821660009081526002602052604090205481811015611e6d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a84565b6001600160a01b03831660008181526002602090815260408083208686039055600480548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610c04836000846124df565b6000611ee084846118de565b905060001981146116115781811015611f3b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610a84565b6116118484848403611a0f565b606060ff8314611f6257611f5b83612575565b905061096a565b818054611f6e90613070565b80601f0160208091040260200160405190810160405280929190818152602001828054611f9a90613070565b8015611fe75780601f10611fbc57610100808354040283529160200191611fe7565b820191906000526020600020905b815481529060010190602001808311611fca57829003601f168201915b5050505050905061096a565b600061142c83836125b4565b600033610a108185856120ec565b600061096a825490565b60448151101561203c578060405163d935448560e01b8152600401610a849190612c17565b600481019050808060200190518101906120569190613153565b60405162461bcd60e51b8152600401610a849190612c17565b6001600160a01b03811660009081526009602052604090208054600181018255905b50919050565b600061096a6120a4611c40565b8360405161190160f01b8152600281019290925260228201526042902090565b60008060006120d5878787876125de565b915091506120e2816126a2565b5095945050505050565b6001600160a01b0383166121505760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a84565b6001600160a01b0382166121b25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a84565b6121bd838383612472565b6001600160a01b038316600090815260026020526040902054818110156122355760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a84565b6001600160a01b0380851660008181526002602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906122959086815260200190565b60405180910390a36116118484846124df565b6001600160a01b0382166122fe5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a84565b61230a60008383612472565b806004600082825461231c91906130d0565b90915550506001600160a01b0382166000818152600260209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610c92600083836124df565b6123878282611433565b610c9257612394816127ec565b61239f8360206127fe565b6040516020016123b09291906131ca565b60408051601f198184030181529082905262461bcd60e51b8252610a8491600401612c17565b6123e0828261299a565b6000828152600160205260409020610c049082612a1e565b6124028282611433565b15610c92576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061142c836001600160a01b038416612a33565b600d543390600160a01b900460ff1615806124a057506124a06000805160206132cd83398151915282611433565b6116115760405162461bcd60e51b815260206004820152601060248201526f29a0a6a09d1d3a3c1d10333937bd32b760811b6044820152606401610a84565b600d546001600160a01b031615610c0457600d546001600160a01b0316630987df03336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201528187166024820152908516604482015260648101849052608401600060405180830381600087803b15801561255a57600080fd5b505af192505050801561256b575060015b15610c0457505050565b6060600061258283612b26565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60008260000182815481106125cb576125cb6130a4565b9060005260206000200154905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156126155750600090506003612699565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612669573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661269257600060019250925050612699565b9150600090505b94509492505050565b60008160048111156126b6576126b661323f565b036126be5750565b60018160048111156126d2576126d261323f565b0361271f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a84565b60028160048111156127335761273361323f565b036127805760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a84565b60038160048111156127945761279461323f565b03611bba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a84565b606061096a6001600160a01b03831660145b6060600061280d836002613255565b6128189060026130d0565b67ffffffffffffffff81111561283057612830612cbc565b6040519080825280601f01601f19166020018201604052801561285a576020820181803683370190505b509050600360fc1b81600081518110612875576128756130a4565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106128a4576128a46130a4565b60200101906001600160f81b031916908160001a90535060006128c8846002613255565b6128d39060016130d0565b90505b600181111561294b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612907576129076130a4565b1a60f81b82828151811061291d5761291d6130a4565b60200101906001600160f81b031916908160001a90535060049490941c936129448161326c565b90506128d6565b50831561142c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a84565b6129a48282611433565b610c92576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556129da3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061142c836001600160a01b038416612b4e565b60008181526001830160205260408120548015612b1c576000612a57600183613283565b8554909150600090612a6b90600190613283565b9050818114612ad0576000866000018281548110612a8b57612a8b6130a4565b9060005260206000200154905080876000018481548110612aae57612aae6130a4565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612ae157612ae1613296565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061096a565b600091505061096a565b600060ff8216601f81111561096a57604051632cd44ac360e21b815260040160405180910390fd5b6000818152600183016020526040812054612b955750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561096a565b50600061096a565b600060208284031215612baf57600080fd5b81356001600160e01b03198116811461142c57600080fd5b60005b83811015612be2578181015183820152602001612bca565b50506000910152565b60008151808452612c03816020860160208601612bc7565b601f01601f19169290920160200192915050565b60208152600061142c6020830184612beb565b80356001600160a01b0381168114612c4157600080fd5b919050565b60008060408385031215612c5957600080fd5b612c6283612c2a565b946020939093013593505050565b60008083601f840112612c8257600080fd5b50813567ffffffffffffffff811115612c9a57600080fd5b6020830191508360208260051b8501011115612cb557600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612cfb57612cfb612cbc565b604052919050565b600067ffffffffffffffff821115612d1d57612d1d612cbc565b50601f01601f191660200190565b600080600080600080600060a0888a031215612d4657600080fd5b612d4f88612c2a565b9650612d5d60208901612c2a565b9550604088013567ffffffffffffffff80821115612d7a57600080fd5b612d868b838c01612c70565b909750955060608a0135915080821115612d9f57600080fd5b612dab8b838c01612c70565b909550935060808a0135915080821115612dc457600080fd5b508801601f81018a13612dd657600080fd5b8035612de9612de482612d03565b612cd2565b8181528b6020838501011115612dfe57600080fd5b8160208401602083013760006020838301015280935050505092959891949750929550565b600060208284031215612e3557600080fd5b61142c82612c2a565b600080600060608486031215612e5357600080fd5b612e5c84612c2a565b9250612e6a60208501612c2a565b9150604084013590509250925092565b600060208284031215612e8c57600080fd5b5035919050565b60008060408385031215612ea657600080fd5b82359150612eb660208401612c2a565b90509250929050565b60ff60f81b881681526000602060e081840152612edf60e084018a612beb565b8381036040850152612ef1818a612beb565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612f4357835183529284019291840191600101612f27565b50909c9b505050505050505050505050565b60008060408385031215612f6857600080fd5b50508035926020909101359150565b600080600060408486031215612f8c57600080fd5b833567ffffffffffffffff811115612fa357600080fd5b612faf86828701612c70565b90945092505060208401358015158114612fc857600080fd5b809150509250925092565b600080600080600080600060e0888a031215612fee57600080fd5b612ff788612c2a565b965061300560208901612c2a565b95506040880135945060608801359350608088013560ff8116811461302957600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561305957600080fd5b61306283612c2a565b9150612eb660208401612c2a565b600181811c9082168061308457607f821691505b60208210810361209157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561096a5761096a6130ba565b6000808335601e198436030181126130fa57600080fd5b83018035915067ffffffffffffffff82111561311557600080fd5b602001915036819003821315612cb557600080fd5b8183823760009101908152919050565b60006001820161314c5761314c6130ba565b5060010190565b60006020828403121561316557600080fd5b815167ffffffffffffffff81111561317c57600080fd5b8201601f8101841361318d57600080fd5b805161319b612de482612d03565b8181528560208385010111156131b057600080fd5b6131c1826020830160208601612bc7565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613202816017850160208801612bc7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613233816028840160208801612bc7565b01602801949350505050565b634e487b7160e01b600052602160045260246000fd5b808202811582820484141761096a5761096a6130ba565b60008161327b5761327b6130ba565b506000190190565b8181038181111561096a5761096a6130ba565b634e487b7160e01b600052603160045260246000fdfe71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb12caf2a45785e5e236d02aef43cf5c418eb8efbb7c865a0042c3a49873586e9b7bb92eab1ca3c67bc0dc88c778861afee62b67dcedea70454cb7d81131f472ef0a2646970667358221220b7b5759bbf1c3c6b5069727e581b9b556166ce96c367c096953915e699987df764736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c000000000000000000000000000000000000000000000000000000000000000453414d4100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000453414d4100000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): SAMA
Arg [1] : symbol (string): SAMA
Arg [2] : cap_ (uint256): 0
Arg [3] : _governance (address): 0x495E889d1A6cEB447a57dcc1C68410299392380c
Arg [4] : _admin (address): 0x495E889d1A6cEB447a57dcc1C68410299392380c
Arg [5] : _minter (address): 0x495E889d1A6cEB447a57dcc1C68410299392380c
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c
Arg [4] : 000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c
Arg [5] : 000000000000000000000000495e889d1a6ceb447a57dcc1c68410299392380c
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 53414d4100000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 53414d4100000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
95498:8707:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44935:214;;;;;;;;;;-1:-1:-1;44935:214:0;;;;;:::i;:::-;;:::i;:::-;;;470:14:1;;463:22;445:41;;433:2;418:18;44935:214:0;;;;;;;;51961:100;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;54321:201::-;;;;;;;;;;-1:-1:-1;54321:201:0;;;;;:::i;:::-;;:::i;53090:108::-;;;;;;;;;;-1:-1:-1;53178:12:0;;53090:108;;;1836:25:1;;;1824:2;1809:18;53090:108:0;1690:177:1;100392:337:0;;;;;;;;;;-1:-1:-1;100392:337:0;;;;;:::i;:::-;;:::i;:::-;;98977:265;;;;;;;;;;-1:-1:-1;98977:265:0;;;;;:::i;:::-;;:::i;99483:258::-;;;;;;;;;;-1:-1:-1;99483:258:0;;;;;:::i;:::-;;:::i;26507:131::-;;;;;;;;;;-1:-1:-1;26507:131:0;;;;;:::i;:::-;26581:7;26608:12;;;;;;;;;;:22;;;;26507:131;26948:147;;;;;;;;;;-1:-1:-1;26948:147:0;;;;;:::i;:::-;;:::i;52932:93::-;;;;;;;;;;-1:-1:-1;52932:93:0;;53015:2;5616:36:1;;5604:2;5589:18;52932:93:0;5474:184:1;97386:83:0;;;;;;;;;;-1:-1:-1;97457:4:0;;97386:83;;92692:115;;;;;;;;;;;;;:::i;28092:218::-;;;;;;;;;;-1:-1:-1;28092:218:0;;;;;:::i;:::-;;:::i;55772:238::-;;;;;;;;;;-1:-1:-1;55772:238:0;;;;;:::i;:::-;;:::i;100970:273::-;;;;;;;;;;;;;:::i;99749:172::-;;;;;;;;;;-1:-1:-1;99749:172:0;;;;;:::i;:::-;;:::i;101806:267::-;;;;;;;;;;-1:-1:-1;101806:267:0;;;;;:::i;:::-;;:::i;98679:290::-;;;;;;;;;;-1:-1:-1;98679:290:0;;;;;:::i;:::-;;:::i;99929:178::-;;;;;;;;;;-1:-1:-1;99929:178:0;;;;;:::i;:::-;;:::i;102117:258::-;;;;;;;;;;-1:-1:-1;102117:258:0;;;;;:::i;:::-;;:::i;98189:101::-;;;;;;;;;;-1:-1:-1;98265:17:0;;-1:-1:-1;;;;;98265:17:0;98189:101;;;-1:-1:-1;;;;;6012:32:1;;;5994:51;;5982:2;5967:18;98189:101:0;5848:203:1;98103:78:0;;;;;;;;;;-1:-1:-1;98166:7:0;;-1:-1:-1;;;98166:7:0;;;;98103:78;;101509:210;;;;;;;;;;-1:-1:-1;101509:210:0;;;;;:::i;:::-;;:::i;53261:127::-;;;;;;;;;;-1:-1:-1;53261:127:0;;;;;:::i;:::-;-1:-1:-1;;;;;53362:18:0;53335:7;53362:18;;;:9;:18;;;;;;;53261:127;95705:60;;;;;;;;;;;;95742:23;95705:60;;100115:228;;;;;;;;;;-1:-1:-1;100115:228:0;;;;;:::i;:::-;;:::i;92434:128::-;;;;;;;;;;-1:-1:-1;92434:128:0;;;;;:::i;:::-;;:::i;100737:225::-;;;;;;;;;;;;;:::i;89425:657::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;97838:83::-;;;;;;;;;;;;;:::i;101251:250::-;;;;;;;;;;-1:-1:-1;101251:250:0;;;;;:::i;:::-;;:::i;97598:206::-;;;;;;;;;;;;;:::i;45748:153::-;;;;;;;;;;-1:-1:-1;45748:153:0;;;;;:::i;:::-;;:::i;24980:147::-;;;;;;;;;;-1:-1:-1;24980:147:0;;;;;:::i;:::-;;:::i;52180:104::-;;;;;;;;;;;;;:::i;24085:49::-;;;;;;;;;;-1:-1:-1;24085:49:0;24130:4;24085:49;;56513:436;;;;;;;;;;-1:-1:-1;56513:436:0;;;;;:::i;:::-;;:::i;99250:225::-;;;;;;;;;;-1:-1:-1;99250:225:0;;;;;:::i;:::-;;:::i;46075:142::-;;;;;;;;;;-1:-1:-1;46075:142:0;;;;;:::i;:::-;;:::i;94714:369::-;;;;;;:::i;:::-;;:::i;91723:645::-;;;;;;;;;;-1:-1:-1;91723:645:0;;;;;:::i;:::-;;:::i;95772:62::-;;;;;;;;;;;;95810:24;95772:62;;27388:149;;;;;;;;;;-1:-1:-1;27388:149:0;;;;;:::i;:::-;;:::i;95900:66::-;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;95900:66:0;;98298:373;;;;;;;;;;-1:-1:-1;98298:373:0;;;;;:::i;:::-;;:::i;53850:151::-;;;;;;;;;;-1:-1:-1;53850:151:0;;;;;:::i;:::-;;:::i;97982:113::-;;;;;;;;;;-1:-1:-1;97982:113:0;;;;;:::i;:::-;;:::i;102440:307::-;;;;;;;;;;-1:-1:-1;102440:307:0;;;;;:::i;:::-;;:::i;95628:70::-;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;95628:70:0;;96039:68;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;96039:68:0;;44935:214;45020:4;-1:-1:-1;;;;;;45044:57:0;;-1:-1:-1;;;45044:57:0;;:97;;;45105:36;45129:11;45105:23;:36::i;:::-;45037:104;44935:214;-1:-1:-1;;44935:214:0:o;51961:100::-;52015:13;52048:5;52041:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51961:100;:::o;54321:201::-;54404:4;3572:10;54460:32;3572:10;54476:7;54485:6;54460:8;:32::i;:::-;-1:-1:-1;54510:4:0;;54321:201;-1:-1:-1;;;54321:201:0:o;100392:337::-;100622:34;95810:24;3572:10;24980:147;:::i;100622:34::-;100614:68;;;;-1:-1:-1;;;100614:68:0;;9737:2:1;100614:68:0;;;9719:21:1;9776:2;9756:18;;;9749:30;-1:-1:-1;;;9795:18:1;;;9788:51;9856:18;;100614:68:0;;;;;;;;;100693:28;100699:8;100709;;100718:1;100709:11;;;;;;;:::i;:::-;;;;;;;100693:5;:28::i;:::-;100392:337;;;;;;;:::o;98977:265::-;99068:33;95742:23;3572:10;24980:147;:::i;99068:33::-;99060:68;;;;-1:-1:-1;;;99060:68:0;;10219:2:1;99060:68:0;;;10201:21:1;10258:2;10238:18;;;10231:30;-1:-1:-1;;;10277:18:1;;;10270:52;10339:18;;99060:68:0;10017:346:1;99060:68:0;99139:17;:38;;-1:-1:-1;;;;;;99139:38:0;-1:-1:-1;;;;;99139:38:0;;;;;;;;99195:39;;5994:51:1;;;99195:39:0;;5982:2:1;5967:18;99195:39:0;;;;;;;;98977:265;:::o;99483:258::-;99614:4;99640:14;99649:4;99640:8;:14::i;:::-;99639:15;99631:48;;;;-1:-1:-1;;;99631:48:0;;10570:2:1;99631:48:0;;;10552:21:1;10609:2;10589:18;;;10582:30;-1:-1:-1;;;10628:18:1;;;10621:50;10688:18;;99631:48:0;10368:344:1;99631:48:0;99697:36;99716:4;99722:2;99726:6;99697:18;:36::i;:::-;99690:43;99483:258;-1:-1:-1;;;;99483:258:0:o;26948:147::-;26581:7;26608:12;;;;;;;;;;:22;;;24576:16;24587:4;24576:10;:16::i;:::-;27062:25:::1;27073:4;27079:7;27062:10;:25::i;:::-;26948:147:::0;;;:::o;92692:115::-;92752:7;92779:20;:18;:20::i;:::-;92772:27;;92692:115;:::o;28092:218::-;-1:-1:-1;;;;;28188:23:0;;3572:10;28188:23;28180:83;;;;-1:-1:-1;;;28180:83:0;;10919:2:1;28180:83:0;;;10901:21:1;10958:2;10938:18;;;10931:30;10997:34;10977:18;;;10970:62;-1:-1:-1;;;11048:18:1;;;11041:45;11103:19;;28180:83:0;10717:411:1;28180:83:0;28276:26;28288:4;28294:7;28276:11;:26::i;:::-;28092:218;;:::o;55772:238::-;55860:4;3572:10;55916:64;3572:10;55932:7;55969:10;55941:25;3572:10;55932:7;55941:9;:25::i;:::-;:38;;;;:::i;:::-;55916:8;:64::i;100970:273::-;101037:36;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;101037:36::-;101015:110;;;;-1:-1:-1;;;101015:110:0;;11597:2:1;101015:110:0;;;11579:21:1;11636:2;11616:18;;;11609:30;11675:26;11655:18;;;11648:54;11719:18;;101015:110:0;11395:348:1;101015:110:0;101144:7;;-1:-1:-1;;;101144:7:0;;;;101136:45;;;;-1:-1:-1;;;101136:45:0;;11950:2:1;101136:45:0;;;11932:21:1;11989:2;11969:18;;;11962:30;12028:27;12008:18;;;12001:55;12073:18;;101136:45:0;11748:349:1;101136:45:0;101192:7;:15;;-1:-1:-1;;;;101192:15:0;;;101225:10;;;;101202:5;;101225:10;100970:273::o;99749:172::-;99825:34;95810:24;3572:10;24980:147;:::i;99825:34::-;99817:68;;;;-1:-1:-1;;;99817:68:0;;9737:2:1;99817:68:0;;;9719:21:1;9776:2;9756:18;;;9749:30;-1:-1:-1;;;9795:18:1;;;9788:51;9856:18;;99817:68:0;9535:345:1;99817:68:0;99896:17;99902:2;99906:6;99896:5;:17::i;101806:267::-;101895:37;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;101895:37::-;101887:70;;;;-1:-1:-1;;;101887:70:0;;12304:2:1;101887:70:0;;;12286:21:1;12343:2;12323:18;;;12316:30;-1:-1:-1;;;12362:18:1;;;12355:50;12422:18;;101887:70:0;12102:344:1;101887:70:0;101976:7;;-1:-1:-1;;;101976:7:0;;;;;:28;;;101987:17;101996:7;101987:8;:17::i;:::-;101968:62;;;;-1:-1:-1;;;101968:62:0;;12653:2:1;101968:62:0;;;12635:21:1;12692:2;12672:18;;;12665:30;-1:-1:-1;;;12711:18:1;;;12704:51;12772:18;;101968:62:0;12451:345:1;98679:290:0;3572:10;98797:32;-1:-1:-1;;;;;;;;;;;3572:10:0;98797:7;:32::i;:::-;98789:71;;;;-1:-1:-1;;;98789:71:0;;13003:2:1;98789:71:0;;;12985:21:1;13042:2;13022:18;;;13015:30;13081:28;13061:18;;;13054:56;13127:18;;98789:71:0;12801:350:1;98789:71:0;98871:36;-1:-1:-1;;;;;;;;;;;98900:6:0;98871:11;:36::i;:::-;98918:43;-1:-1:-1;;;;;;;;;;;98946:14:0;98918:10;:43::i;99929:178::-;3572:10;100032:14;3572:10;100032:8;:14::i;:::-;100031:15;100023:46;;;;-1:-1:-1;;;100023:46:0;;13358:2:1;100023:46:0;;;13340:21:1;13397:2;13377:18;;;13370:30;-1:-1:-1;;;13416:18:1;;;13409:48;13474:18;;100023:46:0;13156:342:1;100023:46:0;100080:19;100086:4;100092:6;100080:5;:19::i;102117:258::-;102208:37;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;102208:37::-;102200:70;;;;-1:-1:-1;;;102200:70:0;;13705:2:1;102200:70:0;;;13687:21:1;13744:2;13724:18;;;13717:30;-1:-1:-1;;;13763:18:1;;;13756:50;13823:18;;102200:70:0;13503:344:1;102200:70:0;102289:17;102298:7;102289:8;:17::i;:::-;102281:51;;;;-1:-1:-1;;;102281:51:0;;14054:2:1;102281:51:0;;;14036:21:1;14093:2;14073:18;;;14066:30;-1:-1:-1;;;14112:18:1;;;14105:51;14173:18;;102281:51:0;13852:345:1;102281:51:0;102345:22;102351:7;102360:6;102345:5;:22::i;101509:210::-;101574:36;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;101574:36::-;101566:70;;;;-1:-1:-1;;;101566:70:0;;14404:2:1;101566:70:0;;;14386:21:1;14443:2;14423:18;;;14416:30;-1:-1:-1;;;14462:18:1;;;14455:51;14523:18;;101566:70:0;14202:345:1;101566:70:0;-1:-1:-1;;;;;101647:23:0;;101673:5;101647:23;;;:14;:23;;;;;;;;;:31;;-1:-1:-1;;101647:31:0;;;101696:15;;5994:51:1;;;101696:15:0;;5967:18:1;101696:15:0;5848:203:1;100115:228:0;100201:17;100210:7;100201:8;:17::i;:::-;100200:18;100192:53;;;;-1:-1:-1;;;100192:53:0;;14754:2:1;100192:53:0;;;14736:21:1;14793:2;14773:18;;;14766:30;-1:-1:-1;;;14812:18:1;;;14805:52;14874:18;;100192:53:0;14552:346:1;100192:53:0;100256:46;100272:7;3572:10;100295:6;100256:15;:46::i;92434:128::-;-1:-1:-1;;;;;92530:14:0;;92503:7;92530:14;;;:7;:14;;;;;65947;92530:24;65855:114;100737:225;100788:36;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;100788:36::-;100780:71;;;;-1:-1:-1;;;100780:71:0;;15105:2:1;100780:71:0;;;15087:21:1;15144:2;15124:18;;;15117:30;-1:-1:-1;;;15163:18:1;;;15156:52;15225:18;;100780:71:0;14903:346:1;100780:71:0;100871:7;;-1:-1:-1;;;100871:7:0;;;;100870:8;100862:41;;;;-1:-1:-1;;;100862:41:0;;15456:2:1;100862:41:0;;;15438:21:1;15495:2;15475:18;;;15468:30;-1:-1:-1;;;15514:18:1;;;15507:50;15574:18;;100862:41:0;15254:344:1;100862:41:0;100914:7;:14;;-1:-1:-1;;;;100914:14:0;-1:-1:-1;;;100914:14:0;;;100946:8;;;;100914:14;;100946:8;100737:225::o;89425:657::-;89546:13;89574:18;;89546:13;;;89574:18;89848:41;:5;89875:13;89848:26;:41::i;:::-;89904:47;:8;89934:16;89904:29;:47::i;:::-;90047:16;;;90030:1;90047:16;;;;;;;;;-1:-1:-1;;;89795:279:0;;;-1:-1:-1;89795:279:0;;-1:-1:-1;89966:13:0;;-1:-1:-1;90002:4:0;;-1:-1:-1;90030:1:0;-1:-1:-1;90047:16:0;-1:-1:-1;89795:279:0;-1:-1:-1;89425:657:0:o;97838:83::-;97879:7;97906;:5;:7::i;101251:250::-;101332:36;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;101332:36::-;101310:109;;;;-1:-1:-1;;;101310:109:0;;15805:2:1;101310:109:0;;;15787:21:1;15844:2;15824:18;;;15817:30;15883:25;15863:18;;;15856:53;15926:18;;101310:109:0;15603:347:1;101310:109:0;-1:-1:-1;;;;;101430:23:0;;;;;;:14;:23;;;;;;;;;:30;;-1:-1:-1;;101430:30:0;101456:4;101430:30;;;101478:15;;5994:51:1;;;101478:15:0;;5967:18:1;101478:15:0;5848:203:1;97598:206:0;97636:7;97660:35;-1:-1:-1;;;;;;;;;;;97660:18:0;:35::i;:::-;97699:1;97660:40;97656:90;;-1:-1:-1;97732:1:0;;97598:206::o;97656:90::-;97763:33;-1:-1:-1;;;;;;;;;;;97794:1:0;45748:153;45838:7;45865:18;;;:12;:18;;;;;:28;;45887:5;45865:21;:28::i;:::-;45858:35;45748:153;-1:-1:-1;;;45748:153:0:o;24980:147::-;25066:4;25090:12;;;;;;;;;;;-1:-1:-1;;;;;25090:29:0;;;;;;;;;;;;;;;24980:147::o;52180:104::-;52236:13;52269:7;52262:14;;;;;:::i;56513:436::-;56606:4;3572:10;56606:4;56689:25;3572:10;56706:7;56689:9;:25::i;:::-;56662:52;;56753:15;56733:16;:35;;56725:85;;;;-1:-1:-1;;;56725:85:0;;16157:2:1;56725:85:0;;;16139:21:1;16196:2;16176:18;;;16169:30;16235:34;16215:18;;;16208:62;-1:-1:-1;;;16286:18:1;;;16279:35;16331:19;;56725:85:0;15955:401:1;56725:85:0;56846:60;56855:5;56862:7;56890:15;56871:16;:34;56846:8;:60::i;:::-;-1:-1:-1;56937:4:0;;56513:436;-1:-1:-1;;;;56513:436:0:o;99250:225::-;99354:4;99380:22;3572:10;97982:113;:::i;99380:22::-;99379:23;99371:52;;;;-1:-1:-1;;;99371:52:0;;16563:2:1;99371:52:0;;;16545:21:1;16602:2;16582:18;;;16575:30;-1:-1:-1;;;16621:18:1;;;16614:46;16677:18;;99371:52:0;16361:340:1;99371:52:0;99441:26;99456:2;99460:6;99441:14;:26::i;46075:142::-;46155:7;46182:18;;;:12;:18;;;;;:27;;:25;:27::i;94714:369::-;94805:9;94800:276;94820:16;;;94800:276;;;94859:12;;94904:4;94941:5;;94947:1;94941:8;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;94896:68;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94858:106;;;;94984:7;94983:8;:24;;;;;94995:12;94983:24;94979:86;;;95028:21;95042:6;95028:13;:21::i;:::-;94843:233;;94838:3;;;;;:::i;:::-;;;;94800:276;;;;94714:369;;;:::o;91723:645::-;91967:8;91948:15;:27;;91940:69;;;;-1:-1:-1;;;91940:69:0;;17850:2:1;91940:69:0;;;17832:21:1;17889:2;17869:18;;;17862:30;17928:31;17908:18;;;17901:59;17977:18;;91940:69:0;17648:353:1;91940:69:0;92022:18;90898:95;92082:5;92089:7;92098:5;92105:16;92115:5;92105:9;:16::i;:::-;92053:79;;;;;;18293:25:1;;;;-1:-1:-1;;;;;18392:15:1;;;18372:18;;;18365:43;18444:15;;;;18424:18;;;18417:43;18476:18;;;18469:34;18519:19;;;18512:35;18563:19;;;18556:35;;;18265:19;;92053:79:0;;;;;;;;;;;;92043:90;;;;;;92022:111;;92146:12;92161:28;92178:10;92161:16;:28::i;:::-;92146:43;;92202:14;92219:28;92233:4;92239:1;92242;92245;92219:13;:28::i;:::-;92202:45;;92276:5;-1:-1:-1;;;;;92266:15:0;:6;-1:-1:-1;;;;;92266:15:0;;92258:58;;;;-1:-1:-1;;;92258:58:0;;18804:2:1;92258:58:0;;;18786:21:1;18843:2;18823:18;;;18816:30;18882:32;18862:18;;;18855:60;18932:18;;92258:58:0;18602:354:1;92258:58:0;92329:31;92338:5;92345:7;92354:5;92329:8;:31::i;:::-;91929:439;;;91723:645;;;;;;;:::o;27388:149::-;26581:7;26608:12;;;;;;;;;;:22;;;24576:16;24587:4;24576:10;:16::i;:::-;27503:26:::1;27515:4;27521:7;27503:11;:26::i;98298:373::-:0;98370:38;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;98370:38::-;98348:109;;;;-1:-1:-1;;;98348:109:0;;19163:2:1;98348:109:0;;;19145:21:1;19202:2;19182:18;;;19175:30;-1:-1:-1;;;19221:18:1;;;19214:51;19282:18;;98348:109:0;18961:345:1;98348:109:0;98477:7;;-1:-1:-1;;;98477:7:0;;;;98476:8;98468:40;;;;-1:-1:-1;;;98468:40:0;;19513:2:1;98468:40:0;;;19495:21:1;19552:2;19532:18;;;19525:30;-1:-1:-1;;;19571:18:1;;;19564:49;19630:18;;98468:40:0;19311:343:1;98468:40:0;53178:12;;98527:6;:29;;98519:61;;;;-1:-1:-1;;;98519:61:0;;19861:2:1;98519:61:0;;;19843:21:1;19900:2;19880:18;;;19873:30;-1:-1:-1;;;19919:18:1;;;19912:49;19978:18;;98519:61:0;19659:343:1;98519:61:0;98593:7;:14;;-1:-1:-1;;;;98593:14:0;-1:-1:-1;;;98593:14:0;;;98618:4;:13;;;98649:14;;;;;;98625:6;1836:25:1;;1824:2;1809:18;;1690:177;53850:151:0;-1:-1:-1;;;;;53966:18:0;;;53939:7;53966:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;53850:151::o;97982:113::-;-1:-1:-1;;;;;98063:24:0;98039:4;98063:24;;;:14;:24;;;;;;;;;97982:113::o;102440:307::-;102578:37;-1:-1:-1;;;;;;;;;;;3572:10:0;24980:147;:::i;102578:37::-;102570:70;;;;-1:-1:-1;;;102570:70:0;;20209:2:1;102570:70:0;;;20191:21:1;20248:2;20228:18;;;20221:30;-1:-1:-1;;;20267:18:1;;;20260:50;20327:18;;102570:70:0;20007:344:1;102570:70:0;102659:14;102668:4;102659:8;:14::i;:::-;102651:48;;;;-1:-1:-1;;;102651:48:0;;20558:2:1;102651:48:0;;;20540:21:1;20597:2;20577:18;;;20570:30;-1:-1:-1;;;20616:18:1;;;20609:51;20677:18;;102651:48:0;20356:345:1;102651:48:0;102712:27;102722:4;102728:2;102732:6;102712:9;:27::i;24684:204::-;24769:4;-1:-1:-1;;;;;;24793:47:0;;-1:-1:-1;;;24793:47:0;;:87;;-1:-1:-1;;;;;;;;;;5263:40:0;;;24844:36;5154:157;60506:346;-1:-1:-1;;;;;60608:19:0;;60600:68;;;;-1:-1:-1;;;60600:68:0;;20908:2:1;60600:68:0;;;20890:21:1;20947:2;20927:18;;;20920:30;20986:34;20966:18;;;20959:62;-1:-1:-1;;;21037:18:1;;;21030:34;21081:19;;60600:68:0;20706:400:1;60600:68:0;-1:-1:-1;;;;;60687:21:0;;60679:68;;;;-1:-1:-1;;;60679:68:0;;21313:2:1;60679:68:0;;;21295:21:1;21352:2;21332:18;;;21325:30;21391:34;21371:18;;;21364:62;-1:-1:-1;;;21442:18:1;;;21435:32;21484:19;;60679:68:0;21111:398:1;60679:68:0;-1:-1:-1;;;;;60760:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;60812:32;;1836:25:1;;;60812:32:0;;1809:18:1;60812:32:0;;;;;;;60506:346;;;:::o;102755:202::-;97457:4;;102870:6;102848:19;53178:12;;;53090:108;102848:19;:28;;;;:::i;:::-;:37;;102840:68;;;;-1:-1:-1;;;102840:68:0;;21716:2:1;102840:68:0;;;21698:21:1;21755:2;21735:18;;;21728:30;-1:-1:-1;;;21774:18:1;;;21767:48;21832:18;;102840:68:0;21514:342:1;102840:68:0;102921:28;102933:7;102942:6;102921:11;:28::i;55102:261::-;55199:4;3572:10;55257:38;55273:4;3572:10;55288:6;55257:15;:38::i;:::-;55306:27;55316:4;55322:2;55326:6;55306:9;:27::i;25431:105::-;25498:30;25509:4;3572:10;25498;:30::i;:::-;25431:105;:::o;102965:352::-;-1:-1:-1;;;;;;;;;;;103082:4:0;:23;103078:190;;103148:35;-1:-1:-1;;;;;;;;;;;103148:18:0;:35::i;:::-;:40;103122:134;;;;-1:-1:-1;;;103122:134:0;;22063:2:1;103122:134:0;;;22045:21:1;;;22082:18;;;22075:30;22141:34;22121:18;;;22114:62;22193:18;;103122:134:0;21861:356:1;103122:134:0;103278:31;103295:4;103301:7;103278:16;:31::i;88063:268::-;88116:7;88148:4;-1:-1:-1;;;;;88157:11:0;88140:28;;:63;;;;;88189:14;88172:13;:31;88140:63;88136:188;;;-1:-1:-1;88227:22:0;;88063:268::o;88136:188::-;88289:23;88431:81;;;86255:95;88431:81;;;26914:25:1;88454:11:0;26955:18:1;;;26948:34;;;;88467:14:0;26998:18:1;;;26991:34;88483:13:0;27041:18:1;;;27034:34;88506:4:0;27084:19:1;;;27077:61;88394:7:0;;26886:19:1;;88431:81:0;;;;;;;;;;;;88421:92;;;;;;88414:99;;88339:182;;46573:174;46662:32;46680:4;46686:7;46662:17;:32::i;:::-;46705:18;;;;:12;:18;;;;;:34;;46731:7;46705:25;:34::i;59393:675::-;-1:-1:-1;;;;;59477:21:0;;59469:67;;;;-1:-1:-1;;;59469:67:0;;22424:2:1;59469:67:0;;;22406:21:1;22463:2;22443:18;;;22436:30;22502:34;22482:18;;;22475:62;-1:-1:-1;;;22553:18:1;;;22546:31;22594:19;;59469:67:0;22222:397:1;59469:67:0;59549:49;59570:7;59587:1;59591:6;59549:20;:49::i;:::-;-1:-1:-1;;;;;59636:18:0;;59611:22;59636:18;;;:9;:18;;;;;;59673:24;;;;59665:71;;;;-1:-1:-1;;;59665:71:0;;22826:2:1;59665:71:0;;;22808:21:1;22865:2;22845:18;;;22838:30;22904:34;22884:18;;;22877:62;-1:-1:-1;;;22955:18:1;;;22948:32;22997:19;;59665:71:0;22624:398:1;59665:71:0;-1:-1:-1;;;;;59772:18:0;;;;;;:9;:18;;;;;;;;59793:23;;;59772:44;;59911:12;:22;;;;;;;59962:37;1836:25:1;;;59772:18:0;;;59962:37;;1809:18:1;59962:37:0;;;;;;;60012:48;60032:7;60049:1;60053:6;60012:19;:48::i;61143:419::-;61244:24;61271:25;61281:5;61288:7;61271:9;:25::i;:::-;61244:52;;-1:-1:-1;;61311:16:0;:37;61307:248;;61393:6;61373:16;:26;;61365:68;;;;-1:-1:-1;;;61365:68:0;;23229:2:1;61365:68:0;;;23211:21:1;23268:2;23248:18;;;23241:30;23307:31;23287:18;;;23280:59;23356:18;;61365:68:0;23027:353:1;61365:68:0;61477:51;61486:5;61493:7;61521:6;61502:16;:25;61477:8;:51::i;83581:274::-;83675:13;81526:66;83705:47;;83701:147;;83776:15;83785:5;83776:8;:15::i;:::-;83769:22;;;;83701:147;83831:5;83824:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41053:158;41127:7;41178:22;41182:3;41194:5;41178:3;:22::i;53594:193::-;53673:4;3572:10;53729:28;3572:10;53746:2;53750:6;53729:9;:28::i;40582:117::-;40645:7;40672:19;40680:3;35882:18;;35799:109;93586:498;93830:2;93809:11;:18;:23;93805:59;;;93852:11;93841:23;;-1:-1:-1;;;93841:23:0;;;;;;;;:::i;93805:59::-;93968:4;93955:11;93951:22;93936:37;;94012:11;94001:33;;;;;;;;;;;;:::i;:::-;93994:41;;-1:-1:-1;;;93994:41:0;;;;;;;;:::i;92945:207::-;-1:-1:-1;;;;;93066:14:0;;93005:15;93066:14;;;:7;:14;;;;;65947;;66084:1;66066:19;;;;65947:14;93127:17;93022:130;92945:207;;;:::o;89163:167::-;89240:7;89267:55;89289:20;:18;:20::i;:::-;89311:10;75013:4;75007:11;-1:-1:-1;;;75032:23:0;;75085:4;75076:14;;75069:39;;;;75138:4;75129:14;;75122:34;75193:4;75178:20;;;74810:406;73026:236;73111:7;73132:17;73151:18;73173:25;73184:4;73190:1;73193;73196;73173:10;:25::i;:::-;73131:67;;;;73209:18;73221:5;73209:11;:18::i;:::-;-1:-1:-1;73245:9:0;73026:236;-1:-1:-1;;;;;73026:236:0:o;57419:806::-;-1:-1:-1;;;;;57516:18:0;;57508:68;;;;-1:-1:-1;;;57508:68:0;;24463:2:1;57508:68:0;;;24445:21:1;24502:2;24482:18;;;24475:30;24541:34;24521:18;;;24514:62;-1:-1:-1;;;24592:18:1;;;24585:35;24637:19;;57508:68:0;24261:401:1;57508:68:0;-1:-1:-1;;;;;57595:16:0;;57587:64;;;;-1:-1:-1;;;57587:64:0;;24869:2:1;57587:64:0;;;24851:21:1;24908:2;24888:18;;;24881:30;24947:34;24927:18;;;24920:62;-1:-1:-1;;;24998:18:1;;;24991:33;25041:19;;57587:64:0;24667:399:1;57587:64:0;57664:38;57685:4;57691:2;57695:6;57664:20;:38::i;:::-;-1:-1:-1;;;;;57737:15:0;;57715:19;57737:15;;;:9;:15;;;;;;57771:21;;;;57763:72;;;;-1:-1:-1;;;57763:72:0;;25273:2:1;57763:72:0;;;25255:21:1;25312:2;25292:18;;;25285:30;25351:34;25331:18;;;25324:62;-1:-1:-1;;;25402:18:1;;;25395:36;25448:19;;57763:72:0;25071:402:1;57763:72:0;-1:-1:-1;;;;;57871:15:0;;;;;;;:9;:15;;;;;;57889:20;;;57871:38;;58089:13;;;;;;;;;;:23;;;;;;58141:26;;;;;;57903:6;1836:25:1;;1824:2;1809:18;;1690:177;58141:26:0;;;;;;;;58180:37;58200:4;58206:2;58210:6;58180:19;:37::i;58512:548::-;-1:-1:-1;;;;;58596:21:0;;58588:65;;;;-1:-1:-1;;;58588:65:0;;25680:2:1;58588:65:0;;;25662:21:1;25719:2;25699:18;;;25692:30;25758:33;25738:18;;;25731:61;25809:18;;58588:65:0;25478:355:1;58588:65:0;58666:49;58695:1;58699:7;58708:6;58666:20;:49::i;:::-;58744:6;58728:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;58899:18:0;;;;;;:9;:18;;;;;;;;:28;;;;;;58954:37;1836:25:1;;;58954:37:0;;1809:18:1;58954:37:0;;;;;;;59004:48;59032:1;59036:7;59045:6;59004:19;:48::i;25826:492::-;25915:22;25923:4;25929:7;25915;:22::i;:::-;25910:401;;26103:28;26123:7;26103:19;:28::i;:::-;26204:38;26232:4;26239:2;26204:19;:38::i;:::-;26008:257;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;26008:257:0;;;;;;;;;;-1:-1:-1;;;25954:345:0;;;;;;;:::i;46310:169::-;46398:31;46415:4;46421:7;46398:16;:31::i;:::-;46440:18;;;;:12;:18;;;;;:31;;46463:7;46440:22;:31::i;30107:239::-;30191:22;30199:4;30205:7;30191;:22::i;:::-;30187:152;;;30262:5;30230:12;;;;;;;;;;;-1:-1:-1;;;;;30230:29:0;;;;;;;;;;:37;;-1:-1:-1;;30230:37:0;;;30287:40;3572:10;;30230:12;;30287:40;;30262:5;30287:40;30107:239;;:::o;40085:158::-;40158:4;40182:53;40190:3;-1:-1:-1;;;;;40210:23:0;;40182:7;:53::i;103325:366::-;103596:7;;3572:10;;-1:-1:-1;;;103596:7:0;;;;103595:8;;:44;;;103607:32;-1:-1:-1;;;;;;;;;;;103631:7:0;103607;:32::i;:::-;103573:110;;;;-1:-1:-1;;;103573:110:0;;16563:2:1;103573:110:0;;;16545:21:1;16602:2;16582:18;;;16575:30;-1:-1:-1;;;16621:18:1;;;16614:46;16677:18;;103573:110:0;16361:340:1;103699:503:0;103908:17;;-1:-1:-1;;;;;103908:17:0;:31;103904:291;;103995:17;;-1:-1:-1;;;;;103995:17:0;103977:47;3572:10;103977:182;;-1:-1:-1;;;;;;103977:182:0;;;;;;;-1:-1:-1;;;;;27436:15:1;;;103977:182:0;;;27418:34:1;27488:15;;;27468:18;;;27461:43;27540:15;;;27520:18;;;27513:43;27572:18;;;27565:34;;;27352:19;;103977:182:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;103956:228;;;103699:503;;;:::o;82235:415::-;82294:13;82320:11;82334:16;82345:4;82334:10;:16::i;:::-;82460:14;;;82471:2;82460:14;;;;;;;;;82320:30;;-1:-1:-1;82440:17:0;;82460:14;;;;;;;;;-1:-1:-1;;;82553:16:0;;;-1:-1:-1;82599:4:0;82590:14;;82583:28;;;;-1:-1:-1;82553:16:0;82235:415::o;36262:120::-;36329:7;36356:3;:11;;36368:5;36356:18;;;;;;;;:::i;:::-;;;;;;;;;36349:25;;36262:120;;;;:::o;71410:1477::-;71498:7;;72432:66;72419:79;;72415:163;;;-1:-1:-1;72531:1:0;;-1:-1:-1;72535:30:0;72515:51;;72415:163;72692:24;;;72675:14;72692:24;;;;;;;;;27837:25:1;;;27910:4;27898:17;;27878:18;;;27871:45;;;;27932:18;;;27925:34;;;27975:18;;;27968:34;;;72692:24:0;;27809:19:1;;72692:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;72692:24:0;;-1:-1:-1;;72692:24:0;;;-1:-1:-1;;;;;;;72731:20:0;;72727:103;;72784:1;72788:29;72768:50;;;;;;;72727:103;72850:6;-1:-1:-1;72858:20:0;;-1:-1:-1;71410:1477:0;;;;;;;;:::o;66870:521::-;66948:20;66939:5;:29;;;;;;;;:::i;:::-;;66935:449;;66870:521;:::o;66935:449::-;67046:29;67037:5;:38;;;;;;;;:::i;:::-;;67033:351;;67092:34;;-1:-1:-1;;;67092:34:0;;28347:2:1;67092:34:0;;;28329:21:1;28386:2;28366:18;;;28359:30;28425:26;28405:18;;;28398:54;28469:18;;67092:34:0;28145:348:1;67033:351:0;67157:35;67148:5;:44;;;;;;;;:::i;:::-;;67144:240;;67209:41;;-1:-1:-1;;;67209:41:0;;28700:2:1;67209:41:0;;;28682:21:1;28739:2;28719:18;;;28712:30;28778:33;28758:18;;;28751:61;28829:18;;67209:41:0;28498:355:1;67144:240:0;67281:30;67272:5;:39;;;;;;;;:::i;:::-;;67268:116;;67328:44;;-1:-1:-1;;;67328:44:0;;29060:2:1;67328:44:0;;;29042:21:1;29099:2;29079:18;;;29072:30;29138:34;29118:18;;;29111:62;-1:-1:-1;;;29189:18:1;;;29182:32;29231:19;;67328:44:0;28858:398:1;21770:151:0;21828:13;21861:52;-1:-1:-1;;;;;21873:22:0;;19645:2;21166:447;21241:13;21267:19;21299:10;21303:6;21299:1;:10;:::i;:::-;:14;;21312:1;21299:14;:::i;:::-;21289:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21289:25:0;;21267:47;;-1:-1:-1;;;21325:6:0;21332:1;21325:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;21325:15:0;;;;;;;;;-1:-1:-1;;;21351:6:0;21358:1;21351:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;21351:15:0;;;;;;;;-1:-1:-1;21382:9:0;21394:10;21398:6;21394:1;:10;:::i;:::-;:14;;21407:1;21394:14;:::i;:::-;21382:26;;21377:131;21414:1;21410;:5;21377:131;;;-1:-1:-1;;;21458:5:0;21466:3;21458:11;21449:21;;;;;;;:::i;:::-;;;;21437:6;21444:1;21437:9;;;;;;;;:::i;:::-;;;;:33;-1:-1:-1;;;;;21437:33:0;;;;;;;;-1:-1:-1;21495:1:0;21485:11;;;;;21417:3;;;:::i;:::-;;;21377:131;;;-1:-1:-1;21526:10:0;;21518:55;;;;-1:-1:-1;;;21518:55:0;;29777:2:1;21518:55:0;;;29759:21:1;;;29796:18;;;29789:30;29855:34;29835:18;;;29828:62;29907:18;;21518:55:0;29575:356:1;29689:238:0;29773:22;29781:4;29787:7;29773;:22::i;:::-;29768:152;;29812:6;:12;;;;;;;;;;;-1:-1:-1;;;;;29812:29:0;;;;;;;;;:36;;-1:-1:-1;;29812:36:0;29844:4;29812:36;;;29895:12;3572:10;;3492:98;29895:12;-1:-1:-1;;;;;29868:40:0;29886:7;-1:-1:-1;;;;;29868:40:0;29880:4;29868:40;;;;;;;;;;29689:238;;:::o;39757:152::-;39827:4;39851:50;39856:3;-1:-1:-1;;;;;39876:23:0;;39851:4;:50::i;34078:1420::-;34144:4;34283:19;;;:12;;;:19;;;;;;34319:15;;34315:1176;;34694:21;34718:14;34731:1;34718:10;:14;:::i;:::-;34767:18;;34694:38;;-1:-1:-1;34747:17:0;;34767:22;;34788:1;;34767:22;:::i;:::-;34747:42;;34823:13;34810:9;:26;34806:405;;34857:17;34877:3;:11;;34889:9;34877:22;;;;;;;;:::i;:::-;;;;;;;;;34857:42;;35031:9;35002:3;:11;;35014:13;35002:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;35116:23;;;:12;;;:23;;;;;:36;;;34806:405;35292:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;35387:3;:12;;:19;35400:5;35387:19;;;;;;;;;;;35380:26;;;35430:4;35423:11;;;;;;;34315:1176;35474:5;35467:12;;;;;82727:251;82788:7;82861:4;82825:40;;82889:2;82880:11;;82876:71;;;82915:20;;-1:-1:-1;;;82915:20:0;;;;;;;;;;;33488:414;33551:4;35681:19;;;:12;;;:19;;;;;;33568:327;;-1:-1:-1;33611:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;33794:18;;33772:19;;;:12;;;:19;;;;;;:40;;;;33827:11;;33568:327;-1:-1:-1;33878:5:0;33871:12;;14:286:1;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:1;;209:43;;199:71;;266:1;263;256:12;497:250;582:1;592:113;606:6;603:1;600:13;592:113;;;682:11;;;676:18;663:11;;;656:39;628:2;621:10;592:113;;;-1:-1:-1;;739:1:1;721:16;;714:27;497:250::o;752:271::-;794:3;832:5;826:12;859:6;854:3;847:19;875:76;944:6;937:4;932:3;928:14;921:4;914:5;910:16;875:76;:::i;:::-;1005:2;984:15;-1:-1:-1;;980:29:1;971:39;;;;1012:4;967:50;;752:271;-1:-1:-1;;752:271:1:o;1028:220::-;1177:2;1166:9;1159:21;1140:4;1197:45;1238:2;1227:9;1223:18;1215:6;1197:45;:::i;1253:173::-;1321:20;;-1:-1:-1;;;;;1370:31:1;;1360:42;;1350:70;;1416:1;1413;1406:12;1350:70;1253:173;;;:::o;1431:254::-;1499:6;1507;1560:2;1548:9;1539:7;1535:23;1531:32;1528:52;;;1576:1;1573;1566:12;1528:52;1599:29;1618:9;1599:29;:::i;:::-;1589:39;1675:2;1660:18;;;;1647:32;;-1:-1:-1;;;1431:254:1:o;1872:367::-;1935:8;1945:6;1999:3;1992:4;1984:6;1980:17;1976:27;1966:55;;2017:1;2014;2007:12;1966:55;-1:-1:-1;2040:20:1;;2083:18;2072:30;;2069:50;;;2115:1;2112;2105:12;2069:50;2152:4;2144:6;2140:17;2128:29;;2212:3;2205:4;2195:6;2192:1;2188:14;2180:6;2176:27;2172:38;2169:47;2166:67;;;2229:1;2226;2219:12;2166:67;1872:367;;;;;:::o;2244:127::-;2305:10;2300:3;2296:20;2293:1;2286:31;2336:4;2333:1;2326:15;2360:4;2357:1;2350:15;2376:275;2447:2;2441:9;2512:2;2493:13;;-1:-1:-1;;2489:27:1;2477:40;;2547:18;2532:34;;2568:22;;;2529:62;2526:88;;;2594:18;;:::i;:::-;2630:2;2623:22;2376:275;;-1:-1:-1;2376:275:1:o;2656:186::-;2704:4;2737:18;2729:6;2726:30;2723:56;;;2759:18;;:::i;:::-;-1:-1:-1;2825:2:1;2804:15;-1:-1:-1;;2800:29:1;2831:4;2796:40;;2656:186::o;2847:1472::-;3005:6;3013;3021;3029;3037;3045;3053;3106:3;3094:9;3085:7;3081:23;3077:33;3074:53;;;3123:1;3120;3113:12;3074:53;3146:29;3165:9;3146:29;:::i;:::-;3136:39;;3194:38;3228:2;3217:9;3213:18;3194:38;:::i;:::-;3184:48;;3283:2;3272:9;3268:18;3255:32;3306:18;3347:2;3339:6;3336:14;3333:34;;;3363:1;3360;3353:12;3333:34;3402:70;3464:7;3455:6;3444:9;3440:22;3402:70;:::i;:::-;3491:8;;-1:-1:-1;3376:96:1;-1:-1:-1;3579:2:1;3564:18;;3551:32;;-1:-1:-1;3595:16:1;;;3592:36;;;3624:1;3621;3614:12;3592:36;3663:72;3727:7;3716:8;3705:9;3701:24;3663:72;:::i;:::-;3754:8;;-1:-1:-1;3637:98:1;-1:-1:-1;3842:3:1;3827:19;;3814:33;;-1:-1:-1;3859:16:1;;;3856:36;;;3888:1;3885;3878:12;3856:36;-1:-1:-1;3911:24:1;;3966:4;3958:13;;3954:27;-1:-1:-1;3944:55:1;;3995:1;3992;3985:12;3944:55;4031:2;4018:16;4056:48;4072:31;4100:2;4072:31;:::i;:::-;4056:48;:::i;:::-;4127:2;4120:5;4113:17;4167:7;4162:2;4157;4153;4149:11;4145:20;4142:33;4139:53;;;4188:1;4185;4178:12;4139:53;4243:2;4238;4234;4230:11;4225:2;4218:5;4214:14;4201:45;4287:1;4282:2;4277;4270:5;4266:14;4262:23;4255:34;4308:5;4298:15;;;;;2847:1472;;;;;;;;;;:::o;4324:186::-;4383:6;4436:2;4424:9;4415:7;4411:23;4407:32;4404:52;;;4452:1;4449;4442:12;4404:52;4475:29;4494:9;4475:29;:::i;4515:328::-;4592:6;4600;4608;4661:2;4649:9;4640:7;4636:23;4632:32;4629:52;;;4677:1;4674;4667:12;4629:52;4700:29;4719:9;4700:29;:::i;:::-;4690:39;;4748:38;4782:2;4771:9;4767:18;4748:38;:::i;:::-;4738:48;;4833:2;4822:9;4818:18;4805:32;4795:42;;4515:328;;;;;:::o;4848:180::-;4907:6;4960:2;4948:9;4939:7;4935:23;4931:32;4928:52;;;4976:1;4973;4966:12;4928:52;-1:-1:-1;4999:23:1;;4848:180;-1:-1:-1;4848:180:1:o;5215:254::-;5283:6;5291;5344:2;5332:9;5323:7;5319:23;5315:32;5312:52;;;5360:1;5357;5350:12;5312:52;5396:9;5383:23;5373:33;;5425:38;5459:2;5448:9;5444:18;5425:38;:::i;:::-;5415:48;;5215:254;;;;;:::o;6056:1259::-;6462:3;6457;6453:13;6445:6;6441:26;6430:9;6423:45;6404:4;6487:2;6525:3;6520:2;6509:9;6505:18;6498:31;6552:46;6593:3;6582:9;6578:19;6570:6;6552:46;:::i;:::-;6646:9;6638:6;6634:22;6629:2;6618:9;6614:18;6607:50;6680:33;6706:6;6698;6680:33;:::i;:::-;6744:2;6729:18;;6722:34;;;-1:-1:-1;;;;;6793:32:1;;6787:3;6772:19;;6765:61;6813:3;6842:19;;6835:35;;;6907:22;;;6901:3;6886:19;;6879:51;6979:13;;7001:22;;;7077:15;;;;-1:-1:-1;7039:15:1;;;;-1:-1:-1;7120:169:1;7134:6;7131:1;7128:13;7120:169;;;7195:13;;7183:26;;7264:15;;;;7229:12;;;;7156:1;7149:9;7120:169;;;-1:-1:-1;7306:3:1;;6056:1259;-1:-1:-1;;;;;;;;;;;;6056:1259:1:o;7320:248::-;7388:6;7396;7449:2;7437:9;7428:7;7424:23;7420:32;7417:52;;;7465:1;7462;7455:12;7417:52;-1:-1:-1;;7488:23:1;;;7558:2;7543:18;;;7530:32;;-1:-1:-1;7320:248:1:o;7573:609::-;7676:6;7684;7692;7745:2;7733:9;7724:7;7720:23;7716:32;7713:52;;;7761:1;7758;7751:12;7713:52;7801:9;7788:23;7834:18;7826:6;7823:30;7820:50;;;7866:1;7863;7856:12;7820:50;7905:70;7967:7;7958:6;7947:9;7943:22;7905:70;:::i;:::-;7994:8;;-1:-1:-1;7879:96:1;-1:-1:-1;;8079:2:1;8064:18;;8051:32;8119:13;;8112:21;8102:32;;8092:60;;8148:1;8145;8138:12;8092:60;8171:5;8161:15;;;7573:609;;;;;:::o;8187:693::-;8298:6;8306;8314;8322;8330;8338;8346;8399:3;8387:9;8378:7;8374:23;8370:33;8367:53;;;8416:1;8413;8406:12;8367:53;8439:29;8458:9;8439:29;:::i;:::-;8429:39;;8487:38;8521:2;8510:9;8506:18;8487:38;:::i;:::-;8477:48;;8572:2;8561:9;8557:18;8544:32;8534:42;;8623:2;8612:9;8608:18;8595:32;8585:42;;8677:3;8666:9;8662:19;8649:33;8722:4;8715:5;8711:16;8704:5;8701:27;8691:55;;8742:1;8739;8732:12;8691:55;8187:693;;;;-1:-1:-1;8187:693:1;;;;8765:5;8817:3;8802:19;;8789:33;;-1:-1:-1;8869:3:1;8854:19;;;8841:33;;8187:693;-1:-1:-1;;8187:693:1:o;8885:260::-;8953:6;8961;9014:2;9002:9;8993:7;8989:23;8985:32;8982:52;;;9030:1;9027;9020:12;8982:52;9053:29;9072:9;9053:29;:::i;:::-;9043:39;;9101:38;9135:2;9124:9;9120:18;9101:38;:::i;9150:380::-;9229:1;9225:12;;;;9272;;;9293:61;;9347:4;9339:6;9335:17;9325:27;;9293:61;9400:2;9392:6;9389:14;9369:18;9366:38;9363:161;;9446:10;9441:3;9437:20;9434:1;9427:31;9481:4;9478:1;9471:15;9509:4;9506:1;9499:15;9885:127;9946:10;9941:3;9937:20;9934:1;9927:31;9977:4;9974:1;9967:15;10001:4;9998:1;9991:15;11133:127;11194:10;11189:3;11185:20;11182:1;11175:31;11225:4;11222:1;11215:15;11249:4;11246:1;11239:15;11265:125;11330:9;;;11351:10;;;11348:36;;;11364:18;;:::i;16706:521::-;16783:4;16789:6;16849:11;16836:25;16943:2;16939:7;16928:8;16912:14;16908:29;16904:43;16884:18;16880:68;16870:96;;16962:1;16959;16952:12;16870:96;16989:33;;17041:20;;;-1:-1:-1;17084:18:1;17073:30;;17070:50;;;17116:1;17113;17106:12;17070:50;17149:4;17137:17;;-1:-1:-1;17180:14:1;17176:27;;;17166:38;;17163:58;;;17217:1;17214;17207:12;17232:271;17415:6;17407;17402:3;17389:33;17371:3;17441:16;;17466:13;;;17441:16;17232:271;-1:-1:-1;17232:271:1:o;17508:135::-;17547:3;17568:17;;;17565:43;;17588:18;;:::i;:::-;-1:-1:-1;17635:1:1;17624:13;;17508:135::o;23608:648::-;23688:6;23741:2;23729:9;23720:7;23716:23;23712:32;23709:52;;;23757:1;23754;23747:12;23709:52;23790:9;23784:16;23823:18;23815:6;23812:30;23809:50;;;23855:1;23852;23845:12;23809:50;23878:22;;23931:4;23923:13;;23919:27;-1:-1:-1;23909:55:1;;23960:1;23957;23950:12;23909:55;23989:2;23983:9;24014:48;24030:31;24058:2;24030:31;:::i;24014:48::-;24085:2;24078:5;24071:17;24125:7;24120:2;24115;24111;24107:11;24103:20;24100:33;24097:53;;;24146:1;24143;24136:12;24097:53;24159:67;24223:2;24218;24211:5;24207:14;24202:2;24198;24194:11;24159:67;:::i;:::-;24245:5;23608:648;-1:-1:-1;;;;;23608:648:1:o;25838:812::-;26249:25;26244:3;26237:38;26219:3;26304:6;26298:13;26320:75;26388:6;26383:2;26378:3;26374:12;26367:4;26359:6;26355:17;26320:75;:::i;:::-;-1:-1:-1;;;26454:2:1;26414:16;;;26446:11;;;26439:40;26504:13;;26526:76;26504:13;26588:2;26580:11;;26573:4;26561:17;;26526:76;:::i;:::-;26622:17;26641:2;26618:26;;25838:812;-1:-1:-1;;;;25838:812:1:o;28013:127::-;28074:10;28069:3;28065:20;28062:1;28055:31;28105:4;28102:1;28095:15;28129:4;28126:1;28119:15;29261:168;29334:9;;;29365;;29382:15;;;29376:22;;29362:37;29352:71;;29403:18;;:::i;29434:136::-;29473:3;29501:5;29491:39;;29510:18;;:::i;:::-;-1:-1:-1;;;29546:18:1;;29434:136::o;29936:128::-;30003:9;;;30024:11;;;30021:37;;;30038:18;;:::i;30069:127::-;30130:10;30125:3;30121:20;30118:1;30111:31;30161:4;30158:1;30151:15;30185:4;30182:1;30175:15
Swarm Source
ipfs://b7b5759bbf1c3c6b5069727e581b9b556166ce96c367c096953915e699987df7
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 ]
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.