More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x78db047ba2c3c6c65946ce955ef2ffac2ef1f466a4126ba7c82ed9630e96bb95 | Deposit | (pending) | 46 mins ago | IN | 0.01 ETH | (Pending) | |||
0xa693e0b4ba23d2962e33c7798166edd10ba70eadc4e3274c4d31298ac0295b5f | Deposit | (pending) | 1 hr ago | IN | 0.0206 ETH | (Pending) | |||
0x73a1fccb33a8f0ecb162502e7bc2b518eb7cf3919e0a97c16964fd77268d2c2e | Deposit | (pending) | 1 hr ago | IN | 0.01 ETH | (Pending) | |||
0x083f7ec73dc202de9c8363d2d97942cde911d6cb101c968486d0aeabd9d06b68 | Deposit | (pending) | 1 hr ago | IN | 0.01 ETH | (Pending) | |||
Deposit | 21033053 | 32 hrs ago | IN | 0.2 ETH | 0.00017045 | ||||
Deposit | 21032923 | 33 hrs ago | IN | 0.034 ETH | 0.0002236 | ||||
Deposit | 21032923 | 33 hrs ago | IN | 0.01 ETH | 0.00022526 | ||||
Deposit | 21032923 | 33 hrs ago | IN | 2.33 ETH | 0.00022551 | ||||
Deposit | 21032743 | 33 hrs ago | IN | 0.26 ETH | 0.0002506 | ||||
Deposit | 21032743 | 33 hrs ago | IN | 2 ETH | 0.00024971 | ||||
Deposit | 21032639 | 34 hrs ago | IN | 0.1 ETH | 0.00025481 | ||||
Deposit | 21032632 | 34 hrs ago | IN | 0.05 ETH | 0.00029005 | ||||
Deposit | 21032629 | 34 hrs ago | IN | 0.5 ETH | 0.00027448 | ||||
Deposit | 21032628 | 34 hrs ago | IN | 0.1 ETH | 0.00111314 | ||||
Deposit | 21032628 | 34 hrs ago | IN | 0.333 ETH | 0.00120103 | ||||
Deposit | 21032627 | 34 hrs ago | IN | 4.95 ETH | 0.00086493 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 1.54 ETH | 0.00074371 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 4.99 ETH | 0.00074371 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 0.5 ETH | 0.00074371 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 5 ETH | 0.00117442 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 20 ETH | 0.00117442 | ||||
Deposit | 21032626 | 34 hrs ago | IN | 0.225 ETH | 0.00130091 | ||||
Deposit | 21032623 | 34 hrs ago | IN | 0.037 ETH | 0.00064356 | ||||
Deposit | 21032623 | 34 hrs ago | IN | 5 ETH | 0.00066881 | ||||
Deposit | 21032623 | 34 hrs ago | IN | 0.01 ETH | 0.00105615 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
21032628 | 34 hrs ago | 0.1 ETH | ||||
21032628 | 34 hrs ago | 0.333 ETH | ||||
21032627 | 34 hrs ago | 4.95 ETH | ||||
21032626 | 34 hrs ago | 1.54 ETH | ||||
21032626 | 34 hrs ago | 4.99 ETH | ||||
21032626 | 34 hrs ago | 0.5 ETH | ||||
21032626 | 34 hrs ago | 5 ETH | ||||
21032626 | 34 hrs ago | 20 ETH | ||||
21032626 | 34 hrs ago | 0.225 ETH | ||||
21032623 | 34 hrs ago | 0.037 ETH | ||||
21032623 | 34 hrs ago | 5 ETH | ||||
21032623 | 34 hrs ago | 0.01 ETH | ||||
21032623 | 34 hrs ago | 50 ETH | ||||
21032623 | 34 hrs ago | 12 ETH | ||||
21032623 | 34 hrs ago | 1 ETH | ||||
21032622 | 34 hrs ago | 1 ETH | ||||
21032622 | 34 hrs ago | 1 ETH | ||||
21032622 | 34 hrs ago | 1.999 ETH | ||||
21032621 | 34 hrs ago | 0.01 ETH | ||||
21032621 | 34 hrs ago | 50 ETH | ||||
21032620 | 34 hrs ago | 0.08 ETH | ||||
21032620 | 34 hrs ago | 30 ETH | ||||
21032620 | 34 hrs ago | 0.1 ETH | ||||
21032620 | 34 hrs ago | 1 ETH | ||||
21032619 | 34 hrs ago | 1.49 ETH |
Loading...
Loading
Contract Name:
Drop
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 999999 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity =0.8.7; import '@openzeppelin/contracts/access/AccessControl.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../lib/utils/TransferHelper.sol"; import "./IDropV2.sol"; contract Drop is IDropV2, AccessControl, ReentrancyGuard, Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; uint256 public constant PRICE_MULTIPLE = 1E8; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IERC20 public constant TOKEN = IERC20(address(0)); struct TokenInfo { uint256 maxAmount; uint256 minAmountEachDeposit; uint256 maxAmountEachDeposit; uint256 amount; uint256 usdAmount; uint256 usdPrice; uint256 tokenPowerPrice; } // The block number when Drop starts uint256 public startTime; // The block number when white list drop timeout uint256 public whiteListTimeOutTime; // The block number when Drop ends uint256 public endTime; uint256 public maxTotalDropUSDAmount; uint256 public currentTotalDropUSDAmount; uint256 public maxDropUSDAmountEachUser; address public finAddr; // address => amount mapping(address => uint256) public userInfoMap; // tokenAddress => info mapping(address => TokenInfo) public tokenInfoMap; // participators address[] public addresses; EnumerableSet.AddressSet private _whiteList; constructor() public { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } modifier onlyOwner() { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), 'Ownable: caller is not the owner'); _; } function initialize( uint256 _startTime, uint256 _whiteListTimeOutTime, uint256 _endTime, uint256 _maxTotalDropUSDAmount, uint256 _maxDropUSDAmountEachUser, address _finAddr, address _ownerAddress ) external override initializer onlyOwner { startTime = _startTime; whiteListTimeOutTime = _whiteListTimeOutTime; endTime = _endTime; maxTotalDropUSDAmount = _maxTotalDropUSDAmount; maxDropUSDAmountEachUser = _maxDropUSDAmountEachUser; finAddr = _finAddr; emit FinAddressTransferred(address(0), finAddr); if (_ownerAddress != address(0)) { transferOwnership(_ownerAddress); } } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); if (newOwner != _msgSender()) { _revokeRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(DEFAULT_ADMIN_ROLE, newOwner); } } function setStartTime(uint256 _startTime) public onlyOwner { startTime = _startTime; } function setWhiteListTimeOutTime(uint256 _whiteListTimeOutTime) public onlyOwner { whiteListTimeOutTime = _whiteListTimeOutTime; } function setEndTime(uint256 _endTime) public onlyOwner { endTime = _endTime; } function setMaxTotalDropUSDAmount(uint256 _maxTotalDropUSDAmount) public onlyOwner { maxTotalDropUSDAmount = _maxTotalDropUSDAmount; } function setMaxDropUSDAmountEachUser(uint256 _maxDropUSDAmountEachUser) public onlyOwner { maxDropUSDAmountEachUser = _maxDropUSDAmountEachUser; } function setTokenInfo( address _token, uint256 _maxAmount, uint256 _minAmountEachDeposit, uint256 _maxAmountEachDeposit, uint256 _usdPrice, uint256 _tokenPowerPrice ) external override onlyOwner { TokenInfo storage tokenInfo = tokenInfoMap[_token]; if (tokenInfo.maxAmount != _maxAmount) { tokenInfo.maxAmount = _maxAmount; } if (tokenInfo.minAmountEachDeposit != _minAmountEachDeposit) { tokenInfo.minAmountEachDeposit = _minAmountEachDeposit; } if (tokenInfo.maxAmountEachDeposit != _maxAmountEachDeposit) { tokenInfo.maxAmountEachDeposit = _maxAmountEachDeposit; } if (tokenInfo.usdPrice != _usdPrice) { tokenInfo.usdPrice = _usdPrice; } if (tokenInfo.tokenPowerPrice != _tokenPowerPrice) { tokenInfo.tokenPowerPrice = _tokenPowerPrice; } emit SetTokenInfo(_token, _maxAmount, _minAmountEachDeposit, _maxAmountEachDeposit, _usdPrice, _tokenPowerPrice); } function addToWhiteList(address _address) public onlyOwner { _whiteList.add(_address); } function removeFromWhiteList(address _address) public onlyOwner { _whiteList.remove(_address); } function addAllToWhiteList(address[] memory _addresses) public onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { addToWhiteList(_addresses[i]); } } function removeAllFromWhiteList(address[] memory _addresses) public onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { removeFromWhiteList(_addresses[i]); } } function whiteList() public view override returns (address[] memory _addresses) { _addresses = new address[](_whiteList.length()); for (uint256 i = 0; i < _whiteList.length(); ++i) { _addresses[i] = _whiteList.at(i); } } function _deposit(address _token, uint256 _amount) internal virtual returns (uint256 amount) { require(_amount > 0, 'need _amount > 0'); TokenInfo storage tokenInfo = tokenInfoMap[_token]; require(tokenInfo.usdPrice != 0, 'Drop NOT SUPPORT THIS TOKEN'); uint256 maxDropUSDAmount = maxTotalDropUSDAmount.sub(currentTotalDropUSDAmount); require(maxDropUSDAmount != 0, 'Drop IS STOP'); uint256 maxDropAmount = tokenInfo.maxAmount.sub(tokenInfo.amount); require(maxDropAmount != 0, 'Token STOP'); if (block.timestamp > whiteListTimeOutTime && tokenInfo.tokenPowerPrice != 0 && address(TOKEN) != address(0)) { uint256 maxDropAmountByTokenPower = TOKEN.balanceOf(_msgSender()).mul(PRICE_MULTIPLE).div( tokenInfo.tokenPowerPrice ); maxDropAmount = maxDropAmountByTokenPower > maxDropAmount ? maxDropAmount : maxDropAmountByTokenPower; require(maxDropAmount != 0, 'Not Token'); } maxDropAmount = tokenInfo.maxAmountEachDeposit > maxDropAmount ? maxDropAmount : tokenInfo.maxAmountEachDeposit; uint256 userRemainDropUSDAmount = maxDropUSDAmountEachUser.sub(userInfoMap[_msgSender()]); maxDropUSDAmount = userRemainDropUSDAmount > maxDropUSDAmount ? maxDropUSDAmount : userRemainDropUSDAmount; require(maxDropUSDAmount != 0, 'User STOP'); _amount = maxDropAmount > _amount ? _amount : maxDropAmount; uint256 usdAmount = _amount.mul(tokenInfo.usdPrice).div(PRICE_MULTIPLE); if (usdAmount > maxDropUSDAmount) { usdAmount = maxDropUSDAmount; amount = usdAmount.mul(PRICE_MULTIPLE).div(tokenInfo.usdPrice); } else { amount = _amount; if (userInfoMap[_msgSender()] == 0) { require(amount >= tokenInfo.minAmountEachDeposit, 'MIN Drop AMOUNT'); } } currentTotalDropUSDAmount = currentTotalDropUSDAmount.add(usdAmount); tokenInfo.usdAmount = tokenInfo.usdAmount.add(usdAmount); tokenInfo.amount = tokenInfo.amount.add(amount); if (userInfoMap[_msgSender()] == 0) { addresses.push(_msgSender()); } userInfoMap[_msgSender()] = userInfoMap[_msgSender()].add(usdAmount); if (currentTotalDropUSDAmount >= maxTotalDropUSDAmount) { endTime = block.timestamp; } emit Deposit(_token, _msgSender(), amount, usdAmount); } function getRemainDropAmount(address _token, address _user) external view override returns (uint256) { if (block.timestamp >= startTime && block.timestamp <= whiteListTimeOutTime && !_whiteList.contains(_user)) { return 0; } TokenInfo memory tokenInfo = tokenInfoMap[_token]; if (tokenInfo.usdPrice == 0) { return 0; } uint256 maxDropUSDAmount = maxTotalDropUSDAmount.sub(currentTotalDropUSDAmount); if (maxDropUSDAmount == 0) { return 0; } uint256 maxDropAmount = tokenInfo.maxAmount.sub(tokenInfo.amount); if (maxDropAmount == 0) { return 0; } if ((!_whiteList.contains(_user) || block.timestamp > whiteListTimeOutTime) && tokenInfo.tokenPowerPrice != 0) { uint256 maxDropAmountByTokenPower = TOKEN.balanceOf(_msgSender()).mul(PRICE_MULTIPLE).div( tokenInfo.tokenPowerPrice ); maxDropAmount = maxDropAmountByTokenPower > maxDropAmount ? maxDropAmount : maxDropAmountByTokenPower; if (maxDropAmount == 0) { return 0; } } maxDropAmount = tokenInfo.maxAmountEachDeposit > maxDropAmount ? maxDropAmount : tokenInfo.maxAmountEachDeposit; uint256 userRemainDropUSDAmount = maxDropUSDAmountEachUser.sub(userInfoMap[_user]); maxDropUSDAmount = userRemainDropUSDAmount > maxDropUSDAmount ? maxDropUSDAmount : userRemainDropUSDAmount; if (maxDropUSDAmount == 0) { return 0; } uint256 amount = maxDropUSDAmount.mul(PRICE_MULTIPLE).div(tokenInfo.usdPrice); return maxDropAmount > amount ? amount : maxDropAmount; } function deposit(address _token, uint256 _amount) external payable override nonReentrant returns (uint256 amount, uint256 ethAmount) { require(block.timestamp >= startTime, 'not Drop time'); require(endTime == 0 || block.timestamp <= endTime, 'not Drop time'); require(block.timestamp > whiteListTimeOutTime || _whiteList.contains(_msgSender()), 'Drop white list time'); if ((address(0)) != _token) { amount = _deposit(_token, _amount); IERC20(_token).safeTransferFrom(address(_msgSender()), finAddr, amount); } if (msg.value != 0) { ethAmount = _deposit(WETH, msg.value); TransferHelper.safeTransferETH(finAddr, ethAmount); if (msg.value > ethAmount) TransferHelper.safeTransferETH(_msgSender(), msg.value - ethAmount); } } function transferDropFinAddress(address _finAddr) external override { require(_msgSender() == finAddr, ' FORBIDDEN'); finAddr = _finAddr; emit FinAddressTransferred(_msgSender(), finAddr); } function getAddressesLength() external view returns (uint256) { return addresses.length; } function getAddresses() public view returns (address[] memory) { return addresses; } function emergencyWithdrawEther() public onlyOwner { payable(_msgSender()).transfer(address(this).balance); } function emergencyWithdrawErc20(address tokenAddress) public onlyOwner { IERC20 token = IERC20(tokenAddress); token.safeTransfer(_msgSender(), token.balanceOf(address(this))); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.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 AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ 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. */ 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`. */ 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. * * [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. */ 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. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// 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 IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/Address.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. * * 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 initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !Address.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 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; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.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 ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// 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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) 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. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // 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; 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 on 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; assembly { result := store } return result; } }
pragma solidity >=0.6.6; interface IDropBase { event Deposit(address indexed token, address indexed sender, uint256 tokenAmount, uint256 usdAmount); event FinAddressTransferred(address indexed previousFinAddress, address indexed newFinAddress); event SetTokenInfo( address indexed token, uint256 maxAmount, uint256 minAmountEachDeposit, uint256 maxAmountEachDeposit, uint256 usdPrice, uint256 bakePowerPrice ); function setTokenInfo( address _token, uint256 _maxAmount, uint256 _minAmountEachDeposit, uint256 _maxAmountEachDeposit, uint256 _usdPrice, uint256 _bakePowerPrice ) external; function getRemainDropAmount(address _token, address _user) external view returns (uint256); function deposit(address _token, uint256 _amount) external payable returns (uint256 amount, uint256 ethAmount); function transferDropFinAddress(address _finAddr) external; }
pragma solidity >=0.6.6; import './IDropBase.sol'; interface IDropV2 is IDropBase { function initialize( uint256 _startBlock, uint256 _whiteListTimeOutBlock, uint256 _endBlock, uint256 _maxTotalDropUSDAmount, uint256 _maxDropUSDAmountEachUser, address _finAddr, address _ownerAddress ) external; function whiteList() external view returns (address[] memory addresses); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20.sol tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper: ETH_TRANSFER_FAILED'); } }
{ "optimizer": { "enabled": true, "runs": 999999 }, "evmVersion": "istanbul", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousFinAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newFinAddress","type":"address"}],"name":"FinAddressTransferred","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":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minAmountEachDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxAmountEachDeposit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bakePowerPrice","type":"uint256"}],"name":"SetTokenInfo","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_MULTIPLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addAllToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTotalDropUSDAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"ethAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"emergencyWithdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAddressesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"getRemainDropAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_whiteListTimeOutTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"},{"internalType":"uint256","name":"_maxTotalDropUSDAmount","type":"uint256"},{"internalType":"uint256","name":"_maxDropUSDAmountEachUser","type":"uint256"},{"internalType":"address","name":"_finAddr","type":"address"},{"internalType":"address","name":"_ownerAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxDropUSDAmountEachUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotalDropUSDAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeAllFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxDropUSDAmountEachUser","type":"uint256"}],"name":"setMaxDropUSDAmountEachUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTotalDropUSDAmount","type":"uint256"}],"name":"setMaxTotalDropUSDAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_minAmountEachDeposit","type":"uint256"},{"internalType":"uint256","name":"_maxAmountEachDeposit","type":"uint256"},{"internalType":"uint256","name":"_usdPrice","type":"uint256"},{"internalType":"uint256","name":"_tokenPowerPrice","type":"uint256"}],"name":"setTokenInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whiteListTimeOutTime","type":"uint256"}],"name":"setWhiteListTimeOutTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenInfoMap","outputs":[{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"minAmountEachDeposit","type":"uint256"},{"internalType":"uint256","name":"maxAmountEachDeposit","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"uint256","name":"usdPrice","type":"uint256"},{"internalType":"uint256","name":"tokenPowerPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_finAddr","type":"address"}],"name":"transferDropFinAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfoMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteList","outputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteListTimeOutTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50600180556200002360003362000029565b620000d9565b62000035828262000039565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000035576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000953390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61379080620000e96000396000f3fe6080604052600436106102bb5760003560e01c806391d148541161016e578063cbf78f47116100cb578063dc92f8f01161007f578063e798784a11610064578063e798784a14610809578063edf26d9b14610829578063f2fde38b1461084957600080fd5b8063dc92f8f0146107de578063e76437ea146107f357600080fd5b8063d547741f116100b0578063d547741f14610788578063d616a25c146107a8578063dabc417a146107be57600080fd5b8063cbf78f4714610753578063ccb98ffc1461076857600080fd5b8063ad5c464811610122578063b6b9d02e11610107578063b6b9d02e146106e6578063b8df6de014610706578063bf431a051461072657600080fd5b8063ad5c46481461069e578063b5587657146106c657600080fd5b8063a217fddf11610153578063a217fddf14610647578063a39fac121461065c578063aa779a531461067157600080fd5b806391d14854146105e057806398ff76f61461063157600080fd5b806336eda2e11161021c5780635d467a56116101d057806369848c2f116101b557806369848c2f1461050357806378e979251461059057806382bfefc8146105a657600080fd5b80635d467a56146104c3578063646e66de146104e357600080fd5b806347e7ef241161020157806347e7ef241461046357806347ee03941461048b57806356df04eb146104ab57600080fd5b806336eda2e1146104235780633e0a322d1461044357600080fd5b80632ad29cee116102735780633197cbb6116102585780633197cbb6146103cb5780633544a864146103e157806336568abe1461040357600080fd5b80632ad29cee1461038b5780632f2ff15d146103ab57600080fd5b80631f85d8bc116102a45780631f85d8bc1461031757806323ce6aed14610337578063248a9ca31461035b57600080fd5b806301bf6648146102c057806301ffc9a7146102e2575b600080fd5b3480156102cc57600080fd5b506102e06102db36600461314d565b610869565b005b3480156102ee57600080fd5b506103026102fd366004613357565b610915565b60405190151581526020015b60405180910390f35b34801561032357600080fd5b506102e06103323660046133b2565b6109ae565b34801561034357600080fd5b5061034d60065481565b60405190815260200161030e565b34801561036757600080fd5b5061034d61037636600461331b565b60009081526020819052604090206001015490565b34801561039757600080fd5b506102e06103a636600461314d565b610c15565b3480156103b757600080fd5b506102e06103c6366004613334565b610d1d565b3480156103d757600080fd5b5061034d60055481565b3480156103ed57600080fd5b506103f6610d48565b60405161030e91906134b2565b34801561040f57600080fd5b506102e061041e366004613334565b610e02565b34801561042f57600080fd5b506102e061043e36600461331b565b610eb1565b34801561044f57600080fd5b506102e061045e36600461331b565b610f4e565b61047661047136600461319b565b610feb565b6040805192835260208301919091520161030e565b34801561049757600080fd5b506102e06104a636600461314d565b611281565b3480156104b757600080fd5b5061034d6305f5e10081565b3480156104cf57600080fd5b506102e06104de36600461331b565b611324565b3480156104ef57600080fd5b506102e06104fe36600461331b565b6113c1565b34801561050f57600080fd5b5061055b61051e36600461314d565b600b602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290919087565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161030e565b34801561059c57600080fd5b5061034d60035481565b3480156105b257600080fd5b506105bb600081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030e565b3480156105ec57600080fd5b506103026105fb366004613334565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561063d57600080fd5b5061034d60075481565b34801561065357600080fd5b5061034d600081565b34801561066857600080fd5b506103f661145e565b34801561067d57600080fd5b5061034d61068c36600461314d565b600a6020526000908152604090205481565b3480156106aa57600080fd5b506105bb73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156106d257600080fd5b506102e06106e136600461320f565b6114cd565b3480156106f257600080fd5b506102e061070136600461314d565b6115a5565b34801561071257600080fd5b506102e061072136600461320f565b6116fd565b34801561073257600080fd5b506009546105bb9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561075f57600080fd5b50600c5461034d565b34801561077457600080fd5b506102e061078336600461331b565b6117d5565b34801561079457600080fd5b506102e06107a3366004613334565b611872565b3480156107b457600080fd5b5061034d60045481565b3480156107ca57600080fd5b5061034d6107d9366004613168565b611898565b3480156107ea57600080fd5b506102e0611b69565b3480156107ff57600080fd5b5061034d60085481565b34801561081557600080fd5b506102e06108243660046131c5565b611c30565b34801561083557600080fd5b506105bb61084436600461331b565b611db5565b34801561085557600080fd5b506102e061086436600461314d565b611dec565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610911600d82611f5a565b5050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806109a857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600254610100900460ff166109c95760025460ff16156109cd565b303b155b610a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108fd565b600254610100900460ff16158015610a9857600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60038890556004879055600586905560068590556008849055600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85169081179091556040516000907fdf1e840bea3b758df0b2119a3815ecb553e993c4f96ce378c1d8d92b8778fded908290a373ffffffffffffffffffffffffffffffffffffffff821615610bdc57610bdc82611dec565b8015610c0b57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b60095473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f20464f5242494444454e0000000000000000000000000000000000000000000060448201526064016108fd565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560405133907fdf1e840bea3b758df0b2119a3815ecb553e993c4f96ce378c1d8d92b8778fded90600090a350565b600082815260208190526040902060010154610d398133611f83565b610d438383612053565b505050565b6060610d54600d612143565b67ffffffffffffffff811115610d6c57610d6c61372b565b604051908082528060200260200182016040528015610d95578160200160208202803683370190505b50905060005b610da5600d612143565b811015610dfe57610db7600d8261214d565b828281518110610dc957610dc96136fc565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152610df781613665565b9050610d9b565b5090565b73ffffffffffffffffffffffffffffffffffffffff81163314610ea7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108fd565b6109118282612159565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600455565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610fe6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600355565b6000806002600154141561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108fd565b60026001556003544210156110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742044726f702074696d650000000000000000000000000000000000000060448201526064016108fd565b60055415806110dd57506005544211155b611143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742044726f702074696d650000000000000000000000000000000000000060448201526064016108fd565b6004544211806111595750611159600d33612210565b6111bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f44726f70207768697465206c6973742074696d6500000000000000000000000060448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff84161561120f576111e5848461223f565b915061120f3360095473ffffffffffffffffffffffffffffffffffffffff878116929116856127cb565b34156112745761123373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23461223f565b6009549091506112599073ffffffffffffffffffffffffffffffffffffffff16826128ad565b80341115611274576112743361126f83346135ed565b6128ad565b6001805590939092509050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b610911600d826129b7565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600655565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600855565b6060600c8054806020026020016040519081016040528092919081815260200182805480156114c357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611498575b5050505050905090565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60005b815181101561091157611593828281518110611586576115866136fc565b6020026020010151611281565b8061159d81613665565b915050611568565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661163d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b80610911336040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156116a757600080fd5b505afa1580156116bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116df9190613399565b73ffffffffffffffffffffffffffffffffffffffff841691906129d9565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60005b8151811015610911576117c38282815181106117b6576117b66136fc565b6020026020010151610869565b806117cd81613665565b915050611798565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661186d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600555565b60008281526020819052604090206001015461188e8133611f83565b610d438383612159565b600060035442101580156118ae57506004544211155b80156118c257506118c0600d83612210565b155b156118cf575060006109a8565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b6020908152604091829020825160e081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820181905260069092015460c0820152906119565760009150506109a8565b600061196f600754600654612a2f90919063ffffffff16565b905080611981576000925050506109a8565b606082015182516000916119959190612a2f565b9050806119a857600093505050506109a8565b6119b3600d86612210565b15806119c0575060045442115b80156119cf575060c083015115155b15611abf5760c0830151600090611a9890611a926305f5e100846370a08231335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b158015611a5457600080fd5b505afa158015611a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8c9190613399565b90612a3b565b90612a47565b9050818111611aa75780611aa9565b815b915081611abd5760009450505050506109a8565b505b80836040015111611ad4578260400151611ad6565b805b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60205260408120546008549293509091611b0d91612a2f565b9050828111611b1c5780611b1e565b825b925082611b325760009450505050506109a8565b60a0840151600090611b4c90611a92866305f5e100612a3b565b9050808311611b5b5782611b5d565b805b98975050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60405133904780156108fc02916000818181858888f19350505050158015611c2d573d6000803e3d6000fd5b50565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611cc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600b6020526040902080548614611cf9578581555b84816001015414611d0c57600181018590555b83816002015414611d1f57600281018490555b82816005015414611d3257600581018390555b81816006015414611d4557600681018290555b6040805187815260208101879052908101859052606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8816907fd6a94994bf20def57e38152684f72dd3215f37076c1bcc9286b7aafc207cbcf79060a00160405180910390a250505050505050565b600c8181548110611dc557600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff8116611f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108fd565b73ffffffffffffffffffffffffffffffffffffffff81163314611c2d57611f4f600033612159565b611c2d600082612a53565b6000611f7c8373ffffffffffffffffffffffffffffffffffffffff8416612a5d565b9392505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661091157611fd98173ffffffffffffffffffffffffffffffffffffffff166014612b50565b611fe4836020612b50565b604051602001611ff5929190613431565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108fd9160040161350c565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109115760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120e53390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109a8825490565b6000611f7c8383612d93565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156109115760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611f7c565b60008082116122aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e656564205f616d6f756e74203e20300000000000000000000000000000000060448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b60205260409020600581015461233a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f44726f70204e4f5420535550504f5254205448495320544f4b454e000000000060448201526064016108fd565b6000612353600754600654612a2f90919063ffffffff16565b9050806123bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f44726f702049532053544f50000000000000000000000000000000000000000060448201526064016108fd565b600382015482546000916123d09190612a2f565b905080612439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f546f6b656e2053544f500000000000000000000000000000000000000000000060448201526064016108fd565b6004544211801561244d5750600683015415155b8015612457575060005b156124f857600683015460009061247c90611a926305f5e100846370a08231336119f0565b905081811161248b578061248d565b815b9150816124f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f7420546f6b656e000000000000000000000000000000000000000000000060448201526064016108fd565b505b8083600201541161250d57826002015461250f565b805b336000908152600a6020526040812054600854929350909161253091612a2f565b905082811161253f5780612541565b825b9250826125aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f557365722053544f50000000000000000000000000000000000000000000000060448201526064016108fd565b8582116125b757816125b9565b855b955060006125dc6305f5e100611a9287600501548a612a3b90919063ffffffff16565b90508381111561260757506005840154839061260090611a92836305f5e100612a3b565b955061268c565b336000908152600a602052604090205487965061268c57846001015486101561268c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4d494e2044726f7020414d4f554e54000000000000000000000000000000000060448201526064016108fd565b6007546126999082612dbd565b60075560048501546126ab9082612dbd565b600486015560038501546126bf9087612dbd565b6003860155336000908152600a602052604090205461273357600c80546001810182556000919091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555b336000908152600a602052604090205461274d9082612dbd565b336000908152600a60205260409020556006546007541061276d57426005555b6040805187815260208101839052339173ffffffffffffffffffffffffffffffffffffffff8b16917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050505092915050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526128a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612dc9565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516128e49190613415565b60006040518083038185875af1925050503d8060008114612921576040519150601f19603f3d011682016040523d82523d6000602084013e612926565b606091505b5050905080610d43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201527f4c4544000000000000000000000000000000000000000000000000000000000060648201526084016108fd565b6000611f7c8373ffffffffffffffffffffffffffffffffffffffff8416612ed5565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d439084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612825565b6000611f7c82846135ed565b6000611f7c82846135b0565b6000611f7c8284613575565b6109118282612053565b60008181526001830160205260408120548015612b46576000612a816001836135ed565b8554909150600090612a95906001906135ed565b9050818114612afa576000866000018281548110612ab557612ab56136fc565b9060005260206000200154905080876000018481548110612ad857612ad86136fc565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612b0b57612b0b6136cd565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109a8565b60009150506109a8565b60606000612b5f8360026135b0565b612b6a90600261355d565b67ffffffffffffffff811115612b8257612b8261372b565b6040519080825280601f01601f191660200182016040528015612bac576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612be357612be36136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612c4657612c466136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612c828460026135b0565b612c8d90600161355d565b90505b6001811115612d2a577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612cce57612cce6136fc565b1a60f81b828281518110612ce457612ce46136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612d2381613630565b9050612c90565b508315611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108fd565b6000826000018281548110612daa57612daa6136fc565b9060005260206000200154905092915050565b6000611f7c828461355d565b6000612e2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f249092919063ffffffff16565b805190915015610d435780806020019051810190612e4991906132f9565b610d43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108fd565b6000818152600183016020526040812054612f1c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109a8565b5060006109a8565b6060612f338484600085612f3b565b949350505050565b606082471015612fcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108fd565b73ffffffffffffffffffffffffffffffffffffffff85163b61304b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108fd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516130749190613415565b60006040518083038185875af1925050503d80600081146130b1576040519150601f19603f3d011682016040523d82523d6000602084013e6130b6565b606091505b50915091506130c68282866130d1565b979650505050505050565b606083156130e0575081611f7c565b8251156130f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fd919061350c565b803573ffffffffffffffffffffffffffffffffffffffff8116811461314857600080fd5b919050565b60006020828403121561315f57600080fd5b611f7c82613124565b6000806040838503121561317b57600080fd5b61318483613124565b915061319260208401613124565b90509250929050565b600080604083850312156131ae57600080fd5b6131b783613124565b946020939093013593505050565b60008060008060008060c087890312156131de57600080fd5b6131e787613124565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000602080838503121561322257600080fd5b823567ffffffffffffffff8082111561323a57600080fd5b818501915085601f83011261324e57600080fd5b8135818111156132605761326061372b565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156132a3576132a361372b565b604052828152858101935084860182860187018a10156132c257600080fd5b600095505b838610156132ec576132d881613124565b8552600195909501949386019386016132c7565b5098975050505050505050565b60006020828403121561330b57600080fd5b81518015158114611f7c57600080fd5b60006020828403121561332d57600080fd5b5035919050565b6000806040838503121561334757600080fd5b8235915061319260208401613124565b60006020828403121561336957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611f7c57600080fd5b6000602082840312156133ab57600080fd5b5051919050565b600080600080600080600060e0888a0312156133cd57600080fd5b87359650602088013595506040880135945060608801359350608088013592506133f960a08901613124565b915061340760c08901613124565b905092959891949750929550565b60008251613427818460208701613604565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613469816017850160208801613604565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516134a6816028840160208801613604565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350057835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016134ce565b50909695505050505050565b602081526000825180602084015261352b816040850160208701613604565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156135705761357061369e565b500190565b6000826135ab577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135e8576135e861369e565b500290565b6000828210156135ff576135ff61369e565b500390565b60005b8381101561361f578181015183820152602001613607565b838111156128a75750506000910152565b60008161363f5761363f61369e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156136975761369761369e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220ac2553a6941052db582eb0c9b7cc1819522cab2530e4d2e71419591806735bc664736f6c63430008070033
Deployed Bytecode
0x6080604052600436106102bb5760003560e01c806391d148541161016e578063cbf78f47116100cb578063dc92f8f01161007f578063e798784a11610064578063e798784a14610809578063edf26d9b14610829578063f2fde38b1461084957600080fd5b8063dc92f8f0146107de578063e76437ea146107f357600080fd5b8063d547741f116100b0578063d547741f14610788578063d616a25c146107a8578063dabc417a146107be57600080fd5b8063cbf78f4714610753578063ccb98ffc1461076857600080fd5b8063ad5c464811610122578063b6b9d02e11610107578063b6b9d02e146106e6578063b8df6de014610706578063bf431a051461072657600080fd5b8063ad5c46481461069e578063b5587657146106c657600080fd5b8063a217fddf11610153578063a217fddf14610647578063a39fac121461065c578063aa779a531461067157600080fd5b806391d14854146105e057806398ff76f61461063157600080fd5b806336eda2e11161021c5780635d467a56116101d057806369848c2f116101b557806369848c2f1461050357806378e979251461059057806382bfefc8146105a657600080fd5b80635d467a56146104c3578063646e66de146104e357600080fd5b806347e7ef241161020157806347e7ef241461046357806347ee03941461048b57806356df04eb146104ab57600080fd5b806336eda2e1146104235780633e0a322d1461044357600080fd5b80632ad29cee116102735780633197cbb6116102585780633197cbb6146103cb5780633544a864146103e157806336568abe1461040357600080fd5b80632ad29cee1461038b5780632f2ff15d146103ab57600080fd5b80631f85d8bc116102a45780631f85d8bc1461031757806323ce6aed14610337578063248a9ca31461035b57600080fd5b806301bf6648146102c057806301ffc9a7146102e2575b600080fd5b3480156102cc57600080fd5b506102e06102db36600461314d565b610869565b005b3480156102ee57600080fd5b506103026102fd366004613357565b610915565b60405190151581526020015b60405180910390f35b34801561032357600080fd5b506102e06103323660046133b2565b6109ae565b34801561034357600080fd5b5061034d60065481565b60405190815260200161030e565b34801561036757600080fd5b5061034d61037636600461331b565b60009081526020819052604090206001015490565b34801561039757600080fd5b506102e06103a636600461314d565b610c15565b3480156103b757600080fd5b506102e06103c6366004613334565b610d1d565b3480156103d757600080fd5b5061034d60055481565b3480156103ed57600080fd5b506103f6610d48565b60405161030e91906134b2565b34801561040f57600080fd5b506102e061041e366004613334565b610e02565b34801561042f57600080fd5b506102e061043e36600461331b565b610eb1565b34801561044f57600080fd5b506102e061045e36600461331b565b610f4e565b61047661047136600461319b565b610feb565b6040805192835260208301919091520161030e565b34801561049757600080fd5b506102e06104a636600461314d565b611281565b3480156104b757600080fd5b5061034d6305f5e10081565b3480156104cf57600080fd5b506102e06104de36600461331b565b611324565b3480156104ef57600080fd5b506102e06104fe36600461331b565b6113c1565b34801561050f57600080fd5b5061055b61051e36600461314d565b600b602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290919087565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161030e565b34801561059c57600080fd5b5061034d60035481565b3480156105b257600080fd5b506105bb600081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030e565b3480156105ec57600080fd5b506103026105fb366004613334565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561063d57600080fd5b5061034d60075481565b34801561065357600080fd5b5061034d600081565b34801561066857600080fd5b506103f661145e565b34801561067d57600080fd5b5061034d61068c36600461314d565b600a6020526000908152604090205481565b3480156106aa57600080fd5b506105bb73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156106d257600080fd5b506102e06106e136600461320f565b6114cd565b3480156106f257600080fd5b506102e061070136600461314d565b6115a5565b34801561071257600080fd5b506102e061072136600461320f565b6116fd565b34801561073257600080fd5b506009546105bb9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561075f57600080fd5b50600c5461034d565b34801561077457600080fd5b506102e061078336600461331b565b6117d5565b34801561079457600080fd5b506102e06107a3366004613334565b611872565b3480156107b457600080fd5b5061034d60045481565b3480156107ca57600080fd5b5061034d6107d9366004613168565b611898565b3480156107ea57600080fd5b506102e0611b69565b3480156107ff57600080fd5b5061034d60085481565b34801561081557600080fd5b506102e06108243660046131c5565b611c30565b34801561083557600080fd5b506105bb61084436600461331b565b611db5565b34801561085557600080fd5b506102e061086436600461314d565b611dec565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b610911600d82611f5a565b5050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806109a857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600254610100900460ff166109c95760025460ff16156109cd565b303b155b610a59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108fd565b600254610100900460ff16158015610a9857600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60038890556004879055600586905560068590556008849055600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85169081179091556040516000907fdf1e840bea3b758df0b2119a3815ecb553e993c4f96ce378c1d8d92b8778fded908290a373ffffffffffffffffffffffffffffffffffffffff821615610bdc57610bdc82611dec565b8015610c0b57600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b60095473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610cac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f20464f5242494444454e0000000000000000000000000000000000000000000060448201526064016108fd565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915560405133907fdf1e840bea3b758df0b2119a3815ecb553e993c4f96ce378c1d8d92b8778fded90600090a350565b600082815260208190526040902060010154610d398133611f83565b610d438383612053565b505050565b6060610d54600d612143565b67ffffffffffffffff811115610d6c57610d6c61372b565b604051908082528060200260200182016040528015610d95578160200160208202803683370190505b50905060005b610da5600d612143565b811015610dfe57610db7600d8261214d565b828281518110610dc957610dc96136fc565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152610df781613665565b9050610d9b565b5090565b73ffffffffffffffffffffffffffffffffffffffff81163314610ea7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108fd565b6109118282612159565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610f49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600455565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610fe6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600355565b6000806002600154141561105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108fd565b60026001556003544210156110cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742044726f702074696d650000000000000000000000000000000000000060448201526064016108fd565b60055415806110dd57506005544211155b611143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f742044726f702074696d650000000000000000000000000000000000000060448201526064016108fd565b6004544211806111595750611159600d33612210565b6111bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f44726f70207768697465206c6973742074696d6500000000000000000000000060448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff84161561120f576111e5848461223f565b915061120f3360095473ffffffffffffffffffffffffffffffffffffffff878116929116856127cb565b34156112745761123373c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23461223f565b6009549091506112599073ffffffffffffffffffffffffffffffffffffffff16826128ad565b80341115611274576112743361126f83346135ed565b6128ad565b6001805590939092509050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b610911600d826129b7565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166113bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600655565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600855565b6060600c8054806020026020016040519081016040528092919081815260200182805480156114c357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611498575b5050505050905090565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60005b815181101561091157611593828281518110611586576115866136fc565b6020026020010151611281565b8061159d81613665565b915050611568565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661163d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b80610911336040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b1580156116a757600080fd5b505afa1580156116bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116df9190613399565b73ffffffffffffffffffffffffffffffffffffffff841691906129d9565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60005b8151811015610911576117c38282815181106117b6576117b66136fc565b6020026020010151610869565b806117cd81613665565b915050611798565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661186d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b600555565b60008281526020819052604090206001015461188e8133611f83565b610d438383612159565b600060035442101580156118ae57506004544211155b80156118c257506118c0600d83612210565b155b156118cf575060006109a8565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b6020908152604091829020825160e081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820181905260069092015460c0820152906119565760009150506109a8565b600061196f600754600654612a2f90919063ffffffff16565b905080611981576000925050506109a8565b606082015182516000916119959190612a2f565b9050806119a857600093505050506109a8565b6119b3600d86612210565b15806119c0575060045442115b80156119cf575060c083015115155b15611abf5760c0830151600090611a9890611a926305f5e100846370a08231335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff909116600482015260240160206040518083038186803b158015611a5457600080fd5b505afa158015611a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8c9190613399565b90612a3b565b90612a47565b9050818111611aa75780611aa9565b815b915081611abd5760009450505050506109a8565b505b80836040015111611ad4578260400151611ad6565b805b73ffffffffffffffffffffffffffffffffffffffff86166000908152600a60205260408120546008549293509091611b0d91612a2f565b9050828111611b1c5780611b1e565b825b925082611b325760009450505050506109a8565b60a0840151600090611b4c90611a92866305f5e100612a3b565b9050808311611b5b5782611b5d565b805b98975050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b60405133904780156108fc02916000818181858888f19350505050158015611c2d573d6000803e3d6000fd5b50565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611cc8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600b6020526040902080548614611cf9578581555b84816001015414611d0c57600181018590555b83816002015414611d1f57600281018490555b82816005015414611d3257600581018390555b81816006015414611d4557600681018290555b6040805187815260208101879052908101859052606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8816907fd6a94994bf20def57e38152684f72dd3215f37076c1bcc9286b7aafc207cbcf79060a00160405180910390a250505050505050565b600c8181548110611dc557600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff8116611f27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108fd565b73ffffffffffffffffffffffffffffffffffffffff81163314611c2d57611f4f600033612159565b611c2d600082612a53565b6000611f7c8373ffffffffffffffffffffffffffffffffffffffff8416612a5d565b9392505050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661091157611fd98173ffffffffffffffffffffffffffffffffffffffff166014612b50565b611fe4836020612b50565b604051602001611ff5929190613431565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108fd9160040161350c565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166109115760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556120e53390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006109a8825490565b6000611f7c8383612d93565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156109115760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526001830160205260408120541515611f7c565b60008082116122aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e656564205f616d6f756e74203e20300000000000000000000000000000000060448201526064016108fd565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b60205260409020600581015461233a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f44726f70204e4f5420535550504f5254205448495320544f4b454e000000000060448201526064016108fd565b6000612353600754600654612a2f90919063ffffffff16565b9050806123bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f44726f702049532053544f50000000000000000000000000000000000000000060448201526064016108fd565b600382015482546000916123d09190612a2f565b905080612439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f546f6b656e2053544f500000000000000000000000000000000000000000000060448201526064016108fd565b6004544211801561244d5750600683015415155b8015612457575060005b156124f857600683015460009061247c90611a926305f5e100846370a08231336119f0565b905081811161248b578061248d565b815b9150816124f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f7420546f6b656e000000000000000000000000000000000000000000000060448201526064016108fd565b505b8083600201541161250d57826002015461250f565b805b336000908152600a6020526040812054600854929350909161253091612a2f565b905082811161253f5780612541565b825b9250826125aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f557365722053544f50000000000000000000000000000000000000000000000060448201526064016108fd565b8582116125b757816125b9565b855b955060006125dc6305f5e100611a9287600501548a612a3b90919063ffffffff16565b90508381111561260757506005840154839061260090611a92836305f5e100612a3b565b955061268c565b336000908152600a602052604090205487965061268c57846001015486101561268c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4d494e2044726f7020414d4f554e54000000000000000000000000000000000060448201526064016108fd565b6007546126999082612dbd565b60075560048501546126ab9082612dbd565b600486015560038501546126bf9087612dbd565b6003860155336000908152600a602052604090205461273357600c80546001810182556000919091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555b336000908152600a602052604090205461274d9082612dbd565b336000908152600a60205260409020556006546007541061276d57426005555b6040805187815260208101839052339173ffffffffffffffffffffffffffffffffffffffff8b16917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050505092915050565b60405173ffffffffffffffffffffffffffffffffffffffff808516602483015283166044820152606481018290526128a79085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612dc9565b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516128e49190613415565b60006040518083038185875af1925050503d8060008114612921576040519150601f19603f3d011682016040523d82523d6000602084013e612926565b606091505b5050905080610d43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960448201527f4c4544000000000000000000000000000000000000000000000000000000000060648201526084016108fd565b6000611f7c8373ffffffffffffffffffffffffffffffffffffffff8416612ed5565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052610d439084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401612825565b6000611f7c82846135ed565b6000611f7c82846135b0565b6000611f7c8284613575565b6109118282612053565b60008181526001830160205260408120548015612b46576000612a816001836135ed565b8554909150600090612a95906001906135ed565b9050818114612afa576000866000018281548110612ab557612ab56136fc565b9060005260206000200154905080876000018481548110612ad857612ad86136fc565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612b0b57612b0b6136cd565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109a8565b60009150506109a8565b60606000612b5f8360026135b0565b612b6a90600261355d565b67ffffffffffffffff811115612b8257612b8261372b565b6040519080825280601f01601f191660200182016040528015612bac576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612be357612be36136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612c4657612c466136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000612c828460026135b0565b612c8d90600161355d565b90505b6001811115612d2a577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612cce57612cce6136fc565b1a60f81b828281518110612ce457612ce46136fc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93612d2381613630565b9050612c90565b508315611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108fd565b6000826000018281548110612daa57612daa6136fc565b9060005260206000200154905092915050565b6000611f7c828461355d565b6000612e2b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612f249092919063ffffffff16565b805190915015610d435780806020019051810190612e4991906132f9565b610d43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108fd565b6000818152600183016020526040812054612f1c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109a8565b5060006109a8565b6060612f338484600085612f3b565b949350505050565b606082471015612fcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108fd565b73ffffffffffffffffffffffffffffffffffffffff85163b61304b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108fd565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516130749190613415565b60006040518083038185875af1925050503d80600081146130b1576040519150601f19603f3d011682016040523d82523d6000602084013e6130b6565b606091505b50915091506130c68282866130d1565b979650505050505050565b606083156130e0575081611f7c565b8251156130f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fd919061350c565b803573ffffffffffffffffffffffffffffffffffffffff8116811461314857600080fd5b919050565b60006020828403121561315f57600080fd5b611f7c82613124565b6000806040838503121561317b57600080fd5b61318483613124565b915061319260208401613124565b90509250929050565b600080604083850312156131ae57600080fd5b6131b783613124565b946020939093013593505050565b60008060008060008060c087890312156131de57600080fd5b6131e787613124565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b6000602080838503121561322257600080fd5b823567ffffffffffffffff8082111561323a57600080fd5b818501915085601f83011261324e57600080fd5b8135818111156132605761326061372b565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811085821117156132a3576132a361372b565b604052828152858101935084860182860187018a10156132c257600080fd5b600095505b838610156132ec576132d881613124565b8552600195909501949386019386016132c7565b5098975050505050505050565b60006020828403121561330b57600080fd5b81518015158114611f7c57600080fd5b60006020828403121561332d57600080fd5b5035919050565b6000806040838503121561334757600080fd5b8235915061319260208401613124565b60006020828403121561336957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611f7c57600080fd5b6000602082840312156133ab57600080fd5b5051919050565b600080600080600080600060e0888a0312156133cd57600080fd5b87359650602088013595506040880135945060608801359350608088013592506133f960a08901613124565b915061340760c08901613124565b905092959891949750929550565b60008251613427818460208701613604565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613469816017850160208801613604565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516134a6816028840160208801613604565b01602801949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561350057835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016134ce565b50909695505050505050565b602081526000825180602084015261352b816040850160208701613604565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600082198211156135705761357061369e565b500190565b6000826135ab577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135e8576135e861369e565b500290565b6000828210156135ff576135ff61369e565b500390565b60005b8381101561361f578181015183820152602001613607565b838111156128a75750506000910152565b60008161363f5761363f61369e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156136975761369761369e565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220ac2553a6941052db582eb0c9b7cc1819522cab2530e4d2e71419591806735bc664736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.