Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
VeridaToken
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "./IVDA.sol"; // import "hardhat/console.sol"; contract VeridaToken is ERC20PausableUpgradeable, OwnableUpgradeable, IVeridaToken, AccessControlEnumerableUpgradeable { string public constant TOKEN_NAME = "Verida"; string public constant TOKEN_SYMBOL = "VDA"; uint8 public constant DECIMAL = 18; uint256 public constant MAX_SUPPLY = 1_000_000_000 * (10 ** DECIMAL); bytes32 internal constant MINT_ROLE = keccak256('MintRole'); uint32 public constant RATE_DENOMINATOR = 1000; // Set up rate from 0.001% // Rate values can be set up to 30% uint32 public constant AMOUNT_RATE_LIMIT = 30 * RATE_DENOMINATOR; // State variables mapping(address => bool) public isExcludedFromSellAmountLimit; mapping(address => bool) public isExcludedFromWalletAmountLimit; uint256 internal maxAmountPerWallet; uint256 internal maxAmountPerSell; uint32 public maxAmountPerWalletRate; uint32 public maxAmountPerSellRate; bool public isMaxAmountPerWalletEnabled; bool public isMaxAmountPerSellEnabled; bool public isTransferEnabled; /** * @notice Gap for later use */ uint256[20] private __gap; // Custom errors error OutOfSupplyLimit(); error DuplicatedRequest(); error InvalidAddress(); error TransferLimited(); error BurnNotAllowed(); error WalletAmountLimited(); error SellAmountLimited(); error NoPermission(); error InvalidRate(); /** * Store addresses that a automatic market make pairs. * Any transfers to these addresses could be subject to a maximum transfer amount */ mapping(address => bool) public automatedMarketMakerPairs; modifier validMint(uint256 amount) { if ((totalSupply() + amount) > MAX_SUPPLY) { revert OutOfSupplyLimit(); } _; } event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event UpdateMaxAmountPerWalletRate(uint32 newRate, uint32 oldRate); event UpdateMaxAmountPerSell(uint32 newRate, uint32 oldRate); event ExcludeFromSellAmountLimit(address indexed account, bool excluded); event ExcludeFromWalletAmountLimit(address indexed account, bool excluded); event EnableMaxAmountPerWallet(bool isEnabled); event EnableMaxAmountPerSell(bool isEnabled); function initialize() external initializer { __ERC20_init(TOKEN_NAME, TOKEN_SYMBOL); __ERC20Pausable_init(); __Ownable_init(); __AccessControlEnumerable_init(); _grantRole(DEFAULT_ADMIN_ROLE, owner()); grantRole(MINT_ROLE, owner()); maxAmountPerSellRate = 100; //100 / RATE_DENOMINATOR = 0.1% maxAmountPerWalletRate = 20 * RATE_DENOMINATOR; // 20% _updateMaxAmountPerWallet(); _updateMaxAmountPerSell(); isExcludedFromSellAmountLimit[owner()] = true; isExcludedFromWalletAmountLimit[owner()] = true; isTransferEnabled = false; } /** @dev Decimals of Verida token */ function decimals() public view virtual override returns (uint8) { return DECIMAL; } /** * @dev Mint `amount` tokens to `to`. */ function mint(address to, uint256 amount) external virtual override validMint(amount) { if (!hasRole(MINT_ROLE, _msgSender())) { revert NoPermission(); } _mint(to, amount); } /** * @dev see {IVeridaToken-addMinter} */ function addMinter(address to) external virtual override payable onlyOwner { if (hasRole(MINT_ROLE, to)) { revert DuplicatedRequest(); } assembly { if iszero(to) { let ptr := mload(0x40) mstore(ptr, 0xe6c4247b00000000000000000000000000000000000000000000000000000000) revert(ptr, 0x4) //revert InvalidAddress() } } grantRole(MINT_ROLE, to); emit AddMinter(to); } /** * @dev see {IVeridaToken-revokeMinter} */ function revokeMinter(address to) external virtual override payable onlyOwner { if (!hasRole(MINT_ROLE, to)) { revert InvalidAddress(); } revokeRole(MINT_ROLE, to); emit RevokeMinter(to); } /** * @dev see {IVeridaToken-getMinterCount} */ function getMinterCount() external view virtual override returns(uint256){ return getRoleMemberCount(MINT_ROLE); } /** * @dev see {IVeridaToken-getMinterList} */ function getMinterList() external view virtual override returns(address[] memory) { uint256 count = getRoleMemberCount(MINT_ROLE); address[] memory minterList = new address[](count); for (uint i; i < count;) { minterList[i] = getRoleMember(MINT_ROLE, i); unchecked { ++i; } } return minterList; } /** * @dev return current version of Verida Token */ function getVersion() external pure virtual returns(string memory){ return "1.0"; } /** * @dev See {IERC20-transfer}. * Checked for lockedAmount on transfer */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { bool transferEnabled = isTransferEnabled; assembly { // If burning operation if eq(iszero(recipient), 1) { let ptr := mload(0x40) mstore(ptr, 0xe5d8776700000000000000000000000000000000000000000000000000000000) revert(ptr, 0x4) //revert BurnNotAllowed() } if eq(iszero(transferEnabled), 1) { if eq(iszero(sender), 0) { let ptr := mload(0x40) mstore(ptr, 0x69126dbd00000000000000000000000000000000000000000000000000000000) revert(ptr, 0x4) //revert TransferLimited() } } } if (isMaxAmountPerWalletEnabled && !isExcludedFromWalletAmountLimit[recipient]) { if ((balanceOf(recipient) + amount) > maxAmountPerWallet) { revert WalletAmountLimited(); } } // isSelling if (isMaxAmountPerSellEnabled && automatedMarketMakerPairs[recipient] && !isExcludedFromSellAmountLimit[sender]) { if (amount > maxAmountPerSell) { revert SellAmountLimited(); } } super._transfer(sender, recipient, amount); } /** * @dev enable/disable AutomatedMarkertMakerPair */ function setAutomatedMarketMakerPair(address pair, bool value) external virtual payable onlyOwner { if (automatedMarketMakerPairs[pair] == value) { revert DuplicatedRequest(); } automatedMarketMakerPairs[pair] = value; emit SetAutomatedMarketMakerPair(pair, value); } /** * @dev update max amount per wallet percent. */ function updateMaxAmountPerWalletRate(uint32 newRate) external virtual payable onlyOwner { if (newRate == 0 || newRate > AMOUNT_RATE_LIMIT) { revert InvalidRate(); } emit UpdateMaxAmountPerWalletRate(newRate, maxAmountPerWalletRate); maxAmountPerWalletRate = newRate; _updateMaxAmountPerWallet(); } /** * @dev Update max amount per wallet. * called when rate updated or total supply updated. */ function _updateMaxAmountPerWallet() internal { maxAmountPerWallet = MAX_SUPPLY * maxAmountPerWalletRate / (RATE_DENOMINATOR * 100); } /** * @dev update max amount per sell percent. */ function updateMaxAmountPerSellRate(uint32 newRate) external virtual payable onlyOwner { if (newRate == 0 || newRate > AMOUNT_RATE_LIMIT) { revert InvalidRate(); } emit UpdateMaxAmountPerSell(newRate, maxAmountPerSellRate); maxAmountPerSellRate = newRate; _updateMaxAmountPerSell(); } /** * @dev Update max amount per sell. * called when rate updated or total supply updated. */ function _updateMaxAmountPerSell() internal { maxAmountPerSell = MAX_SUPPLY * maxAmountPerSellRate / (RATE_DENOMINATOR * 100); } /** * @dev exclude account from sell amount limit */ function excludeFromSellAmountLimit(address account, bool excluded) external virtual payable onlyOwner { if (isExcludedFromSellAmountLimit[account] == excluded) { revert DuplicatedRequest(); } isExcludedFromSellAmountLimit[account] = excluded; emit ExcludeFromSellAmountLimit(account, excluded); } /** * @dev exclude account from wallet amount limit */ function excludeFromWalletAmountLimit(address account, bool excluded) external virtual payable onlyOwner { if (isExcludedFromWalletAmountLimit[account] == excluded) { revert DuplicatedRequest(); } isExcludedFromWalletAmountLimit[account] = excluded; emit ExcludeFromWalletAmountLimit(account, excluded); } /** * @dev enable/disable MaxAmountPerSell */ function enableMaxAmountPerSell(bool isEnabled) external virtual payable onlyOwner { if (isMaxAmountPerSellEnabled == isEnabled) { revert DuplicatedRequest(); } isMaxAmountPerSellEnabled = isEnabled; emit EnableMaxAmountPerSell(isEnabled); } /** * @dev enable/disable MaxAmountPerWallet */ function enableMaxAmountPerWallet(bool isEnabled) external virtual payable onlyOwner { if (isMaxAmountPerWalletEnabled == isEnabled) { revert DuplicatedRequest(); } isMaxAmountPerWalletEnabled = isEnabled; emit EnableMaxAmountPerWallet(isEnabled); } /** * See {IVDA.sol} */ function enableTransfer() external virtual override payable onlyOwner { if (isTransferEnabled) { revert DuplicatedRequest(); } isTransferEnabled = true; } /** * See {OwnableUpgradeable.sol} * @dev give `mint` role to the new owner */ function _transferOwnership(address newOwner) internal virtual override { if (newOwner != address(0x0)) { // Give roles to the new owner if this is not `renounceOwnership` _grantRole(DEFAULT_ADMIN_ROLE, newOwner); grantRole(MINT_ROLE, newOwner); } // Revoke roles from the previous owner address oldOwner = owner(); revokeRole(MINT_ROLE, oldOwner); _revokeRole(DEFAULT_ADMIN_ROLE, oldOwner); super._transferOwnership(newOwner); } /** * See {IVDA.sol} */ function pause() external virtual override payable onlyOwner { _pause(); } /** * See {IVDA.sol} */ function unpause() external virtual override payable onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerableUpgradeable.sol"; import "./AccessControlUpgradeable.sol"; import "../utils/structs/EnumerableSetUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerableUpgradeable).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 This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @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: * * ``` * 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}: * * ``` * 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. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } 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(IAccessControlUpgradeable).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 ", StringsUpgradeable.toHexString(account), " is missing role ", StringsUpgradeable.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 This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // 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 This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.0; import "../ERC20Upgradeable.sol"; import "../../../security/PausableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * IMPORTANT: This contract does not include public pause and unpause functions. In * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will * make the contract unpausable. */ abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { function __ERC20Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __ERC20Pausable_init_unchained() internal onlyInitializing { } /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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 IERC165Upgradeable { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. 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 10, 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 * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { 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 = MathUpgradeable.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 `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @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. * * ``` * 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 EnumerableSetUpgradeable { // 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; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; /** @title Verida Token */ interface IVeridaToken { /** * @dev Allow token mint for 'to'. */ function addMinter(address to) external payable; /** * @dev Revoke mint role from 'to' */ function revokeMinter(address to) external payable; /** * @dev Get Minter count. */ function getMinterCount() external view returns(uint256); /** * @dev Get Minter list. */ function getMinterList() external view returns(address[] memory); /** * @dev Mint `amount` tokens to `to`. */ function mint(address to, uint256 amount) external; /** * @notice Enable token transfer * @dev Only the contract owner enables. Once enabled, not able to disable. */ function enableTransfer() external payable; /** * @notice Pause contract. All transfers become disabled * @dev Only the contract owner is allowed to do this */ function pause() external payable; /** * @notice Unpause contract. Transfers become allowed * @dev Only the contract owner is allowed to do this */ function unpause() external payable; /** * @dev Emitted when MINT_ROLE is added to 'to' address */ event AddMinter(address indexed to); /** * @dev Emitted when MINT_ROLE is revoked from 'to' address */ event RevokeMinter(address indexed to); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"BurnNotAllowed","type":"error"},{"inputs":[],"name":"DuplicatedRequest","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidRate","type":"error"},{"inputs":[],"name":"NoPermission","type":"error"},{"inputs":[],"name":"OutOfSupplyLimit","type":"error"},{"inputs":[],"name":"SellAmountLimited","type":"error"},{"inputs":[],"name":"TransferLimited","type":"error"},{"inputs":[],"name":"WalletAmountLimited","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"AddMinter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"EnableMaxAmountPerSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"EnableMaxAmountPerWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromSellAmountLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromWalletAmountLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"RevokeMinter","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":true,"internalType":"address","name":"pair","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"newRate","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"oldRate","type":"uint32"}],"name":"UpdateMaxAmountPerSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"newRate","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"oldRate","type":"uint32"}],"name":"UpdateMaxAmountPerWalletRate","type":"event"},{"inputs":[],"name":"AMOUNT_RATE_LIMIT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DECIMAL","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATE_DENOMINATOR","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_SYMBOL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"payable","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":"","type":"address"}],"name":"automatedMarketMakerPairs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"enableMaxAmountPerSell","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"enableMaxAmountPerWallet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"enableTransfer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromSellAmountLimit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromWalletAmountLimit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getMinterCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinterList","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":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromSellAmountLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromWalletAmountLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMaxAmountPerSellEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMaxAmountPerWalletEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTransferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmountPerSellRate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmountPerWalletRate","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"address","name":"to","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"payable","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":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"payable","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":[],"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newRate","type":"uint32"}],"name":"updateMaxAmountPerSellRate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newRate","type":"uint32"}],"name":"updateMaxAmountPerWalletRate","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061337d806100206000396000f3fe6080604052600436106103605760003560e01c80638129fc1c116101c6578063a59b6695116100f7578063d547741f11610095578063efa5424d1161006f578063efa5424d146109fe578063f1b50c1d14610a25578063f2fde38b14610a2d578063f804bc8414610a4d57600080fd5b8063d547741f14610976578063dd62ed3e14610996578063de0d6117146109dc57600080fd5b8063bb4fb6ac116100d1578063bb4fb6ac146108f4578063ca15c8731461091a578063cca5dcb61461093a578063cfbd48851461096357600080fd5b8063a59b66951461087b578063a9059cbb146108a3578063b62496f5146108c357600080fd5b806395d89b41116101645780639a7a23d61161013e5780639a7a23d6146108205780639cfb2c5014610833578063a217fddf14610846578063a457c2d71461085b57600080fd5b806395d89b41146107e557806396ed8744146107fa578063983b2d561461080d57600080fd5b80638da5cb5b116101a05780638da5cb5b146107375780638dbb94eb146107695780639010d07c1461077e57806391d148541461079e57600080fd5b80638129fc1c146107075780638456cb591461071c57806385a2d2fc1461072457600080fd5b8063313ce567116102a0578063673a2dba1161023e57806370a082311161021857806370a0823114610693578063715018a6146106c957806379f5d0f6146106de5780637efad8e0146106f157600080fd5b8063673a2dba146106585780636aa7f4fb1461066b5780636ab55fd91461067e57600080fd5b8063395093511161027a57806339509351146105f85780633f4ba83a1461061857806340c10f19146106205780635c975abb1461064057600080fd5b8063313ce567146105a157806332cb6b0c146105c357806336568abe146105d857600080fd5b80631e447b371161030d57806323b872dd116102e757806323b872dd146104ff578063248a9ca31461051f5780632a905318146105505780632f2ff15d1461057f57600080fd5b80631e447b37146104735780631f0bf9a8146104a457806322dad34f146104ce57600080fd5b80630d8e6e2c1161033e5780630d8e6e2c146103dc57806318160ddd14610422578063188214001461044157600080fd5b806301ffc9a71461036557806306fdde031461039a578063095ea7b3146103bc575b600080fd5b34801561037157600080fd5b50610385610380366004612d1e565b610a6b565b60405190151581526020015b60405180910390f35b3480156103a657600080fd5b506103af610aaf565b6040516103919190612d6c565b3480156103c857600080fd5b506103856103d7366004612dbb565b610b41565b3480156103e857600080fd5b5060408051808201909152600381527f312e30000000000000000000000000000000000000000000000000000000000060208201526103af565b34801561042e57600080fd5b506035545b604051908152602001610391565b34801561044d57600080fd5b506103af6040518060400160405280600681526020016556657269646160d01b81525081565b34801561047f57600080fd5b5061038561048e366004612de5565b6101916020526000908152604090205460ff1681565b3480156104b057600080fd5b506104b9610b59565b60405163ffffffff9091168152602001610391565b3480156104da57600080fd5b506103856104e9366004612de5565b6101926020526000908152604090205460ff1681565b34801561050b57600080fd5b5061038561051a366004612e00565b610b69565b34801561052b57600080fd5b5061043361053a366004612e3c565b600090815261012d602052604090206001015490565b34801561055c57600080fd5b506103af6040518060400160405280600381526020016256444160e81b81525081565b34801561058b57600080fd5b5061059f61059a366004612e55565b610b8d565b005b3480156105ad57600080fd5b5060125b60405160ff9091168152602001610391565b3480156105cf57600080fd5b50610433610bb8565b3480156105e457600080fd5b5061059f6105f3366004612e55565b610bd2565b34801561060457600080fd5b50610385610613366004612dbb565b610c63565b61059f610ca2565b34801561062c57600080fd5b5061059f61063b366004612dbb565b610cb4565b34801561064c57600080fd5b5060655460ff16610385565b61059f610666366004612e91565b610d85565b61059f610679366004612eac565b610e26565b34801561068a57600080fd5b506105b1601281565b34801561069f57600080fd5b506104336106ae366004612de5565b6001600160a01b031660009081526033602052604090205490565b3480156106d557600080fd5b5061059f610ed1565b61059f6106ec366004612ed6565b610ee3565b3480156106fd57600080fd5b506104b96103e881565b34801561071357600080fd5b5061059f610f99565b61059f61124e565b61059f610732366004612eac565b61125e565b34801561074357600080fd5b5060c9546001600160a01b03165b6040516001600160a01b039091168152602001610391565b34801561077557600080fd5b50610433611301565b34801561078a57600080fd5b50610751610799366004612efc565b611331565b3480156107aa57600080fd5b506103856107b9366004612e55565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107f157600080fd5b506103af611351565b61059f610808366004612ed6565b611360565b61059f61081b366004612de5565b611427565b61059f61082e366004612eac565b611500565b61059f610841366004612e91565b61159f565b34801561085257600080fd5b50610433600081565b34801561086757600080fd5b50610385610876366004612dbb565b611633565b34801561088757600080fd5b5061019554610385906901000000000000000000900460ff1681565b3480156108af57600080fd5b506103856108be366004612dbb565b6116dd565b3480156108cf57600080fd5b506103856108de366004612de5565b6101aa6020526000908152604090205460ff1681565b34801561090057600080fd5b50610195546104b990640100000000900463ffffffff1681565b34801561092657600080fd5b50610433610935366004612e3c565b6116eb565b34801561094657600080fd5b5061019554610385906a0100000000000000000000900460ff1681565b61059f610971366004612de5565b611703565b34801561098257600080fd5b5061059f610991366004612e55565b6117c4565b3480156109a257600080fd5b506104336109b1366004612f1e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156109e857600080fd5b506109f16117ea565b6040516103919190612f48565b348015610a0a57600080fd5b50610195546103859068010000000000000000900460ff1681565b61059f6118ce565b348015610a3957600080fd5b5061059f610a48366004612de5565b61192d565b348015610a5957600080fd5b50610195546104b99063ffffffff1681565b60006001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610aa95750610aa9826119ba565b92915050565b606060368054610abe90612f95565b80601f0160208091040260200160405190810160405280929190818152602001828054610aea90612f95565b8015610b375780601f10610b0c57610100808354040283529160200191610b37565b820191906000526020600020905b815481529060010190602001808311610b1a57829003601f168201915b5050505050905090565b600033610b4f818585611a21565b5060019392505050565b610b666103e8601e612fe5565b81565b600033610b77858285611b79565b610b82858585611c0b565b506001949350505050565b600082815261012d6020526040902060010154610ba981611ddf565b610bb38383611de9565b505050565b610bc46012600a6130f1565b610b6690633b9aca00613100565b6001600160a01b0381163314610c555760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610c5f8282611e0c565b5050565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190610b4f9082908690610c9d908790613117565b611a21565b610caa611e2f565b610cb2611e89565b565b80610cc16012600a6130f1565b610ccf90633b9aca00613100565b81610cd960355490565b610ce39190613117565b1115610d1b576040517f95f0bc2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d457f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f336107b9565b610d7b576040517f9d7b369d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bb38383611edb565b610d8d611e2f565b80151561019560099054906101000a900460ff16151503610dc15760405163834d1c0f60e01b815260040160405180910390fd5b610195805482151569010000000000000000000269ff000000000000000000199091161790556040517f26c91081c0782868dfbe40ca30d2ae068d646ed54a1a073e2e304baf6bb0894990610e1b90831515815260200190565b60405180910390a150565b610e2e611e2f565b6001600160a01b0382166000908152610191602052604090205481151560ff909116151503610e705760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101916020908152604091829020805460ff191685151590811790915591519182527f66fdd7c10d03d94451a3f7ce9ef46ea3fbb82fba2b58ea8268092ab11a08c1d891015b60405180910390a25050565b610ed9611e2f565b610cb26000611fa8565b610eeb611e2f565b63ffffffff81161580610f155750610f066103e8601e612fe5565b63ffffffff168163ffffffff16115b15610f3357604051636a43f8d160e01b815260040160405180910390fd5b610195546040805163ffffffff808516825290921660208301527f721427ee5ae2f0298e362e9b36b127c37a12455e67c4e3d6d953887105868d0e910160405180910390a1610195805463ffffffff191663ffffffff8316179055610f96612040565b50565b600054610100900460ff1615808015610fb95750600054600160ff909116105b80610fd35750303b158015610fd3575060005460ff166001145b6110455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c4c565b6000805460ff191660011790558015611068576000805461ff0019166101001790555b6110ab6040518060400160405280600681526020016556657269646160d01b8152506040518060400160405280600381526020016256444160e81b81525061208f565b6110b3612104565b6110bb612177565b6110c36121ea565b6110df60006110da60c9546001600160a01b031690565b611de9565b6111157f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f61059a60c9546001600160a01b031690565b610195805467ffffffff00000000191664640000000017905561113b6103e86014612fe5565b610195805463ffffffff191663ffffffff9290921691909117905561115e612040565b611166612255565b6001610191600061117f60c9546001600160a01b031690565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600161019260006111cf60c9546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561019580546aff00000000000000000000191690558015610f96576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610e1b565b611256611e2f565b610cb26122ad565b611266611e2f565b6001600160a01b0382166000908152610192602052604090205481151560ff9091161515036112a85760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101926020908152604091829020805460ff191685151590811790915591519182527f24ea892b6f2e14d4836c0856ea27d79ba147c952a2b983019e43f60601e56cd19101610ec5565b600061132c7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f6116eb565b905090565b600082815261015f6020526040812061134a90836122ea565b9392505050565b606060378054610abe90612f95565b611368611e2f565b63ffffffff8116158061139257506113836103e8601e612fe5565b63ffffffff168163ffffffff16115b156113b057604051636a43f8d160e01b815260040160405180910390fd5b610195546040805163ffffffff808516825264010000000090930490921660208301527f457148260a93981757a9053ba4267422da85717b0172f3c3d82e4cb159684d0a910160405180910390a1610195805467ffffffff00000000191664010000000063ffffffff841602179055610f96612255565b61142f611e2f565b6001600160a01b03811660009081527f4a5a5557a90b781b1d363e1e9468347bd7ebd3ca55d2825cb9abb0ee4f3d1e51602052604090205460ff16156114885760405163834d1c0f60e01b815260040160405180910390fd5b8061149f5760405163e6c4247b60e01b8152600481fd5b6114c97f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82610b8d565b6040516001600160a01b038216907f16baa937b08d58713325f93ac58b8a9369a4359bbefb4957d6d9b402735722ab90600090a250565b611508611e2f565b6001600160a01b03821660009081526101aa602052604090205481151560ff90911615150361154a5760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101aa6020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6115a7611e2f565b80151561019560089054906101000a900460ff161515036115db5760405163834d1c0f60e01b815260040160405180910390fd5b6101958054821515680100000000000000000268ff0000000000000000199091161790556040517f68ca6298d6086e74b40dbc9b393bbf4ddc7a14e4907f6ba7240031aa375fca2090610e1b90831515815260200190565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190838110156116d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610c4c565b610b828286868403611a21565b600033610b4f818585611c0b565b600081815261015f60205260408120610aa9906122f6565b61170b611e2f565b6001600160a01b03811660009081527f4a5a5557a90b781b1d363e1e9468347bd7ebd3ca55d2825cb9abb0ee4f3d1e51602052604090205460ff166117635760405163e6c4247b60e01b815260040160405180910390fd5b61178d7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f826117c4565b6040516001600160a01b038216907fb25deee473f0ba18671a95db5d000875190013846968f76c09db86657cac5e4290600090a250565b600082815261012d60205260409020600101546117e081611ddf565b610bb38383611e0c565b606060006118177f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f6116eb565b905060008167ffffffffffffffff8111156118345761183461312a565b60405190808252806020026020018201604052801561185d578160200160208202803683370190505b50905060005b828110156118c7576118957f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82611331565b8282815181106118a7576118a7613140565b6001600160a01b0390921660209283029190910190910152600101611863565b5092915050565b6118d6611e2f565b610195546a0100000000000000000000900460ff16156119095760405163834d1c0f60e01b815260040160405180910390fd5b61019580546aff0000000000000000000019166a0100000000000000000000179055565b611935611e2f565b6001600160a01b0381166119b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c4c565b610f9681611fa8565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610aa957507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610aa9565b6001600160a01b038316611a9c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b038216611b185760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603460209081526040808320938616835292905220546000198114611c055781811015611bf85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610c4c565b611c058484848403611a21565b50505050565b610195546a0100000000000000000000900460ff16821560001901611c55576040517fe5d87767000000000000000000000000000000000000000000000000000000008152600481fd5b6001811503611c8f578315611c8f576040517f69126dbd000000000000000000000000000000000000000000000000000000008152600481fd5b6101955468010000000000000000900460ff168015611cc857506001600160a01b0383166000908152610192602052604090205460ff16155b15611d33576101935482611cf1856001600160a01b031660009081526033602052604090205490565b611cfb9190613117565b1115611d33576040517f6db3d97b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610195546901000000000000000000900460ff168015611d6c57506001600160a01b03831660009081526101aa602052604090205460ff165b8015611d9257506001600160a01b0384166000908152610191602052604090205460ff16155b15611dd45761019454821115611dd4576040517f6a95f88400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c05848484612300565b610f9681336124ff565b611df38282612575565b600082815261015f60205260409020610bb39082612619565b611e16828261262e565b600082815261015f60205260409020610bb390826126b3565b60c9546001600160a01b03163314610cb25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c4c565b611e916126c8565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611f315760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610c4c565b611f3d6000838361271a565b8060356000828254611f4f9190613117565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b03811615611fec57611fc2600082611de9565b611fec7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82610b8d565b600061200060c9546001600160a01b031690565b905061202c7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f826117c4565b612037600082611e0c565b610c5f82612793565b61204d6103e86064612fe5565b6101955463ffffffff91821691166120676012600a6130f1565b61207590633b9aca00613100565b61207f9190613100565b6120899190613156565b61019355565b600054610100900460ff166120fa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610c5f82826127fd565b600054610100900460ff1661216f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb2612881565b600054610100900460ff166121e25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb26128f8565b600054610100900460ff16610cb25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b6122626103e86064612fe5565b6101955463ffffffff91821691640100000000909104166122856012600a6130f1565b61229390633b9aca00613100565b61229d9190613100565b6122a79190613156565b61019455565b6122b561296c565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ebe3390565b600061134a83836129bf565b6000610aa9825490565b6001600160a01b03831661237c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0382166123f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b61240383838361271a565b6001600160a01b038316600090815260336020526040902054818110156124925760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906124f29086815260200190565b60405180910390a3611c05565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff16610c5f57612533816129e9565b61253e8360206129fb565b60405160200161254f929190613178565b60408051601f198184030181529082905262461bcd60e51b8252610c4c91600401612d6c565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff16610c5f57600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061134a836001600160a01b038416612bdc565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff1615610c5f57600082815261012d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061134a836001600160a01b038416612c2b565b60655460ff16610cb25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c4c565b60655460ff1615610bb35760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c6520706175736564000000000000000000000000000000000000000000006064820152608401610c4c565b60c980546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166128685760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b60366128748382613247565b506037610bb38282613247565b600054610100900460ff166128ec5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b6065805460ff19169055565b600054610100900460ff166129635760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb233611fa8565b60655460ff1615610cb25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c4c565b60008260000182815481106129d6576129d6613140565b9060005260206000200154905092915050565b6060610aa96001600160a01b03831660145b60606000612a0a836002613100565b612a15906002613117565b67ffffffffffffffff811115612a2d57612a2d61312a565b6040519080825280601f01601f191660200182016040528015612a57576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a8e57612a8e613140565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ad957612ad9613140565b60200101906001600160f81b031916908160001a9053506000612afd846002613100565b612b08906001613117565b90505b6001811115612b8d577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b4957612b49613140565b1a60f81b828281518110612b5f57612b5f613140565b60200101906001600160f81b031916908160001a90535060049490941c93612b8681613307565b9050612b0b565b50831561134a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c4c565b6000818152600183016020526040812054612c2357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610aa9565b506000610aa9565b60008181526001830160205260408120548015612d14576000612c4f60018361331e565b8554909150600090612c639060019061331e565b9050818114612cc8576000866000018281548110612c8357612c83613140565b9060005260206000200154905080876000018481548110612ca657612ca6613140565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612cd957612cd9613331565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610aa9565b6000915050610aa9565b600060208284031215612d3057600080fd5b81356001600160e01b03198116811461134a57600080fd5b60005b83811015612d63578181015183820152602001612d4b565b50506000910152565b6020815260008251806020840152612d8b816040850160208701612d48565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612db657600080fd5b919050565b60008060408385031215612dce57600080fd5b612dd783612d9f565b946020939093013593505050565b600060208284031215612df757600080fd5b61134a82612d9f565b600080600060608486031215612e1557600080fd5b612e1e84612d9f565b9250612e2c60208501612d9f565b9150604084013590509250925092565b600060208284031215612e4e57600080fd5b5035919050565b60008060408385031215612e6857600080fd5b82359150612e7860208401612d9f565b90509250929050565b80358015158114612db657600080fd5b600060208284031215612ea357600080fd5b61134a82612e81565b60008060408385031215612ebf57600080fd5b612ec883612d9f565b9150612e7860208401612e81565b600060208284031215612ee857600080fd5b813563ffffffff8116811461134a57600080fd5b60008060408385031215612f0f57600080fd5b50508035926020909101359150565b60008060408385031215612f3157600080fd5b612f3a83612d9f565b9150612e7860208401612d9f565b6020808252825182820181905260009190848201906040850190845b81811015612f895783516001600160a01b031683529284019291840191600101612f64565b50909695505050505050565b600181811c90821680612fa957607f821691505b602082108103612fc957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff81811683821602808216919082811461300557613005612fcf565b505092915050565b600181815b8085111561304857816000190482111561302e5761302e612fcf565b8085161561303b57918102915b93841c9390800290613012565b509250929050565b60008261305f57506001610aa9565b8161306c57506000610aa9565b8160018114613082576002811461308c576130a8565b6001915050610aa9565b60ff84111561309d5761309d612fcf565b50506001821b610aa9565b5060208310610133831016604e8410600b84101617156130cb575081810a610aa9565b6130d5838361300d565b80600019048211156130e9576130e9612fcf565b029392505050565b600061134a60ff841683613050565b8082028115828204841417610aa957610aa9612fcf565b80820180821115610aa957610aa9612fcf565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008261317357634e487b7160e01b600052601260045260246000fd5b500490565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131b0816017850160208801612d48565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516131ed816028840160208801612d48565b01602801949350505050565b601f821115610bb357600081815260208120601f850160051c810160208610156132205750805b601f850160051c820191505b8181101561323f5782815560010161322c565b505050505050565b815167ffffffffffffffff8111156132615761326161312a565b6132758161326f8454612f95565b846131f9565b602080601f8311600181146132aa57600084156132925750858301515b600019600386901b1c1916600185901b17855561323f565b600085815260208120601f198616915b828110156132d9578886015182559484019460019091019084016132ba565b50858210156132f75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008161331657613316612fcf565b506000190190565b81810381811115610aa957610aa9612fcf565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220eebe771999a8f13d4866ff917ed4fa2651164406e0c373f71e4c9a72e22254b764736f6c63430008120033
Deployed Bytecode
0x6080604052600436106103605760003560e01c80638129fc1c116101c6578063a59b6695116100f7578063d547741f11610095578063efa5424d1161006f578063efa5424d146109fe578063f1b50c1d14610a25578063f2fde38b14610a2d578063f804bc8414610a4d57600080fd5b8063d547741f14610976578063dd62ed3e14610996578063de0d6117146109dc57600080fd5b8063bb4fb6ac116100d1578063bb4fb6ac146108f4578063ca15c8731461091a578063cca5dcb61461093a578063cfbd48851461096357600080fd5b8063a59b66951461087b578063a9059cbb146108a3578063b62496f5146108c357600080fd5b806395d89b41116101645780639a7a23d61161013e5780639a7a23d6146108205780639cfb2c5014610833578063a217fddf14610846578063a457c2d71461085b57600080fd5b806395d89b41146107e557806396ed8744146107fa578063983b2d561461080d57600080fd5b80638da5cb5b116101a05780638da5cb5b146107375780638dbb94eb146107695780639010d07c1461077e57806391d148541461079e57600080fd5b80638129fc1c146107075780638456cb591461071c57806385a2d2fc1461072457600080fd5b8063313ce567116102a0578063673a2dba1161023e57806370a082311161021857806370a0823114610693578063715018a6146106c957806379f5d0f6146106de5780637efad8e0146106f157600080fd5b8063673a2dba146106585780636aa7f4fb1461066b5780636ab55fd91461067e57600080fd5b8063395093511161027a57806339509351146105f85780633f4ba83a1461061857806340c10f19146106205780635c975abb1461064057600080fd5b8063313ce567146105a157806332cb6b0c146105c357806336568abe146105d857600080fd5b80631e447b371161030d57806323b872dd116102e757806323b872dd146104ff578063248a9ca31461051f5780632a905318146105505780632f2ff15d1461057f57600080fd5b80631e447b37146104735780631f0bf9a8146104a457806322dad34f146104ce57600080fd5b80630d8e6e2c1161033e5780630d8e6e2c146103dc57806318160ddd14610422578063188214001461044157600080fd5b806301ffc9a71461036557806306fdde031461039a578063095ea7b3146103bc575b600080fd5b34801561037157600080fd5b50610385610380366004612d1e565b610a6b565b60405190151581526020015b60405180910390f35b3480156103a657600080fd5b506103af610aaf565b6040516103919190612d6c565b3480156103c857600080fd5b506103856103d7366004612dbb565b610b41565b3480156103e857600080fd5b5060408051808201909152600381527f312e30000000000000000000000000000000000000000000000000000000000060208201526103af565b34801561042e57600080fd5b506035545b604051908152602001610391565b34801561044d57600080fd5b506103af6040518060400160405280600681526020016556657269646160d01b81525081565b34801561047f57600080fd5b5061038561048e366004612de5565b6101916020526000908152604090205460ff1681565b3480156104b057600080fd5b506104b9610b59565b60405163ffffffff9091168152602001610391565b3480156104da57600080fd5b506103856104e9366004612de5565b6101926020526000908152604090205460ff1681565b34801561050b57600080fd5b5061038561051a366004612e00565b610b69565b34801561052b57600080fd5b5061043361053a366004612e3c565b600090815261012d602052604090206001015490565b34801561055c57600080fd5b506103af6040518060400160405280600381526020016256444160e81b81525081565b34801561058b57600080fd5b5061059f61059a366004612e55565b610b8d565b005b3480156105ad57600080fd5b5060125b60405160ff9091168152602001610391565b3480156105cf57600080fd5b50610433610bb8565b3480156105e457600080fd5b5061059f6105f3366004612e55565b610bd2565b34801561060457600080fd5b50610385610613366004612dbb565b610c63565b61059f610ca2565b34801561062c57600080fd5b5061059f61063b366004612dbb565b610cb4565b34801561064c57600080fd5b5060655460ff16610385565b61059f610666366004612e91565b610d85565b61059f610679366004612eac565b610e26565b34801561068a57600080fd5b506105b1601281565b34801561069f57600080fd5b506104336106ae366004612de5565b6001600160a01b031660009081526033602052604090205490565b3480156106d557600080fd5b5061059f610ed1565b61059f6106ec366004612ed6565b610ee3565b3480156106fd57600080fd5b506104b96103e881565b34801561071357600080fd5b5061059f610f99565b61059f61124e565b61059f610732366004612eac565b61125e565b34801561074357600080fd5b5060c9546001600160a01b03165b6040516001600160a01b039091168152602001610391565b34801561077557600080fd5b50610433611301565b34801561078a57600080fd5b50610751610799366004612efc565b611331565b3480156107aa57600080fd5b506103856107b9366004612e55565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107f157600080fd5b506103af611351565b61059f610808366004612ed6565b611360565b61059f61081b366004612de5565b611427565b61059f61082e366004612eac565b611500565b61059f610841366004612e91565b61159f565b34801561085257600080fd5b50610433600081565b34801561086757600080fd5b50610385610876366004612dbb565b611633565b34801561088757600080fd5b5061019554610385906901000000000000000000900460ff1681565b3480156108af57600080fd5b506103856108be366004612dbb565b6116dd565b3480156108cf57600080fd5b506103856108de366004612de5565b6101aa6020526000908152604090205460ff1681565b34801561090057600080fd5b50610195546104b990640100000000900463ffffffff1681565b34801561092657600080fd5b50610433610935366004612e3c565b6116eb565b34801561094657600080fd5b5061019554610385906a0100000000000000000000900460ff1681565b61059f610971366004612de5565b611703565b34801561098257600080fd5b5061059f610991366004612e55565b6117c4565b3480156109a257600080fd5b506104336109b1366004612f1e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3480156109e857600080fd5b506109f16117ea565b6040516103919190612f48565b348015610a0a57600080fd5b50610195546103859068010000000000000000900460ff1681565b61059f6118ce565b348015610a3957600080fd5b5061059f610a48366004612de5565b61192d565b348015610a5957600080fd5b50610195546104b99063ffffffff1681565b60006001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610aa95750610aa9826119ba565b92915050565b606060368054610abe90612f95565b80601f0160208091040260200160405190810160405280929190818152602001828054610aea90612f95565b8015610b375780601f10610b0c57610100808354040283529160200191610b37565b820191906000526020600020905b815481529060010190602001808311610b1a57829003601f168201915b5050505050905090565b600033610b4f818585611a21565b5060019392505050565b610b666103e8601e612fe5565b81565b600033610b77858285611b79565b610b82858585611c0b565b506001949350505050565b600082815261012d6020526040902060010154610ba981611ddf565b610bb38383611de9565b505050565b610bc46012600a6130f1565b610b6690633b9aca00613100565b6001600160a01b0381163314610c555760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610c5f8282611e0c565b5050565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190610b4f9082908690610c9d908790613117565b611a21565b610caa611e2f565b610cb2611e89565b565b80610cc16012600a6130f1565b610ccf90633b9aca00613100565b81610cd960355490565b610ce39190613117565b1115610d1b576040517f95f0bc2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d457f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f336107b9565b610d7b576040517f9d7b369d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bb38383611edb565b610d8d611e2f565b80151561019560099054906101000a900460ff16151503610dc15760405163834d1c0f60e01b815260040160405180910390fd5b610195805482151569010000000000000000000269ff000000000000000000199091161790556040517f26c91081c0782868dfbe40ca30d2ae068d646ed54a1a073e2e304baf6bb0894990610e1b90831515815260200190565b60405180910390a150565b610e2e611e2f565b6001600160a01b0382166000908152610191602052604090205481151560ff909116151503610e705760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101916020908152604091829020805460ff191685151590811790915591519182527f66fdd7c10d03d94451a3f7ce9ef46ea3fbb82fba2b58ea8268092ab11a08c1d891015b60405180910390a25050565b610ed9611e2f565b610cb26000611fa8565b610eeb611e2f565b63ffffffff81161580610f155750610f066103e8601e612fe5565b63ffffffff168163ffffffff16115b15610f3357604051636a43f8d160e01b815260040160405180910390fd5b610195546040805163ffffffff808516825290921660208301527f721427ee5ae2f0298e362e9b36b127c37a12455e67c4e3d6d953887105868d0e910160405180910390a1610195805463ffffffff191663ffffffff8316179055610f96612040565b50565b600054610100900460ff1615808015610fb95750600054600160ff909116105b80610fd35750303b158015610fd3575060005460ff166001145b6110455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c4c565b6000805460ff191660011790558015611068576000805461ff0019166101001790555b6110ab6040518060400160405280600681526020016556657269646160d01b8152506040518060400160405280600381526020016256444160e81b81525061208f565b6110b3612104565b6110bb612177565b6110c36121ea565b6110df60006110da60c9546001600160a01b031690565b611de9565b6111157f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f61059a60c9546001600160a01b031690565b610195805467ffffffff00000000191664640000000017905561113b6103e86014612fe5565b610195805463ffffffff191663ffffffff9290921691909117905561115e612040565b611166612255565b6001610191600061117f60c9546001600160a01b031690565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600161019260006111cf60c9546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561019580546aff00000000000000000000191690558015610f96576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610e1b565b611256611e2f565b610cb26122ad565b611266611e2f565b6001600160a01b0382166000908152610192602052604090205481151560ff9091161515036112a85760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101926020908152604091829020805460ff191685151590811790915591519182527f24ea892b6f2e14d4836c0856ea27d79ba147c952a2b983019e43f60601e56cd19101610ec5565b600061132c7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f6116eb565b905090565b600082815261015f6020526040812061134a90836122ea565b9392505050565b606060378054610abe90612f95565b611368611e2f565b63ffffffff8116158061139257506113836103e8601e612fe5565b63ffffffff168163ffffffff16115b156113b057604051636a43f8d160e01b815260040160405180910390fd5b610195546040805163ffffffff808516825264010000000090930490921660208301527f457148260a93981757a9053ba4267422da85717b0172f3c3d82e4cb159684d0a910160405180910390a1610195805467ffffffff00000000191664010000000063ffffffff841602179055610f96612255565b61142f611e2f565b6001600160a01b03811660009081527f4a5a5557a90b781b1d363e1e9468347bd7ebd3ca55d2825cb9abb0ee4f3d1e51602052604090205460ff16156114885760405163834d1c0f60e01b815260040160405180910390fd5b8061149f5760405163e6c4247b60e01b8152600481fd5b6114c97f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82610b8d565b6040516001600160a01b038216907f16baa937b08d58713325f93ac58b8a9369a4359bbefb4957d6d9b402735722ab90600090a250565b611508611e2f565b6001600160a01b03821660009081526101aa602052604090205481151560ff90911615150361154a5760405163834d1c0f60e01b815260040160405180910390fd5b6001600160a01b03821660008181526101aa6020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6115a7611e2f565b80151561019560089054906101000a900460ff161515036115db5760405163834d1c0f60e01b815260040160405180910390fd5b6101958054821515680100000000000000000268ff0000000000000000199091161790556040517f68ca6298d6086e74b40dbc9b393bbf4ddc7a14e4907f6ba7240031aa375fca2090610e1b90831515815260200190565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190838110156116d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610c4c565b610b828286868403611a21565b600033610b4f818585611c0b565b600081815261015f60205260408120610aa9906122f6565b61170b611e2f565b6001600160a01b03811660009081527f4a5a5557a90b781b1d363e1e9468347bd7ebd3ca55d2825cb9abb0ee4f3d1e51602052604090205460ff166117635760405163e6c4247b60e01b815260040160405180910390fd5b61178d7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f826117c4565b6040516001600160a01b038216907fb25deee473f0ba18671a95db5d000875190013846968f76c09db86657cac5e4290600090a250565b600082815261012d60205260409020600101546117e081611ddf565b610bb38383611e0c565b606060006118177f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f6116eb565b905060008167ffffffffffffffff8111156118345761183461312a565b60405190808252806020026020018201604052801561185d578160200160208202803683370190505b50905060005b828110156118c7576118957f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82611331565b8282815181106118a7576118a7613140565b6001600160a01b0390921660209283029190910190910152600101611863565b5092915050565b6118d6611e2f565b610195546a0100000000000000000000900460ff16156119095760405163834d1c0f60e01b815260040160405180910390fd5b61019580546aff0000000000000000000019166a0100000000000000000000179055565b611935611e2f565b6001600160a01b0381166119b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c4c565b610f9681611fa8565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610aa957507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610aa9565b6001600160a01b038316611a9c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b038216611b185760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152603460209081526040808320938616835292905220546000198114611c055781811015611bf85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610c4c565b611c058484848403611a21565b50505050565b610195546a0100000000000000000000900460ff16821560001901611c55576040517fe5d87767000000000000000000000000000000000000000000000000000000008152600481fd5b6001811503611c8f578315611c8f576040517f69126dbd000000000000000000000000000000000000000000000000000000008152600481fd5b6101955468010000000000000000900460ff168015611cc857506001600160a01b0383166000908152610192602052604090205460ff16155b15611d33576101935482611cf1856001600160a01b031660009081526033602052604090205490565b611cfb9190613117565b1115611d33576040517f6db3d97b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610195546901000000000000000000900460ff168015611d6c57506001600160a01b03831660009081526101aa602052604090205460ff165b8015611d9257506001600160a01b0384166000908152610191602052604090205460ff16155b15611dd45761019454821115611dd4576040517f6a95f88400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c05848484612300565b610f9681336124ff565b611df38282612575565b600082815261015f60205260409020610bb39082612619565b611e16828261262e565b600082815261015f60205260409020610bb390826126b3565b60c9546001600160a01b03163314610cb25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c4c565b611e916126c8565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216611f315760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610c4c565b611f3d6000838361271a565b8060356000828254611f4f9190613117565b90915550506001600160a01b0382166000818152603360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b6001600160a01b03811615611fec57611fc2600082611de9565b611fec7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f82610b8d565b600061200060c9546001600160a01b031690565b905061202c7f3f351bc28b49370a1cf2de2d928010c06ba39a48bc5bcaadbb4d84836a70f96f826117c4565b612037600082611e0c565b610c5f82612793565b61204d6103e86064612fe5565b6101955463ffffffff91821691166120676012600a6130f1565b61207590633b9aca00613100565b61207f9190613100565b6120899190613156565b61019355565b600054610100900460ff166120fa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610c5f82826127fd565b600054610100900460ff1661216f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb2612881565b600054610100900460ff166121e25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb26128f8565b600054610100900460ff16610cb25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b6122626103e86064612fe5565b6101955463ffffffff91821691640100000000909104166122856012600a6130f1565b61229390633b9aca00613100565b61229d9190613100565b6122a79190613156565b61019455565b6122b561296c565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ebe3390565b600061134a83836129bf565b6000610aa9825490565b6001600160a01b03831661237c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0382166123f85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610c4c565b61240383838361271a565b6001600160a01b038316600090815260336020526040902054818110156124925760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610c4c565b6001600160a01b0380851660008181526033602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906124f29086815260200190565b60405180910390a3611c05565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff16610c5f57612533816129e9565b61253e8360206129fb565b60405160200161254f929190613178565b60408051601f198184030181529082905262461bcd60e51b8252610c4c91600401612d6c565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff16610c5f57600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff191660011790556125d53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061134a836001600160a01b038416612bdc565b600082815261012d602090815260408083206001600160a01b038516845290915290205460ff1615610c5f57600082815261012d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061134a836001600160a01b038416612c2b565b60655460ff16610cb25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c4c565b60655460ff1615610bb35760405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e7366657220776860448201527f696c6520706175736564000000000000000000000000000000000000000000006064820152608401610c4c565b60c980546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166128685760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b60366128748382613247565b506037610bb38282613247565b600054610100900460ff166128ec5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b6065805460ff19169055565b600054610100900460ff166129635760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610c4c565b610cb233611fa8565b60655460ff1615610cb25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c4c565b60008260000182815481106129d6576129d6613140565b9060005260206000200154905092915050565b6060610aa96001600160a01b03831660145b60606000612a0a836002613100565b612a15906002613117565b67ffffffffffffffff811115612a2d57612a2d61312a565b6040519080825280601f01601f191660200182016040528015612a57576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a8e57612a8e613140565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612ad957612ad9613140565b60200101906001600160f81b031916908160001a9053506000612afd846002613100565b612b08906001613117565b90505b6001811115612b8d577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612b4957612b49613140565b1a60f81b828281518110612b5f57612b5f613140565b60200101906001600160f81b031916908160001a90535060049490941c93612b8681613307565b9050612b0b565b50831561134a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c4c565b6000818152600183016020526040812054612c2357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610aa9565b506000610aa9565b60008181526001830160205260408120548015612d14576000612c4f60018361331e565b8554909150600090612c639060019061331e565b9050818114612cc8576000866000018281548110612c8357612c83613140565b9060005260206000200154905080876000018481548110612ca657612ca6613140565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612cd957612cd9613331565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610aa9565b6000915050610aa9565b600060208284031215612d3057600080fd5b81356001600160e01b03198116811461134a57600080fd5b60005b83811015612d63578181015183820152602001612d4b565b50506000910152565b6020815260008251806020840152612d8b816040850160208701612d48565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114612db657600080fd5b919050565b60008060408385031215612dce57600080fd5b612dd783612d9f565b946020939093013593505050565b600060208284031215612df757600080fd5b61134a82612d9f565b600080600060608486031215612e1557600080fd5b612e1e84612d9f565b9250612e2c60208501612d9f565b9150604084013590509250925092565b600060208284031215612e4e57600080fd5b5035919050565b60008060408385031215612e6857600080fd5b82359150612e7860208401612d9f565b90509250929050565b80358015158114612db657600080fd5b600060208284031215612ea357600080fd5b61134a82612e81565b60008060408385031215612ebf57600080fd5b612ec883612d9f565b9150612e7860208401612e81565b600060208284031215612ee857600080fd5b813563ffffffff8116811461134a57600080fd5b60008060408385031215612f0f57600080fd5b50508035926020909101359150565b60008060408385031215612f3157600080fd5b612f3a83612d9f565b9150612e7860208401612d9f565b6020808252825182820181905260009190848201906040850190845b81811015612f895783516001600160a01b031683529284019291840191600101612f64565b50909695505050505050565b600181811c90821680612fa957607f821691505b602082108103612fc957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b63ffffffff81811683821602808216919082811461300557613005612fcf565b505092915050565b600181815b8085111561304857816000190482111561302e5761302e612fcf565b8085161561303b57918102915b93841c9390800290613012565b509250929050565b60008261305f57506001610aa9565b8161306c57506000610aa9565b8160018114613082576002811461308c576130a8565b6001915050610aa9565b60ff84111561309d5761309d612fcf565b50506001821b610aa9565b5060208310610133831016604e8410600b84101617156130cb575081810a610aa9565b6130d5838361300d565b80600019048211156130e9576130e9612fcf565b029392505050565b600061134a60ff841683613050565b8082028115828204841417610aa957610aa9612fcf565b80820180821115610aa957610aa9612fcf565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008261317357634e487b7160e01b600052601260045260246000fd5b500490565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516131b0816017850160208801612d48565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516131ed816028840160208801612d48565b01602801949350505050565b601f821115610bb357600081815260208120601f850160051c810160208610156132205750805b601f850160051c820191505b8181101561323f5782815560010161322c565b505050505050565b815167ffffffffffffffff8111156132615761326161312a565b6132758161326f8454612f95565b846131f9565b602080601f8311600181146132aa57600084156132925750858301515b600019600386901b1c1916600185901b17855561323f565b600085815260208120601f198616915b828110156132d9578886015182559484019460019091019084016132ba565b50858210156132f75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008161331657613316612fcf565b506000190190565b81810381811115610aa957610aa9612fcf565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220eebe771999a8f13d4866ff917ed4fa2651164406e0c373f71e4c9a72e22254b764736f6c63430008120033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.